gi-gio-2.0.27: Gio bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
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.

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

Overloaded methods

getInterface

dBusObjectGetInterface Source #

Arguments

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

object: A DBusObject.

-> Text

interfaceName: A D-Bus interface name.

-> m 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 C_DBusObjectInterfaceAddedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO () Source #

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

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 -> 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

onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => 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 C_DBusObjectInterfaceRemovedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO () Source #

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

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 -> 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

onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => 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