gi-gio-2.0.35: Gio bindings

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

GI.Gio.Interfaces.DBusObjectManager

Contents

- Exported types
- Methods
  - getInterface
  - getObject
  - getObjectPath
  - getObjects
- Signals
  - interfaceAdded
  - interfaceRemoved
  - objectAdded
  - objectRemoved

Description

The `GDBusObjectManager` type is the base type for service- and client-side implementations of the standardized `org.freedesktop.DBus.ObjectManager` interface.

See `DBusObjectManagerClient` for the client-side implementation and `DBusObjectManagerServer` for the service-side implementation.

Synopsis

- newtype DBusObjectManager = DBusObjectManager (ManagedPtr DBusObjectManager)
- class (GObject o, IsDescendantOf DBusObjectManager o) => IsDBusObjectManager o
- toDBusObjectManager :: (MonadIO m, IsDBusObjectManager o) => o -> m DBusObjectManager
- dBusObjectManagerGetInterface :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> Text -> m (Maybe DBusInterface)
- dBusObjectManagerGetObject :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> m (Maybe DBusObject)
- dBusObjectManagerGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m Text
- dBusObjectManagerGetObjects :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m [DBusObject]
- type DBusObjectManagerInterfaceAddedCallback = DBusObject -> DBusInterface -> IO ()
- afterDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId
- onDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId
- type DBusObjectManagerInterfaceRemovedCallback = DBusObject -> DBusInterface -> IO ()
- afterDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId
- onDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId
- type DBusObjectManagerObjectAddedCallback = DBusObject -> IO ()
- afterDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId
- onDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId
- type DBusObjectManagerObjectRemovedCallback = DBusObject -> IO ()
- afterDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId
- onDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId

# Exported types

newtype DBusObjectManager Source #

Memory-managed wrapper type.

Constructors

DBusObjectManager (ManagedPtr DBusObjectManager) |

#### Instances

Instances details

Eq DBusObjectManager Source # |
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager Methods (==) :: DBusObjectManager -> DBusObjectManager -> Bool Source # (/=) :: DBusObjectManager -> DBusObjectManager -> Bool Source #
GObject DBusObjectManager Source # |
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager
ManagedPtrNewtype DBusObjectManager Source # |
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager Methods toManagedPtr :: DBusObjectManager -> ManagedPtr DBusObjectManager Source #
TypedObject DBusObjectManager Source # |
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager Methods glibType :: IO GType Source #
HasParentTypes DBusObjectManager Source # |
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager
IsGValue (Maybe DBusObjectManager) Source # | Convert `DBusObjectManager` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe DBusObjectManager -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe DBusObjectManager) Source #
type ParentTypes DBusObjectManager Source # |
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager type ParentTypes DBusObjectManager = '[Object]

class (GObject o, IsDescendantOf DBusObjectManager o) => IsDBusObjectManager o Source #

Type class for types which can be safely cast to `DBusObjectManager`, for instance with `toDBusObjectManager`.

#### Instances

Instances details

(GObject o, IsDescendantOf DBusObjectManager o) => IsDBusObjectManager o Source # |
Instance details Defined in GI.Gio.Interfaces.DBusObjectManager

toDBusObjectManager :: (MonadIO m, IsDBusObjectManager o) => o -> m DBusObjectManager Source #

Cast to `DBusObjectManager`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getInterface, getObject, getObjectPath, getObjects, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getInterface

dBusObjectManagerGetInterface Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectManager a) |
=> a | `manager`: A `DBusObjectManager`.
-> Text | `objectPath`: Object path to look up.
-> Text | `interfaceName`: D-Bus interface name to look up.
-> m (Maybe DBusInterface) | Returns: A `DBusInterface` instance or `Nothing`. Free with `objectUnref`.

Gets the interface proxy for `interfaceName` at `objectPath`, if any.

Since: 2.30

## getObject

dBusObjectManagerGetObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectManager a) |
=> a | `manager`: A `DBusObjectManager`.
-> Text | `objectPath`: Object path to look up.
-> m (Maybe DBusObject) | Returns: A `DBusObject` or `Nothing`. Free with `objectUnref`.

Gets the `DBusObject` at `objectPath`, if any.

Since: 2.30

## getObjectPath

dBusObjectManagerGetObjectPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectManager a) |
=> a | `manager`: A `DBusObjectManager`.
-> m Text | Returns: A string owned by `manager`. Do not free.

Gets the object path that `manager` is for.

Since: 2.30

## getObjects

dBusObjectManagerGetObjects Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectManager a) |
=> a | `manager`: A `DBusObjectManager`.
-> m [DBusObject] | Returns: A list of `DBusObject` objects. The returned list should be freed with `g_list_free()` after each element has been freed with `objectUnref`.

Gets all `DBusObject` objects known to `manager`.

Since: 2.30

# Signals

## interfaceAdded

type DBusObjectManagerInterfaceAddedCallback Source #

Arguments

= DBusObject | `object`: The `DBusObject` on which an interface was added.
-> DBusInterface | `interface`: The `DBusInterface` that was added.
-> IO () |

Emitted when `interface` is added to `object`.

This signal exists purely as a convenience to avoid having to connect signals to all objects managed by `manager`.

Since: 2.30

afterDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId Source #

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

    after dBusObjectManager #interfaceAdded 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.

onDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId Source #

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

    on dBusObjectManager #interfaceAdded callback

## interfaceRemoved

type DBusObjectManagerInterfaceRemovedCallback Source #

Arguments

= DBusObject | `object`: The `DBusObject` on which an interface was removed.
-> DBusInterface | `interface`: The `DBusInterface` that was removed.
-> IO () |

Emitted when `interface` has been removed from `object`.

This signal exists purely as a convenience to avoid having to connect signals to all objects managed by `manager`.

Since: 2.30

afterDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId Source #

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

    after dBusObjectManager #interfaceRemoved 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.

onDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId Source #

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

    on dBusObjectManager #interfaceRemoved callback

## objectAdded

type DBusObjectManagerObjectAddedCallback Source #

Arguments

= DBusObject | `object`: The `DBusObject` that was added.
-> IO () |

Emitted when `object` is added to `manager`.

Since: 2.30

afterDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId Source #

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

    after dBusObjectManager #objectAdded 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.

onDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId Source #

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

    on dBusObjectManager #objectAdded callback

## objectRemoved

type DBusObjectManagerObjectRemovedCallback Source #

Arguments

= DBusObject | `object`: The `DBusObject` that was removed.
-> IO () |

Emitted when `object` is removed from `manager`.

Since: 2.30

afterDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId Source #

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

    after dBusObjectManager #objectRemoved 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.

onDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId Source #

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

    on dBusObjectManager #objectRemoved callback