aboutsummaryrefslogtreecommitdiff
path: root/src/mm-base-modem-at.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-06-28 12:06:51 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-06-28 15:07:34 +0200
commitc4d82aaf1e7cf10475204102533ac7784f83f0d3 (patch)
tree8b132bfb70e025b980004afb0c37b64539077b8c /src/mm-base-modem-at.c
parent7e3863897e73227a7de54db967fd95b40a8833d1 (diff)
base-modem,at: improve documentation on response processor methods
Diffstat (limited to 'src/mm-base-modem-at.c')
-rw-r--r--src/mm-base-modem-at.c68
1 files changed, 36 insertions, 32 deletions
diff --git a/src/mm-base-modem-at.c b/src/mm-base-modem-at.c
index 101c9549..94bd3956 100644
--- a/src/mm-base-modem-at.c
+++ b/src/mm-base-modem-at.c
@@ -355,16 +355,17 @@ mm_base_modem_at_sequence (MMBaseModem *self,
/* Response processor helpers */
gboolean
-mm_base_modem_response_processor_string (MMBaseModem *self,
- gpointer none,
- const gchar *command,
- const gchar *response,
- gboolean last_command,
- const GError *error,
- GVariant **result,
- GError **result_error)
+mm_base_modem_response_processor_string (MMBaseModem *self,
+ gpointer none,
+ const gchar *command,
+ const gchar *response,
+ gboolean last_command,
+ const GError *error,
+ GVariant **result,
+ GError **result_error)
{
if (error) {
+ /* Abort sequence on command error */
*result_error = g_error_copy (error);
return FALSE;
}
@@ -374,16 +375,17 @@ mm_base_modem_response_processor_string (MMBaseModem *self,
}
gboolean
-mm_base_modem_response_processor_no_result (MMBaseModem *self,
- gpointer none,
- const gchar *command,
- const gchar *response,
- gboolean last_command,
- const GError *error,
- GVariant **result,
- GError **result_error)
+mm_base_modem_response_processor_no_result (MMBaseModem *self,
+ gpointer none,
+ const gchar *command,
+ const gchar *response,
+ gboolean last_command,
+ const GError *error,
+ GVariant **result,
+ GError **result_error)
{
if (error) {
+ /* Abort sequence on command error */
*result_error = g_error_copy (error);
return FALSE;
}
@@ -393,16 +395,17 @@ mm_base_modem_response_processor_no_result (MMBaseModem *self,
}
gboolean
-mm_base_modem_response_processor_no_result_continue (MMBaseModem *self,
- gpointer none,
- const gchar *command,
- const gchar *response,
- gboolean last_command,
- const GError *error,
- GVariant **result,
- GError **result_error)
+mm_base_modem_response_processor_no_result_continue (MMBaseModem *self,
+ gpointer none,
+ const gchar *command,
+ const gchar *response,
+ gboolean last_command,
+ const GError *error,
+ GVariant **result,
+ GError **result_error)
{
if (error)
+ /* Abort sequence on command error */
*result_error = g_error_copy (error);
/* Return FALSE so that we keep on with the next steps in the sequence */
@@ -410,16 +413,17 @@ mm_base_modem_response_processor_no_result_continue (MMBaseModem *self,
}
gboolean
-mm_base_modem_response_processor_continue_on_error (MMBaseModem *self,
- gpointer none,
- const gchar *command,
- const gchar *response,
- gboolean last_command,
- const GError *error,
- GVariant **result,
- GError **result_error)
+mm_base_modem_response_processor_continue_on_error (MMBaseModem *self,
+ gpointer none,
+ const gchar *command,
+ const gchar *response,
+ gboolean last_command,
+ const GError *error,
+ GVariant **result,
+ GError **result_error)
{
if (error)
+ /* Ignore errors, continue to next command */
return FALSE;
*result = NULL;