dbus-1.3.11: A client library for the D-Bus IPC system.

Safe Haskell | None
Language | Haskell2010

DBus.Internal.Types

Synopsis

- data Type
  - = TypeBoolean
  - | TypeWord8
  - | TypeWord16
  - | TypeWord32
  - | TypeWord64
  - | TypeInt16
  - | TypeInt32
  - | TypeInt64
  - | TypeDouble
  - | TypeUnixFd
  - | TypeString
  - | TypeSignature
  - | TypeObjectPath
  - | TypeVariant
  - | TypeArray Type
  - | TypeDictionary Type Type
  - | TypeStructure [Type]
- showType :: Bool -> Type -> String
- newtype Signature = Signature [Type]
- signatureTypes :: Signature -> [Type]
- formatSignature :: Signature -> String
- typeCode :: Type -> String
- signature :: MonadThrow m => [Type] -> m Signature
- signature_ :: [Type] -> Signature
- parseSignature :: MonadThrow m => String -> m Signature
- parseSignatureBytes :: MonadThrow m => ByteString -> m Signature
- parseSigFast :: MonadThrow m => ByteString -> m Signature
- parseAtom :: Int -> (Type -> a) -> a -> a
- data SigParseError = SigParseError
- peekWord8AsInt :: ByteString -> Int -> Int
- parseSigFull :: MonadThrow m => ByteString -> m Signature
- extractFromVariant :: IsValue a => Variant -> Maybe a
- typeOf :: IsValue a => a -> Type
- class IsVariant a where
  - toVariant :: a -> Variant
  - fromVariant :: Variant -> Maybe a
- class IsVariant a => IsValue a where
  - typeOf_ :: Proxy a -> Type
  - toValue :: a -> Value
  - fromValue :: Value -> Maybe a
- class IsValue a => IsAtom a where
  - toAtom :: a -> Atom
  - fromAtom :: Atom -> Maybe a
- newtype Variant = Variant Value
- data Value
  - = ValueAtom Atom
  - | ValueVariant Variant
  - | ValueBytes ByteString
  - | ValueVector Type (Vector Value)
  - | ValueMap Type Type (Map Atom Value)
  - | ValueStructure [Value]
- data Atom
  - = AtomBool Bool
  - | AtomWord8 Word8
  - | AtomWord16 Word16
  - | AtomWord32 Word32
  - | AtomWord64 Word64
  - | AtomInt16 Int16
  - | AtomInt32 Int32
  - | AtomInt64 Int64
  - | AtomDouble Double
  - | AtomUnixFd Fd
  - | AtomText Text
  - | AtomSignature Signature
  - | AtomObjectPath ObjectPath
- showAtom :: Bool -> Atom -> String
- showValue :: Bool -> Value -> String
- showThings :: String -> (a -> String) -> String -> [a] -> String
- vectorToBytes :: Vector Value -> ByteString
- variantType :: Variant -> Type
- valueType :: Value -> Type
- atomType :: Atom -> Type
- bimap :: Ord k' => (k -> v -> (k', v')) -> Map k v -> Map k' v'
- bimapM :: (Monad m, Ord k') => (k -> v -> m (k', v')) -> Map k v -> m (Map k' v')
- varToVal :: IsVariant a => a -> Value
- newtype ObjectPath = ObjectPath String
- pathElements :: ObjectPath -> [String]
- fromElements :: [String] -> ObjectPath
- formatObjectPath :: ObjectPath -> String
- parseObjectPath :: MonadThrow m => String -> m ObjectPath
- objectPath_ :: String -> ObjectPath
- parserObjectPath :: Parser ()
- newtype InterfaceName = InterfaceName String
- formatInterfaceName :: InterfaceName -> String
- parseInterfaceName :: MonadThrow m => String -> m InterfaceName
- interfaceName_ :: String -> InterfaceName
- parserInterfaceName :: Parser ()
- newtype MemberName = MemberName String
- formatMemberName :: MemberName -> String
- parseMemberName :: MonadThrow m => String -> m MemberName
- memberName_ :: String -> MemberName
- parserMemberName :: Parser ()
- newtype ErrorName = ErrorName String
- formatErrorName :: ErrorName -> String
- parseErrorName :: MonadThrow m => String -> m ErrorName
- errorName_ :: String -> ErrorName
- newtype BusName = BusName String
- formatBusName :: BusName -> String
- parseBusName :: MonadThrow m => String -> m BusName
- busName_ :: String -> BusName
- parserBusName :: Parser ()
- newtype Structure = Structure [Value]
- structureItems :: Structure -> [Variant]
- data Array
  - = Array Type (Vector Value)
  - | ArrayBytes ByteString
- arrayItems :: Array -> [Variant]
- data Dictionary = Dictionary Type Type (Map Atom Value)
- dictionaryItems :: Dictionary -> [(Variant, Variant)]
- newtype Serial = Serial Word32
- serialValue :: Serial -> Word32
- firstSerial :: Serial
- nextSerial :: Serial -> Serial
- skipSepBy1 :: Parser a -> Parser b -> Parser ()
- forceParse :: String -> (String -> Maybe a) -> String -> a
- maybeParseString :: MonadThrow m => Parser a -> String -> m a

# Documentation

data Type #

Constructors

TypeBoolean |
TypeWord8 |
TypeWord16 |
TypeWord32 |
TypeWord64 |
TypeInt16 |
TypeInt32 |
TypeInt64 |
TypeDouble |
TypeUnixFd |
TypeString |
TypeSignature |
TypeObjectPath |
TypeVariant |
TypeArray Type |
TypeDictionary Type Type |
TypeStructure [Type] |

#### Instances

Instances details

NFData Type # |
Instance details Defined in DBus.Internal.Types Methods rnf :: Type -> () #
Generic Type # |
Instance details Defined in DBus.Internal.Types Associated Types
type Rep Type |
Instance details Defined in DBus.Internal.Types type Rep Type = D1 ('MetaData "Type" "DBus.Internal.Types" "dbus-1.3.11-HtdmZsU2WWi3zWEUaxClgd" 'False) ((((C1 ('MetaCons "TypeBoolean" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeWord8" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeWord16" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeWord32" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TypeWord64" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeInt16" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeInt32" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeInt64" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "TypeDouble" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeUnixFd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSignature" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TypeObjectPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeVariant" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: (C1 ('MetaCons "TypeDictionary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: C1 ('MetaCons "TypeStructure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type])))))))
Methods from :: Type -> Rep Type x # to :: Rep Type x -> Type #
Show Type # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Type -> ShowS # show :: Type -> String # showList :: [Type] -> ShowS #
Eq Type # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Type -> Type -> Bool # (/=) :: Type -> Type -> Bool #
Ord Type # |
Instance details Defined in DBus.Internal.Types Methods compare :: Type -> Type -> Ordering # (<) :: Type -> Type -> Bool # (<=) :: Type -> Type -> Bool # (>) :: Type -> Type -> Bool # (>=) :: Type -> Type -> Bool # max :: Type -> Type -> Type # min :: Type -> Type -> Type #
type Rep Type # |
Instance details Defined in DBus.Internal.Types type Rep Type = D1 ('MetaData "Type" "DBus.Internal.Types" "dbus-1.3.11-HtdmZsU2WWi3zWEUaxClgd" 'False) ((((C1 ('MetaCons "TypeBoolean" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeWord8" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeWord16" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeWord32" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TypeWord64" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeInt16" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeInt32" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeInt64" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "TypeDouble" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeUnixFd" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSignature" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TypeObjectPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeVariant" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: (C1 ('MetaCons "TypeDictionary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: C1 ('MetaCons "TypeStructure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type])))))))

showType :: Bool -> Type -> String #

newtype Signature #

A signature is a list of D-Bus types, obeying some basic rules of validity.

The rules of signature validity are complex: see http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures for details.

Constructors

Signature [Type] |

#### Instances

Instances details

IsAtom Signature # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Signature -> Atom # fromAtom :: Atom -> Maybe Signature #
IsValue Signature # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Signature -> Type # toValue :: Signature -> Value # fromValue :: Value -> Maybe Signature #
IsVariant Signature # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Signature -> Variant # fromVariant :: Variant -> Maybe Signature #
NFData Signature # |
Instance details Defined in DBus.Internal.Types Methods rnf :: Signature -> () #
IsString Signature # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> Signature #
Show Signature # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Signature -> ShowS # show :: Signature -> String # showList :: [Signature] -> ShowS #
Eq Signature # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Signature -> Signature -> Bool # (/=) :: Signature -> Signature -> Bool #
Ord Signature # |
Instance details Defined in DBus.Internal.Types Methods compare :: Signature -> Signature -> Ordering # (<) :: Signature -> Signature -> Bool # (<=) :: Signature -> Signature -> Bool # (>) :: Signature -> Signature -> Bool # (>=) :: Signature -> Signature -> Bool # max :: Signature -> Signature -> Signature # min :: Signature -> Signature -> Signature #

signatureTypes :: Signature -> [Type] #

Get the list of types in a signature. The inverse of `signature`.

formatSignature :: Signature -> String #

Convert a signature into a signature string. The inverse of `parseSignature`.

typeCode :: Type -> String #

signature :: MonadThrow m => [Type] -> m Signature #

Convert a list of types into a valid signature.

Throws if the given types are not a valid signature.

signature_ :: [Type] -> Signature #

Convert a list of types into a valid signature.

Throws an exception if the given types are not a valid signature.

parseSignature :: MonadThrow m => String -> m Signature #

Parse a signature string into a valid signature.

Throws if the given string is not a valid signature.

parseSignatureBytes :: MonadThrow m => ByteString -> m Signature #

parseSigFast :: MonadThrow m => ByteString -> m Signature #

parseAtom :: Int -> (Type -> a) -> a -> a #

data SigParseError #

Constructors

SigParseError |

#### Instances

Instances details

Exception SigParseError # |
Instance details Defined in DBus.Internal.Types Methods toException :: SigParseError -> SomeException # fromException :: SomeException -> Maybe SigParseError # displayException :: SigParseError -> String # backtraceDesired :: SigParseError -> Bool #
Show SigParseError # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> SigParseError -> ShowS # show :: SigParseError -> String # showList :: [SigParseError] -> ShowS #

peekWord8AsInt :: ByteString -> Int -> Int #

parseSigFull :: MonadThrow m => ByteString -> m Signature #

extractFromVariant :: IsValue a => Variant -> Maybe a #

typeOf :: IsValue a => a -> Type #

class IsVariant a where #

Methods

toVariant :: a -> Variant #

fromVariant :: Variant -> Maybe a #

#### Instances

Instances details

IsVariant ByteString # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: ByteString -> Variant # fromVariant :: Variant -> Maybe ByteString #
IsVariant ByteString # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: ByteString -> Variant # fromVariant :: Variant -> Maybe ByteString #
IsVariant Array # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Array -> Variant # fromVariant :: Variant -> Maybe Array #
IsVariant BusName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: BusName -> Variant # fromVariant :: Variant -> Maybe BusName #
IsVariant Dictionary # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Dictionary -> Variant # fromVariant :: Variant -> Maybe Dictionary #
IsVariant ErrorName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: ErrorName -> Variant # fromVariant :: Variant -> Maybe ErrorName #
IsVariant InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: InterfaceName -> Variant # fromVariant :: Variant -> Maybe InterfaceName #
IsVariant MemberName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: MemberName -> Variant # fromVariant :: Variant -> Maybe MemberName #
IsVariant ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: ObjectPath -> Variant # fromVariant :: Variant -> Maybe ObjectPath #
IsVariant Serial # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Serial -> Variant # fromVariant :: Variant -> Maybe Serial #
IsVariant Signature # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Signature -> Variant # fromVariant :: Variant -> Maybe Signature #
IsVariant Structure # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Structure -> Variant # fromVariant :: Variant -> Maybe Structure #
IsVariant Variant # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Variant -> Variant # fromVariant :: Variant -> Maybe Variant #
IsVariant Int16 # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Int16 -> Variant # fromVariant :: Variant -> Maybe Int16 #
IsVariant Int32 # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Int32 -> Variant # fromVariant :: Variant -> Maybe Int32 #
IsVariant Int64 # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Int64 -> Variant # fromVariant :: Variant -> Maybe Int64 #
IsVariant Fd # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Fd -> Variant # fromVariant :: Variant -> Maybe Fd #
IsVariant Word16 # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Word16 -> Variant # fromVariant :: Variant -> Maybe Word16 #
IsVariant Word32 # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Word32 -> Variant # fromVariant :: Variant -> Maybe Word32 #
IsVariant Word64 # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Word64 -> Variant # fromVariant :: Variant -> Maybe Word64 #
IsVariant Word8 # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Word8 -> Variant # fromVariant :: Variant -> Maybe Word8 #
IsVariant Text # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Text -> Variant # fromVariant :: Variant -> Maybe Text #
IsVariant Text # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Text -> Variant # fromVariant :: Variant -> Maybe Text #
IsVariant String # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: String -> Variant # fromVariant :: Variant -> Maybe String #
IsVariant () # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: () -> Variant # fromVariant :: Variant -> Maybe () #
IsVariant Bool # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Bool -> Variant # fromVariant :: Variant -> Maybe Bool #
IsVariant Double # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Double -> Variant # fromVariant :: Variant -> Maybe Double #
IsValue a => IsVariant (Vector a) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Vector a -> Variant # fromVariant :: Variant -> Maybe (Vector a) #
IsValue a => IsVariant [a] # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: [a] -> Variant # fromVariant :: Variant -> Maybe [a] #
(Ord k, IsAtom k, IsValue v) => IsVariant (Map k v) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Map k v -> Variant # fromVariant :: Variant -> Maybe (Map k v) #
(IsVariant a1, IsVariant a2) => IsVariant (a1, a2) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2) -> Variant # fromVariant :: Variant -> Maybe (a1, a2) #
(IsVariant a1, IsVariant a2, IsVariant a3) => IsVariant (a1, a2, a3) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4) => IsVariant (a1, a2, a3, a4) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5) => IsVariant (a1, a2, a3, a4, a5) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6) => IsVariant (a1, a2, a3, a4, a5, a6) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7) => IsVariant (a1, a2, a3, a4, a5, a6, a7) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13, IsVariant a14) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) #
(IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13, IsVariant a14, IsVariant a15) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) -> Variant # fromVariant :: Variant -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) #

class IsVariant a => IsValue a where #

Value types can be used as items in containers, such as lists or dictionaries.

Users may not provide new instances of `IsValue` because this could allow containers to be created with items of heterogenous types.

Methods

typeOf_ :: Proxy a -> Type #

toValue :: a -> Value #

fromValue :: Value -> Maybe a #

#### Instances

Instances details

IsValue ByteString # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy ByteString -> Type # toValue :: ByteString -> Value # fromValue :: Value -> Maybe ByteString #
IsValue ByteString # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy ByteString -> Type # toValue :: ByteString -> Value # fromValue :: Value -> Maybe ByteString #
IsValue ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy ObjectPath -> Type # toValue :: ObjectPath -> Value # fromValue :: Value -> Maybe ObjectPath #
IsValue Signature # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Signature -> Type # toValue :: Signature -> Value # fromValue :: Value -> Maybe Signature #
IsValue Variant # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Variant -> Type # toValue :: Variant -> Value # fromValue :: Value -> Maybe Variant #
IsValue Int16 # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Int16 -> Type # toValue :: Int16 -> Value # fromValue :: Value -> Maybe Int16 #
IsValue Int32 # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Int32 -> Type # toValue :: Int32 -> Value # fromValue :: Value -> Maybe Int32 #
IsValue Int64 # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Int64 -> Type # toValue :: Int64 -> Value # fromValue :: Value -> Maybe Int64 #
IsValue Fd # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Fd -> Type # toValue :: Fd -> Value # fromValue :: Value -> Maybe Fd #
IsValue Word16 # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Word16 -> Type # toValue :: Word16 -> Value # fromValue :: Value -> Maybe Word16 #
IsValue Word32 # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Word32 -> Type # toValue :: Word32 -> Value # fromValue :: Value -> Maybe Word32 #
IsValue Word64 # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Word64 -> Type # toValue :: Word64 -> Value # fromValue :: Value -> Maybe Word64 #
IsValue Word8 # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Word8 -> Type # toValue :: Word8 -> Value # fromValue :: Value -> Maybe Word8 #
IsValue Text # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Text -> Type # toValue :: Text -> Value # fromValue :: Value -> Maybe Text #
IsValue Text # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Text -> Type # toValue :: Text -> Value # fromValue :: Value -> Maybe Text #
IsValue String # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy String -> Type # toValue :: String -> Value # fromValue :: Value -> Maybe String #
IsValue () # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy () -> Type # toValue :: () -> Value # fromValue :: Value -> Maybe () #
IsValue Bool # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Bool -> Type # toValue :: Bool -> Value # fromValue :: Value -> Maybe Bool #
IsValue Double # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Double -> Type # toValue :: Double -> Value # fromValue :: Value -> Maybe Double #
IsValue a => IsValue (Vector a) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (Vector a) -> Type # toValue :: Vector a -> Value # fromValue :: Value -> Maybe (Vector a) #
IsValue a => IsValue [a] # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy [a] -> Type # toValue :: [a] -> Value # fromValue :: Value -> Maybe [a] #
(Ord k, IsAtom k, IsValue v) => IsValue (Map k v) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (Map k v) -> Type # toValue :: Map k v -> Value # fromValue :: Value -> Maybe (Map k v) #
(IsValue a1, IsValue a2) => IsValue (a1, a2) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2) -> Type # toValue :: (a1, a2) -> Value # fromValue :: Value -> Maybe (a1, a2) #
(IsValue a1, IsValue a2, IsValue a3) => IsValue (a1, a2, a3) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3) -> Type # toValue :: (a1, a2, a3) -> Value # fromValue :: Value -> Maybe (a1, a2, a3) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4) => IsValue (a1, a2, a3, a4) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4) -> Type # toValue :: (a1, a2, a3, a4) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5) => IsValue (a1, a2, a3, a4, a5) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5) -> Type # toValue :: (a1, a2, a3, a4, a5) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6) => IsValue (a1, a2, a3, a4, a5, a6) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6) -> Type # toValue :: (a1, a2, a3, a4, a5, a6) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7) => IsValue (a1, a2, a3, a4, a5, a6, a7) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13, IsValue a14) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) #
(IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13, IsValue a14, IsValue a15) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) -> Type # toValue :: (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) -> Value # fromValue :: Value -> Maybe (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) #

class IsValue a => IsAtom a where #

Atomic types can be used as keys to dictionaries.

Users may not provide new instances of `IsAtom` because this could allow dictionaries to be created with invalid keys.

Methods

toAtom :: a -> Atom #

fromAtom :: Atom -> Maybe a #

#### Instances

Instances details

IsAtom ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: ObjectPath -> Atom # fromAtom :: Atom -> Maybe ObjectPath #
IsAtom Signature # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Signature -> Atom # fromAtom :: Atom -> Maybe Signature #
IsAtom Int16 # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Int16 -> Atom # fromAtom :: Atom -> Maybe Int16 #
IsAtom Int32 # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Int32 -> Atom # fromAtom :: Atom -> Maybe Int32 #
IsAtom Int64 # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Int64 -> Atom # fromAtom :: Atom -> Maybe Int64 #
IsAtom Fd # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Fd -> Atom # fromAtom :: Atom -> Maybe Fd #
IsAtom Word16 # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Word16 -> Atom # fromAtom :: Atom -> Maybe Word16 #
IsAtom Word32 # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Word32 -> Atom # fromAtom :: Atom -> Maybe Word32 #
IsAtom Word64 # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Word64 -> Atom # fromAtom :: Atom -> Maybe Word64 #
IsAtom Word8 # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Word8 -> Atom # fromAtom :: Atom -> Maybe Word8 #
IsAtom Text # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Text -> Atom # fromAtom :: Atom -> Maybe Text #
IsAtom Text # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Text -> Atom # fromAtom :: Atom -> Maybe Text #
IsAtom String # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: String -> Atom # fromAtom :: Atom -> Maybe String #
IsAtom Bool # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Bool -> Atom # fromAtom :: Atom -> Maybe Bool #
IsAtom Double # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: Double -> Atom # fromAtom :: Atom -> Maybe Double #

newtype Variant #

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

Constructors

Variant Value |

#### Instances

Instances details

IsValue Variant # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy Variant -> Type # toValue :: Variant -> Value # fromValue :: Value -> Maybe Variant #
IsVariant Variant # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Variant -> Variant # fromVariant :: Variant -> Maybe Variant #
Show Variant # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Variant -> ShowS # show :: Variant -> String # showList :: [Variant] -> ShowS #
Eq Variant # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Variant -> Variant -> Bool # (/=) :: Variant -> Variant -> Bool #

data Value #

Constructors

ValueAtom Atom |
ValueVariant Variant |
ValueBytes ByteString |
ValueVector Type (Vector Value) |
ValueMap Type Type (Map Atom Value) |
ValueStructure [Value] |

#### Instances

Instances details

Show Value # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Value -> ShowS # show :: Value -> String # showList :: [Value] -> ShowS #
Eq Value # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Value -> Value -> Bool # (/=) :: Value -> Value -> Bool #

data Atom #

Constructors

AtomBool Bool |
AtomWord8 Word8 |
AtomWord16 Word16 |
AtomWord32 Word32 |
AtomWord64 Word64 |
AtomInt16 Int16 |
AtomInt32 Int32 |
AtomInt64 Int64 |
AtomDouble Double |
AtomUnixFd Fd |
AtomText Text |
AtomSignature Signature |
AtomObjectPath ObjectPath |

#### Instances

Instances details

Show Atom # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Atom -> ShowS # show :: Atom -> String # showList :: [Atom] -> ShowS #
Eq Atom # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Atom -> Atom -> Bool # (/=) :: Atom -> Atom -> Bool #
Ord Atom # |
Instance details Defined in DBus.Internal.Types Methods compare :: Atom -> Atom -> Ordering # (<) :: Atom -> Atom -> Bool # (<=) :: Atom -> Atom -> Bool # (>) :: Atom -> Atom -> Bool # (>=) :: Atom -> Atom -> Bool # max :: Atom -> Atom -> Atom # min :: Atom -> Atom -> Atom #

showAtom :: Bool -> Atom -> String #

showValue :: Bool -> Value -> String #

showThings :: String -> (a -> String) -> String -> [a] -> String #

vectorToBytes :: Vector Value -> ByteString #

variantType :: Variant -> Type #

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.

valueType :: Value -> Type #

atomType :: Atom -> Type #

bimap :: Ord k' => (k -> v -> (k', v')) -> Map k v -> Map k' v' #

bimapM :: (Monad m, Ord k') => (k -> v -> m (k', v')) -> Map k v -> m (Map k' v') #

varToVal :: IsVariant a => a -> Value #

newtype ObjectPath #

Object paths are special strings, used to identify a particular object exported from a D-Bus application.

Object paths must begin with a slash, and consist of alphanumeric characters separated by slashes.

See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path for details.

Constructors

ObjectPath String |

#### Instances

Instances details

IsAtom ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods toAtom :: ObjectPath -> Atom # fromAtom :: Atom -> Maybe ObjectPath #
IsValue ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods typeOf_ :: Proxy ObjectPath -> Type # toValue :: ObjectPath -> Value # fromValue :: Value -> Maybe ObjectPath #
IsVariant ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: ObjectPath -> Variant # fromVariant :: Variant -> Maybe ObjectPath #
NFData ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods rnf :: ObjectPath -> () #
IsString ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> ObjectPath #
Show ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> ObjectPath -> ShowS # show :: ObjectPath -> String # showList :: [ObjectPath] -> ShowS #
Eq ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods (==) :: ObjectPath -> ObjectPath -> Bool # (/=) :: ObjectPath -> ObjectPath -> Bool #
Ord ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods compare :: ObjectPath -> ObjectPath -> Ordering # (<) :: ObjectPath -> ObjectPath -> Bool # (<=) :: ObjectPath -> ObjectPath -> Bool # (>) :: ObjectPath -> ObjectPath -> Bool # (>=) :: ObjectPath -> ObjectPath -> Bool # max :: ObjectPath -> ObjectPath -> ObjectPath # min :: ObjectPath -> ObjectPath -> ObjectPath #
Lift ObjectPath # |
Instance details Defined in DBus.Internal.Types Methods lift :: Quote m => ObjectPath -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => ObjectPath -> Code m ObjectPath #

pathElements :: ObjectPath -> [String] #

fromElements :: [String] -> ObjectPath #

formatObjectPath :: ObjectPath -> String #

parseObjectPath :: MonadThrow m => String -> m ObjectPath #

objectPath_ :: String -> ObjectPath #

parserObjectPath :: Parser () #

newtype InterfaceName #

Interfaces are used to group a set of methods and signals within an exported object. Interface names consist of alphanumeric characters separated by periods.

See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface for details.

Constructors

InterfaceName String |

#### Instances

Instances details

IsVariant InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: InterfaceName -> Variant # fromVariant :: Variant -> Maybe InterfaceName #
NFData InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods rnf :: InterfaceName -> () #
IsString InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> InterfaceName #
Show InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> InterfaceName -> ShowS # show :: InterfaceName -> String # showList :: [InterfaceName] -> ShowS #
Eq InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods (==) :: InterfaceName -> InterfaceName -> Bool # (/=) :: InterfaceName -> InterfaceName -> Bool #
Ord InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods compare :: InterfaceName -> InterfaceName -> Ordering # (<) :: InterfaceName -> InterfaceName -> Bool # (<=) :: InterfaceName -> InterfaceName -> Bool # (>) :: InterfaceName -> InterfaceName -> Bool # (>=) :: InterfaceName -> InterfaceName -> Bool # max :: InterfaceName -> InterfaceName -> InterfaceName # min :: InterfaceName -> InterfaceName -> InterfaceName #
Lift InterfaceName # |
Instance details Defined in DBus.Internal.Types Methods lift :: Quote m => InterfaceName -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => InterfaceName -> Code m InterfaceName #

formatInterfaceName :: InterfaceName -> String #

parseInterfaceName :: MonadThrow m => String -> m InterfaceName #

interfaceName_ :: String -> InterfaceName #

parserInterfaceName :: Parser () #

newtype MemberName #

Member names are used to identify a single method or signal within an interface. Method names consist of alphanumeric characters.

See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-member for details.

Constructors

MemberName String |

#### Instances

Instances details

IsVariant MemberName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: MemberName -> Variant # fromVariant :: Variant -> Maybe MemberName #
NFData MemberName # |
Instance details Defined in DBus.Internal.Types Methods rnf :: MemberName -> () #
IsString MemberName # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> MemberName #
Show MemberName # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> MemberName -> ShowS # show :: MemberName -> String # showList :: [MemberName] -> ShowS #
Eq MemberName # |
Instance details Defined in DBus.Internal.Types Methods (==) :: MemberName -> MemberName -> Bool # (/=) :: MemberName -> MemberName -> Bool #
Ord MemberName # |
Instance details Defined in DBus.Internal.Types Methods compare :: MemberName -> MemberName -> Ordering # (<) :: MemberName -> MemberName -> Bool # (<=) :: MemberName -> MemberName -> Bool # (>) :: MemberName -> MemberName -> Bool # (>=) :: MemberName -> MemberName -> Bool # max :: MemberName -> MemberName -> MemberName # min :: MemberName -> MemberName -> MemberName #
Lift MemberName # |
Instance details Defined in DBus.Internal.Types Methods lift :: Quote m => MemberName -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => MemberName -> Code m MemberName #

formatMemberName :: MemberName -> String #

parseMemberName :: MonadThrow m => String -> m MemberName #

memberName_ :: String -> MemberName #

parserMemberName :: Parser () #

newtype ErrorName #

Error names are used to identify which type of error was returned from a method call. Error names consist of alphanumeric characters separated by periods.

See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-error for details.

Constructors

ErrorName String |

#### Instances

Instances details

IsVariant ErrorName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: ErrorName -> Variant # fromVariant :: Variant -> Maybe ErrorName #
NFData ErrorName # |
Instance details Defined in DBus.Internal.Types Methods rnf :: ErrorName -> () #
IsString ErrorName # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> ErrorName #
Show ErrorName # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> ErrorName -> ShowS # show :: ErrorName -> String # showList :: [ErrorName] -> ShowS #
Eq ErrorName # |
Instance details Defined in DBus.Internal.Types Methods (==) :: ErrorName -> ErrorName -> Bool # (/=) :: ErrorName -> ErrorName -> Bool #
Ord ErrorName # |
Instance details Defined in DBus.Internal.Types Methods compare :: ErrorName -> ErrorName -> Ordering # (<) :: ErrorName -> ErrorName -> Bool # (<=) :: ErrorName -> ErrorName -> Bool # (>) :: ErrorName -> ErrorName -> Bool # (>=) :: ErrorName -> ErrorName -> Bool # max :: ErrorName -> ErrorName -> ErrorName # min :: ErrorName -> ErrorName -> ErrorName #

formatErrorName :: ErrorName -> String #

parseErrorName :: MonadThrow m => String -> m ErrorName #

errorName_ :: String -> ErrorName #

newtype BusName #

Bus names are used to identify particular clients on the message bus. A bus name may be either unique or well-known, where unique names start with a colon. Bus names consist of alphanumeric characters separated by periods.

See http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus for details.

Constructors

BusName String |

#### Instances

Instances details

IsVariant BusName # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: BusName -> Variant # fromVariant :: Variant -> Maybe BusName #
NFData BusName # |
Instance details Defined in DBus.Internal.Types Methods rnf :: BusName -> () #
IsString BusName # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> BusName #
Show BusName # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> BusName -> ShowS # show :: BusName -> String # showList :: [BusName] -> ShowS #
Eq BusName # |
Instance details Defined in DBus.Internal.Types Methods (==) :: BusName -> BusName -> Bool # (/=) :: BusName -> BusName -> Bool #
Ord BusName # |
Instance details Defined in DBus.Internal.Types Methods compare :: BusName -> BusName -> Ordering # (<) :: BusName -> BusName -> Bool # (<=) :: BusName -> BusName -> Bool # (>) :: BusName -> BusName -> Bool # (>=) :: BusName -> BusName -> Bool # max :: BusName -> BusName -> BusName # min :: BusName -> BusName -> BusName #
Lift BusName # |
Instance details Defined in DBus.Internal.Types Methods lift :: Quote m => BusName -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => BusName -> Code m BusName #

formatBusName :: BusName -> String #

parseBusName :: MonadThrow m => String -> m BusName #

busName_ :: String -> BusName #

parserBusName :: Parser () #

newtype Structure #

A D-Bus Structure is a container type similar to Haskell tuples, storing values of any type that is convertable to `IsVariant`. A Structure may contain up to 255 values.

Most users can use the `IsVariant` instance for tuples to extract the values of a structure. This type is for very large structures, which may be awkward to work with as tuples.

Constructors

Structure [Value] |

#### Instances

Instances details

IsVariant Structure # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Structure -> Variant # fromVariant :: Variant -> Maybe Structure #
Show Structure # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Structure -> ShowS # show :: Structure -> String # showList :: [Structure] -> ShowS #
Eq Structure # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Structure -> Structure -> Bool # (/=) :: Structure -> Structure -> Bool #

structureItems :: Structure -> [Variant] #

data Array #

A D-Bus Array is a container type similar to Haskell lists, storing zero or more values of a single D-Bus type.

Most users can use the `IsVariant` instance for lists or vectors to extract the values of an array. This type is for advanced use cases, where the user wants to convert array values to Haskell types that are not instances of `IsValue`.

Constructors

Array Type (Vector Value) |
ArrayBytes ByteString |

#### Instances

Instances details

IsVariant Array # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Array -> Variant # fromVariant :: Variant -> Maybe Array #
Show Array # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Array -> ShowS # show :: Array -> String # showList :: [Array] -> ShowS #
Eq Array # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Array -> Array -> Bool # (/=) :: Array -> Array -> Bool #

arrayItems :: Array -> [Variant] #

data Dictionary #

A D-Bus Dictionary is a container type similar to Haskell maps, storing zero or more associations between keys and values.

Most users can use the `IsVariant` instance for maps to extract the values of a dictionary. This type is for advanced use cases, where the user wants to convert dictionary items to Haskell types that are not instances of `IsValue`.

Constructors

Dictionary Type Type (Map Atom Value) |

#### Instances

Instances details

IsVariant Dictionary # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Dictionary -> Variant # fromVariant :: Variant -> Maybe Dictionary #
Show Dictionary # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Dictionary -> ShowS # show :: Dictionary -> String # showList :: [Dictionary] -> ShowS #
Eq Dictionary # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Dictionary -> Dictionary -> Bool # (/=) :: Dictionary -> Dictionary -> Bool #

dictionaryItems :: Dictionary -> [(Variant, Variant)] #

newtype Serial #

A value used to uniquely identify a particular message within a session. Serials are 32-bit unsigned integers, and eventually wrap.

Constructors

Serial Word32 |

#### Instances

Instances details

IsVariant Serial # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: Serial -> Variant # fromVariant :: Variant -> Maybe Serial #
Show Serial # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> Serial -> ShowS # show :: Serial -> String # showList :: [Serial] -> ShowS #
Eq Serial # |
Instance details Defined in DBus.Internal.Types Methods (==) :: Serial -> Serial -> Bool # (/=) :: Serial -> Serial -> Bool #
Ord Serial # |
Instance details Defined in DBus.Internal.Types Methods compare :: Serial -> Serial -> Ordering # (<) :: Serial -> Serial -> Bool # (<=) :: Serial -> Serial -> Bool # (>) :: Serial -> Serial -> Bool # (>=) :: Serial -> Serial -> Bool # max :: Serial -> Serial -> Serial # min :: Serial -> Serial -> Serial #

serialValue :: Serial -> Word32 #

firstSerial :: Serial #

Get the first serial in the sequence.

nextSerial :: Serial -> Serial #

Get the next serial in the sequence. This may wrap around to `firstSerial`.

skipSepBy1 :: Parser a -> Parser b -> Parser () #

forceParse :: String -> (String -> Maybe a) -> String -> a #

maybeParseString :: MonadThrow m => Parser a -> String -> m a #