gi-gio-2.0.32: Gio bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gio.Interfaces.DBusObject

Description

The DBusObject type is the base type for D-Bus objects on both the service side (see DBusObjectSkeleton) and the client side (see DBusObjectProxy). It is essentially just a container of interfaces.

Synopsis

Exported types

newtype DBusObject Source #

Memory-managed wrapper type.

Constructors

DBusObject (ManagedPtr DBusObject) 

Instances

Instances details
Eq DBusObject Source # 
Instance details

Defined in GI.Gio.Interfaces.DBusObject

GObject DBusObject Source # 
Instance details

Defined in GI.Gio.Interfaces.DBusObject

ManagedPtrNewtype DBusObject Source # 
Instance details

Defined in GI.Gio.Interfaces.DBusObject

Methods

toManagedPtr :: DBusObject -> ManagedPtr DBusObject

TypedObject DBusObject Source # 
Instance details

Defined in GI.Gio.Interfaces.DBusObject

Methods

glibType :: IO GType

HasParentTypes DBusObject Source # 
Instance details

Defined in GI.Gio.Interfaces.DBusObject

IsGValue (Maybe DBusObject) Source #

Convert DBusObject to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Interfaces.DBusObject

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe DBusObject -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe DBusObject)

type ParentTypes DBusObject Source # 
Instance details

Defined in GI.Gio.Interfaces.DBusObject

type ParentTypes DBusObject = '[Object]

class (GObject o, IsDescendantOf DBusObject o) => IsDBusObject o Source #

Type class for types which can be safely cast to DBusObject, for instance with toDBusObject.

Instances

Instances details
(GObject o, IsDescendantOf DBusObject o) => IsDBusObject o Source # 
Instance details

Defined in GI.Gio.Interfaces.DBusObject

toDBusObject :: (MonadIO m, IsDBusObject o) => o -> m DBusObject Source #

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

Methods

getInterface

dBusObjectGetInterface Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObject a) 
=> a

object: A DBusObject.

-> Text

interfaceName: A D-Bus interface name.

-> m (Maybe DBusInterface)

Returns: Nothing if not found, otherwise a DBusInterface that must be freed with objectUnref.

Gets the D-Bus interface with name interfaceName associated with object, if any.

Since: 2.30

getInterfaces

dBusObjectGetInterfaces Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObject a) 
=> a

object: A DBusObject.

-> m [DBusInterface]

Returns: A list of DBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed with objectUnref.

Gets the D-Bus interfaces associated with object.

Since: 2.30

getObjectPath

dBusObjectGetObjectPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObject a) 
=> a

object: A DBusObject.

-> m Text

Returns: A string owned by object. Do not free.

Gets the object path for object.

Since: 2.30

Signals

interfaceAdded

type DBusObjectInterfaceAddedCallback Source #

Arguments

 = DBusInterface

interface: The DBusInterface that was added.

-> IO () 

Emitted when interface is added to object.

Since: 2.30

afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> 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 dBusObject #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.

onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> 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 dBusObject #interfaceAdded callback

interfaceRemoved

type DBusObjectInterfaceRemovedCallback Source #

Arguments

 = DBusInterface

interface: The DBusInterface that was removed.

-> IO () 

Emitted when interface is removed from object.

Since: 2.30

afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> 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 dBusObject #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.

onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> 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 dBusObject #interfaceRemoved callback