dbus-core-0.8.4: Low-level D-Bus protocol implementationSource codeContentsIndex
DBus.Types
Contents
Available types
Variants
Signatures
Object paths
Arrays
Dictionaries
Structures
Names
Bus names
Interface names
Error names
Member names
Synopsis
data Type
= DBusBoolean
| DBusByte
| DBusInt16
| DBusInt32
| DBusInt64
| DBusWord16
| DBusWord32
| DBusWord64
| DBusDouble
| DBusString
| DBusSignature
| DBusObjectPath
| DBusVariant
| DBusArray Type
| DBusDictionary Type Type
| DBusStructure [Type]
typeCode :: Type -> Text
data Variant
class Variable a where
toVariant :: a -> Variant
fromVariant :: Variant -> Maybe a
variantType :: Variant -> Type
data Signature
signatureTypes :: Signature -> [Type]
strSignature :: Signature -> Text
mkSignature :: Text -> Maybe Signature
mkSignature_ :: Text -> Signature
data ObjectPath
strObjectPath :: ObjectPath -> Text
mkObjectPath :: Text -> Maybe ObjectPath
mkObjectPath_ :: Text -> ObjectPath
data Array
arrayType :: Array -> Type
arrayItems :: Array -> [Variant]
toArray :: Variable a => Type -> [a] -> Maybe Array
fromArray :: Variable a => Array -> Maybe [a]
arrayFromItems :: Type -> [Variant] -> Maybe Array
arrayToBytes :: Array -> Maybe ByteString
arrayFromBytes :: ByteString -> Array
data Dictionary
dictionaryItems :: Dictionary -> [(Variant, Variant)]
dictionaryKeyType :: Dictionary -> Type
dictionaryValueType :: Dictionary -> Type
toDictionary :: (Variable a, Variable b) => Type -> Type -> Map a b -> Maybe Dictionary
fromDictionary :: (Variable a, Ord a, Variable b) => Dictionary -> Maybe (Map a b)
dictionaryFromItems :: Type -> Type -> [(Variant, Variant)] -> Maybe Dictionary
dictionaryToArray :: Dictionary -> Array
arrayToDictionary :: Array -> Maybe Dictionary
data Structure = Structure [Variant]
data BusName
strBusName :: BusName -> Text
mkBusName :: Text -> Maybe BusName
mkBusName_ :: Text -> BusName
data InterfaceName
strInterfaceName :: InterfaceName -> Text
mkInterfaceName :: Text -> Maybe InterfaceName
mkInterfaceName_ :: Text -> InterfaceName
data ErrorName
strErrorName :: ErrorName -> Text
mkErrorName :: Text -> Maybe ErrorName
mkErrorName_ :: Text -> ErrorName
data MemberName
strMemberName :: MemberName -> Text
mkMemberName :: Text -> Maybe MemberName
mkMemberName_ :: Text -> MemberName
Available types
data Type Source

"Atomic" types are any which can't contain any other types. Only atomic types may be used as dictionary keys.

Every type has an associated type code; a textual representation of the type, useful for debugging.

Variants may contain any other built-in D-Bus value. Besides representing native VARIANT values, they allow type-safe storage and deconstruction of heterogeneous collections.

Every variant is strongly-typed; that is, the type of its contained value is known at all times. This function retrieves that type, so that the correct cast can be used to retrieve the value.

This is the type contained within the array, not the type of the array itself.

Constructors
DBusBoolean
DBusByte
DBusInt16
DBusInt32
DBusInt64
DBusWord16
DBusWord32
DBusWord64
DBusDouble
DBusString
DBusSignature
DBusObjectPath
DBusVariant
DBusArray Type
DBusDictionary Type Type
DBusStructure [Type]
show/hide Instances
typeCode :: Type -> TextSource
Variants
data Variant Source
show/hide Instances
class Variable a whereSource
Methods
toVariant :: a -> VariantSource
fromVariant :: Variant -> Maybe aSource
show/hide Instances
variantType :: Variant -> TypeSource
Signatures
data Signature Source
show/hide Instances
signatureTypes :: Signature -> [Type]Source
strSignature :: Signature -> TextSource
mkSignature :: Text -> Maybe SignatureSource
mkSignature_ :: Text -> SignatureSource
Object paths
data ObjectPath Source
show/hide Instances
strObjectPath :: ObjectPath -> TextSource
mkObjectPath :: Text -> Maybe ObjectPathSource
mkObjectPath_ :: Text -> ObjectPathSource
Arrays
data Array Source
show/hide Instances
arrayType :: Array -> TypeSource
arrayItems :: Array -> [Variant]Source
toArray :: Variable a => Type -> [a] -> Maybe ArraySource
fromArray :: Variable a => Array -> Maybe [a]Source
arrayFromItems :: Type -> [Variant] -> Maybe ArraySource
arrayToBytes :: Array -> Maybe ByteStringSource
arrayFromBytes :: ByteString -> ArraySource
Dictionaries
data Dictionary Source
show/hide Instances
dictionaryItems :: Dictionary -> [(Variant, Variant)]Source
dictionaryKeyType :: Dictionary -> TypeSource
dictionaryValueType :: Dictionary -> TypeSource
toDictionary :: (Variable a, Variable b) => Type -> Type -> Map a b -> Maybe DictionarySource
fromDictionary :: (Variable a, Ord a, Variable b) => Dictionary -> Maybe (Map a b)Source
dictionaryFromItems :: Type -> Type -> [(Variant, Variant)] -> Maybe DictionarySource
dictionaryToArray :: Dictionary -> ArraySource
arrayToDictionary :: Array -> Maybe DictionarySource
Structures
data Structure Source
Constructors
Structure [Variant]
show/hide Instances
Names
Bus names
data BusName Source
show/hide Instances
strBusName :: BusName -> TextSource
mkBusName :: Text -> Maybe BusNameSource
mkBusName_ :: Text -> BusNameSource
Interface names
data InterfaceName Source
show/hide Instances
strInterfaceName :: InterfaceName -> TextSource
mkInterfaceName :: Text -> Maybe InterfaceNameSource
mkInterfaceName_ :: Text -> InterfaceNameSource
Error names
data ErrorName Source
show/hide Instances
strErrorName :: ErrorName -> TextSource
mkErrorName :: Text -> Maybe ErrorNameSource
mkErrorName_ :: Text -> ErrorNameSource
Member names
data MemberName Source
show/hide Instances
strMemberName :: MemberName -> TextSource
mkMemberName :: Text -> Maybe MemberNameSource
mkMemberName_ :: Text -> MemberNameSource
Produced by Haddock version 2.6.1