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

Contents

- Exported types
- Methods
  - lookup
  - ref
  - unref
- Properties
  - annotations
  - key
  - refCount
  - value

Description

Information about an annotation.

Since: 2.26

Synopsis

- newtype DBusAnnotationInfo = DBusAnnotationInfo (ManagedPtr DBusAnnotationInfo)
- newZeroDBusAnnotationInfo :: MonadIO m => m DBusAnnotationInfo
- noDBusAnnotationInfo :: Maybe DBusAnnotationInfo
- dBusAnnotationInfoLookup :: (HasCallStack, MonadIO m) => Maybe [DBusAnnotationInfo] -> Text -> m Text
- dBusAnnotationInfoRef :: (HasCallStack, MonadIO m) => DBusAnnotationInfo -> m DBusAnnotationInfo
- dBusAnnotationInfoUnref :: (HasCallStack, MonadIO m) => DBusAnnotationInfo -> m ()
- clearDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> m ()
- getDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> m (Maybe [DBusAnnotationInfo])
- setDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()
- clearDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m ()
- getDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text)
- setDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> CString -> m ()
- getDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> m Int32
- setDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> Int32 -> m ()
- clearDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m ()
- getDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text)
- setDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> CString -> m ()

# Exported types

newtype DBusAnnotationInfo Source #

Memory-managed wrapper type.

Constructors

DBusAnnotationInfo (ManagedPtr DBusAnnotationInfo) |

Instances

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

newZeroDBusAnnotationInfo :: MonadIO m => m DBusAnnotationInfo Source #

Construct a `DBusAnnotationInfo` struct initialized to zero.

noDBusAnnotationInfo :: Maybe DBusAnnotationInfo Source #

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

# Methods

## lookup

dBusAnnotationInfoLookup Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Maybe [DBusAnnotationInfo] | `annotations`: A `Nothing`-terminated array of annotations or `Nothing`.
-> Text | `name`: The name of the annotation to look up.
-> m Text | Returns: The value or `Nothing` if not found. Do not free, it is owned by `annotations`.

Looks up the value of an annotation.

The cost of this function is O(n) in number of annotations.

Since: 2.26

## ref

dBusAnnotationInfoRef Source #

Arguments

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

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

Since: 2.26

## unref

dBusAnnotationInfoUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> DBusAnnotationInfo | `info`: A `DBusAnnotationInfo`.
-> 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.

clearDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> m () Source #

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

    clear #annotations

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

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

    get dBusAnnotationInfo #annotations

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

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

    set dBusAnnotationInfo [ #annotations := value ]

## key

The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".

clearDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m () Source #

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

    clear #key

getDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text) Source #

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

    get dBusAnnotationInfo #key

setDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> CString -> m () Source #

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

    set dBusAnnotationInfo [ #key := value ]

## refCount

The reference count or -1 if statically allocated.

getDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> m Int32 Source #

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

    get dBusAnnotationInfo #refCount

setDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> Int32 -> m () Source #

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

    set dBusAnnotationInfo [ #refCount := value ]

## value

The value of the annotation.

clearDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m () Source #

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

    clear #value

getDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text) Source #

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

    get dBusAnnotationInfo #value

setDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> CString -> m () Source #

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

    set dBusAnnotationInfo [ #value := value ]