gi-gio-2.0.27: Gio bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gio.Objects.DBusObjectSkeleton

Contents

- Exported types
- Methods
  - Overloaded methods
  - addInterface
  - flush
  - new
  - removeInterface
  - removeInterfaceByName
  - setObjectPath
- Properties
  - gObjectPath
- Signals
  - authorizeMethod

Description

A `DBusObjectSkeleton` instance is essentially a group of D-Bus interfaces. The set of exported interfaces on the object may be dynamic and change at runtime.

This type is intended to be used with `DBusObjectManager`.

Since: 2.30

Synopsis

- newtype DBusObjectSkeleton = DBusObjectSkeleton (ManagedPtr DBusObjectSkeleton)
- class (GObject o, IsDescendantOf DBusObjectSkeleton o) => IsDBusObjectSkeleton o
- toDBusObjectSkeleton :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m DBusObjectSkeleton
- dBusObjectSkeletonAddInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m ()
- dBusObjectSkeletonFlush :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> m ()
- dBusObjectSkeletonNew :: (HasCallStack, MonadIO m) => Text -> m DBusObjectSkeleton
- dBusObjectSkeletonRemoveInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m ()
- dBusObjectSkeletonRemoveInterfaceByName :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m ()
- dBusObjectSkeletonSetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m ()
- clearDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m ()
- constructDBusObjectSkeletonGObjectPath :: (IsDBusObjectSkeleton o, MonadIO m) => Text -> m (GValueConstruct o)
- getDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m (Maybe Text)
- setDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> Text -> m ()
- type C_DBusObjectSkeletonAuthorizeMethodCallback = Ptr () -> Ptr DBusInterfaceSkeleton -> Ptr DBusMethodInvocation -> Ptr () -> IO CInt
- type DBusObjectSkeletonAuthorizeMethodCallback = DBusInterfaceSkeleton -> DBusMethodInvocation -> IO Bool
- afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
- genClosure_DBusObjectSkeletonAuthorizeMethod :: MonadIO m => DBusObjectSkeletonAuthorizeMethodCallback -> m (GClosure C_DBusObjectSkeletonAuthorizeMethodCallback)
- mk_DBusObjectSkeletonAuthorizeMethodCallback :: C_DBusObjectSkeletonAuthorizeMethodCallback -> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback)
- noDBusObjectSkeletonAuthorizeMethodCallback :: Maybe DBusObjectSkeletonAuthorizeMethodCallback
- onDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
- wrap_DBusObjectSkeletonAuthorizeMethodCallback :: DBusObjectSkeletonAuthorizeMethodCallback -> C_DBusObjectSkeletonAuthorizeMethodCallback

# Exported types

newtype DBusObjectSkeleton Source #

Memory-managed wrapper type.

Constructors

DBusObjectSkeleton (ManagedPtr DBusObjectSkeleton) |

#### Instances

Instances details

Eq DBusObjectSkeleton Source # |
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton Methods (==) :: DBusObjectSkeleton -> DBusObjectSkeleton -> Bool # (/=) :: DBusObjectSkeleton -> DBusObjectSkeleton -> Bool #
GObject DBusObjectSkeleton Source # |
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton
TypedObject DBusObjectSkeleton Source # |
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton Methods glibType :: IO GType Source #
ManagedPtrNewtype DBusObjectSkeleton Source # |
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton Methods toManagedPtr :: DBusObjectSkeleton -> ManagedPtr DBusObjectSkeleton Source #
IsGValue DBusObjectSkeleton Source # | Convert `DBusObjectSkeleton` to and from `GValue` with `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton Methods toGValue :: DBusObjectSkeleton -> IO GValue Source # fromGValue :: GValue -> IO DBusObjectSkeleton Source #
HasParentTypes DBusObjectSkeleton Source # |
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton
type ParentTypes DBusObjectSkeleton Source # |
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton type ParentTypes DBusObjectSkeleton = '[Object, DBusObject]

class (GObject o, IsDescendantOf DBusObjectSkeleton o) => IsDBusObjectSkeleton o Source #

Type class for types which can be safely cast to `DBusObjectSkeleton`, for instance with `toDBusObjectSkeleton`.

#### Instances

Instances details

(GObject o, IsDescendantOf DBusObjectSkeleton o) => IsDBusObjectSkeleton o Source # |
Instance details Defined in GI.Gio.Objects.DBusObjectSkeleton

toDBusObjectSkeleton :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m DBusObjectSkeleton Source #

Cast to `DBusObjectSkeleton`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

## Overloaded methods

## addInterface

dBusObjectSkeletonAddInterface Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) |
=> a | `object`: A `DBusObjectSkeleton`.
-> b | `interface_`: A `DBusInterfaceSkeleton`.
-> m () |

Adds `interface_` to `object`.

If `object` already contains a `DBusInterfaceSkeleton` with the same interface name, it is removed before `interface_` is added.

Note that `object` takes its own reference on `interface_` and holds it until removed.

Since: 2.30

## flush

dBusObjectSkeletonFlush Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) |
=> a | `object`: A `DBusObjectSkeleton`.
-> m () |

This method simply calls `dBusInterfaceSkeletonFlush` on all interfaces belonging to `object`. See that method for when flushing is useful.

Since: 2.30

## new

dBusObjectSkeletonNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `objectPath`: An object path.
-> m DBusObjectSkeleton | Returns: A `DBusObjectSkeleton`. Free with `objectUnref`.

Creates a new `DBusObjectSkeleton`.

Since: 2.30

## removeInterface

dBusObjectSkeletonRemoveInterface Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) |
=> a | `object`: A `DBusObjectSkeleton`.
-> b | `interface_`: A `DBusInterfaceSkeleton`.
-> m () |

Removes `interface_` from `object`.

Since: 2.30

## removeInterfaceByName

dBusObjectSkeletonRemoveInterfaceByName Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) |
=> a | `object`: A `DBusObjectSkeleton`.
-> Text | `interfaceName`: A D-Bus interface name.
-> m () |

Removes the `DBusInterface` with `interfaceName` from `object`.

If no D-Bus interface of the given interface exists, this function does nothing.

Since: 2.30

## setObjectPath

dBusObjectSkeletonSetObjectPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) |
=> a | `object`: A `DBusObjectSkeleton`.
-> Text | `objectPath`: A valid D-Bus object path.
-> m () |

Sets the object path for `object`.

Since: 2.30

# Properties

## gObjectPath

The object path where the object is exported.

Since: 2.30

clearDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m () Source #

Set the value of the “`g-object-path`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #gObjectPath

constructDBusObjectSkeletonGObjectPath :: (IsDBusObjectSkeleton o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`g-object-path`” property. This is rarely needed directly, but it is used by `new`.

getDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m (Maybe Text) Source #

Get the value of the “`g-object-path`” property. When overloading is enabled, this is equivalent to

    get dBusObjectSkeleton #gObjectPath

setDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> Text -> m () Source #

Set the value of the “`g-object-path`” property. When overloading is enabled, this is equivalent to

    set dBusObjectSkeleton [ #gObjectPath := value ]

# Signals

## authorizeMethod

type C_DBusObjectSkeletonAuthorizeMethodCallback = Ptr () -> Ptr DBusInterfaceSkeleton -> Ptr DBusMethodInvocation -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type DBusObjectSkeletonAuthorizeMethodCallback Source #

Arguments

= DBusInterfaceSkeleton | `interface`: The `DBusInterfaceSkeleton` that `invocation` is for.
-> DBusMethodInvocation | `invocation`: A `DBusMethodInvocation`.
-> IO Bool | Returns: `True` if the call is authorized, `False` otherwise.

Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized.

This signal is like `DBusInterfaceSkeleton`'s gAuthorizeMethod signal, except that it is for the enclosing object.

The default class handler just returns `True`.

Since: 2.30

afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId Source #

Connect a signal handler for the authorizeMethod signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after dBusObjectSkeleton #authorizeMethod callback

genClosure_DBusObjectSkeletonAuthorizeMethod :: MonadIO m => DBusObjectSkeletonAuthorizeMethodCallback -> m (GClosure C_DBusObjectSkeletonAuthorizeMethodCallback) Source #

Wrap the callback into a `GClosure`.

mk_DBusObjectSkeletonAuthorizeMethodCallback :: C_DBusObjectSkeletonAuthorizeMethodCallback -> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback) Source #

Generate a function pointer callable from C code, from a `C_DBusObjectSkeletonAuthorizeMethodCallback`.

noDBusObjectSkeletonAuthorizeMethodCallback :: Maybe DBusObjectSkeletonAuthorizeMethodCallback Source #

A convenience synonym for ``Nothing` :: `Maybe` `DBusObjectSkeletonAuthorizeMethodCallback``.

onDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId Source #

Connect a signal handler for the authorizeMethod signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on dBusObjectSkeleton #authorizeMethod callback

wrap_DBusObjectSkeletonAuthorizeMethodCallback :: DBusObjectSkeletonAuthorizeMethodCallback -> C_DBusObjectSkeletonAuthorizeMethodCallback Source #

Wrap a `DBusObjectSkeletonAuthorizeMethodCallback` into a `C_DBusObjectSkeletonAuthorizeMethodCallback`.