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]


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]


mm_modem_time_peek_network_timezone ()

MMNetworkTimezone *
mm_modem_time_peek_network_timezone (MMModemTime *self);

Returns


mm_modem_time_get_network_timezone ()

MMNetworkTimezone *
mm_modem_time_get_network_timezone (MMModemTime *self);

Returns


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 .

 

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


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

Types and Values

struct MMModemTime

struct MMModemTime;

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