Class DBusInterfaceSkeleton

All Implemented Interfaces:
PointerInterface
Direct Known Subclasses:
ClientSkeleton, LocationSkeleton, ManagerSkeleton

public class DBusInterfaceSkeleton extends Object
Abstract base class for D-Bus interfaces on the service side.

https://docs.gtk.org/gio/class.DBusInterfaceSkeleton.html

  • Field Details

  • Constructor Details

    • DBusInterfaceSkeleton

      public DBusInterfaceSkeleton(PointerContainer pointer)
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • export

      public boolean export(@Nonnull DBusConnection connection, @Nonnull Str object_path) throws AllocationError
      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.
      Parameters:
      connection - A #GDBusConnection to export @interface_ on.
      object_path - The path to export the interface at.
      Returns:
      %TRUE if the interface was exported on @connection, otherwise %FALSE with @error set.
      Throws:
      AllocationError
    • export

      public boolean export(@Nonnull DBusConnection connection, String object_path) throws AllocationError
      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.
      Parameters:
      connection - A #GDBusConnection to export @interface_ on.
      object_path - The path to export the interface at.
      Returns:
      %TRUE if the interface was exported on @connection, otherwise %FALSE with @error set.
      Throws:
      AllocationError
    • flush

      public void 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.
    • getConnection

      public DBusConnection getConnection()
      Gets the first connection that @interface_ is exported on, if any.
      Returns:
      A #GDBusConnection or %NULL if @interface_ is not exported anywhere. Do not free, the object belongs to @interface_.
    • getConnections

      public List getConnections()
      Gets a list of the connections that @interface_ is exported on.
      Returns:
      A list of all the connections that @interface_ is exported on. The returned list should be freed with g_list_free() after each element has been freed with g_object_unref().
    • getFlags

      public int getFlags()
      Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
      of @interface_
      Returns:
      One or more flags from the #GDBusInterfaceSkeletonFlags enumeration.
    • getInfo

      public DBusInterfaceInfo getInfo()
      Gets D-Bus introspection information for the D-Bus interface
      implemented by @interface_.
      Returns:
      A #GDBusInterfaceInfo (never %NULL). Do not free.
    • getObjectPath

      public Str getObjectPath()
      Gets the object path that @interface_ is exported on, if any.
      Returns:
      A string owned by @interface_ or %NULL if @interface_ is not exported anywhere. Do not free, the string belongs to @interface_.
    • getProperties

      public Variant getProperties()
      Gets all D-Bus properties for @interface_.
      Returns:
      A #GVariant of type ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. Free with g_variant_unref().
    • getVtable

      public DBusInterfaceVTable getVtable()
      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.
      Returns:
      A #GDBusInterfaceVTable (never %NULL).
    • hasConnection

      public boolean hasConnection(@Nonnull DBusConnection connection)
      Checks if @interface_ is exported on @connection.
      Parameters:
      connection - A #GDBusConnection.
      Returns:
      %TRUE if @interface_ is exported on @connection, %FALSE otherwise.
    • setFlags

      public void setFlags(int flags)
      Sets flags describing what the behavior of @skeleton should be.
      Parameters:
      flags - Flags from the #GDBusInterfaceSkeletonFlags enumeration.
    • unexport

      public void 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()
    • unexportFromConnection

      public void unexportFromConnection(@Nonnull DBusConnection connection)
      Stops exporting @interface_ on @connection.

      To stop exporting on all connections the interface is exported on,
      use g_dbus_interface_skeleton_unexport().
      Parameters:
      connection - A #GDBusConnection.
    • onGAuthorizeMethod

      public SignalHandler onGAuthorizeMethod(DBusInterfaceSkeleton.OnGAuthorizeMethod signal)
      Connect to signal "g-authorize-method".
      See DBusInterfaceSkeleton.OnGAuthorizeMethod.onGAuthorizeMethod(ch.bailu.gtk.gio.DBusMethodInvocation) for signal description.
      Field SIGNAL_ON_G_AUTHORIZE_METHOD 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.
    • asDBusInterface

      public DBusInterface asDBusInterface()
      Implements interface DBusInterface. Call this to get access to interface functions.
      Returns:
      DBusInterface
    • 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()