GDebugControllerDBus

GDebugControllerDBus — Debugging controller D-Bus implementation

Functions

Properties

GDBusConnection * connection Read / Write / Construct Only

Signals

gboolean authorize Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GDebugControllerDBus

Implemented Interfaces

GDebugControllerDBus implements GInitable and GDebugController.

Includes

#include <gio/gio.h>

Description

GDebugControllerDBus is an implementation of GDebugController which exposes debug settings as a D-Bus object.

It is a GInitable object, and will register an object at /org/gtk/Debugging on the bus given as “connection” once it’s initialized. The object will be unregistered when the last reference to the GDebugControllerDBus is dropped.

Functions

g_debug_controller_dbus_new ()

GDebugControllerDBus *
g_debug_controller_dbus_new (GDBusConnection *connection,
                             GCancellable *cancellable,
                             GError **error);

Create a new GDebugControllerDBus and synchronously initialize it.

Initializing the object will export the debug object on connection . The object will remain registered until the last reference to the GDebugControllerDBus is dropped.

Initialization may fail if registering the object on connection fails.

Parameters

connection

a GDBusConnection to register the debug object on

 

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 

Returns

a new GDebugControllerDBus, or NULL on failure.

[nullable][transfer full]

Since: 2.72

Types and Values

GDebugControllerDBus

typedef struct _GDebugControllerDBus GDebugControllerDBus;

GDebugControllerDBus is an implementation of GDebugController over D-Bus.

Since: 2.72

Property Details

The “connection” property

  “connection”               GDBusConnection *

The D-Bus connection to expose the debugging interface on.

Typically this will be the same connection (to the system or session bus) which the rest of the application or service’s D-Bus objects are registered on.

Owner: GDebugControllerDBus

Flags: Read / Write / Construct Only

Since: 2.72

Signal Details

The “authorize” signal

gboolean
user_function (GDebugControllerDBus  *controller,
               GDBusMethodInvocation *invocation,
               gpointer               user_data)

Emitted when a D-Bus peer is trying to change the debug settings and used to determine if that is authorized.

This signal is emitted in a dedicated worker thread, so handlers are allowed to perform blocking I/O. This means that, for example, it is appropriate to call polkit_authority_check_authorization_sync() to check authorization using polkit.

If FALSE is returned then no further handlers are run and the request to change the debug settings is rejected.

Otherwise, if TRUE is returned, signal emission continues. If no handlers return FALSE, then the debug settings are allowed to be changed.

Signal handlers must not modify invocation , or cause it to return a value.

The default class handler just returns TRUE.

Parameters

controller

The GDebugControllerDBus emitting the signal.

 

invocation

A GDBusMethodInvocation.

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE if the call is authorized, FALSE otherwise.

Flags: Run Last

Since: 2.72