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.Structs.DBusInterfaceInfo

Contents

- Exported types
- Methods
  - cacheBuild
  - cacheRelease
  - generateXml
  - lookupMethod
  - lookupProperty
  - lookupSignal
  - ref
  - unref
- Properties
  - annotations
  - methods
  - name
  - properties
  - refCount
  - signals

Description

Information about a D-Bus interface.

Since: 2.26

Synopsis

- newtype DBusInterfaceInfo = DBusInterfaceInfo (ManagedPtr DBusInterfaceInfo)
- newZeroDBusInterfaceInfo :: MonadIO m => m DBusInterfaceInfo
- noDBusInterfaceInfo :: Maybe DBusInterfaceInfo
- dBusInterfaceInfoCacheBuild :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m ()
- dBusInterfaceInfoCacheRelease :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m ()
- dBusInterfaceInfoGenerateXml :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Word32 -> String -> m ()
- dBusInterfaceInfoLookupMethod :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Text -> m DBusMethodInfo
- dBusInterfaceInfoLookupProperty :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Text -> m DBusPropertyInfo
- dBusInterfaceInfoLookupSignal :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Text -> m DBusSignalInfo
- dBusInterfaceInfoRef :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m DBusInterfaceInfo
- dBusInterfaceInfoUnref :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m ()
- clearDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m ()
- getDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusAnnotationInfo])
- setDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()
- clearDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m ()
- getDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusMethodInfo])
- setDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusMethodInfo) -> m ()
- clearDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m ()
- getDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m (Maybe Text)
- setDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> CString -> m ()
- clearDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m ()
- getDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusPropertyInfo])
- setDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusPropertyInfo) -> m ()
- getDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> m Int32
- setDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> Int32 -> m ()
- clearDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m ()
- getDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusSignalInfo])
- setDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusSignalInfo) -> m ()

# Exported types

newtype DBusInterfaceInfo Source #

Memory-managed wrapper type.

Constructors

DBusInterfaceInfo (ManagedPtr DBusInterfaceInfo) |

Instances

BoxedObject DBusInterfaceInfo Source # |
Instance details Defined in GI.Gio.Structs.DBusInterfaceInfo Methods boxedType :: DBusInterfaceInfo -> IO GType Source #
tag ~ AttrSet => Constructible DBusInterfaceInfo tag Source # |
Instance details Defined in GI.Gio.Structs.DBusInterfaceInfo Methods new :: MonadIO m => (ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo) -> [AttrOp DBusInterfaceInfo tag] -> m DBusInterfaceInfo Source #

newZeroDBusInterfaceInfo :: MonadIO m => m DBusInterfaceInfo Source #

Construct a `DBusInterfaceInfo` struct initialized to zero.

noDBusInterfaceInfo :: Maybe DBusInterfaceInfo Source #

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

# Methods

## cacheBuild

dBusInterfaceInfoCacheBuild Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A `DBusInterfaceInfo`.
-> m () |

Builds a lookup-cache to speed up `dBusInterfaceInfoLookupMethod`, `dBusInterfaceInfoLookupSignal` and `dBusInterfaceInfoLookupProperty`.

If this has already been called with `info`, the existing cache is used and its use count is increased.

Note that `info` cannot be modified until `dBusInterfaceInfoCacheRelease` is called.

Since: 2.30

## cacheRelease

dBusInterfaceInfoCacheRelease Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A GDBusInterfaceInfo
-> m () |

Decrements the usage count for the cache for `info` built by `dBusInterfaceInfoCacheBuild` (if any) and frees the resources used by the cache if the usage count drops to zero.

Since: 2.30

## generateXml

dBusInterfaceInfoGenerateXml Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A `DBusNodeInfo`
-> Word32 | `indent`: Indentation level.
-> String | `stringBuilder`: A `String` to to append XML data to.
-> m () |

Appends an XML representation of `info` (and its children) to `stringBuilder`.

This function is typically used for generating introspection XML documents at run-time for handling the `org.freedesktop.DBus.Introspectable.Introspect` method.

Since: 2.26

## lookupMethod

dBusInterfaceInfoLookupMethod Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A `DBusInterfaceInfo`.
-> Text | `name`: A D-Bus method name (typically in CamelCase)
-> m DBusMethodInfo | Returns: A `DBusMethodInfo` or `Nothing` if not found. Do not free, it is owned by `info`.

Looks up information about a method.

The cost of this function is O(n) in number of methods unless `dBusInterfaceInfoCacheBuild` has been used on `info`.

Since: 2.26

## lookupProperty

dBusInterfaceInfoLookupProperty Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A `DBusInterfaceInfo`.
-> Text | `name`: A D-Bus property name (typically in CamelCase).
-> m DBusPropertyInfo | Returns: A `DBusPropertyInfo` or `Nothing` if not found. Do not free, it is owned by `info`.

Looks up information about a property.

The cost of this function is O(n) in number of properties unless `dBusInterfaceInfoCacheBuild` has been used on `info`.

Since: 2.26

## lookupSignal

dBusInterfaceInfoLookupSignal Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A `DBusInterfaceInfo`.
-> Text | `name`: A D-Bus signal name (typically in CamelCase)
-> m DBusSignalInfo | Returns: A `DBusSignalInfo` or `Nothing` if not found. Do not free, it is owned by `info`.

Looks up information about a signal.

The cost of this function is O(n) in number of signals unless `dBusInterfaceInfoCacheBuild` has been used on `info`.

Since: 2.26

## ref

dBusInterfaceInfoRef Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A `DBusInterfaceInfo`
-> m DBusInterfaceInfo | Returns: The same `info`.

If `info` is statically allocated does nothing. Otherwise increases the reference count.

Since: 2.26

## unref

dBusInterfaceInfoUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusInterfaceInfo | `info`: A `DBusInterfaceInfo`.
-> m () |

If `info` is statically allocated, does nothing. Otherwise decreases the reference count of `info`. When its reference count drops to 0, the memory used is freed.

Since: 2.26

# Properties

## annotations

A pointer to a `Nothing`-terminated array of pointers to `DBusAnnotationInfo` structures or `Nothing` if there are no annotations.

clearDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m () Source #

Set the value of the “`annotations`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #annotations

getDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusAnnotationInfo]) Source #

Get the value of the “`annotations`” field. When overloading is enabled, this is equivalent to

    get dBusInterfaceInfo #annotations

setDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () Source #

Set the value of the “`annotations`” field. When overloading is enabled, this is equivalent to

    set dBusInterfaceInfo [ #annotations := value ]

## methods

A pointer to a `Nothing`-terminated array of pointers to `DBusMethodInfo` structures or `Nothing` if there are no methods.

clearDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m () Source #

Set the value of the “`methods`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #methods

getDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusMethodInfo]) Source #

Get the value of the “`methods`” field. When overloading is enabled, this is equivalent to

    get dBusInterfaceInfo #methods

setDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusMethodInfo) -> m () Source #

Set the value of the “`methods`” field. When overloading is enabled, this is equivalent to

    set dBusInterfaceInfo [ #methods := value ]

## name

The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".

clearDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m () Source #

Set the value of the “`name`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #name

getDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m (Maybe Text) Source #

Get the value of the “`name`” field. When overloading is enabled, this is equivalent to

    get dBusInterfaceInfo #name

setDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> CString -> m () Source #

Set the value of the “`name`” field. When overloading is enabled, this is equivalent to

    set dBusInterfaceInfo [ #name := value ]

## properties

A pointer to a `Nothing`-terminated array of pointers to `DBusPropertyInfo` structures or `Nothing` if there are no properties.

clearDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m () Source #

Set the value of the “`properties`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #properties

getDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusPropertyInfo]) Source #

Get the value of the “`properties`” field. When overloading is enabled, this is equivalent to

    get dBusInterfaceInfo #properties

setDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusPropertyInfo) -> m () Source #

Set the value of the “`properties`” field. When overloading is enabled, this is equivalent to

    set dBusInterfaceInfo [ #properties := value ]

## refCount

The reference count or -1 if statically allocated.

getDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> m Int32 Source #

Get the value of the “`ref_count`” field. When overloading is enabled, this is equivalent to

    get dBusInterfaceInfo #refCount

setDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> Int32 -> m () Source #

Set the value of the “`ref_count`” field. When overloading is enabled, this is equivalent to

    set dBusInterfaceInfo [ #refCount := value ]

## signals

A pointer to a `Nothing`-terminated array of pointers to `DBusSignalInfo` structures or `Nothing` if there are no signals.

clearDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m () Source #

Set the value of the “`signals`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #signals

getDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusSignalInfo]) Source #

Get the value of the “`signals`” field. When overloading is enabled, this is equivalent to

    get dBusInterfaceInfo #signals

setDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusSignalInfo) -> m () Source #

Set the value of the “`signals`” field. When overloading is enabled, this is equivalent to

    set dBusInterfaceInfo [ #signals := value ]