diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-05 18:11:18 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 14:53:21 +0100 |
commit | a339546c4547e0950d8dc8aa1d22aafc8969fac9 (patch) | |
tree | d64ccd502f8a60cd8abdaf33c6d2a5dc389de81b /src/mm-iface-modem-time.h | |
parent | 5b01df5baa796d6a1ddec4e57c18a1c742f870f4 (diff) |
iface-modem-time: setup generic unsolicited message handling
Modems may get notified via unsolicited messages (either AT or QMI or some
other thing), that the network time was updated. This setup allows subclasses
implementing the Time interface to setup/cleanup and enable/disable the
unsolicited messages, as well as notify about the network time updates.
Diffstat (limited to 'src/mm-iface-modem-time.h')
-rw-r--r-- | src/mm-iface-modem-time.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mm-iface-modem-time.h b/src/mm-iface-modem-time.h index 5e312ef7..1d517fdc 100644 --- a/src/mm-iface-modem-time.h +++ b/src/mm-iface-modem-time.h @@ -56,6 +56,38 @@ struct _MMIfaceModemTime { MMNetworkTimezone * (* load_network_timezone_finish) (MMIfaceModemTime *self, GAsyncResult *res, GError **error); + + /* Asynchronous setting up unsolicited events */ + void (*setup_unsolicited_events) (MMIfaceModemTime *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*setup_unsolicited_events_finish) (MMIfaceModemTime *self, + GAsyncResult *res, + GError **error); + + /* Asynchronous cleaning up of unsolicited events */ + void (*cleanup_unsolicited_events) (MMIfaceModemTime *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*cleanup_unsolicited_events_finish) (MMIfaceModemTime *self, + GAsyncResult *res, + GError **error); + + /* Asynchronous enabling unsolicited events */ + void (* enable_unsolicited_events) (MMIfaceModemTime *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* enable_unsolicited_events_finish) (MMIfaceModemTime *self, + GAsyncResult *res, + GError **error); + + /* Asynchronous disabling unsolicited events */ + void (* disable_unsolicited_events) (MMIfaceModemTime *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* disable_unsolicited_events_finish) (MMIfaceModemTime *self, + GAsyncResult *res, + GError **error); }; GType mm_iface_modem_time_get_type (void); @@ -91,4 +123,9 @@ void mm_iface_modem_time_shutdown (MMIfaceModemTime *self); void mm_iface_modem_time_bind_simple_status (MMIfaceModemTime *self, MMSimpleStatus *status); +/* Implementations of the unsolicited events handling should call this method + * to notify about the updated time */ +void mm_iface_modem_time_update_network_time (MMIfaceModemTime *self, + const gchar *network_time); + #endif /* MM_IFACE_MODEM_TIME_H */ |