GClueClient

GClueClient

Functions

Properties

gboolean active Read / Write
gchar * desktop-id Read / Write
guint distance-threshold Read / Write
gchar * location Read / Write
guint requested-accuracy-level Read / Write
guint time-threshold Read / Write

Signals

Object Hierarchy

    GInterface
    ╰── GClueClient

Description

Functions

gclue_client_interface_info ()

GDBusInterfaceInfo *
gclue_client_interface_info (void);

Gets a machine-readable description of the org.freedesktop.GeoClue2.Client D-Bus interface.

Returns

A GDBusInterfaceInfo. Do not free.

[transfer none]


gclue_client_override_properties ()

guint
gclue_client_override_properties (GObjectClass *klass,
                                  guint property_id_begin);

Overrides all GObject properties in the GClueClient interface for a concrete class. The properties are overridden in the order they are defined.

Parameters

klass

The class structure for a GObject derived class.

 

property_id_begin

The property id to assign to the first overridden property.

 

Returns

The last property id.


gclue_client_emit_location_updated ()

void
gclue_client_emit_location_updated (GClueClient *object,
                                    const gchar *arg_old,
                                    const gchar *arg_new);

Emits the "LocationUpdated" D-Bus signal.

Parameters

object

A GClueClient.

 

arg_old

Argument to pass with the signal.

 

arg_new

Argument to pass with the signal.

 

gclue_client_call_start ()

void
gclue_client_call_start (GClueClient *proxy,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);

Asynchronously invokes the Start() 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 gclue_client_call_start_finish() to get the result of the operation.

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

Parameters

proxy

A GClueClientProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

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

 

user_data

User data to pass to callback .

 

gclue_client_call_start_finish ()

gboolean
gclue_client_call_start_finish (GClueClient *proxy,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with gclue_client_call_start().

Parameters

proxy

A GClueClientProxy.

 

res

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

 

error

Return location for error or NULL.

 

Returns

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

[skip]


gclue_client_call_start_sync ()

gboolean
gclue_client_call_start_sync (GClueClient *proxy,
                              GCancellable *cancellable,
                              GError **error);

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

See gclue_client_call_start() for the asynchronous version of this method.

Parameters

proxy

A GClueClientProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 

Returns

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

[skip]


gclue_client_call_stop ()

void
gclue_client_call_stop (GClueClient *proxy,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

Asynchronously invokes the Stop() 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 gclue_client_call_stop_finish() to get the result of the operation.

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

Parameters

proxy

A GClueClientProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

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

 

user_data

User data to pass to callback .

 

gclue_client_call_stop_finish ()

gboolean
gclue_client_call_stop_finish (GClueClient *proxy,
                               GAsyncResult *res,
                               GError **error);

Finishes an operation started with gclue_client_call_stop().

Parameters

proxy

A GClueClientProxy.

 

res

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

 

error

Return location for error or NULL.

 

Returns

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

[skip]


gclue_client_call_stop_sync ()

gboolean
gclue_client_call_stop_sync (GClueClient *proxy,
                             GCancellable *cancellable,
                             GError **error);

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

See gclue_client_call_stop() for the asynchronous version of this method.

Parameters

proxy

A GClueClientProxy.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 

Returns

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

[skip]


gclue_client_get_location ()

const gchar *
gclue_client_get_location (GClueClient *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 gclue_client_dup_location() if on another thread.

[skip]

Parameters

object

A GClueClient.

 

Returns

The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

[transfer none]


gclue_client_dup_location ()

gchar *
gclue_client_dup_location (GClueClient *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 GClueClient.

 

Returns

The property value or NULL if the property is not set. The returned value should be freed with g_free().

[transfer full]


gclue_client_set_location ()

void
gclue_client_set_location (GClueClient *object,
                           const gchar *value);

Sets the "Location" D-Bus property to value .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

Parameters

object

A GClueClient.

 

value

The value to set.

 

gclue_client_get_distance_threshold ()

guint
gclue_client_get_distance_threshold (GClueClient *object);

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

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

[skip]

Parameters

object

A GClueClient.

 

Returns

The property value.


gclue_client_set_distance_threshold ()

void
gclue_client_set_distance_threshold (GClueClient *object,
                                     guint value);

Sets the "DistanceThreshold" D-Bus property to value .

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

[skip]

Parameters

object

A GClueClient.

 

value

The value to set.

 

gclue_client_get_desktop_id ()

const gchar *
gclue_client_get_desktop_id (GClueClient *object);

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

Since this D-Bus property is both readable and writable, 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 gclue_client_dup_desktop_id() if on another thread.

[skip]

Parameters

object

A GClueClient.

 

Returns

The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

[transfer none]


gclue_client_dup_desktop_id ()

gchar *
gclue_client_dup_desktop_id (GClueClient *object);

Gets a copy of the "DesktopId" D-Bus property.

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

[skip]

Parameters

object

A GClueClient.

 

Returns

The property value or NULL if the property is not set. The returned value should be freed with g_free().

[transfer full]


gclue_client_set_desktop_id ()

void
gclue_client_set_desktop_id (GClueClient *object,
                             const gchar *value);

Sets the "DesktopId" D-Bus property to value .

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

[skip]

Parameters

object

A GClueClient.

 

value

The value to set.

 

gclue_client_get_requested_accuracy_level ()

guint
gclue_client_get_requested_accuracy_level
                               (GClueClient *object);

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

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

[skip]

Parameters

object

A GClueClient.

 

Returns

The property value.


gclue_client_set_requested_accuracy_level ()

void
gclue_client_set_requested_accuracy_level
                               (GClueClient *object,
                                guint value);

Sets the "RequestedAccuracyLevel" D-Bus property to value .

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

[skip]

Parameters

object

A GClueClient.

 

value

The value to set.

 

gclue_client_get_active ()

gboolean
gclue_client_get_active (GClueClient *object);

Gets the value of the "Active" 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 GClueClient.

 

Returns

The property value.


gclue_client_set_active ()

void
gclue_client_set_active (GClueClient *object,
                         gboolean value);

Sets the "Active" D-Bus property to value .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

Parameters

object

A GClueClient.

 

value

The value to set.

 

Types and Values

Property Details

The “active” property

  “active”                   gboolean

Represents the D-Bus property "Active".

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


The “desktop-id” property

  “desktop-id”               gchar *

Represents the D-Bus property "DesktopId".

Since the D-Bus property for this GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.

Flags: Read / Write

Default value: NULL


The “distance-threshold” property

  “distance-threshold”       guint

Represents the D-Bus property "DistanceThreshold".

Since the D-Bus property for this GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.

Flags: Read / Write

Default value: 0


The “location” property

  “location”                 gchar *

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

Default value: NULL


The “requested-accuracy-level” property

  “requested-accuracy-level” guint

Represents the D-Bus property "RequestedAccuracyLevel".

Since the D-Bus property for this GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.

Flags: Read / Write

Default value: 0


The “time-threshold” property

  “time-threshold”           guint

Represents the D-Bus property "TimeThreshold".

Since the D-Bus property for this GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.

Flags: Read / Write

Default value: 0

Signal Details

The “handle-start” signal

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

Signal emitted when a remote caller is invoking the Start() 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 gclue_client_complete_start() 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 GClueClient.

 

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-stop” signal

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

Signal emitted when a remote caller is invoking the Stop() 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 gclue_client_complete_stop() 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 GClueClient.

 

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 “location-updated” signal

void
user_function (GClueClient *object,
               gchar       *arg_old,
               gchar       *arg_new,
               gpointer     user_data)

On the client-side, this signal is emitted whenever the D-Bus signal "LocationUpdated" 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.

Parameters

object

A GClueClient.

 

arg_old

Argument.

 

arg_new

Argument.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last