Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Objects.DBusInterfaceSkeleton
Description
Abstract base class for D-Bus interfaces on the service side.
Since: 2.30
Synopsis
- newtype DBusInterfaceSkeleton = DBusInterfaceSkeleton (ManagedPtr DBusInterfaceSkeleton)
- class (GObject o, IsDescendantOf DBusInterfaceSkeleton o) => IsDBusInterfaceSkeleton o
- toDBusInterfaceSkeleton :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m DBusInterfaceSkeleton
- type family ResolveDBusInterfaceSkeletonMethod (t :: Symbol) o where ...
- data DBusInterfaceSkeletonExportMethodInfo
- dBusInterfaceSkeletonExport :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> Text -> m ()
- data DBusInterfaceSkeletonFlushMethodInfo
- dBusInterfaceSkeletonFlush :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m ()
- data DBusInterfaceSkeletonGetConnectionMethodInfo
- dBusInterfaceSkeletonGetConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m (Maybe DBusConnection)
- data DBusInterfaceSkeletonGetConnectionsMethodInfo
- dBusInterfaceSkeletonGetConnections :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m [DBusConnection]
- data DBusInterfaceSkeletonGetFlagsMethodInfo
- dBusInterfaceSkeletonGetFlags :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m [DBusInterfaceSkeletonFlags]
- data DBusInterfaceSkeletonGetInfoMethodInfo
- dBusInterfaceSkeletonGetInfo :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m DBusInterfaceInfo
- data DBusInterfaceSkeletonGetObjectPathMethodInfo
- dBusInterfaceSkeletonGetObjectPath :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m (Maybe Text)
- data DBusInterfaceSkeletonGetPropertiesMethodInfo
- dBusInterfaceSkeletonGetProperties :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m GVariant
- data DBusInterfaceSkeletonGetVtableMethodInfo
- dBusInterfaceSkeletonGetVtable :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m DBusInterfaceVTable
- data DBusInterfaceSkeletonHasConnectionMethodInfo
- dBusInterfaceSkeletonHasConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> m Bool
- data DBusInterfaceSkeletonSetFlagsMethodInfo
- dBusInterfaceSkeletonSetFlags :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> [DBusInterfaceSkeletonFlags] -> m ()
- data DBusInterfaceSkeletonUnexportMethodInfo
- dBusInterfaceSkeletonUnexport :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m ()
- data DBusInterfaceSkeletonUnexportFromConnectionMethodInfo
- dBusInterfaceSkeletonUnexportFromConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> m ()
- data DBusInterfaceSkeletonGFlagsPropertyInfo
- constructDBusInterfaceSkeletonGFlags :: (IsDBusInterfaceSkeleton o, MonadIO m) => [DBusInterfaceSkeletonFlags] -> m (GValueConstruct o)
- dBusInterfaceSkeletonGFlags :: AttrLabelProxy "gFlags"
- getDBusInterfaceSkeletonGFlags :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m [DBusInterfaceSkeletonFlags]
- setDBusInterfaceSkeletonGFlags :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> [DBusInterfaceSkeletonFlags] -> m ()
- type DBusInterfaceSkeletonGAuthorizeMethodCallback = DBusMethodInvocation -> IO Bool
- data DBusInterfaceSkeletonGAuthorizeMethodSignalInfo
- afterDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusInterfaceSkeletonGAuthorizeMethodCallback) -> m SignalHandlerId
- onDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusInterfaceSkeletonGAuthorizeMethodCallback) -> m SignalHandlerId
Exported types
newtype DBusInterfaceSkeleton Source #
Memory-managed wrapper type.
Constructors
DBusInterfaceSkeleton (ManagedPtr DBusInterfaceSkeleton) |
Instances
class (GObject o, IsDescendantOf DBusInterfaceSkeleton o) => IsDBusInterfaceSkeleton o Source #
Type class for types which can be safely cast to DBusInterfaceSkeleton
, for instance with toDBusInterfaceSkeleton
.
Instances
(GObject o, IsDescendantOf DBusInterfaceSkeleton o) => IsDBusInterfaceSkeleton o Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton |
toDBusInterfaceSkeleton :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m DBusInterfaceSkeleton Source #
Cast to DBusInterfaceSkeleton
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, export, flush, forceFloating, freezeNotify, getv, hasConnection, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unexport, unexportFromConnection, unref, watchClosure.
Getters
getConnection, getConnections, getData, getFlags, getInfo, getObject, getObjectPath, getProperties, getProperty, getQdata, getVtable.
Setters
type family ResolveDBusInterfaceSkeletonMethod (t :: Symbol) o where ... Source #
Equations
export
data DBusInterfaceSkeletonExportMethodInfo Source #
Instances
(signature ~ (b -> Text -> m ()), MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => OverloadedMethod DBusInterfaceSkeletonExportMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonExportMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonExport Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () | (Can throw |
Exports interface_
at objectPath
on connection
.
This can be called multiple times to export the same interface_
onto multiple connections however the objectPath
provided must be
the same for all connections.
Use dBusInterfaceSkeletonUnexport
to unexport the object.
Since: 2.30
flush
data DBusInterfaceSkeletonFlushMethodInfo Source #
Instances
(signature ~ m (), MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonFlushMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonFlushMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonFlush Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m () |
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.
Since: 2.30
getConnection
data DBusInterfaceSkeletonGetConnectionMethodInfo Source #
Instances
(signature ~ m (Maybe DBusConnection), MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonGetConnectionMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonGetConnectionMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonGetConnection Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m (Maybe DBusConnection) | Returns: A |
Gets the first connection that interface_
is exported on, if any.
Since: 2.30
getConnections
data DBusInterfaceSkeletonGetConnectionsMethodInfo Source #
Instances
(signature ~ m [DBusConnection], MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonGetConnectionsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonGetConnectionsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonGetConnections Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m [DBusConnection] | Returns: A list of
all the connections that |
Gets a list of the connections that interface_
is exported on.
Since: 2.32
getFlags
data DBusInterfaceSkeletonGetFlagsMethodInfo Source #
Instances
(signature ~ m [DBusInterfaceSkeletonFlags], MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonGetFlagsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonGetFlagsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonGetFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m [DBusInterfaceSkeletonFlags] | Returns: One or more flags from the |
Gets the DBusInterfaceSkeletonFlags
that describes what the behavior
of interface_
Since: 2.30
getInfo
data DBusInterfaceSkeletonGetInfoMethodInfo Source #
Instances
(signature ~ m DBusInterfaceInfo, MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonGetInfoMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonGetInfoMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonGetInfo Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m DBusInterfaceInfo | Returns: A |
Gets D-Bus introspection information for the D-Bus interface
implemented by interface_
.
Since: 2.30
getObjectPath
data DBusInterfaceSkeletonGetObjectPathMethodInfo Source #
Instances
(signature ~ m (Maybe Text), MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonGetObjectPathMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonGetObjectPathMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonGetObjectPath Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m (Maybe Text) | Returns: A string owned by |
Gets the object path that interface_
is exported on, if any.
Since: 2.30
getProperties
data DBusInterfaceSkeletonGetPropertiesMethodInfo Source #
Instances
(signature ~ m GVariant, MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonGetPropertiesMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonGetPropertiesMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonGetProperties Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m GVariant | Returns: A |
Gets all D-Bus properties for interface_
.
Since: 2.30
getVtable
data DBusInterfaceSkeletonGetVtableMethodInfo Source #
Instances
(signature ~ m DBusInterfaceVTable, MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonGetVtableMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonGetVtableMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonGetVtable Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m DBusInterfaceVTable | Returns: the vtable of the D-Bus interface implemented by the skeleton |
Gets the interface vtable for the D-Bus interface implemented by
interface_
. The returned function pointers should expect interface_
itself to be passed as userData
.
Since: 2.30
hasConnection
data DBusInterfaceSkeletonHasConnectionMethodInfo Source #
Instances
(signature ~ (b -> m Bool), MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => OverloadedMethod DBusInterfaceSkeletonHasConnectionMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonHasConnectionMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonHasConnection Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Checks if interface_
is exported on connection
.
Since: 2.32
setFlags
data DBusInterfaceSkeletonSetFlagsMethodInfo Source #
Instances
(signature ~ ([DBusInterfaceSkeletonFlags] -> m ()), MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonSetFlagsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonSetFlagsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonSetFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> [DBusInterfaceSkeletonFlags] |
|
-> m () |
Sets flags describing what the behavior of skeleton
should be.
Since: 2.30
unexport
data DBusInterfaceSkeletonUnexportMethodInfo Source #
Instances
(signature ~ m (), MonadIO m, IsDBusInterfaceSkeleton a) => OverloadedMethod DBusInterfaceSkeletonUnexportMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonUnexportMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonUnexport Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) | |
=> a |
|
-> m () |
Stops exporting interface_
on all connections it is exported on.
To unexport interface_
from only a single connection, use
dBusInterfaceSkeletonUnexportFromConnection
Since: 2.30
unexportFromConnection
data DBusInterfaceSkeletonUnexportFromConnectionMethodInfo Source #
Instances
(signature ~ (b -> m ()), MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => OverloadedMethod DBusInterfaceSkeletonUnexportFromConnectionMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DBusInterfaceSkeletonUnexportFromConnectionMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Methods |
dBusInterfaceSkeletonUnexportFromConnection Source #
Arguments
:: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) | |
=> a |
|
-> b |
|
-> m () |
Stops exporting interface_
on connection
.
To stop exporting on all connections the interface is exported on,
use dBusInterfaceSkeletonUnexport
.
Since: 2.32
Properties
gFlags
Flags from the DBusInterfaceSkeletonFlags
enumeration.
Since: 2.30
data DBusInterfaceSkeletonGFlagsPropertyInfo Source #
Instances
constructDBusInterfaceSkeletonGFlags :: (IsDBusInterfaceSkeleton o, MonadIO m) => [DBusInterfaceSkeletonFlags] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “g-flags
” property. This is rarely needed directly, but it is used by new
.
dBusInterfaceSkeletonGFlags :: AttrLabelProxy "gFlags" Source #
getDBusInterfaceSkeletonGFlags :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m [DBusInterfaceSkeletonFlags] Source #
Get the value of the “g-flags
” property.
When overloading is enabled, this is equivalent to
get
dBusInterfaceSkeleton #gFlags
setDBusInterfaceSkeletonGFlags :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> [DBusInterfaceSkeletonFlags] -> m () Source #
Set the value of the “g-flags
” property.
When overloading is enabled, this is equivalent to
set
dBusInterfaceSkeleton [ #gFlags:=
value ]
Signals
gAuthorizeMethod
type DBusInterfaceSkeletonGAuthorizeMethodCallback Source #
Arguments
= DBusMethodInvocation |
|
-> IO Bool |
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 DBusObjectSkeleton
, then the
DBusObjectSkeleton::authorizeMethod 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
DBusObjectSkeleton
, if any) and DBusInterfaceSkeleton:gFlags does
not have the
DBusInterfaceSkeletonFlagsHandleMethodInvocationsInThread
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.
Since: 2.30
data DBusInterfaceSkeletonGAuthorizeMethodSignalInfo Source #
Instances
SignalInfo DBusInterfaceSkeletonGAuthorizeMethodSignalInfo Source # | |||||
Defined in GI.Gio.Objects.DBusInterfaceSkeleton Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DBusInterfaceSkeletonGAuthorizeMethodSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType DBusInterfaceSkeletonGAuthorizeMethodSignalInfo Source # | |||||
afterDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusInterfaceSkeletonGAuthorizeMethodCallback) -> m SignalHandlerId Source #
Connect a signal handler for the gAuthorizeMethod signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dBusInterfaceSkeleton #gAuthorizeMethod callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusInterfaceSkeletonGAuthorizeMethodCallback) -> m SignalHandlerId Source #
Connect a signal handler for the gAuthorizeMethod signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dBusInterfaceSkeleton #gAuthorizeMethod callback