Top |
MmGdbusModemTimeMmGdbusModemTime — Generated C code for the org.freedesktop.ModemManager1.Modem.Time D-Bus interface |
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.
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.[skip]
The property value or NULL
if the property is not set. Do not free the returned value, it belongs to object
.
[transfer none][nullable]
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.
[skip]
The property value or NULL
if the property is not set. The returned value should be freed with g_variant_unref()
.
[transfer full][nullable]
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.
proxy |
||
cancellable |
A GCancellable or |
[nullable] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
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()
.
proxy |
||
out_time |
Return location for return parameter or |
[out][optional] |
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
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.
proxy |
||
out_time |
Return location for return parameter or |
[out][optional] |
cancellable |
A GCancellable or |
[nullable] |
error |
Return location for error or |
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. |
“network-timezone”
property“network-timezone” GVariant *
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.
Owner: MmGdbusModemTime
Flags: Read / Write
Allowed values: GVariant<a{sv}>
Default value: NULL
“handle-get-network-time”
signalgboolean user_function (MmGdbusModemTime *object, GDBusMethodInvocation *invocation, gpointer user_data)
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.
Flags: Run Last
“network-time-changed”
signalvoid user_function (MmGdbusModemTime *object, gchar *arg_time, gpointer user_data)
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.
Flags: Run Last