Package ch.bailu.gtk.geoclue
Class Client
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.Interface
ch.bailu.gtk.geoclue.Client
- All Implemented Interfaces:
PointerInterface
Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page">org.freedesktop.GeoClue2.Client</link>.
https://www.freedesktop.org/software/geoclue/docs/libgeoclue/
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
callStart
(Cancellable cancellable, Client.OnAsyncReadyCallback callback, Pointer user_data) Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on @proxy.boolean
Finishes an operation started with gclue_client_call_start().boolean
callStartSync
(Cancellable cancellable) Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method on @proxy.void
callStop
(Cancellable cancellable, Client.OnAsyncReadyCallback callback, Pointer user_data) Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on @proxy.boolean
Finishes an operation started with gclue_client_call_stop().boolean
callStopSync
(Cancellable cancellable) Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method on @proxy.void
completeStart
(DBusMethodInvocation invocation) Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method.void
completeStop
(DBusMethodInvocation invocation) Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method.Gets a copy of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> D-Bus property.Gets a copy of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> D-Bus property.void
emitLocationUpdated
(Str arg_old, Str arg_new) Emits the <link linkend="gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated">"LocationUpdated"</link> D-Bus signal.void
emitLocationUpdated
(String arg_old, String arg_new) Emits the <link linkend="gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated">"LocationUpdated"</link> D-Bus signal.boolean
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Active">"Active"</link> D-Bus property.static ClassHandler
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> D-Bus property.int
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link> D-Bus property.static int
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> D-Bus property.static long
static TypeSystem.TypeSize
int
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link> D-Bus property.int
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link> D-Bus property.static long
static TypeSystem.TypeSize
static DBusInterfaceInfo
Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page">org.freedesktop.GeoClue2.Client</link> D-Bus interface.onHandleStart
(Client.OnHandleStart signal) Connect to signal "handle-start".onHandleStop
(Client.OnHandleStop signal) Connect to signal "handle-stop".Connect to signal "location-updated".static int
overrideProperties
(ObjectClass klass, int property_id_begin) Overrides all #GObject properties in the #GClueClient interface for a concrete class.void
setActive
(boolean value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Active">"Active"</link> D-Bus property to @value.void
setDesktopId
(Str value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> D-Bus property to @value.void
setDesktopId
(String value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> D-Bus property to @value.void
setDistanceThreshold
(int value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link> D-Bus property to @value.void
setLocation
(Str value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> D-Bus property to @value.void
setLocation
(String value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> D-Bus property to @value.void
setRequestedAccuracyLevel
(int value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link> D-Bus property to @value.void
setTimeThreshold
(int value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link> D-Bus property to @value.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_HANDLE_START
- See Also:
-
SIGNAL_ON_HANDLE_STOP
- See Also:
-
SIGNAL_ON_LOCATION_UPDATED
- See Also:
-
-
Constructor Details
-
Client
-
-
Method Details
-
getClassHandler
-
callStart
public void callStart(@Nullable Cancellable cancellable, Client.OnAsyncReadyCallback callback, @Nullable Pointer user_data) Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> 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 (see g_main_context_push_thread_default()).
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:
cancellable
- A #GCancellable or %NULL.callback
- A #GAsyncReadyCallback to call when the request is satisfied or %NULL.user_data
- User data to pass to @callback.
-
callStartFinish
Finishes an operation started with gclue_client_call_start().- Parameters:
res
- The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_start().- Returns:
- %TRUE if the call succeeded, %FALSE if @error is set.
- Throws:
AllocationError
-
callStartSync
Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> 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:
cancellable
- A #GCancellable or %NULL.- Returns:
- %TRUE if the call succeeded, %FALSE if @error is set.
- Throws:
AllocationError
-
callStop
public void callStop(@Nullable Cancellable cancellable, Client.OnAsyncReadyCallback callback, @Nullable Pointer user_data) Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> 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 (see g_main_context_push_thread_default()).
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:
cancellable
- A #GCancellable or %NULL.callback
- A #GAsyncReadyCallback to call when the request is satisfied or %NULL.user_data
- User data to pass to @callback.
-
callStopFinish
Finishes an operation started with gclue_client_call_stop().- Parameters:
res
- The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gclue_client_call_stop().- Returns:
- %TRUE if the call succeeded, %FALSE if @error is set.
- Throws:
AllocationError
-
callStopSync
Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> 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:
cancellable
- A #GCancellable or %NULL.- Returns:
- %TRUE if the call succeeded, %FALSE if @error is set.
- Throws:
AllocationError
-
completeStart
Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Start">Start()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
This method will free @invocation, you cannot use it afterwards.- Parameters:
invocation
- A #GDBusMethodInvocation.
-
completeStop
Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-GeoClue2-Client.Stop">Stop()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
This method will free @invocation, you cannot use it afterwards.- Parameters:
invocation
- A #GDBusMethodInvocation.
-
dupDesktopId
Gets a copy of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> 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.- Returns:
- The property value or %NULL if the property is not set. The returned value should be freed with g_free().
-
dupLocation
Gets a copy of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.- Returns:
- The property value or %NULL if the property is not set. The returned value should be freed with g_free().
-
emitLocationUpdated
Emits the <link linkend="gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated">"LocationUpdated"</link> D-Bus signal.- Parameters:
arg_old
- Argument to pass with the signal.arg_new
- Argument to pass with the signal.
-
emitLocationUpdated
Emits the <link linkend="gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated">"LocationUpdated"</link> D-Bus signal.- Parameters:
arg_old
- Argument to pass with the signal.arg_new
- Argument to pass with the signal.
-
getActive
public boolean getActive()Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Active">"Active"</link> D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.- Returns:
- The property value.
-
getDesktopId
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> 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.- Returns:
- The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
-
getDistanceThreshold
public int getDistanceThreshold()Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link> 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.- Returns:
- The property value.
-
getLocation
Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> 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.- Returns:
- The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
-
getRequestedAccuracyLevel
public int getRequestedAccuracyLevel()Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link> 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.- Returns:
- The property value.
-
getTimeThreshold
public int getTimeThreshold()Gets the value of the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link> 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.- Returns:
- The property value.
-
setActive
public void setActive(boolean value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Active">"Active"</link> 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.- Parameters:
value
- The value to set.
-
setDesktopId
Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> 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.- Parameters:
value
- The value to set.
-
setDesktopId
Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId">"DesktopId"</link> 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.- Parameters:
value
- The value to set.
-
setDistanceThreshold
public void setDistanceThreshold(int value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold">"DistanceThreshold"</link> 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.- Parameters:
value
- The value to set.
-
setLocation
Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> 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.- Parameters:
value
- The value to set.
-
setLocation
Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.Location">"Location"</link> 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.- Parameters:
value
- The value to set.
-
setRequestedAccuracyLevel
public void setRequestedAccuracyLevel(int value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel">"RequestedAccuracyLevel"</link> 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.- Parameters:
value
- The value to set.
-
setTimeThreshold
public void setTimeThreshold(int value) Sets the <link linkend="gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold">"TimeThreshold"</link> 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.- Parameters:
value
- The value to set.
-
onHandleStart
Connect to signal "handle-start".
SeeClient.OnHandleStart.onHandleStart(ch.bailu.gtk.gio.DBusMethodInvocation)
for signal description.
FieldSIGNAL_ON_HANDLE_START
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onHandleStop
Connect to signal "handle-stop".
SeeClient.OnHandleStop.onHandleStop(ch.bailu.gtk.gio.DBusMethodInvocation)
for signal description.
FieldSIGNAL_ON_HANDLE_STOP
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onLocationUpdated
Connect to signal "location-updated".
SeeClient.OnLocationUpdated.onLocationUpdated(ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str)
for signal description.
FieldSIGNAL_ON_LOCATION_UPDATED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
interfaceInfo
Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page">org.freedesktop.GeoClue2.Client</link> D-Bus interface.- Returns:
- A #GDBusInterfaceInfo. Do not free.
-
overrideProperties
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.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-