Package org.gnome.gio
Interface DebugControllerDBus.AuthorizeCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
DebugControllerDBus
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface DebugControllerDBus.AuthorizeCallback
extends FunctionPointer
Functional interface declaration of the
AuthorizeCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
run
(DBusMethodInvocation invocation) Emitted when a D-Bus peer is trying to change the debug settings and used to determine if that is authorized.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment sourceDebugControllerDBus, MemorySegment invocation) Theupcall
method is called from native code.
-
Method Details
-
run
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 returnfalse
, 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
. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gio.DBusMethodInvocation)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-