MMModemTime

MMModemTime — The Time interface

Functions

Types and Values

struct MMModemTime

Object Hierarchy

    GObject
    ╰── GDBusProxy
        ╰── MmGdbusModemTimeProxy
            ╰── MMModemTime

Implemented Interfaces

MMModemTime implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemTime.

Description

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.

Functions

mm_modem_time_get_path ()

const gchar *
mm_modem_time_get_path (MMModemTime *self);

Gets the DBus path of the MMObject which implements this interface.

Parameters

self

A MMModemTime.

 

Returns

The DBus path of the MMObject object.

[transfer none]

Since: 1.0


mm_modem_time_dup_path ()

gchar *
mm_modem_time_dup_path (MMModemTime *self);

Gets a copy of the DBus path of the MMObject object which implements this interface.

Parameters

self

A MMModemTime.

 

Returns

The DBus path of the MMObject. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_time_peek_network_timezone ()

MMNetworkTimezone *
mm_modem_time_peek_network_timezone (MMModemTime *self);

Gets the network timezone information.

The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use mm_modem_time_get_network_timezone() if on another thread.

Parameters

self

A MMModemTime.

 

Returns

A MMNetworkTimezone. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_time_get_network_timezone ()

MMNetworkTimezone *
mm_modem_time_get_network_timezone (MMModemTime *self);

Gets the network timezone information.

The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call mm_modem_time_get_network_timezone() again to get a new MMNetworkTimezone with the new values.

Parameters

self

A MMModemTime.

 

Returns

A MMNetworkTimezone that must be freed with g_object_unref() or NULL if unknown.

[transfer full]

Since: 1.0


mm_modem_time_get_network_time ()

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.

Parameters

self

A MMModemTime.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

Since: 1.0


mm_modem_time_get_network_time_finish ()

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().

Parameters

self

A MMModemTime.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_enable().

 

error

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().

[transfer full]

Since: 1.0


mm_modem_time_get_network_time_sync ()

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.

Parameters

self

A MMModemTime.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

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().

[transfer full]

Since: 1.0

Types and Values

struct MMModemTime

struct MMModemTime;

The MMModemTime structure contains private data and should only be accessed using the provided API.