aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-3gpp.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-08-06 11:58:42 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-08-06 20:17:00 +0200
commit278842108c2cc1cb887f1afedfbf6cfd4a91d26a (patch)
tree6860c40a58da8e2e007918cc47d2674c7e8cf3ba /src/mm-iface-modem-3gpp.h
parent01bb5cd6601a2eb47af002579af7978bf503976d (diff)
iface-modem-3gpp: refactor registration sequences
Once upon a time it was a good idea to have separate steps for CS and PS related actions, so that plugins could override specific steps with a great detail. That idea turned out to be not very useful, as the only case which requires custom CS/PS registration actions is the QMI-enabled modem, and that one has commands to act on both registration actions at the same time. So, we now consolidate all steps, so that the implementation of the interface needs to provide all the logic to setup/enable/disable/cleanup/check registrations in each mode. Also, we consolidate how the unsolicited registration messages are handled, so that it's equivalent to other unsolicited messages: * 'Setup' will configure ports to process the unsolicited messages. * 'Enable' will tell the modem to send unsolicited messages. * 'Disable' will tell the modem not to send unsolicited messages. * 'Cleanup will configure ports to ignore the unsolicited messages.
Diffstat (limited to 'src/mm-iface-modem-3gpp.h')
-rw-r--r--src/mm-iface-modem-3gpp.h113
1 files changed, 46 insertions, 67 deletions
diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h
index 12dc8bda..c0fe03d0 100644
--- a/src/mm-iface-modem-3gpp.h
+++ b/src/mm-iface-modem-3gpp.h
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details:
*
- * Copyright (C) 2011 Google, Inc.
+ * Copyright (C) 2011-2012 Google, Inc.
*/
#ifndef MM_IFACE_MODEM_3GPP_H
@@ -99,73 +99,52 @@ struct _MMIfaceModem3gpp {
GError **error);
/* Setup unsolicited registration messages */
- void (* setup_unsolicited_registration) (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*setup_unsolicited_registration_finish) (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
+ void (* setup_unsolicited_registration_events) (MMIfaceModem3gpp *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (*setup_unsolicited_registration_events_finish) (MMIfaceModem3gpp *self,
+ GAsyncResult *res,
+ GError **error);
+
+ /* Asynchronous enabling of unsolicited registration events */
+ void (*enable_unsolicited_registration_events) (MMIfaceModem3gpp *self,
+ gboolean cs_supported,
+ gboolean ps_supported,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (*enable_unsolicited_registration_events_finish) (MMIfaceModem3gpp *self,
+ GAsyncResult *res,
+ GError **error);
/* Cleanup unsolicited registration messages */
- void (* cleanup_unsolicited_registration) (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*cleanup_unsolicited_registration_finish) (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
-
- /* Setup CS Registration */
- void (* setup_cs_registration) (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*setup_cs_registration_finish) (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
-
- /* Cleanup CS Registration */
- void (* cleanup_cs_registration) (MMIfaceModem3gpp *self,
+ void (* cleanup_unsolicited_registration_events) (MMIfaceModem3gpp *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (*cleanup_unsolicited_registration_events_finish) (MMIfaceModem3gpp *self,
+ GAsyncResult *res,
+ GError **error);
+ /* Asynchronous disabling of unsolicited registration events */
+ void (*disable_unsolicited_registration_events) (MMIfaceModem3gpp *self,
+ gboolean cs_supported,
+ gboolean ps_supported,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (*disable_unsolicited_registration_events_finish) (MMIfaceModem3gpp *self,
+ GAsyncResult *res,
+ GError **error);
+
+ /* Run CS/PS registration state checks..
+ * Note that no registration state is returned, implementations should call
+ * mm_iface_modem_3gpp_update_registration_state(). */
+ void (* run_registration_checks) (MMIfaceModem3gpp *self,
+ gboolean cs_supported,
+ gboolean ps_supported,
GAsyncReadyCallback callback,
gpointer user_data);
- gboolean (*cleanup_cs_registration_finish) (MMIfaceModem3gpp *self,
+ gboolean (*run_registration_checks_finish) (MMIfaceModem3gpp *self,
GAsyncResult *res,
GError **error);
- /* Setup PS Registration */
- void (* setup_ps_registration) (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*setup_ps_registration_finish) (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
-
- /* Cleanup PS Registration */
- void (* cleanup_ps_registration) (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*cleanup_ps_registration_finish) (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
-
- /* Run CS registration state check.
- * Note that no registration state is returned, implementations should call
- * mm_iface_modem_3gpp_update_registration_state(). */
- void (* run_cs_registration_check) (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*run_cs_registration_check_finish) (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
-
- /* Run PS registration state check.
- * Note that no registration state is returned, implementations should call
- * mm_iface_modem_3gpp_update_registration_state(). */
- void (* run_ps_registration_check) (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*run_ps_registration_check_finish) (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
-
/* Try to register in the network */
void (* register_in_network) (MMIfaceModem3gpp *self,
const gchar *operator_id,
@@ -247,12 +226,12 @@ void mm_iface_modem_3gpp_update_ps_registration_state (MMIfaceModem3gpp *self,
gulong cell_id);
/* Run all registration checks */
-void mm_iface_modem_3gpp_run_all_registration_checks (MMIfaceModem3gpp *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
-gboolean mm_iface_modem_3gpp_run_all_registration_checks_finish (MMIfaceModem3gpp *self,
- GAsyncResult *res,
- GError **error);
+void mm_iface_modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_iface_modem_3gpp_run_registration_checks_finish (MMIfaceModem3gpp *self,
+ GAsyncResult *res,
+ GError **error);
/* Request to reload current operator */
void mm_iface_modem_3gpp_reload_current_operator (MMIfaceModem3gpp *self);