diff options
Diffstat (limited to 'src/mm-generic-cdma.h')
-rw-r--r-- | src/mm-generic-cdma.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mm-generic-cdma.h b/src/mm-generic-cdma.h index 4fbb416a..e4f9e57e 100644 --- a/src/mm-generic-cdma.h +++ b/src/mm-generic-cdma.h @@ -42,7 +42,27 @@ typedef struct { typedef struct { MMModemBaseClass parent; + /* Subclasses should implement this function if they can more accurately + * determine the registration state and/or roaming status than the base + * class can (by using manufacturer custom AT commands or whatever). + * The base class passes its detected registration state in the + * cur_cdma_state and cur_evdo_state arguments, which the subclass should + * override if necessary before passing to the callback. + * + * Subclasses can use the helper functions + * mm_generic_cdma_query_reg_state_callback_info_new(), + * mm_generic_cdma_query_reg_state_set_callback_1x_state(), and + * mm_generic_cdma_query_reg_state_set_callback_evdo_state() to create the + * MMCallbackInfo object and to set the registration state which is passed + * to the callback when the subclass' registration query completes. + * + * Subclasses should generally not return parsing or other non-critical + * errors to the callback since that fails the entire registration check, + * rendering the superclass' checks useless. + */ void (*query_registration_state) (MMGenericCdma *self, + MMModemCdmaRegistrationState cur_cdma_state, + MMModemCdmaRegistrationState cur_evdo_state, MMModemCdmaRegistrationStateFn callback, gpointer user_data); @@ -100,12 +120,18 @@ MMModemCdmaRegistrationState mm_generic_cdma_evdo_get_registration_state_sync (M /* query_registration_state class function helpers */ MMCallbackInfo *mm_generic_cdma_query_reg_state_callback_info_new (MMGenericCdma *self, + MMModemCdmaRegistrationState cur_cdma_state, + MMModemCdmaRegistrationState cur_evdo_state, MMModemCdmaRegistrationStateFn callback, gpointer user_data); +MMModemCdmaRegistrationState mm_generic_cdma_query_reg_state_get_callback_1x_state (MMCallbackInfo *info); + void mm_generic_cdma_query_reg_state_set_callback_1x_state (MMCallbackInfo *info, MMModemCdmaRegistrationState new_state); +MMModemCdmaRegistrationState mm_generic_cdma_query_reg_state_get_callback_evdo_state (MMCallbackInfo *info); + void mm_generic_cdma_query_reg_state_set_callback_evdo_state (MMCallbackInfo *info, MMModemCdmaRegistrationState new_state); |