dbus-1.4.1: 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 Source #

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 Source # |
Instance details Defined in DBus.Internal.Types Methods rnf :: Type -> () Source #
Generic Type Source # |

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.4.1-J91O0zzdbki2WUyoiKBIsC" '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 Source #

to :: Rep Type x -> Type Source #

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

Instance details

Defined in DBus.Internal.Types

type Rep Type = D1 ('MetaData "Type" "DBus.Internal.Types" "dbus-1.4.1-J91O0zzdbki2WUyoiKBIsC" '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 Source #

newtype Signature Source #

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

Instance details

Defined in DBus.Internal.Types

Methods

compare :: Signature -> Signature -> Ordering Source #

(<) :: Signature -> Signature -> Bool Source #

(<=) :: Signature -> Signature -> Bool Source #

(>) :: Signature -> Signature -> Bool Source #

(>=) :: Signature -> Signature -> Bool Source #

max :: Signature -> Signature -> Signature Source #

min :: Signature -> Signature -> Signature Source #

signatureTypes :: Signature -> [Type] Source #

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

formatSignature :: Signature -> String Source #

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

typeCode :: Type -> String Source #

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

Convert a list of types into a valid signature.

Throws if the given types are not a valid signature.

signature_ :: [Type] -> Signature Source #

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 Source #

Parse a signature string into a valid signature.

Throws if the given string is not a valid signature.

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

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

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

data SigParseError Source #

Constructors

SigParseError |

#### Instances

Instances details

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

peekWord8AsInt :: ByteString -> Int -> Int Source #

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

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

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

class IsVariant a where Source #

Methods

toVariant :: a -> Variant Source #

fromVariant :: Variant -> Maybe a Source #

#### Instances

Instances details

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

class IsVariant a => IsValue a where Source #

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 Source #

toValue :: a -> Value Source #

fromValue :: Value -> Maybe a Source #

#### Instances

Instances details

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

class IsValue a => IsAtom a where Source #

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 Source #

fromAtom :: Atom -> Maybe a Source #

#### Instances

Instances details

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

newtype Variant Source #

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

data Value Source #

Constructors

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

#### Instances

Instances details

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

data Atom Source #

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

showAtom :: Bool -> Atom -> String Source #

showValue :: Bool -> Value -> String Source #

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

vectorToBytes :: Vector Value -> ByteString Source #

variantType :: Variant -> Type Source #

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 Source #

atomType :: Atom -> Type Source #

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

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

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

newtype ObjectPath Source #

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

Instance details

Defined in DBus.Internal.Types

Methods

compare :: ObjectPath -> ObjectPath -> Ordering Source #

(<) :: ObjectPath -> ObjectPath -> Bool Source #

(<=) :: ObjectPath -> ObjectPath -> Bool Source #

(>) :: ObjectPath -> ObjectPath -> Bool Source #

(>=) :: ObjectPath -> ObjectPath -> Bool Source #

max :: ObjectPath -> ObjectPath -> ObjectPath Source #

min :: ObjectPath -> ObjectPath -> ObjectPath Source #

Lift ObjectPath Source # |
Instance details Defined in DBus.Internal.Types Methods lift :: Quote m => ObjectPath -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => ObjectPath -> Code m ObjectPath Source #

pathElements :: ObjectPath -> [String] Source #

fromElements :: [String] -> ObjectPath Source #

formatObjectPath :: ObjectPath -> String Source #

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

objectPath_ :: String -> ObjectPath Source #

parserObjectPath :: Parser () Source #

newtype InterfaceName Source #

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 Source # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: InterfaceName -> Variant Source # fromVariant :: Variant -> Maybe InterfaceName Source #
NFData InterfaceName Source # |
Instance details Defined in DBus.Internal.Types Methods rnf :: InterfaceName -> () Source #
IsString InterfaceName Source # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> InterfaceName Source #
Show InterfaceName Source # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> InterfaceName -> ShowS Source # show :: InterfaceName -> String Source # showList :: [InterfaceName] -> ShowS Source #
Eq InterfaceName Source # |
Instance details Defined in DBus.Internal.Types Methods (==) :: InterfaceName -> InterfaceName -> Bool Source # (/=) :: InterfaceName -> InterfaceName -> Bool Source #
Ord InterfaceName Source # |

Instance details

Defined in DBus.Internal.Types

Methods

compare :: InterfaceName -> InterfaceName -> Ordering Source #

(<) :: InterfaceName -> InterfaceName -> Bool Source #

(<=) :: InterfaceName -> InterfaceName -> Bool Source #

(>) :: InterfaceName -> InterfaceName -> Bool Source #

(>=) :: InterfaceName -> InterfaceName -> Bool Source #

max :: InterfaceName -> InterfaceName -> InterfaceName Source #

min :: InterfaceName -> InterfaceName -> InterfaceName Source #

Lift InterfaceName Source # |
Instance details Defined in DBus.Internal.Types Methods lift :: Quote m => InterfaceName -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => InterfaceName -> Code m InterfaceName Source #

formatInterfaceName :: InterfaceName -> String Source #

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

interfaceName_ :: String -> InterfaceName Source #

parserInterfaceName :: Parser () Source #

newtype MemberName Source #

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 Source # |
Instance details Defined in DBus.Internal.Types Methods toVariant :: MemberName -> Variant Source # fromVariant :: Variant -> Maybe MemberName Source #
NFData MemberName Source # |
Instance details Defined in DBus.Internal.Types Methods rnf :: MemberName -> () Source #
IsString MemberName Source # |
Instance details Defined in DBus.Internal.Types Methods fromString :: String -> MemberName Source #
Show MemberName Source # |
Instance details Defined in DBus.Internal.Types Methods showsPrec :: Int -> MemberName -> ShowS Source # show :: MemberName -> String Source # showList :: [MemberName] -> ShowS Source #
Eq MemberName Source # |
Instance details Defined in DBus.Internal.Types Methods (==) :: MemberName -> MemberName -> Bool Source # (/=) :: MemberName -> MemberName -> Bool Source #
Ord MemberName Source # |

Instance details

Defined in DBus.Internal.Types

Methods

compare :: MemberName -> MemberName -> Ordering Source #

(<) :: MemberName -> MemberName -> Bool Source #

(<=) :: MemberName -> MemberName -> Bool Source #

(>) :: MemberName -> MemberName -> Bool Source #

(>=) :: MemberName -> MemberName -> Bool Source #

max :: MemberName -> MemberName -> MemberName Source #

min :: MemberName -> MemberName -> MemberName Source #

Lift MemberName Source # |
Instance details Defined in DBus.Internal.Types Methods lift :: Quote m => MemberName -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => MemberName -> Code m MemberName Source #

formatMemberName :: MemberName -> String Source #

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

memberName_ :: String -> MemberName Source #

parserMemberName :: Parser () Source #

newtype ErrorName Source #

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

Instance details

Defined in DBus.Internal.Types

Methods

compare :: ErrorName -> ErrorName -> Ordering Source #

(<) :: ErrorName -> ErrorName -> Bool Source #

(<=) :: ErrorName -> ErrorName -> Bool Source #

(>) :: ErrorName -> ErrorName -> Bool Source #

(>=) :: ErrorName -> ErrorName -> Bool Source #

max :: ErrorName -> ErrorName -> ErrorName Source #

min :: ErrorName -> ErrorName -> ErrorName Source #

formatErrorName :: ErrorName -> String Source #

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

errorName_ :: String -> ErrorName Source #

newtype BusName Source #

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

formatBusName :: BusName -> String Source #

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

busName_ :: String -> BusName Source #

parserBusName :: Parser () Source #

newtype Structure Source #

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

structureItems :: Structure -> [Variant] Source #

data Array Source #

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

arrayItems :: Array -> [Variant] Source #

data Dictionary Source #

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

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

newtype Serial Source #

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

serialValue :: Serial -> Word32 Source #

firstSerial :: Serial Source #

Get the first serial in the sequence.

nextSerial :: Serial -> Serial Source #

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

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

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

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