MmGdbusModemLocation: libmm-glib Reference Manual

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

## Functions

guint | mm_gdbus_modem_location_get_enabled ()
guint | mm_gdbus_modem_location_get_capabilities ()
gboolean | mm_gdbus_modem_location_get_signals_location ()
GVariant * | mm_gdbus_modem_location_get_location ()
GVariant * | mm_gdbus_modem_location_dup_location ()
void | mm_gdbus_modem_location_call_get_location ()
gboolean | mm_gdbus_modem_location_call_get_location_finish ()
gboolean | mm_gdbus_modem_location_call_get_location_sync ()
void | mm_gdbus_modem_location_call_setup ()
gboolean | mm_gdbus_modem_location_call_setup_finish ()
gboolean | mm_gdbus_modem_location_call_setup_sync ()

## Properties

guint | capabilities | Read / Write
guint | enabled | Read / Write
GVariant * | location | Read / Write
gboolean | signals-location | Read / Write

## Signals

gboolean | handle-get-location | Run Last
gboolean | handle-setup | Run Last

## Types and Values

| MmGdbusModemLocation
struct | MmGdbusModemLocationIface

## Object Hierarchy

        GInterface
        ╰── MmGdbusModemLocation

## Prerequisites

MmGdbusModemLocation requires GObject.

## Known Implementations

MmGdbusModemLocation is implemented by MMModemLocation, MmGdbusModemLocationProxy and MmGdbusModemLocationSkeleton.

## Description

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

## Functions

### mm_gdbus_modem_location_get_enabled ()

    guint
    mm_gdbus_modem_location_get_enabled (MmGdbusModemLocation *object);

Gets the value of the "Enabled" 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]

#### Parameters

object | A MmGdbusModemLocation. |

#### Returns

The property value.

### mm_gdbus_modem_location_get_capabilities ()

    guint
    mm_gdbus_modem_location_get_capabilities
                                   (MmGdbusModemLocation *object);

Gets the value of the "Capabilities" 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]

#### Parameters

object | A MmGdbusModemLocation. |

#### Returns

The property value.

### mm_gdbus_modem_location_get_signals_location ()

    gboolean
    mm_gdbus_modem_location_get_signals_location
                                   (MmGdbusModemLocation *object);

Gets the value of the "SignalsLocation" 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]

#### Parameters

object | A MmGdbusModemLocation. |

#### Returns

The property value.

### mm_gdbus_modem_location_get_location ()

    GVariant *
    mm_gdbus_modem_location_get_location (MmGdbusModemLocation *object);

Gets the value of the "Location" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

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_location_dup_location()` if on another thread.

[skip]

#### Parameters

object | A MmGdbusModemLocation. |

#### 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_location_dup_location ()

    GVariant *
    mm_gdbus_modem_location_dup_location (MmGdbusModemLocation *object);

Gets a copy of the "Location" 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]

#### Parameters

object | A MmGdbusModemLocation. |

#### 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_location_call_get_location ()

    void
    mm_gdbus_modem_location_call_get_location
                                   (MmGdbusModemLocation *proxy,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously invokes the `GetLocation()` 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_location_call_get_location_finish()` to get the result of the operation.

See `mm_gdbus_modem_location_call_get_location_sync()` for the synchronous, blocking version of this method.

#### Parameters

proxy | A MmGdbusModemLocationProxy. |
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_location_call_get_location_finish ()

    gboolean
    mm_gdbus_modem_location_call_get_location_finish
                                   (MmGdbusModemLocation *proxy,
                                    GVariant **out_Location,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `mm_gdbus_modem_location_call_get_location()`.

#### Parameters

proxy | A MmGdbusModemLocationProxy. |
out_Location | Return location for return parameter or `NULL` to ignore. | [out]
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_gdbus_modem_location_call_get_location()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

### mm_gdbus_modem_location_call_get_location_sync ()

    gboolean
    mm_gdbus_modem_location_call_get_location_sync
                                   (MmGdbusModemLocation *proxy,
                                    GVariant **out_Location,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously invokes the `GetLocation()` D-Bus method on `proxy` . The calling thread is blocked until a reply is received.

See `mm_gdbus_modem_location_call_get_location()` for the asynchronous version of this method.

#### Parameters

proxy | A MmGdbusModemLocationProxy. |
out_Location | 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]

### mm_gdbus_modem_location_call_setup ()

    void
    mm_gdbus_modem_location_call_setup (MmGdbusModemLocation *proxy,
                                        guint arg_sources,
                                        gboolean arg_signal_location,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

Asynchronously invokes the `Setup()` 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_location_call_setup_finish()` to get the result of the operation.

See `mm_gdbus_modem_location_call_setup_sync()` for the synchronous, blocking version of this method.

#### Parameters

proxy | A MmGdbusModemLocationProxy. |
arg_sources | Argument to pass with the method invocation. |
arg_signal_location | Argument to pass with the method invocation. |
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_location_call_setup_finish ()

    gboolean
    mm_gdbus_modem_location_call_setup_finish
                                   (MmGdbusModemLocation *proxy,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `mm_gdbus_modem_location_call_setup()`.

#### Parameters

proxy | A MmGdbusModemLocationProxy. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `mm_gdbus_modem_location_call_setup()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

### mm_gdbus_modem_location_call_setup_sync ()

    gboolean
    mm_gdbus_modem_location_call_setup_sync
                                   (MmGdbusModemLocation *proxy,
                                    guint arg_sources,
                                    gboolean arg_signal_location,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously invokes the `Setup()` D-Bus method on `proxy` . The calling thread is blocked until a reply is received.

See `mm_gdbus_modem_location_call_setup()` for the asynchronous version of this method.

#### Parameters

proxy | A MmGdbusModemLocationProxy. |
arg_sources | Argument to pass with the method invocation. |
arg_signal_location | Argument to pass with the method invocation. |
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]

## Types and Values

### MmGdbusModemLocation

    typedef struct _MmGdbusModemLocation MmGdbusModemLocation;

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

### struct MmGdbusModemLocationIface

    struct MmGdbusModemLocationIface {
      GTypeInterface parent_iface;

      gboolean (*handle_get_location) (
        MmGdbusModemLocation *object,
        GDBusMethodInvocation *invocation);

      gboolean (*handle_setup) (
        MmGdbusModemLocation *object,
        GDBusMethodInvocation *invocation,
        guint arg_sources,
        gboolean arg_signal_location);

      guint  (*get_capabilities) (MmGdbusModemLocation *object);

      guint  (*get_enabled) (MmGdbusModemLocation *object);

      GVariant * (*get_location) (MmGdbusModemLocation *object);

      gboolean  (*get_signals_location) (MmGdbusModemLocation *object);
    };

Virtual table for the D-Bus interface org.freedesktop.ModemManager1.Modem.Location.

#### Members

GTypeInterface `parent_iface`; | The parent interface. |
`handle_get_location` () | Handler for the “handle-get-location” signal. |
`handle_setup` () | Handler for the “handle-setup” signal. |
`get_capabilities` () | Getter for the “capabilities” property. |
`get_enabled` () | Getter for the “enabled” property. |
`get_location` () | Getter for the “location” property. |
`get_signals_location` () | Getter for the “signals-location” property. |

## Property Details

### The `“capabilities”` property

      “capabilities”             guint

Represents the D-Bus property "Capabilities".

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.

Flags: Read / Write

Default value: 0

### The `“enabled”` property

      “enabled”                  guint

Represents the D-Bus property "Enabled".

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.

Flags: Read / Write

Default value: 0

### The `“location”` property

      “location”                 GVariant *

Represents the D-Bus property "Location".

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.

Flags: Read / Write

Allowed values: GVariant<a{uv}>

Default value: NULL

### The `“signals-location”` property

      “signals-location”         gboolean

Represents the D-Bus property "SignalsLocation".

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.

Flags: Read / Write

Default value: FALSE

## Signal Details

### The `“handle-get-location”` signal

    gboolean
    user_function (MmGdbusModemLocation  *object,
                   GDBusMethodInvocation *invocation,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `GetLocation()` 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_location_complete_get_location()` 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.

#### Parameters

object | A MmGdbusModemLocation. |
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.

Flags: Run Last

### The `“handle-setup”` signal

    gboolean
    user_function (MmGdbusModemLocation  *object,
                   GDBusMethodInvocation *invocation,
                   guint                  arg_sources,
                   gboolean               arg_signal_location,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `Setup()` 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_location_complete_setup()` 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.

#### Parameters

object | A MmGdbusModemLocation. |
invocation | A GDBusMethodInvocation. |
arg_sources | Argument passed by remote caller. |
arg_signal_location | Argument passed by remote caller. |
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.

Flags: Run Last