gi-gio-2.0.38: Gio bindings

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.Interfaces.DBusInterface

Contents

- Exported types
- Methods
  - getInfo
  - getObject
  - setObject

Description

Base type for D-Bus interfaces.

The `GDBusInterface` type is the base type for D-Bus interfaces both on the service side (see `DBusInterfaceSkeleton`) and client side (see `DBusProxy`).

Since: 2.30

Synopsis

- newtype DBusInterface = DBusInterface (ManagedPtr DBusInterface)
- class (GObject o, IsDescendantOf DBusInterface o) => IsDBusInterface o
- toDBusInterface :: (MonadIO m, IsDBusInterface o) => o -> m DBusInterface
- dBusInterfaceGetInfo :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m (Maybe DBusInterfaceInfo)
- dBusInterfaceGetObject :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m (Maybe DBusObject)
- dBusInterfaceSetObject :: (HasCallStack, MonadIO m, IsDBusInterface a, IsDBusObject b) => a -> Maybe b -> m ()

# Exported types

newtype DBusInterface Source #

Memory-managed wrapper type.

Constructors

DBusInterface (ManagedPtr DBusInterface) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf DBusInterface o) => IsDBusInterface o Source #

Type class for types which can be safely cast to `DBusInterface`, for instance with `toDBusInterface`.

#### Instances

Instances details

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

toDBusInterface :: (MonadIO m, IsDBusInterface o) => o -> m DBusInterface Source #

Cast to `DBusInterface`, 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, getInfo, getObject, getProperty, getQdata.

#### Setters

setData, setDataFull, setObject, setProperty.

## getInfo

dBusInterfaceGetInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusInterface a) |
=> a | `interface_`: An exported D-Bus interface.
-> m (Maybe DBusInterfaceInfo) | Returns: A `DBusInterfaceInfo`. Do not free.

Gets D-Bus introspection information for the D-Bus interface implemented by `interface_`.

This can return `Nothing` if no `DBusInterfaceInfo` was provided during construction of `interface_` and is also not made available otherwise. For example, `DBusProxy` implements `DBusInterface` but allows for a `Nothing` `DBusInterfaceInfo`.

Since: 2.30

## getObject

dBusInterfaceGetObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusInterface a) |
=> a | `interface_`: An exported D-Bus interface.
-> m (Maybe DBusObject) | Returns: A `DBusObject` or `Nothing`. The returned reference should be freed with `objectUnref`.

Gets the `DBusObject` that `interface_` belongs to, if any.

Since: 2.32

## setObject

dBusInterfaceSetObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusInterface a, IsDBusObject b) |
=> a | `interface_`: An exported D-Bus interface.
-> Maybe b | `object`: A `DBusObject` or `Nothing`.
-> m () |

Sets the `DBusObject` for `interface_` to `object`.

Note that `interface_` will hold a weak reference to `object`.

Since: 2.30