| libmm-glib Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties | Signals | ||||
MmGdbusModemTimeMmGdbusModemTime — Generated C code for the org.freedesktop.ModemManager1.Modem.Time D-Bus interface |
MmGdbusModemTime; struct MmGdbusModemTimeIface; GVariant * mm_gdbus_modem_time_get_network_timezone (MmGdbusModemTime *object); GVariant * mm_gdbus_modem_time_dup_network_timezone (MmGdbusModemTime *object); void mm_gdbus_modem_time_call_get_network_time (MmGdbusModemTime *proxy,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean mm_gdbus_modem_time_call_get_network_time_finish (MmGdbusModemTime *proxy,gchar **out_time,GAsyncResult *res,GError **error); gboolean mm_gdbus_modem_time_call_get_network_time_sync (MmGdbusModemTime *proxy,gchar **out_time,GCancellable *cancellable,GError **error);
MmGdbusModemTime is implemented by MMModemTime, MmGdbusModemTimeProxy and MmGdbusModemTimeSkeleton.
This section contains code for working with the org.freedesktop.ModemManager1.Modem.Time D-Bus interface in C.
typedef struct _MmGdbusModemTime MmGdbusModemTime;
Abstract interface type for the D-Bus interface org.freedesktop.ModemManager1.Modem.Time.
struct MmGdbusModemTimeIface {
GTypeInterface parent_iface;
gboolean (*handle_get_network_time) (
MmGdbusModemTime *object,
GDBusMethodInvocation *invocation);
GVariant * (*get_network_timezone) (MmGdbusModemTime *object);
void (*network_time_changed) (
MmGdbusModemTime *object,
const gchar *arg_time);
};
Virtual table for the D-Bus interface org.freedesktop.ModemManager1.Modem.Time.
GTypeInterface |
The parent interface. |
| Handler for the "handle-get-network-time" signal. | |
| Getter for the "network-timezone" property. | |
| Handler for the "network-time-changed" signal. |
GVariant * mm_gdbus_modem_time_get_network_timezone
(MmGdbusModemTime *object);
Gets the value of the "NetworkTimezone" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
object was constructed. Use mm_gdbus_modem_time_dup_network_timezone() if on another thread.
|
A MmGdbusModemTime. |
Returns : |
The property value or NULL if the property is not set. Do not free the returned value, it belongs to object. [transfer none]
|
GVariant * mm_gdbus_modem_time_dup_network_timezone
(MmGdbusModemTime *object);
Gets a copy of the "NetworkTimezone" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
|
A MmGdbusModemTime. |
Returns : |
The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref(). [transfer full]
|
void mm_gdbus_modem_time_call_get_network_time (MmGdbusModemTime *proxy,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously invokes the GetNetworkTime()proxy.
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_gdbus_modem_time_call_get_network_time_finish() to get the result of the operation.
See mm_gdbus_modem_time_call_get_network_time_sync() for the synchronous, blocking version of this method.
|
A MmGdbusModemTimeProxy. |
|
A GCancellable or NULL. [allow-none]
|
|
A GAsyncReadyCallback to call when the request is satisfied or NULL. |
|
User data to pass to callback. |
gboolean mm_gdbus_modem_time_call_get_network_time_finish (MmGdbusModemTime *proxy,gchar **out_time,GAsyncResult *res,GError **error);
Finishes an operation started with mm_gdbus_modem_time_call_get_network_time().
|
A MmGdbusModemTimeProxy. |
|
Return location for return parameter or NULL to ignore. [out]
|
|
The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_gdbus_modem_time_call_get_network_time(). |
|
Return location for error or NULL. |
Returns : |
TRUE if the call succeded, FALSE if error is set. [skip]
|
gboolean mm_gdbus_modem_time_call_get_network_time_sync (MmGdbusModemTime *proxy,gchar **out_time,GCancellable *cancellable,GError **error);
Synchronously invokes the GetNetworkTime()proxy. The calling thread is blocked until a reply is received.
See mm_gdbus_modem_time_call_get_network_time() for the asynchronous version of this method.
|
A MmGdbusModemTimeProxy. |
|
Return location for return parameter or NULL to ignore. [out]
|
|
A GCancellable or NULL. [allow-none]
|
|
Return location for error or NULL. |
Returns : |
TRUE if the call succeded, FALSE if error is set. [skip]
|
"network-timezone" property"network-timezone" GVariant* : Read / Write
Represents the D-Bus property "NetworkTimezone".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Allowed values: GVariant<a{sv}>
Default value: NULL
"handle-get-network-time" signalgboolean user_function (MmGdbusModemTime *object,
GDBusMethodInvocation *invocation,
gpointer user_data) : Run Last
Signal emitted when a remote caller is invoking the GetNetworkTime()
If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_time_complete_get_network_time() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
|
A MmGdbusModemTime. |
|
A GDBusMethodInvocation. |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the invocation was handled, FALSE to let other signal handlers run. |
"network-time-changed" signalvoid user_function (MmGdbusModemTime *object,
gchar *arg_time,
gpointer user_data) : Run Last
On the client-side, this signal is emitted whenever the D-Bus signal "NetworkTimeChanged" is received.
On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
|
A MmGdbusModemTime. |
|
Argument. |
|
user data set when the signal handler was connected. |