d-bus-0.1.8: Permissively licensed D-Bus client library

Safe HaskellNone
LanguageHaskell2010

DBus.Types

Synopsis

Documentation

data ObjectPath Source #

Constructors

ObjectPath 

Fields

Instances

Eq ObjectPath Source # 
Data ObjectPath Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ObjectPath -> c ObjectPath #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ObjectPath #

toConstr :: ObjectPath -> Constr #

dataTypeOf :: ObjectPath -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ObjectPath) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ObjectPath) #

gmapT :: (forall b. Data b => b -> b) -> ObjectPath -> ObjectPath #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ObjectPath -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ObjectPath -> r #

gmapQ :: (forall d. Data d => d -> u) -> ObjectPath -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ObjectPath -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ObjectPath -> m ObjectPath #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ObjectPath -> m ObjectPath #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ObjectPath -> m ObjectPath #

Ord ObjectPath Source # 
Show ObjectPath Source # 
IsString ObjectPath Source # 
type RepType ObjectPath Source # 

objectPath :: Text -> ObjectPath Source #

Parse an object path. Contrary to the standard, empty path parts are ignored

data DBusSimpleType Source #

Types that are not composite. These can be the keys of a Dict. Most of them should be self-explanatory

Constructors

TypeByte 
TypeBoolean 
TypeInt16 
TypeUInt16 
TypeInt32 
TypeUInt32 
TypeInt64 
TypeUInt64 
TypeDouble 
TypeUnixFD

Unix File descriptor

TypeString 
TypeObjectPath

Name of an object instance

TypeSignature

A (DBus) type signature

Instances

Eq DBusSimpleType Source # 
Data DBusSimpleType Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DBusSimpleType -> c DBusSimpleType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DBusSimpleType #

toConstr :: DBusSimpleType -> Constr #

dataTypeOf :: DBusSimpleType -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DBusSimpleType) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DBusSimpleType) #

gmapT :: (forall b. Data b => b -> b) -> DBusSimpleType -> DBusSimpleType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DBusSimpleType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DBusSimpleType -> r #

gmapQ :: (forall d. Data d => d -> u) -> DBusSimpleType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DBusSimpleType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DBusSimpleType -> m DBusSimpleType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DBusSimpleType -> m DBusSimpleType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DBusSimpleType -> m DBusSimpleType #

Read DBusSimpleType Source # 
Show DBusSimpleType Source # 
SEq DBusSimpleType Source # 
SDecide DBusSimpleType Source # 
SingKind DBusSimpleType Source # 
SingI DBusSimpleType TypeByte Source # 

Methods

sing :: Sing TypeByte a #

SingI DBusSimpleType TypeBoolean Source # 

Methods

sing :: Sing TypeBoolean a #

SingI DBusSimpleType TypeInt16 Source # 

Methods

sing :: Sing TypeInt16 a #

SingI DBusSimpleType TypeUInt16 Source # 

Methods

sing :: Sing TypeUInt16 a #

SingI DBusSimpleType TypeInt32 Source # 

Methods

sing :: Sing TypeInt32 a #

SingI DBusSimpleType TypeUInt32 Source # 

Methods

sing :: Sing TypeUInt32 a #

SingI DBusSimpleType TypeInt64 Source # 

Methods

sing :: Sing TypeInt64 a #

SingI DBusSimpleType TypeUInt64 Source # 

Methods

sing :: Sing TypeUInt64 a #

SingI DBusSimpleType TypeDouble Source # 

Methods

sing :: Sing TypeDouble a #

SingI DBusSimpleType TypeUnixFD Source # 

Methods

sing :: Sing TypeUnixFD a #

SingI DBusSimpleType TypeString Source # 

Methods

sing :: Sing TypeString a #

SingI DBusSimpleType TypeObjectPath Source # 
SingI DBusSimpleType TypeSignature Source # 

Methods

sing :: Sing TypeSignature a #

PEq DBusSimpleType (Proxy * DBusSimpleType) Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> Type) -> *) TypeDictEntrySym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> Type) -> *) TypeDictSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let6989586621679115098TSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let6989586621679115088TSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType DBusType -> *) DBusSimpleTypeSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType DBusType -> *) Let6989586621679115077TSym0 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictEntrySym1 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictSym1 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let6989586621679115098TSym1 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let6989586621679115088TSym1 Source # 
data Sing DBusSimpleType Source # 
type DemoteRep DBusSimpleType Source # 
type (:/=) DBusSimpleType x y Source # 
type (:==) DBusSimpleType a0 b0 Source # 
type Apply DBusSimpleType DBusType DBusSimpleTypeSym0 l0 Source # 
type Apply DBusSimpleType DBusType Let6989586621679115077TSym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> Type) TypeDictEntrySym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> Type) TypeDictSym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> *) Let6989586621679115098TSym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> *) Let6989586621679115088TSym0 l0 Source # 

ppSimpleType :: DBusSimpleType -> String Source #

Pretty-print a simple type (this is _not_ DBUs' type format)

data DBusType Source #

Composite Types

Constructors

DBusSimpleType DBusSimpleType

A simple type

TypeArray DBusType

Variable-length homogenous arrays

TypeStruct [DBusType]

Structs (Tuples) and a list of member types

TypeDict DBusSimpleType DBusType

Dictionary / Map

TypeVariant

Existentially types container. Carries it's own type information

TypeDictEntry DBusSimpleType DBusType

Internal helper type for Dicts. You shouldn't have to use this

TypeUnit

Unit isn't actually a DBus type. It is included to make it possible to use methods without a return value

Instances

Eq DBusType Source # 
Data DBusType Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DBusType -> c DBusType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DBusType #

toConstr :: DBusType -> Constr #

dataTypeOf :: DBusType -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DBusType) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DBusType) #

gmapT :: (forall b. Data b => b -> b) -> DBusType -> DBusType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DBusType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DBusType -> r #

gmapQ :: (forall d. Data d => d -> u) -> DBusType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DBusType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DBusType -> m DBusType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DBusType -> m DBusType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DBusType -> m DBusType #

Read DBusType Source # 
Show DBusType Source # 
SEq DBusType Source # 

Methods

(%:==) :: Sing DBusType a -> Sing DBusType b -> Sing Bool ((DBusType :== a) b) #

(%:/=) :: Sing DBusType a -> Sing DBusType b -> Sing Bool ((DBusType :/= a) b) #

SDecide DBusType Source # 

Methods

(%~) :: Sing DBusType a -> Sing DBusType b -> Decision ((DBusType :~: a) b) #

SingKind DBusType Source # 
SingI DBusType TypeVariant Source # 

Methods

sing :: Sing TypeVariant a #

SingI DBusType TypeUnit Source # 

Methods

sing :: Sing TypeUnit a #

SingI DBusSimpleType n0 => SingI DBusType (DBusSimpleType n0) Source # 

Methods

sing :: Sing (DBusSimpleType n0) a #

SingI DBusType n0 => SingI DBusType (TypeArray n0) Source # 

Methods

sing :: Sing (TypeArray n0) a #

SingI [DBusType] n0 => SingI DBusType (TypeStruct n0) Source # 

Methods

sing :: Sing (TypeStruct n0) a #

PEq DBusType (Proxy * DBusType) Source # 

Associated Types

type ((Proxy * DBusType) :== (x :: Proxy * DBusType)) (y :: Proxy * DBusType) :: Bool #

type ((Proxy * DBusType) :/= (x :: Proxy * DBusType)) (y :: Proxy * DBusType) :: Bool #

(SingI DBusSimpleType n0, SingI DBusType n1) => SingI DBusType (TypeDict n0 n1) Source # 

Methods

sing :: Sing (TypeDict n0 n1) a #

(SingI DBusSimpleType n0, SingI DBusType n1) => SingI DBusType (TypeDictEntry n0 n1) Source # 

Methods

sing :: Sing (TypeDictEntry n0 n1) a #

SuppressUnusedWarnings (TyFun [DBusType] DBusType -> *) TypeStructSym0 Source # 
SuppressUnusedWarnings (TyFun DBusType [DBusType] -> *) FlattenRepTypeSym0 Source # 
SuppressUnusedWarnings (TyFun DBusType DBusType -> *) TypeArraySym0 Source # 
SuppressUnusedWarnings (TyFun DBusType DBusType -> *) Let6989586621679115082TSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> Type) -> *) TypeDictEntrySym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> Type) -> *) TypeDictSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let6989586621679115098TSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> *) -> *) Let6989586621679115088TSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType DBusType -> *) DBusSimpleTypeSym0 Source # 
SuppressUnusedWarnings (TyFun DBusSimpleType DBusType -> *) Let6989586621679115077TSym0 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictEntrySym1 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictSym1 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let6989586621679115098TSym1 Source # 
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) Let6989586621679115088TSym1 Source # 
data Sing DBusType Source # 
type DemoteRep DBusType Source # 
type (:/=) DBusType x y Source # 
type (:/=) DBusType x y = Not ((:==) DBusType x y)
type (:==) DBusType a0 b0 Source # 
type Apply DBusType DBusType TypeArraySym0 l0 Source # 
type Apply DBusType DBusType Let6989586621679115082TSym0 l0 Source # 
type Apply DBusSimpleType DBusType DBusSimpleTypeSym0 l0 Source # 
type Apply DBusSimpleType DBusType Let6989586621679115077TSym0 l0 Source # 
type Apply DBusType DBusType (TypeDictEntrySym1 l1) l0 Source # 
type Apply DBusType DBusType (TypeDictSym1 l1) l0 Source # 
type Apply DBusType DBusType (Let6989586621679115098TSym1 l1) l0 Source # 
type Apply DBusType DBusType (Let6989586621679115088TSym1 l1) l0 Source # 
type Apply DBusType [DBusType] FlattenRepTypeSym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> Type) TypeDictEntrySym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> Type) TypeDictSym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> *) Let6989586621679115098TSym0 l0 Source # 
type Apply DBusSimpleType (TyFun DBusType DBusType -> *) Let6989586621679115088TSym0 l0 Source # 
type Apply [DBusType] DBusType TypeStructSym0 l0 Source # 

ppType :: DBusType -> String Source #

Pretty-print a type (this is _not_ DBUs' type format)

data Parity Source #

Constructors

Null 
Arg Parity 

Instances

Eq Parity Source # 

Methods

(==) :: Parity -> Parity -> Bool #

(/=) :: Parity -> Parity -> Bool #

Data Parity Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parity -> c Parity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Parity #

toConstr :: Parity -> Constr #

dataTypeOf :: Parity -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Parity) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Parity) #

gmapT :: (forall b. Data b => b -> b) -> Parity -> Parity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parity -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Parity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Parity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parity -> m Parity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parity -> m Parity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parity -> m Parity #

Show Parity Source # 
SEq Parity Source # 

Methods

(%:==) :: Sing Parity a -> Sing Parity b -> Sing Bool ((Parity :== a) b) #

(%:/=) :: Sing Parity a -> Sing Parity b -> Sing Bool ((Parity :/= a) b) #

SingKind Parity Source # 

Associated Types

type DemoteRep Parity :: * #

SingI Parity Null Source # 

Methods

sing :: Sing Null a #

SingI Parity n0 => SingI Parity (Arg n0) Source # 

Methods

sing :: Sing (Arg n0) a #

PEq Parity (Proxy * Parity) Source # 

Associated Types

type ((Proxy * Parity) :== (x :: Proxy * Parity)) (y :: Proxy * Parity) :: Bool #

type ((Proxy * Parity) :/= (x :: Proxy * Parity)) (y :: Proxy * Parity) :: Bool #

SuppressUnusedWarnings (TyFun Parity Parity -> *) ArgSym0 Source # 
data Sing Parity Source # 
data Sing Parity where
type DemoteRep Parity Source # 
type (:/=) Parity x y Source # 
type (:/=) Parity x y = Not ((:==) Parity x y)
type (:==) Parity a0 b0 Source # 
type Apply Parity Parity ArgSym0 l0 Source # 

type TypeDictSym2 t t = TypeDict t t Source #

type ArgSym1 t = Arg t Source #

type SParity = (Sing :: Parity -> Type) Source #

type family Let6989586621679115077T wild_6989586621679115069 where ... Source #

Equations

Let6989586621679115077T wild_6989586621679115069 = Apply DBusSimpleTypeSym0 wild_6989586621679115069 

type family Let6989586621679115082T wild_6989586621679115067 where ... Source #

Equations

Let6989586621679115082T wild_6989586621679115067 = Apply TypeArraySym0 wild_6989586621679115067 

type family Let6989586621679115088T wild_6989586621679115063 wild_6989586621679115065 where ... Source #

Equations

Let6989586621679115088T wild_6989586621679115063 wild_6989586621679115065 = Apply (Apply TypeDictSym0 wild_6989586621679115063) wild_6989586621679115065 

type family Let6989586621679115098T wild_6989586621679115059 wild_6989586621679115061 where ... Source #

Equations

Let6989586621679115098T wild_6989586621679115059 wild_6989586621679115061 = Apply (Apply TypeDictEntrySym0 wild_6989586621679115059) wild_6989586621679115061 

type family FlattenRepType (a :: DBusType) :: [DBusType] where ... Source #

Equations

FlattenRepType TypeUnit = '[] 
FlattenRepType (TypeStruct ts) = ts 
FlattenRepType (DBusSimpleType wild_6989586621679115069) = Apply (Apply (:$) (Let6989586621679115077TSym1 wild_6989586621679115069)) '[] 
FlattenRepType (TypeArray wild_6989586621679115067) = Apply (Apply (:$) (Let6989586621679115082TSym1 wild_6989586621679115067)) '[] 
FlattenRepType (TypeDict wild_6989586621679115063 wild_6989586621679115065) = Apply (Apply (:$) (Let6989586621679115088TSym2 wild_6989586621679115063 wild_6989586621679115065)) '[] 
FlattenRepType (TypeDictEntry wild_6989586621679115059 wild_6989586621679115061) = Apply (Apply (:$) (Let6989586621679115098TSym2 wild_6989586621679115059 wild_6989586621679115061)) '[] 
FlattenRepType TypeVariant = Apply (Apply (:$) Let6989586621679115106TSym0) '[] 

newtype MethodHandlerT m a Source #

A Transformer for (IO) actions that might want to send a signal.

Constructors

MHT 

Instances

MonadTrans MethodHandlerT Source # 

Methods

lift :: Monad m => m a -> MethodHandlerT m a #

Monad m => Monad (MethodHandlerT m) Source # 
Functor m => Functor (MethodHandlerT m) Source # 

Methods

fmap :: (a -> b) -> MethodHandlerT m a -> MethodHandlerT m b #

(<$) :: a -> MethodHandlerT m b -> MethodHandlerT m a #

Monad m => Applicative (MethodHandlerT m) Source # 
(Functor m, Monad m) => Alternative (MethodHandlerT m) Source # 
Monad m => MonadPlus (MethodHandlerT m) Source # 
MonadIO m => MonadIO (MethodHandlerT m) Source # 

Methods

liftIO :: IO a -> MethodHandlerT m a #

MonadThrow m => MonadThrow (MethodHandlerT m) Source # 

Methods

throwM :: Exception e => e -> MethodHandlerT m a #

MonadCatch m => MonadCatch (MethodHandlerT m) Source # 

Methods

catch :: Exception e => MethodHandlerT m a -> (e -> MethodHandlerT m a) -> MethodHandlerT m a #

Representable t => RepMethod (MethodHandlerT IO t) Source # 
SingI [DBusType] ts => IsMethod (MethodHandlerT IO (DBusArguments ts)) Source # 
type RepMethodArgs (MethodHandlerT IO t) Source # 
type RepMethodValue (MethodHandlerT IO t) Source # 
type ArgTypes (MethodHandlerT IO (DBusArguments ts)) Source # 
type ResultType (MethodHandlerT IO (DBusArguments ts)) Source # 

data SomeSignal where Source #

Constructors

SomeSignal :: SingI a => Signal a -> SomeSignal 

type family ArgsOf x :: Parity where ... Source #

Equations

ArgsOf (IO x) = Null 
ArgsOf (MethodHandlerT IO x) = Null 
ArgsOf (a -> b) = Arg (ArgsOf b) 

type family ArgParity (x :: [DBusType]) :: Parity where ... Source #

Equations

ArgParity '[] = Null 
ArgParity (x ': xs) = Arg (ArgParity xs) 

data DBusArguments :: [DBusType] -> * where Source #

Constructors

ArgsNil :: DBusArguments '[] 
ArgsCons :: DBusValue a -> DBusArguments as -> DBusArguments (a ': as) 

Instances

Eq (DBusArguments t) Source # 
SingI [DBusType] a => Show (DBusArguments a) Source # 
SingI [DBusType] ts => IsMethod (IO (DBusArguments ts)) Source # 
SingI [DBusType] ts => IsMethod (MethodHandlerT IO (DBusArguments ts)) Source # 
type ArgTypes (IO (DBusArguments ts)) Source # 
type ResultType (IO (DBusArguments ts)) Source # 
type ResultType (IO (DBusArguments ts)) = ts
type ArgTypes (MethodHandlerT IO (DBusArguments ts)) Source # 
type ResultType (MethodHandlerT IO (DBusArguments ts)) Source # 

argsToStruct :: DBusArguments (t ': ts) -> DBusStruct (t ': ts) Source #

data DBusStruct :: [DBusType] -> * where Source #

Constructors

StructSingleton :: DBusValue a -> DBusStruct '[a] 
StructCons :: DBusValue a -> DBusStruct as -> DBusStruct (a ': as) 

Instances

data SomeDBusStruct where Source #

Constructors

SDBS :: SingI ts => DBusStruct ts -> SomeDBusStruct 

data DBusValue :: DBusType -> * where Source #

Instances

Eq (DBusValue t) Source # 

Methods

(==) :: DBusValue t -> DBusValue t -> Bool #

(/=) :: DBusValue t -> DBusValue t -> Bool #

SingI DBusType t => Show (DBusValue t) Source # 
(IsMethod f, SingI DBusType t) => IsMethod (DBusValue t -> f) Source # 

Associated Types

type ArgTypes (DBusValue t -> f) :: [DBusType] Source #

type ResultType (DBusValue t -> f) :: [DBusType] Source #

Methods

toMethod :: (DBusValue t -> f) -> MethodWrapper (ArgTypes (DBusValue t -> f)) (ResultType (DBusValue t -> f)) Source #

type RepType (DBusValue t) Source # 
type RepType (DBusValue t) = t
type ArgTypes (DBusValue t -> f) Source # 
type ArgTypes (DBusValue t -> f) = (:) DBusType t (ArgTypes f)
type ResultType (DBusValue t -> f) Source # 
type ResultType (DBusValue t -> f) = ResultType f

fromVariant :: SingI t => DBusValue TypeVariant -> Maybe (DBusValue t) Source #

Extract a DBusValue from a Variant iff the type matches or return nothing

class SingI (RepType a) => Representable a where Source #

Class of types that can be represented in the D-Bus type system.

The toRep and fromRep functions form a Prism and should follow the "obvious" laws:

  • fromRep (toRep x) == Just x
  • fmap toRep (fromRep x) =<= Just x

(where x =<= y iff x is Nothing or x == y)

All DBusValues represent themselves and instances for the following "canonical" pairs are provided

Haskell type => D-Bus type

  • WordX and IntX => UIntX and IntX respectively (for X in {16, 32, 64})
  • Bool => Boolean
  • Word8 => Byte
  • Double => Double
  • Text => String
  • ObjectPath => ObjectPath
  • DBusType => Signature
  • [a] => Array of a (for Representable a)
  • ByteString => Array of Byte
  • Tuples up to length 20 => Structs of equal length where each of the members is itself Representable
  • Map => Dict where the keys can be represented by a DBusSimpleType

An instance for String is impossible because it conflicts with the instance for lists (use Text instead)

Also note that no Representable instances are provided for Int, Integer and Float.

You can automatically derive an instance for your own Types with makeRepresentable

Minimal complete definition

toRep, fromRep

Associated Types

type RepType a :: DBusType Source #

The DBusType that represents this type

Methods

toRep :: a -> DBusValue (RepType a) Source #

Conversion from Haskell to D-Bus types

fromRep :: DBusValue (RepType a) -> Maybe a Source #

Conversion from D-Bus to Haskell types.

type family FromTypeList t where ... Source #

Equations

FromTypeList '[] = TypeUnit 
FromTypeList '[t] = t 
FromTypeList ts = TypeStruct ts 

data MethodWrapper av rv where Source #

Constructors

MReturn :: SingI ts => MethodHandlerT IO (DBusArguments ts) -> MethodWrapper '[] ts 
MAsk :: SingI t => (DBusValue t -> MethodWrapper avs rv) -> MethodWrapper (t ': avs) rv 

data Method where Source #

Constructors

Method :: (SingI avs, SingI ts) => MethodWrapper avs ts -> Text -> ArgumentDescription (ArgParity avs) -> ArgumentDescription (ArgParity ts) -> Method 

data PropertyAccess Source #

Constructors

Read 
Write 
ReadWrite 

Instances

Eq PropertyAccess Source # 
Data PropertyAccess Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PropertyAccess -> c PropertyAccess #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PropertyAccess #

toConstr :: PropertyAccess -> Constr #

dataTypeOf :: PropertyAccess -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PropertyAccess) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PropertyAccess) #

gmapT :: (forall b. Data b => b -> b) -> PropertyAccess -> PropertyAccess #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PropertyAccess -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PropertyAccess -> r #

gmapQ :: (forall d. Data d => d -> u) -> PropertyAccess -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PropertyAccess -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PropertyAccess -> m PropertyAccess #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PropertyAccess -> m PropertyAccess #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PropertyAccess -> m PropertyAccess #

Show PropertyAccess Source # 

data SomeProperty where Source #

Constructors

SomeProperty :: forall t. SingI t => {..} -> SomeProperty 

data Annotation Source #

Constructors

Annotation 

Instances

Eq Annotation Source # 
Data Annotation Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Annotation -> c Annotation #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Annotation #

toConstr :: Annotation -> Constr #

dataTypeOf :: Annotation -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Annotation) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Annotation) #

gmapT :: (forall b. Data b => b -> b) -> Annotation -> Annotation #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Annotation -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Annotation -> r #

gmapQ :: (forall d. Data d => d -> u) -> Annotation -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Annotation -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Annotation -> m Annotation #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Annotation -> m Annotation #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Annotation -> m Annotation #

Show Annotation Source # 

newtype Object Source #

Constructors

Object 

data Match a Source #

Constructors

Match a 
MatchAny 

Instances

Show a => Show (Match a) Source # 

Methods

showsPrec :: Int -> Match a -> ShowS #

show :: Match a -> String #

showList :: [Match a] -> ShowS #

checkMatch :: Eq a => Match a -> Match a -> Bool Source #

data DBusConnection Source #

A value representing a connection to a DBus bus. Use connectBus or makeServer to Create

Constructors

DBusConnection 

Fields

data MethodDescription args rets where Source #

Instances

Show (MethodDescription args rets) Source # 

Methods

showsPrec :: Int -> MethodDescription args rets -> ShowS #

show :: MethodDescription args rets -> String #

showList :: [MethodDescription args rets] -> ShowS #

data SomeMethodDescription where Source #

Constructors

SMD :: (SingI args, SingI rets) => MethodDescription args rets -> SomeMethodDescription