### Interface

# Phosh DBusSensorProxyCompass

#### Description [src]

    interface Phosh.DBusSensorProxyCompass : GObject.Object

Abstract interface type for the D-Bus interface net.hadess.SensorProxy.Compass.

#### Prerequisite

In order to implement DBusSensorProxyCompass, your type must inherit from`GObject`.

#### Implementations

- PhoshDBusSensorProxyCompassProxy
- PhoshDBusSensorProxyCompassSkeleton

#### Functions

###### phosh_dbus_sensor_proxy_compass_interface_info

Gets a machine-readable description of the net.hadess.SensorProxy.Compass D-Bus interface.

###### phosh_dbus_sensor_proxy_compass_override_properties

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

#### Instance methods

###### phosh_dbus_sensor_proxy_compass_call_claim_compass

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

###### phosh_dbus_sensor_proxy_compass_call_claim_compass_finish

Finishes an operation started with phosh_dbus_sensor_proxy_compass_call_claim_compass().

###### phosh_dbus_sensor_proxy_compass_call_claim_compass_sync

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

###### phosh_dbus_sensor_proxy_compass_call_release_compass

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

###### phosh_dbus_sensor_proxy_compass_call_release_compass_finish

Finishes an operation started with phosh_dbus_sensor_proxy_compass_call_release_compass().

###### phosh_dbus_sensor_proxy_compass_call_release_compass_sync

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

###### phosh_dbus_sensor_proxy_compass_complete_claim_compass

Helper function used in service implementations to finish handling invocations of the ClaimCompass() 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.

###### phosh_dbus_sensor_proxy_compass_complete_release_compass

Helper function used in service implementations to finish handling invocations of the ReleaseCompass() 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.

###### phosh_dbus_sensor_proxy_compass_get_compass_heading

Gets the value of the “CompassHeading” D-Bus property.

###### phosh_dbus_sensor_proxy_compass_get_has_compass

Gets the value of the “HasCompass” D-Bus property.

###### phosh_dbus_sensor_proxy_compass_set_compass_heading

Sets the “CompassHeading” D-Bus property to `value`.

###### phosh_dbus_sensor_proxy_compass_set_has_compass

Sets the “HasCompass” D-Bus property to `value`.

#### Properties

###### Phosh.DBusSensorProxyCompass:compass-heading

Represents the D-Bus property “CompassHeading”.

###### Phosh.DBusSensorProxyCompass:has-compass

Represents the D-Bus property “HasCompass”.

#### Signals

###### Phosh.DBusSensorProxyCompass::handle-claim-compass

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

###### Phosh.DBusSensorProxyCompass::handle-release-compass

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

#### Interface structure

    struct PhoshDBusSensorProxyCompassIface {
      GTypeInterface parent_iface;
      gboolean (* handle_claim_compass) (
        PhoshDBusSensorProxyCompass* object,
        GDBusMethodInvocation* invocation
      );
      gboolean (* handle_release_compass) (
        PhoshDBusSensorProxyCompass* object,
        GDBusMethodInvocation* invocation
      );
      gdouble (* get_compass_heading) (
        PhoshDBusSensorProxyCompass* object
      );
      gboolean (* get_has_compass) (
        PhoshDBusSensorProxyCompass* object
      );

    }

Virtual table for the D-Bus interface net.hadess.SensorProxy.Compass.

###### Interface members

`parent_iface` |
    GTypeInterface
| The parent interface.
`handle_claim_compass` |
    gboolean (* handle_claim_compass) (
        PhoshDBusSensorProxyCompass* object,
        GDBusMethodInvocation* invocation
      )
| Handler for the `PhoshDBusSensorProxyCompass::handle-claim-compass` signal.
`handle_release_compass` |
    gboolean (* handle_release_compass) (
        PhoshDBusSensorProxyCompass* object,
        GDBusMethodInvocation* invocation
      )
| Handler for the `PhoshDBusSensorProxyCompass::handle-release-compass` signal.
`get_compass_heading` |
    gdouble (* get_compass_heading) (
        PhoshDBusSensorProxyCompass* object
      )
| Getter for the `PhoshDBusSensorProxyCompass:compass-heading` property.
`get_has_compass` |
    gboolean (* get_has_compass) (
        PhoshDBusSensorProxyCompass* object
      )
| Getter for the `PhoshDBusSensorProxyCompass:has-compass` property.

#### Virtual methods

###### Phosh.DBusSensorProxyCompass.get_compass_heading

Gets the value of the “CompassHeading” D-Bus property.

###### Phosh.DBusSensorProxyCompass.get_has_compass

Gets the value of the “HasCompass” D-Bus property.

###### Phosh.DBusSensorProxyCompass.handle_claim_compass

Handler for the `PhoshDBusSensorProxyCompass::handle-claim-compass` signal.

###### Phosh.DBusSensorProxyCompass.handle_release_compass

Handler for the `PhoshDBusSensorProxyCompass::handle-release-compass` signal.