gi-gio-2.0.19: Gio bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.Gio.Interfaces.DBusInterface

Contents

- Exported types
- Methods
  - getInfo
  - getObject
  - setObject

Description

The `DBusInterface` 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)
- noDBusInterface :: Maybe DBusInterface
- class GObject o => IsDBusInterface o
- toDBusInterface :: (MonadIO m, IsDBusInterface o) => o -> m DBusInterface
- dBusInterfaceGetInfo :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m DBusInterfaceInfo
- dBusInterfaceGetObject :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m 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

GObject DBusInterface Source # |
Instance details Defined in GI.Gio.Interfaces.DBusInterface Methods gobjectType :: DBusInterface -> IO GType Source #
IsObject DBusInterface Source # |
Instance details Defined in GI.Gio.Interfaces.DBusInterface
IsDBusInterface DBusInterface Source # |
Instance details Defined in GI.Gio.Interfaces.DBusInterface

noDBusInterface :: Maybe DBusInterface Source #

A convenience alias for `Nothing` :: `Maybe` `DBusInterface`.

class GObject o => IsDBusInterface o Source #

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

Instances

(GObject a, (UnknownAncestorError DBusInterface a :: Constraint)) => IsDBusInterface a Source # |
Instance details Defined in GI.Gio.Interfaces.DBusInterface
IsDBusInterface DBusInterface Source # |
Instance details Defined in GI.Gio.Interfaces.DBusInterface
IsDBusInterface DBusInterfaceSkeleton Source # |
Instance details Defined in GI.Gio.Objects.DBusInterfaceSkeleton
IsDBusInterface DBusProxy Source # |
Instance details Defined in GI.Gio.Objects.DBusProxy

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

## getInfo

dBusInterfaceGetInfo Source #

Arguments

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

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

Since: 2.30

## getObject

dBusInterfaceGetObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusInterface a) |
=> a | `interface_`: An exported D-Bus interface.
-> m 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