Package ch.bailu.gtk.gio
Class DBusInterfaceSkeleton
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.DBusInterfaceSkeleton
- All Implemented Interfaces:
PointerInterface
- Direct Known Subclasses:
ClientSkeleton
,LocationSkeleton
,ManagerSkeleton
Abstract base class for D-Bus interfaces on the service side.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionImplements interfaceDBusInterface
.boolean
export
(DBusConnection connection, Str object_path) Exports @interface_ at @object_path on @connection.boolean
export
(DBusConnection connection, String object_path) Exports @interface_ at @object_path on @connection.void
flush()
If @interface_ has outstanding changes, request for these changes to be
emitted immediately.static ClassHandler
Gets the first connection that @interface_ is exported on, if any.Gets a list of the connections that @interface_ is exported on.int
getFlags()
Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
of @interface_getInfo()
Gets D-Bus introspection information for the D-Bus interface
implemented by @interface_.static int
Gets the object path that @interface_ is exported on, if any.static long
static TypeSystem.TypeSize
Gets all D-Bus properties for @interface_.static long
static TypeSystem.TypeSize
Gets the interface vtable for the D-Bus interface implemented by
@interface_.boolean
hasConnection
(DBusConnection connection) Checks if @interface_ is exported on @connection.Connect to signal "g-authorize-method".void
setFlags
(int flags) Sets flags describing what the behavior of @skeleton should be.void
unexport()
Stops exporting @interface_ on all connections it is exported on.void
unexportFromConnection
(DBusConnection connection) Stops exporting @interface_ on @connection.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_G_AUTHORIZE_METHOD
- See Also:
-
-
Constructor Details
-
DBusInterfaceSkeleton
-
-
Method Details
-
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
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
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
Gets D-Bus introspection information for the D-Bus interface
implemented by @interface_.- Returns:
- A #GDBusInterfaceInfo (never %NULL). Do not free.
-
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
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
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
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
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
Connect to signal "g-authorize-method".
SeeDBusInterfaceSkeleton.OnGAuthorizeMethod.onGAuthorizeMethod(ch.bailu.gtk.gio.DBusMethodInvocation)
for signal description.
FieldSIGNAL_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
Implements interfaceDBusInterface
. Call this to get access to interface functions.- Returns:
DBusInterface
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-