Class Client

All Implemented Interfaces:
PointerInterface

public class Client extends Interface
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/

  • Field Details

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler 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

      public boolean callStartFinish(@Nonnull AsyncResult res) throws AllocationError
      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

      public boolean callStartSync(@Nullable Cancellable cancellable) throws AllocationError
      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

      public boolean callStopFinish(@Nonnull AsyncResult res) throws AllocationError
      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

      public boolean callStopSync(@Nullable Cancellable cancellable) throws AllocationError
      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

      public void completeStart(@Nonnull 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. 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

      public void completeStop(@Nonnull 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. 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

      public Str 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

      public Str 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

      public void emitLocationUpdated(@Nonnull Str arg_old, @Nonnull Str arg_new)
      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

      public void emitLocationUpdated(String arg_old, String arg_new)
      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

      public Str 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

      public Str 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

      public void setDesktopId(@Nonnull Str value)
      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

      public void setDesktopId(String value)
      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

      public void setLocation(@Nonnull Str value)
      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

      public void setLocation(String value)
      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

      public SignalHandler onHandleStart(Client.OnHandleStart signal)
      Connect to signal "handle-start".
      See Client.OnHandleStart.onHandleStart(ch.bailu.gtk.gio.DBusMethodInvocation) for signal description.
      Field SIGNAL_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

      public SignalHandler onHandleStop(Client.OnHandleStop signal)
      Connect to signal "handle-stop".
      See Client.OnHandleStop.onHandleStop(ch.bailu.gtk.gio.DBusMethodInvocation) for signal description.
      Field SIGNAL_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

      public SignalHandler onLocationUpdated(Client.OnLocationUpdated signal)
      Connect to signal "location-updated".
      See Client.OnLocationUpdated.onLocationUpdated(ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str) for signal description.
      Field SIGNAL_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

      public static DBusInterfaceInfo 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

      public static int overrideProperties(@Nonnull ObjectClass klass, int 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.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()