Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DBusInterfaceSkeletonGauthorizemethodCallback

[373:7] extends: object

Generated low-level callback wrapper for GIR callback g-authorize-method.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • DBusInterfaceSkeletonGauthorizemethodCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, invocation, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: DBusInterfaceSkeletonMeta

[444:14] static extends: object

Generated metadata helpers for DBusInterfaceSkeleton class surfaces.

Methods

  • properties ()

    Returns property metadata for DBusInterfaceSkeleton.

    • @r A list.
  • signals ()

    Returns signal metadata for DBusInterfaceSkeleton.

    • @r A list.

class: DBusInterfaceSkeleton

[13:7] extends: object

Abstract base class for D-Bus interfaces on the service side.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • DBusInterfaceSkeleton (Handle = null)

    Creates a new DBusInterfaceSkeleton by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asDBusInterface ()

    Wraps this handle as DBusInterface.

    • @r A DBusInterface object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnGauthorizemethod (callback Fn, UserData = null)

    Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized. Note that this signal is emitted in a thread dedicated to handling the method call so handlers are allowed to perform blocking IO. This means that it is appropriate to call e.g. polkit_authority_check_authorization_sync() with the POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION flag set. If %FALSE is returned then no further handlers are run and the signal handler must take a reference to @invocation and finish handling the call (e.g. return an error via g_dbus_method_invocation_return_error()). Otherwise, if %TRUE is returned, signal emission continues. If no handlers return %FALSE, then the method is dispatched. If @interface has an enclosing #GDBusObjectSkeleton, then the #GDBusObjectSkeleton::authorize-method signal handlers run before the handlers for this signal. The default class handler just returns %TRUE. Please note that the common case is optimized: if no signals handlers are connected and the default class handler isn't overridden (for both @interface and the enclosing #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does not have the %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD flags set, no dedicated thread is ever used and the call will be handled in the same thread as the object that @interface belongs to was exported in.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (DBusInterfaceSkeleton Self, DBusMethodInvocation Invocation).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setGflags (string Value)

    Flags from the #GDBusInterfaceSkeletonFlags enumeration.

    • @p Value is the new property value.
    • @r None.
  • export (object connection, string object_path)

    Exports @interface_ at @object_path on @connection. This can be called multiple times to export the same @interface_ onto multiple connections however the @object_path provided must be the same for all connections. Use g_dbus_interface_skeleton_unexport() to unexport the object.

    • @p connection is A #GDBusConnection to export @interface_ on..
    • @p object_path is The path to export the interface at..
  • flush ()

    If @interface_ has outstanding changes, request for these changes to be emitted immediately. For example, an exported D-Bus interface may queue up property changes and emit the org.freedesktop.DBus.Properties.PropertiesChanged signal later (e.g. in an idle handler). This technique is useful for collapsing multiple property changes into one.

    • @r None.
  • get_connection ()

    Gets the first connection that @interface_ is exported on, if any.

  • get_connections ()

    Gets a list of the connections that @interface_ is exported on.

  • get_flags ()

    Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior of

    • @interface_ ``
  • get_info ()

    Gets D-Bus introspection information for the D-Bus interface implemented by @interface_.

  • get_object_path ()

    Gets the object path that @interface_ is exported on, if any.

  • get_properties ()

    Gets all D-Bus properties for @interface_.

  • get_vtable ()

    Gets the interface vtable for the D-Bus interface implemented by

    • @interface_. The returned function pointers should expect @interface_ itself to be passed as @user_data.
  • has_connection (object connection)

    Checks if @interface_ is exported on @connection.

    • @p connection is A #GDBusConnection..
  • set_flags (string flags)

    Sets flags describing what the behavior of @skeleton should be.

    • @p flags is Flags from the #GDBusInterfaceSkeletonFlags enumeration..
    • @r None.
  • unexport ()

    Stops exporting @interface_ on all connections it is exported on. To unexport @interface_ from only a single connection, use g_dbus_interface_skeleton_unexport_from_connection()

    • @r None.
  • unexport_from_connection (object connection)

    Stops exporting @interface_ on @connection. To stop exporting on all connections the interface is exported on, use g_dbus_interface_skeleton_unexport().

    • @p connection is A #GDBusConnection..
    • @r None.
  • connections ()

    Returns get_connections as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use get_connections() when lazy or change-notify access is required.

    • @r An Aussom list of elements.