LfbGdbusFeedbackSkeleton: libfeedback Reference Manual

## LfbGdbusFeedbackSkeleton LfbGdbusFeedbackSkeleton |

## Functions

GDBusInterfaceInfo * | lfb_gdbus_feedback_interface_info ()
guint | lfb_gdbus_feedback_override_properties ()
void | lfb_gdbus_feedback_complete_trigger_feedback ()
void | lfb_gdbus_feedback_complete_end_feedback ()
void | lfb_gdbus_feedback_emit_feedback_ended ()
void | lfb_gdbus_feedback_call_trigger_feedback ()
gboolean | lfb_gdbus_feedback_call_trigger_feedback_finish ()
gboolean | lfb_gdbus_feedback_call_trigger_feedback_sync ()
void | lfb_gdbus_feedback_call_end_feedback ()
gboolean | lfb_gdbus_feedback_call_end_feedback_finish ()
gboolean | lfb_gdbus_feedback_call_end_feedback_sync ()
const gchar * | lfb_gdbus_feedback_get_profile ()
gchar * | lfb_gdbus_feedback_dup_profile ()
void | lfb_gdbus_feedback_set_profile ()
void | lfb_gdbus_feedback_proxy_new ()
LfbGdbusFeedback * | lfb_gdbus_feedback_proxy_new_finish ()
LfbGdbusFeedback * | lfb_gdbus_feedback_proxy_new_sync ()
void | lfb_gdbus_feedback_proxy_new_for_bus ()
LfbGdbusFeedback * | lfb_gdbus_feedback_proxy_new_for_bus_finish ()
LfbGdbusFeedback * | lfb_gdbus_feedback_proxy_new_for_bus_sync ()
LfbGdbusFeedback * | lfb_gdbus_feedback_skeleton_new ()

## Properties

char * | profile | Read / Write

## Signals

void | feedback-ended | Run Last
gboolean | handle-end-feedback | Run Last
gboolean | handle-trigger-feedback | Run Last

## Types and Values

struct | LfbGdbusFeedbackIface
struct | LfbGdbusFeedbackProxy
struct | LfbGdbusFeedbackProxyClass
struct | LfbGdbusFeedbackSkeleton
struct | LfbGdbusFeedbackSkeletonClass
| LfbGdbusFeedback
| LfbGdbusFeedbackProxyPrivate
| LfbGdbusFeedbackSkeletonPrivate

## Object Hierarchy

        GInterface
        ╰── LfbGdbusFeedback
        GObject
        ├── GDBusInterfaceSkeleton
        │   ╰── LfbGdbusFeedbackSkeleton
        ╰── GDBusProxy
            ╰── LfbGdbusFeedbackProxy

## Prerequisites

LfbGdbusFeedback requires GObject.

## Implemented Interfaces

LfbGdbusFeedbackProxy implements GDBusInterface, GInitable, GAsyncInitable and LfbGdbusFeedback.

LfbGdbusFeedbackSkeleton implements GDBusInterface and LfbGdbusFeedback.

## Known Implementations

LfbGdbusFeedback is implemented by LfbGdbusFeedbackProxy and LfbGdbusFeedbackSkeleton.

## Description

## Functions

### lfb_gdbus_feedback_interface_info ()

    GDBusInterfaceInfo *
    lfb_gdbus_feedback_interface_info (void);

Gets a machine-readable description of the org.sigxcpu.Feedback D-Bus interface.

#### Returns

A GDBusInterfaceInfo. Do not free.

[transfer none]

### lfb_gdbus_feedback_override_properties ()

    guint
    lfb_gdbus_feedback_override_properties
                                   (GObjectClass *klass,
                                    guint property_id_begin);

Overrides all GObject properties in the LfbGdbusFeedback 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.

### lfb_gdbus_feedback_complete_trigger_feedback ()

    void
    lfb_gdbus_feedback_complete_trigger_feedback
                                   (LfbGdbusFeedback *object,
                                    GDBusMethodInvocation *invocation,
                                    guint id);

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

object | A LfbGdbusFeedback. |
invocation | A GDBusMethodInvocation. | [transfer full]
id | Parameter to return. |

### lfb_gdbus_feedback_complete_end_feedback ()

    void
    lfb_gdbus_feedback_complete_end_feedback
                                   (LfbGdbusFeedback *object,
                                    GDBusMethodInvocation *invocation);

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

object | A LfbGdbusFeedback. |
invocation | A GDBusMethodInvocation. | [transfer full]

### lfb_gdbus_feedback_emit_feedback_ended ()

    void
    lfb_gdbus_feedback_emit_feedback_ended
                                   (LfbGdbusFeedback *object,
                                    guint arg_id,
                                    guint arg_reason);

Emits the "FeedbackEnded" D-Bus signal.

#### Parameters

object | A LfbGdbusFeedback. |
arg_id | Argument to pass with the signal. |
arg_reason | Argument to pass with the signal. |

### lfb_gdbus_feedback_call_trigger_feedback ()

    void
    lfb_gdbus_feedback_call_trigger_feedback
                                   (LfbGdbusFeedback *proxy,
                                    const gchar *arg_app_id,
                                    const gchar *arg_event,
                                    GVariant *arg_hints,
                                    gint arg_timeout,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

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

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

#### Parameters

proxy | A LfbGdbusFeedbackProxy. |
arg_app_id | Argument to pass with the method invocation. |
arg_event | Argument to pass with the method invocation. |
arg_hints | Argument to pass with the method invocation. |
arg_timeout | Argument to pass with the method invocation. |
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` . |

### lfb_gdbus_feedback_call_trigger_feedback_finish ()

    gboolean
    lfb_gdbus_feedback_call_trigger_feedback_finish
                                   (LfbGdbusFeedback *proxy,
                                    guint *out_id,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `lfb_gdbus_feedback_call_trigger_feedback()`.

#### Parameters

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

#### Returns

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

[skip]

### lfb_gdbus_feedback_call_trigger_feedback_sync ()

    gboolean
    lfb_gdbus_feedback_call_trigger_feedback_sync
                                   (LfbGdbusFeedback *proxy,
                                    const gchar *arg_app_id,
                                    const gchar *arg_event,
                                    GVariant *arg_hints,
                                    gint arg_timeout,
                                    guint *out_id,
                                    GCancellable *cancellable,
                                    GError **error);

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

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

#### Parameters

proxy | A LfbGdbusFeedbackProxy. |
arg_app_id | Argument to pass with the method invocation. |
arg_event | Argument to pass with the method invocation. |
arg_hints | Argument to pass with the method invocation. |
arg_timeout | Argument to pass with the method invocation. |
out_id | Return location for return parameter or `NULL` to ignore. | [out][optional]
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL`. |

#### Returns

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

[skip]

### lfb_gdbus_feedback_call_end_feedback ()

    void
    lfb_gdbus_feedback_call_end_feedback (LfbGdbusFeedback *proxy,
                                          guint arg_id,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

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

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

#### Parameters

proxy | A LfbGdbusFeedbackProxy. |
arg_id | Argument to pass with the method invocation. |
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` . |

### lfb_gdbus_feedback_call_end_feedback_finish ()

    gboolean
    lfb_gdbus_feedback_call_end_feedback_finish
                                   (LfbGdbusFeedback *proxy,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `lfb_gdbus_feedback_call_end_feedback()`.

#### Parameters

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

#### Returns

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

[skip]

### lfb_gdbus_feedback_call_end_feedback_sync ()

    gboolean
    lfb_gdbus_feedback_call_end_feedback_sync
                                   (LfbGdbusFeedback *proxy,
                                    guint arg_id,
                                    GCancellable *cancellable,
                                    GError **error);

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

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

#### Parameters

proxy | A LfbGdbusFeedbackProxy. |
arg_id | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL`. |

#### Returns

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

[skip]

### lfb_gdbus_feedback_get_profile ()

    const gchar *
    lfb_gdbus_feedback_get_profile (LfbGdbusFeedback *object);

Gets the value of the "Profile" 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 `lfb_gdbus_feedback_dup_profile()` if on another thread.

[skip]

#### Parameters

object | A LfbGdbusFeedback. |

#### Returns

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

[transfer none][nullable]

### lfb_gdbus_feedback_dup_profile ()

    gchar *
    lfb_gdbus_feedback_dup_profile (LfbGdbusFeedback *object);

Gets a copy of the "Profile" 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 LfbGdbusFeedback. |

#### Returns

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

[transfer full][nullable]

### lfb_gdbus_feedback_set_profile ()

    void
    lfb_gdbus_feedback_set_profile (LfbGdbusFeedback *object,
                                    const gchar *value);

Sets the "Profile" 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 LfbGdbusFeedback. |
value | The value to set. |

### lfb_gdbus_feedback_proxy_new ()

    void
    lfb_gdbus_feedback_proxy_new (GDBusConnection *connection,
                                  GDBusProxyFlags flags,
                                  const gchar *name,
                                  const gchar *object_path,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronously creates a proxy for the D-Bus interface org.sigxcpu.Feedback. See `g_dbus_proxy_new()` for more details.

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 `lfb_gdbus_feedback_proxy_new_finish()` to get the result of the operation.

See `lfb_gdbus_feedback_proxy_new_sync()` for the synchronous, blocking version of this constructor.

#### Parameters

connection | A GDBusConnection. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique) or `NULL` if `connection` is not a message bus connection. | [nullable]
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied. |
user_data | User data to pass to `callback` . |

### lfb_gdbus_feedback_proxy_new_finish ()

    LfbGdbusFeedback *
    lfb_gdbus_feedback_proxy_new_finish (GAsyncResult *res,
                                         GError **error);

Finishes an operation started with `lfb_gdbus_feedback_proxy_new()`.

#### Parameters

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

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type LfbGdbusFeedbackProxy]

### lfb_gdbus_feedback_proxy_new_sync ()

    LfbGdbusFeedback *
    lfb_gdbus_feedback_proxy_new_sync (GDBusConnection *connection,
                                       GDBusProxyFlags flags,
                                       const gchar *name,
                                       const gchar *object_path,
                                       GCancellable *cancellable,
                                       GError **error);

Synchronously creates a proxy for the D-Bus interface org.sigxcpu.Feedback. See `g_dbus_proxy_new_sync()` for more details.

The calling thread is blocked until a reply is received.

See `lfb_gdbus_feedback_proxy_new()` for the asynchronous version of this constructor.

#### Parameters

connection | A GDBusConnection. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique) or `NULL` if `connection` is not a message bus connection. | [nullable]
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL` |

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type LfbGdbusFeedbackProxy]

### lfb_gdbus_feedback_proxy_new_for_bus ()

    void
    lfb_gdbus_feedback_proxy_new_for_bus (GBusType bus_type,
                                          GDBusProxyFlags flags,
                                          const gchar *name,
                                          const gchar *object_path,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

Like `lfb_gdbus_feedback_proxy_new()` but takes a GBusType instead of a GDBusConnection.

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 `lfb_gdbus_feedback_proxy_new_for_bus_finish()` to get the result of the operation.

See `lfb_gdbus_feedback_proxy_new_for_bus_sync()` for the synchronous, blocking version of this constructor.

#### Parameters

bus_type | A GBusType. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique). |
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied. |
user_data | User data to pass to `callback` . |

### lfb_gdbus_feedback_proxy_new_for_bus_finish ()

    LfbGdbusFeedback *
    lfb_gdbus_feedback_proxy_new_for_bus_finish
                                   (GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `lfb_gdbus_feedback_proxy_new_for_bus()`.

#### Parameters

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

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type LfbGdbusFeedbackProxy]

### lfb_gdbus_feedback_proxy_new_for_bus_sync ()

    LfbGdbusFeedback *
    lfb_gdbus_feedback_proxy_new_for_bus_sync
                                   (GBusType bus_type,
                                    GDBusProxyFlags flags,
                                    const gchar *name,
                                    const gchar *object_path,
                                    GCancellable *cancellable,
                                    GError **error);

Like `lfb_gdbus_feedback_proxy_new_sync()` but takes a GBusType instead of a GDBusConnection.

The calling thread is blocked until a reply is received.

See `lfb_gdbus_feedback_proxy_new_for_bus()` for the asynchronous version of this constructor.

#### Parameters

bus_type | A GBusType. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique). |
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL` |

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type LfbGdbusFeedbackProxy]

### lfb_gdbus_feedback_skeleton_new ()

    LfbGdbusFeedback *
    lfb_gdbus_feedback_skeleton_new (void);

Creates a skeleton object for the D-Bus interface org.sigxcpu.Feedback.

#### Returns

The skeleton object.

[transfer full][type LfbGdbusFeedbackSkeleton]

## Types and Values

### struct LfbGdbusFeedbackIface

    struct LfbGdbusFeedbackIface {
      GTypeInterface parent_iface;

      gboolean (*handle_end_feedback) (
        LfbGdbusFeedback *object,
        GDBusMethodInvocation *invocation,
        guint arg_id);

      gboolean (*handle_trigger_feedback) (
        LfbGdbusFeedback *object,
        GDBusMethodInvocation *invocation,
        const gchar *arg_app_id,
        const gchar *arg_event,
        GVariant *arg_hints,
        gint arg_timeout);

      const gchar * (*get_profile) (LfbGdbusFeedback *object);

      void (*feedback_ended) (
        LfbGdbusFeedback *object,
        guint arg_id,
        guint arg_reason);
    };

Virtual table for the D-Bus interface org.sigxcpu.Feedback.

#### Members

GTypeInterface `parent_iface`; | The parent interface. |
`handle_end_feedback` () | Handler for the “handle-end-feedback” signal. |
`handle_trigger_feedback` () | Handler for the “handle-trigger-feedback” signal. |
`get_profile` () | Getter for the “profile” property. |
`feedback_ended` () | Handler for the “feedback-ended” signal. |

### struct LfbGdbusFeedbackProxy

    struct LfbGdbusFeedbackProxy;

The LfbGdbusFeedbackProxy structure contains only private data and should only be accessed using the provided API.

### struct LfbGdbusFeedbackProxyClass

    struct LfbGdbusFeedbackProxyClass {
      GDBusProxyClass parent_class;
    };

Class structure for LfbGdbusFeedbackProxy.

#### Members

### struct LfbGdbusFeedbackSkeleton

    struct LfbGdbusFeedbackSkeleton;

The LfbGdbusFeedbackSkeleton structure contains only private data and should only be accessed using the provided API.

### struct LfbGdbusFeedbackSkeletonClass

    struct LfbGdbusFeedbackSkeletonClass {
      GDBusInterfaceSkeletonClass parent_class;
    };

Class structure for LfbGdbusFeedbackSkeleton.

#### Members

### LfbGdbusFeedback

    typedef struct _LfbGdbusFeedback LfbGdbusFeedback;

Abstract interface type for the D-Bus interface org.sigxcpu.Feedback.

### LfbGdbusFeedbackProxyPrivate

    typedef struct _LfbGdbusFeedbackProxyPrivate LfbGdbusFeedbackProxyPrivate;

### LfbGdbusFeedbackSkeletonPrivate

    typedef struct _LfbGdbusFeedbackSkeletonPrivate LfbGdbusFeedbackSkeletonPrivate;

## Property Details

### The `“profile”` property

      “profile”                  char *

Represents the D-Bus property "Profile".

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.

Owner: LfbGdbusFeedback

Flags: Read / Write

Default value: NULL

## Signal Details

### The `“feedback-ended”` signal

    void
    user_function (LfbGdbusFeedback *object,
                   guint             arg_id,
                   guint             arg_reason,
                   gpointer          user_data)

On the client-side, this signal is emitted whenever the D-Bus signal "FeedbackEnded" 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 LfbGdbusFeedback. |
arg_id | Argument. |
arg_reason | Argument. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“handle-end-feedback”` signal

    gboolean
    user_function (LfbGdbusFeedback      *object,
                   GDBusMethodInvocation *invocation,
                   guint                  arg_id,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `EndFeedback()` 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 `lfb_gdbus_feedback_complete_end_feedback()` or e.g. `g_dbus_method_invocation_return_error()` on it) and no other signal handlers will run. If no signal handler handles the invocation, the `G_DBUS_ERROR_UNKNOWN_METHOD` error is returned.

#### Parameters

object | A LfbGdbusFeedback. |
invocation | A GDBusMethodInvocation. |
arg_id | Argument passed by remote caller. |
user_data | user data set when the signal handler was connected. |

#### Returns

`G_DBUS_METHOD_INVOCATION_HANDLED` or `TRUE` if the invocation was handled, `G_DBUS_METHOD_INVOCATION_UNHANDLED` or `FALSE` to let other signal handlers run.

Flags: Run Last

### The `“handle-trigger-feedback”` signal

    gboolean
    user_function (LfbGdbusFeedback      *object,
                   GDBusMethodInvocation *invocation,
                   char                  *arg_app_id,
                   char                  *arg_event,
                   GVariant              *arg_hints,
                   int                    arg_timeout,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `TriggerFeedback()` 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 `lfb_gdbus_feedback_complete_trigger_feedback()` or e.g. `g_dbus_method_invocation_return_error()` on it) and no other signal handlers will run. If no signal handler handles the invocation, the `G_DBUS_ERROR_UNKNOWN_METHOD` error is returned.

#### Parameters

object | A LfbGdbusFeedback. |
invocation | A GDBusMethodInvocation. |
arg_app_id | Argument passed by remote caller. |
arg_event | Argument passed by remote caller. |
arg_hints | Argument passed by remote caller. |
arg_timeout | Argument passed by remote caller. |
user_data | user data set when the signal handler was connected. |

#### Returns

`G_DBUS_METHOD_INVOCATION_HANDLED` or `TRUE` if the invocation was handled, `G_DBUS_METHOD_INVOCATION_UNHANDLED` or `FALSE` to let other signal handlers run.

Flags: Run Last