MmGdbusModemTime

## MmGdbusModemTime MmGdbusModemTime — Generated C code for the org.freedesktop.ModemManager1.Modem.Time D-Bus interface |

## Synopsis

                        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);

## Object Hierarchy

      GInterface
       +----MmGdbusModemTime

## Prerequisites

MmGdbusModemTime requires GObject.

## Known Implementations

MmGdbusModemTime is implemented by MMModemTime, MmGdbusModemTimeProxy and MmGdbusModemTimeSkeleton.

## Properties

      "network-timezone"         GVariant*             : Read / Write

## Signals

      "handle-get-network-time"                        : Run Last
      "network-time-changed"                           : Run Last

## Description

This section contains code for working with the org.freedesktop.ModemManager1.Modem.Time D-Bus interface in C.

## Details

### MmGdbusModemTime

    typedef struct _MmGdbusModemTime MmGdbusModemTime;

Abstract interface type for the D-Bus interface org.freedesktop.ModemManager1.Modem.Time.

### struct MmGdbusModemTimeIface

    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 `parent_iface`; | The parent interface.
`handle_get_network_time` () | Handler for the "handle-get-network-time" signal.
`get_network_timezone` () | Getter for the "network-timezone" property.
`network_time_changed` () | Handler for the "network-time-changed" signal.

### mm_gdbus_modem_time_get_network_timezone ()

    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.

### Warning

The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where `object` was constructed. Use `mm_gdbus_modem_time_dup_network_timezone()` if on another thread.

`object` : | 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]

### mm_gdbus_modem_time_dup_network_timezone ()

    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.

`object` : | 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]

### mm_gdbus_modem_time_call_get_network_time ()

    void                mm_gdbus_modem_time_call_get_network_time
                                                            (MmGdbusModemTime *proxy,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously invokes the `GetNetworkTime()` D-Bus method on `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` : | A MmGdbusModemTimeProxy.
`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_gdbus_modem_time_call_get_network_time_finish ()

    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` : | A MmGdbusModemTimeProxy.
`out_time` : | Return location for return parameter or `NULL` to ignore. [out]
`res` : | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_gdbus_modem_time_call_get_network_time()`.
`error` : | Return location for error or `NULL`.
Returns : | `TRUE` if the call succeded, `FALSE` if `error` is set. [skip]

### mm_gdbus_modem_time_call_get_network_time_sync ()

    gboolean            mm_gdbus_modem_time_call_get_network_time_sync
                                                            (MmGdbusModemTime *proxy,
                                                             gchar **out_time,
                                                             GCancellable *cancellable,
                                                             GError **error);

Synchronously invokes the `GetNetworkTime()` D-Bus method on `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` : | A MmGdbusModemTimeProxy.
`out_time` : | Return location for return parameter or `NULL` to ignore. [out]
`cancellable` : | A GCancellable or `NULL`. [allow-none]
`error` : | Return location for error or `NULL`.
Returns : | `TRUE` if the call succeded, `FALSE` if `error` is set. [skip]

## Property Details

### The `"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

## Signal Details

### The `"handle-get-network-time"` signal

    gboolean            user_function                      (MmGdbusModemTime      *object,
                                                            GDBusMethodInvocation *invocation,
                                                            gpointer               user_data)       : Run Last

Signal emitted when a remote caller is invoking the `GetNetworkTime()` D-Bus method.

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.

`object` : | A MmGdbusModemTime.
`invocation` : | A GDBusMethodInvocation.
`user_data` : | user data set when the signal handler was connected.
Returns : | `TRUE` if the invocation was handled, `FALSE` to let other signal handlers run.

### The `"network-time-changed"` signal

    void                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.

`object` : | A MmGdbusModemTime.
`arg_time` : | Argument.
`user_data` : | user data set when the signal handler was connected.