libmm-glib Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
struct MMModemTime; const gchar * mm_modem_time_get_path (MMModemTime *self
); gchar * mm_modem_time_dup_path (MMModemTime *self
); MMNetworkTimezone * mm_modem_time_peek_network_timezone (MMModemTime *self
); MMNetworkTimezone * mm_modem_time_get_network_timezone (MMModemTime *self
); void mm_modem_time_get_network_time (MMModemTime *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gchar * mm_modem_time_get_network_time_finish (MMModemTime *self
,GAsyncResult *res
,GError **error
); gchar * mm_modem_time_get_network_time_sync (MMModemTime *self
,GCancellable *cancellable
,GError **error
);
MMModemTime implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemTime.
The MMModemTime is an object providing access to the methods, signals and properties of the Time interface.
The Time interface is exposed on modems which support network time retrieval.
struct MMModemTime;
The MMModemTime structure contains private data and should only be accessed using the provided API.
const gchar * mm_modem_time_get_path (MMModemTime *self
);
Gets the DBus path of the MMObject which implements this interface.
|
A MMModemTime. |
Returns : |
The DBus path of the MMObject object. [transfer none] |
gchar * mm_modem_time_dup_path (MMModemTime *self
);
Gets a copy of the DBus path of the MMObject object which implements this interface.
|
A MMModemTime. |
Returns : |
The DBus path of the MMObject. The returned value should be freed with g_free() . [transfer full]
|
MMNetworkTimezone * mm_modem_time_peek_network_timezone (MMModemTime *self
);
MMNetworkTimezone * mm_modem_time_get_network_timezone (MMModemTime *self
);
void mm_modem_time_get_network_time (MMModemTime *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously requests the current network time.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call mm_modem_time_get_network_time_finish()
to get the result of the operation.
See mm_modem_time_get_network_time_sync()
for the synchronous, blocking version of this method.
|
A MMModemTime. |
|
A GCancellable or NULL . [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL . |
|
User data to pass to callback . |
gchar * mm_modem_time_get_network_time_finish (MMModemTime *self
,GAsyncResult *res
,GError **error
);
Finishes an operation started with mm_modem_time_get_network_time()
.
|
A MMModemTime. |
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_enable() . |
|
Return location for error or NULL . |
Returns : |
A string containing the network time, or NULL if error is set. The returned value should be freed with g_free() . |
gchar * mm_modem_time_get_network_time_sync (MMModemTime *self
,GCancellable *cancellable
,GError **error
);
Synchronously requests the current network time.
The calling thread is blocked until a reply is received. See mm_modem_time_get_network_time()
for the asynchronous version of this method.
|
A MMModemTime. |
|
A GCancellable or NULL . [allow-none]
|
|
Return location for error or NULL . |
Returns : |
A string containing the network time, or NULL if error is set. The returned value should be freed with g_free() . |