Class DBusInterfaceSkeleton
- All Implemented Interfaces:
DBusInterface,Proxy
- Direct Known Subclasses:
DBusInterfaceSkeleton.DBusInterfaceSkeleton$Impl
- Since:
- 2.30
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class implementing a builder pattern to construct a GObject with properties.static classThe DBusInterfaceSkeleton$Impl type represents a native instance of the abstract DBusInterfaceSkeleton class.static classClass structure forGDBusInterfaceSkeleton.static interfaceFunctional interface declaration of theGAuthorizeMethodCallbackcallback.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface org.gnome.gio.DBusInterface
DBusInterface.DBusInterface$Impl, DBusInterface.DBusInterfaceIface -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DBusInterfaceSkeleton.DBusInterfaceSkeleton(MemorySegment address) Create a DBusInterfaceSkeleton proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected DBusInterfaceSkeletonasParent()Returns this instance as if it were its parent type.booleanemitGAuthorizeMethod(@Nullable DBusMethodInvocation invocation) Emits the "g-authorize-method" signal.booleanexport(DBusConnection connection, String objectPath) Exports this DBusInterfaceSkeleton atobjectPathonconnection.voidflush()If this DBusInterfaceSkeleton has outstanding changes, request for these changes to be emitted immediately.protected booleangAuthorizeMethod(DBusMethodInvocation invocation) Signal class handler for theGDBusInterfaceSkeleton::g-authorize-method signal.@Nullable DBusConnectionGets the first connection that this DBusInterfaceSkeleton is exported on, if any.Gets a list of the connections that this DBusInterfaceSkeleton is exported on.getFlags()Gets theGDBusInterfaceSkeletonFlagsthat describes what the behavior of this DBusInterfaceSkeletongetInfo()Gets D-Bus introspection information for the D-Bus interface implemented byinterface.static MemoryLayoutThe memory layout of the native struct.@Nullable StringGets the object path that this DBusInterfaceSkeleton is exported on, if any.Gets all D-Bus properties forinterface.static @Nullable TypegetType()Get the GType of the DBusInterfaceSkeleton classGets the interface vtable for the D-Bus interface implemented byinterface.The returned function pointers should expect this DBusInterfaceSkeleton itself to be passed asuserData.booleanhasConnection(DBusConnection connection) Checks if this DBusInterfaceSkeleton is exported onconnection.Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized.voidsetFlags(Set<DBusInterfaceSkeletonFlags> flags) Sets flags describing what the behavior ofskeletonshould be.voidsetFlags(DBusInterfaceSkeletonFlags... flags) Sets flags describing what the behavior ofskeletonshould be.voidunexport()Stops exporting this DBusInterfaceSkeleton on all connections it is exported on.voidunexportFromConnection(DBusConnection connection) Stops exporting this DBusInterfaceSkeleton onconnection.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, builder, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gio.DBusInterface
getObject, setObject
-
Constructor Details
-
DBusInterfaceSkeleton
Create a DBusInterfaceSkeleton proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
DBusInterfaceSkeleton
public DBusInterfaceSkeleton()Creates a new DBusInterfaceSkeleton.
-
-
Method Details
-
getType
Get the GType of the DBusInterfaceSkeleton class- Returns:
- the GType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
export
Exports this DBusInterfaceSkeleton atobjectPathonconnection.This can be called multiple times to export the same this DBusInterfaceSkeleton onto multiple connections however the
objectPathprovided must be the same for all connections.Use g_dbus_interface_skeleton_unexport() to unexport the object.
- Parameters:
connection- AGDBusConnectionto export this DBusInterfaceSkeleton on.objectPath- The path to export the interface at.- Returns:
trueif the interface was exported onconnection,otherwisefalsewitherrorset.- Throws:
GErrorException- seeGError- Since:
- 2.30
-
flush
public void flush()If this DBusInterfaceSkeleton 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.PropertiesChangedsignal later (e.g. in an idle handler). This technique is useful for collapsing multiple property changes into one.- Since:
- 2.30
-
getConnection
Gets the first connection that this DBusInterfaceSkeleton is exported on, if any.- Returns:
- A
GDBusConnectionornullif this DBusInterfaceSkeleton is not exported anywhere. Do not free, the object belongs tointerface. - Since:
- 2.30
-
getConnections
Gets a list of the connections that this DBusInterfaceSkeleton is exported on.- Returns:
- A list of all the connections that this DBusInterfaceSkeleton is exported on. The returned list should be freed with g_list_free() after each element has been freed with g_object_unref().
- Since:
- 2.32
-
getFlags
Gets theGDBusInterfaceSkeletonFlagsthat describes what the behavior of this DBusInterfaceSkeleton- Returns:
- One or more flags from the
GDBusInterfaceSkeletonFlagsenumeration. - Since:
- 2.30
-
getInfo
Gets D-Bus introspection information for the D-Bus interface implemented byinterface.- Specified by:
getInfoin interfaceDBusInterface- Returns:
- A
GDBusInterfaceInfo(nevernull). Do not free. - Since:
- 2.30
-
getObjectPath
Gets the object path that this DBusInterfaceSkeleton is exported on, if any.- Returns:
- A string owned by this DBusInterfaceSkeleton or
nullif this DBusInterfaceSkeleton is not exported anywhere. Do not free, the string belongs tointerface. - Since:
- 2.30
-
getProperties
-
getVtable
Gets the interface vtable for the D-Bus interface implemented byinterface.The returned function pointers should expect this DBusInterfaceSkeleton itself to be passed asuserData.- Returns:
- the vtable of the D-Bus interface implemented by the skeleton
- Since:
- 2.30
-
hasConnection
Checks if this DBusInterfaceSkeleton is exported onconnection.- Parameters:
connection- AGDBusConnection.- Returns:
trueif this DBusInterfaceSkeleton is exported onconnection,falseotherwise.- Since:
- 2.32
-
setFlags
Sets flags describing what the behavior ofskeletonshould be.- Parameters:
flags- Flags from theGDBusInterfaceSkeletonFlagsenumeration.- Since:
- 2.30
-
setFlags
Sets flags describing what the behavior ofskeletonshould be.- Parameters:
flags- Flags from theGDBusInterfaceSkeletonFlagsenumeration.- Since:
- 2.30
-
unexport
public void unexport()Stops exporting this DBusInterfaceSkeleton on all connections it is exported on.To unexport this DBusInterfaceSkeleton from only a single connection, use g_dbus_interface_skeleton_unexport_from_connection()
- Since:
- 2.30
-
unexportFromConnection
Stops exporting this DBusInterfaceSkeleton onconnection.To stop exporting on all connections the interface is exported on, use g_dbus_interface_skeleton_unexport().
- Parameters:
connection- AGDBusConnection.- Since:
- 2.32
-
gAuthorizeMethod
Signal class handler for theGDBusInterfaceSkeleton::g-authorize-method signal. -
onGAuthorizeMethod
public SignalConnection<DBusInterfaceSkeleton.GAuthorizeMethodCallback> onGAuthorizeMethod(DBusInterfaceSkeleton.GAuthorizeMethodCallback handler) 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
falseis returned then no further handlers are run and the signal handler must take a reference toinvocationand finish handling the call (e.g. return an error via g_dbus_method_invocation_return_error()).Otherwise, if
trueis returned, signal emission continues. If no handlers returnfalse, then the method is dispatched. Ifinterface_has an enclosingGDBusObjectSkeleton, then theGDBusObjectSkeleton::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 enclosingGDBusObjectSkeleton, if any) andGDBusInterfaceSkeleton:g-flags does not have theDBusInterfaceSkeletonFlags.HANDLE_METHOD_INVOCATIONS_IN_THREADflags set, no dedicated thread is ever used and the call will be handled in the same thread as the object thatinterface_belongs to was exported in.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- Since:
- 2.30
- See Also:
-
emitGAuthorizeMethod
Emits the "g-authorize-method" signal. SeeonGAuthorizeMethod(org.gnome.gio.DBusInterfaceSkeleton.GAuthorizeMethodCallback).
-