Safe Haskell | None |
---|---|
Language | Haskell2010 |
- dbusLogger :: String
- logDebug :: String -> IO ()
- logWarning :: String -> IO ()
- logError :: String -> IO ()
- data ObjectPath = ObjectPath {
- opAbsolute :: Bool
- opParts :: [Text]
- type InterfaceName = Text
- type MemberName = Text
- opNode :: ObjectPath -> ObjectPath
- opPath :: ObjectPath -> ObjectPath
- newtype Signature = Signature {
- fromSignature :: [DBusType]
- objectPath :: Text -> ObjectPath
- objectPathToText :: ObjectPath -> Text
- stripObjectPrefix :: ObjectPath -> ObjectPath -> Maybe ObjectPath
- isPathPrefix :: ObjectPath -> ObjectPath -> Bool
- isRoot :: ObjectPath -> Bool
- isEmpty :: ObjectPath -> Bool
- data DBusSimpleType
- ppSimpleType :: DBusSimpleType -> String
- data DBusType
- ppType :: DBusType -> String
- data Parity
- type TypeByteSym0 = TypeByte
- type TypeBooleanSym0 = TypeBoolean
- type TypeInt16Sym0 = TypeInt16
- type TypeUInt16Sym0 = TypeUInt16
- type TypeInt32Sym0 = TypeInt32
- type TypeUInt32Sym0 = TypeUInt32
- type TypeInt64Sym0 = TypeInt64
- type TypeUInt64Sym0 = TypeUInt64
- type TypeDoubleSym0 = TypeDouble
- type TypeUnixFDSym0 = TypeUnixFD
- type TypeStringSym0 = TypeString
- type TypeObjectPathSym0 = TypeObjectPath
- type TypeSignatureSym0 = TypeSignature
- type SDBusSimpleType = (Sing :: DBusSimpleType -> Type)
- type DBusSimpleTypeSym1 t = DBusSimpleType t
- data DBusSimpleTypeSym0 l = (KindOf (Apply DBusSimpleTypeSym0 arg) ~ KindOf (DBusSimpleTypeSym1 arg)) => DBusSimpleTypeSym0KindInference
- type TypeArraySym1 t = TypeArray t
- data TypeArraySym0 l = (KindOf (Apply TypeArraySym0 arg) ~ KindOf (TypeArraySym1 arg)) => TypeArraySym0KindInference
- type TypeStructSym1 t = TypeStruct t
- data TypeStructSym0 l = (KindOf (Apply TypeStructSym0 arg) ~ KindOf (TypeStructSym1 arg)) => TypeStructSym0KindInference
- type TypeDictSym2 t t = TypeDict t t
- data TypeDictSym1 l l = (KindOf (Apply (TypeDictSym1 l) arg) ~ KindOf (TypeDictSym2 l arg)) => TypeDictSym1KindInference
- data TypeDictSym0 l = (KindOf (Apply TypeDictSym0 arg) ~ KindOf (TypeDictSym1 arg)) => TypeDictSym0KindInference
- type TypeVariantSym0 = TypeVariant
- type TypeDictEntrySym2 t t = TypeDictEntry t t
- data TypeDictEntrySym1 l l = (KindOf (Apply (TypeDictEntrySym1 l) arg) ~ KindOf (TypeDictEntrySym2 l arg)) => TypeDictEntrySym1KindInference
- data TypeDictEntrySym0 l = (KindOf (Apply TypeDictEntrySym0 arg) ~ KindOf (TypeDictEntrySym1 arg)) => TypeDictEntrySym0KindInference
- type TypeUnitSym0 = TypeUnit
- type SDBusType = (Sing :: DBusType -> Type)
- type NullSym0 = Null
- type ArgSym1 t = Arg t
- data ArgSym0 l = (KindOf (Apply ArgSym0 arg) ~ KindOf (ArgSym1 arg)) => ArgSym0KindInference
- type SParity = (Sing :: Parity -> Type)
- type family Equals_6989586621679109107 (a :: DBusSimpleType) (b :: DBusSimpleType) :: Bool where ...
- type family Equals_6989586621679109114 (a :: DBusType) (b :: DBusType) :: Bool where ...
- type family Equals_6989586621679109156 (a :: Parity) (b :: Parity) :: Bool where ...
- type family Let6989586621679115077T wild_6989586621679115069 where ...
- type Let6989586621679115077TSym1 t = Let6989586621679115077T t
- data Let6989586621679115077TSym0 l = (KindOf (Apply Let6989586621679115077TSym0 arg) ~ KindOf (Let6989586621679115077TSym1 arg)) => Let6989586621679115077TSym0KindInference
- type family Let6989586621679115082T wild_6989586621679115067 where ...
- type Let6989586621679115082TSym1 t = Let6989586621679115082T t
- data Let6989586621679115082TSym0 l = (KindOf (Apply Let6989586621679115082TSym0 arg) ~ KindOf (Let6989586621679115082TSym1 arg)) => Let6989586621679115082TSym0KindInference
- type family Let6989586621679115088T wild_6989586621679115063 wild_6989586621679115065 where ...
- type Let6989586621679115088TSym2 t t = Let6989586621679115088T t t
- data Let6989586621679115088TSym1 l l = (KindOf (Apply (Let6989586621679115088TSym1 l) arg) ~ KindOf (Let6989586621679115088TSym2 l arg)) => Let6989586621679115088TSym1KindInference
- data Let6989586621679115088TSym0 l = (KindOf (Apply Let6989586621679115088TSym0 arg) ~ KindOf (Let6989586621679115088TSym1 arg)) => Let6989586621679115088TSym0KindInference
- type family Let6989586621679115098T wild_6989586621679115059 wild_6989586621679115061 where ...
- type Let6989586621679115098TSym2 t t = Let6989586621679115098T t t
- data Let6989586621679115098TSym1 l l = (KindOf (Apply (Let6989586621679115098TSym1 l) arg) ~ KindOf (Let6989586621679115098TSym2 l arg)) => Let6989586621679115098TSym1KindInference
- data Let6989586621679115098TSym0 l = (KindOf (Apply Let6989586621679115098TSym0 arg) ~ KindOf (Let6989586621679115098TSym1 arg)) => Let6989586621679115098TSym0KindInference
- type family Let6989586621679115106T where ...
- type Let6989586621679115106TSym0 = Let6989586621679115106T
- type family FlattenRepType (a :: DBusType) :: [DBusType] where ...
- type FlattenRepTypeSym1 t = FlattenRepType t
- data FlattenRepTypeSym0 l = (KindOf (Apply FlattenRepTypeSym0 arg) ~ KindOf (FlattenRepTypeSym1 arg)) => FlattenRepTypeSym0KindInference
- sFlattenRepType :: forall t. Sing t -> Sing (Apply FlattenRepTypeSym0 t :: [DBusType])
- flattenRepType :: DBusType -> [DBusType]
- newtype MethodHandlerT m a = MHT {
- unMHT :: ExceptT MsgError (WriterT [SomeSignal] m) a
- methodError :: Monad m => MsgError -> MethodHandlerT m a
- catchMethodError :: Monad m => MethodHandlerT m a -> (MsgError -> MethodHandlerT m a) -> MethodHandlerT m a
- runMethodHandlerT :: MethodHandlerT m a -> m (Either MsgError a, [SomeSignal])
- data Signal a = Signal {}
- data SomeSignal where
- SomeSignal :: SingI a => Signal a -> SomeSignal
- data SignalDescription a = SignalDescription {}
- signalDArgumentTypes :: SingI ts => SignalDescription ts -> [DBusType]
- data SomeSignalDescription where
- SSD :: forall a. SingI a => SignalDescription a -> SomeSignalDescription
- type family ArgsOf x :: Parity where ...
- type family ArgParity (x :: [DBusType]) :: Parity where ...
- data ArgumentDescription parity where
- (:>) :: Text -> ArgumentDescription n -> ArgumentDescription (Arg n)
- Done :: ArgumentDescription Null
- adToList :: ArgumentDescription n -> [Text]
- data DBusArguments :: [DBusType] -> * where
- ArgsNil :: DBusArguments '[]
- ArgsCons :: DBusValue a -> DBusArguments as -> DBusArguments (a ': as)
- data SomeDBusArguments where
- SDBA :: SingI ts => DBusArguments ts -> SomeDBusArguments
- listToSomeArguments :: [SomeDBusValue] -> SomeDBusArguments
- argsToValues :: SomeDBusArguments -> [SomeDBusValue]
- argsToStruct :: DBusArguments (t ': ts) -> DBusStruct (t ': ts)
- structToArgs :: DBusStruct ts -> DBusArguments ts
- maybeArgsToStruct :: (SingI ts, SingI ss) => DBusArguments ts -> Maybe (DBusStruct ss)
- singletonArg :: DBusValue a -> DBusArguments '[a]
- showArgs :: Sing a -> DBusArguments a -> String
- data DBusStruct :: [DBusType] -> * where
- StructSingleton :: DBusValue a -> DBusStruct '[a]
- StructCons :: DBusValue a -> DBusStruct as -> DBusStruct (a ': as)
- data SomeDBusStruct where
- SDBS :: SingI ts => DBusStruct ts -> SomeDBusStruct
- showStruct :: Sing a -> DBusStruct a -> String
- data DBusValue :: DBusType -> * where
- DBVByte :: Word8 -> DBusValue (DBusSimpleType TypeByte)
- DBVBool :: Bool -> DBusValue (DBusSimpleType TypeBoolean)
- DBVInt16 :: Int16 -> DBusValue (DBusSimpleType TypeInt16)
- DBVUInt16 :: Word16 -> DBusValue (DBusSimpleType TypeUInt16)
- DBVInt32 :: Int32 -> DBusValue (DBusSimpleType TypeInt32)
- DBVUInt32 :: Word32 -> DBusValue (DBusSimpleType TypeUInt32)
- DBVInt64 :: Int64 -> DBusValue (DBusSimpleType TypeInt64)
- DBVUInt64 :: Word64 -> DBusValue (DBusSimpleType TypeUInt64)
- DBVDouble :: Double -> DBusValue (DBusSimpleType TypeDouble)
- DBVUnixFD :: Word32 -> DBusValue (DBusSimpleType TypeUnixFD)
- DBVString :: Text -> DBusValue (DBusSimpleType TypeString)
- DBVObjectPath :: ObjectPath -> DBusValue (DBusSimpleType TypeObjectPath)
- DBVSignature :: [DBusType] -> DBusValue (DBusSimpleType TypeSignature)
- DBVVariant :: SingI t => DBusValue t -> DBusValue TypeVariant
- DBVArray :: [DBusValue a] -> DBusValue (TypeArray a)
- DBVByteArray :: ByteString -> DBusValue (TypeArray (DBusSimpleType TypeByte))
- DBVStruct :: DBusStruct ts -> DBusValue (TypeStruct ts)
- DBVDict :: [(DBusValue (DBusSimpleType k), DBusValue v)] -> DBusValue (TypeDict k v)
- DBVUnit :: DBusValue TypeUnit
- castDBV :: (SingI s, SingI t) => DBusValue s -> Maybe (DBusValue t)
- data SomeDBusValue where
- DBV :: SingI t => DBusValue t -> SomeDBusValue
- dbusValue :: SingI t => SomeDBusValue -> Maybe (DBusValue t)
- dbusSValue :: SingI t => SomeDBusValue -> Maybe (DBusValue (DBusSimpleType t))
- fromVariant :: SingI t => DBusValue TypeVariant -> Maybe (DBusValue t)
- typeOf :: SingI t => DBusValue t -> DBusType
- class SingI (RepType a) => Representable a where
- type family FromTypeList t where ...
- data MethodWrapper av rv where
- MReturn :: SingI ts => MethodHandlerT IO (DBusArguments ts) -> MethodWrapper '[] ts
- MAsk :: SingI t => (DBusValue t -> MethodWrapper avs rv) -> MethodWrapper (t ': avs) rv
- data Method where
- Method :: (SingI avs, SingI ts) => MethodWrapper avs ts -> Text -> ArgumentDescription (ArgParity avs) -> ArgumentDescription (ArgParity ts) -> Method
- data PropertyAccess
- data PropertyEmitsChangedSignal
- data Property t where
- data SomeProperty where
- SomeProperty :: forall t. SingI t => {..} -> SomeProperty
- propertyType :: SingI t => Property t -> DBusType
- data RemoteProperty a = RP {
- rpEntity :: Text
- rpObject :: ObjectPath
- rpInterface :: Text
- rpName :: Text
- data Annotation = Annotation {}
- data SignalArgument = SignalArgument {}
- data Interface = Interface {}
- newtype Object = Object {}
- object :: Text -> Interface -> Object
- newtype Objects = Objects {}
- root :: ObjectPath -> Object -> Objects
- data MsgError = MsgError {}
- data MethodError
- type Serial = Word32
- type Slot = Either [SomeDBusValue] [SomeDBusValue] -> STM ()
- type AnswerSlots = Map Serial Slot
- data Match a
- checkMatch :: Eq a => Match a -> Match a -> Bool
- maybeToMatch :: Maybe a -> Match a
- data MatchSignal = MatchSignal {}
- anySignal :: MatchSignal
- type SignalSlots = [((Match Text, Match Text, Match ObjectPath, Match Text), SomeSignal -> IO ())]
- type PropertySlots = Map (ObjectPath, Text, Text) [Maybe SomeDBusValue -> IO ()]
- data DBusConnection = DBusConnection {
- dBusCreateSerial :: STM Serial
- dBusAnswerSlots :: TVar AnswerSlots
- dBusSignalSlots :: TVar SignalSlots
- dBusPropertySlots :: TVar PropertySlots
- dBusWriteLock :: TMVar (Builder -> IO ())
- dBusConnectionName :: Text
- dBusConnectionAliveRef :: TVar Bool
- dBusGcRef :: !(TVar ())
- dBusKillConnection :: IO ()
- data MethodDescription args rets where
- MD :: {..} -> MethodDescription args rets
- data SomeMethodDescription where
- SMD :: (SingI args, SingI rets) => MethodDescription args rets -> SomeMethodDescription
Documentation
dbusLogger :: String Source #
logWarning :: String -> IO () Source #
data ObjectPath Source #
ObjectPath | |
|
type InterfaceName = Text Source #
type MemberName = Text Source #
opNode :: ObjectPath -> ObjectPath Source #
opPath :: ObjectPath -> ObjectPath Source #
objectPath :: Text -> ObjectPath Source #
Parse an object path. Contrary to the standard, empty path parts are ignored
objectPathToText :: ObjectPath -> Text Source #
stripObjectPrefix :: ObjectPath -> ObjectPath -> Maybe ObjectPath Source #
isPathPrefix :: ObjectPath -> ObjectPath -> Bool Source #
isRoot :: ObjectPath -> Bool Source #
isEmpty :: ObjectPath -> Bool Source #
data DBusSimpleType Source #
Types that are not composite. These can be the keys of a Dict. Most of them should be self-explanatory
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 |
ppSimpleType :: DBusSimpleType -> String Source #
Pretty-print a simple type (this is _not_ DBUs' type format)
Composite Types
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 |
Eq Parity Source # | |
Data Parity Source # | |
Show Parity Source # | |
SEq Parity Source # | |
SingKind Parity Source # | |
SingI Parity Null Source # | |
SingI Parity n0 => SingI Parity (Arg n0) Source # | |
PEq Parity (Proxy * Parity) Source # | |
SuppressUnusedWarnings (TyFun Parity Parity -> *) ArgSym0 Source # | |
data Sing Parity Source # | |
type DemoteRep Parity Source # | |
type (:/=) Parity x y Source # | |
type (:==) Parity a0 b0 Source # | |
type Apply Parity Parity ArgSym0 l0 Source # | |
type TypeByteSym0 = TypeByte Source #
type TypeBooleanSym0 = TypeBoolean Source #
type TypeInt16Sym0 = TypeInt16 Source #
type TypeUInt16Sym0 = TypeUInt16 Source #
type TypeInt32Sym0 = TypeInt32 Source #
type TypeUInt32Sym0 = TypeUInt32 Source #
type TypeInt64Sym0 = TypeInt64 Source #
type TypeUInt64Sym0 = TypeUInt64 Source #
type TypeDoubleSym0 = TypeDouble Source #
type TypeUnixFDSym0 = TypeUnixFD Source #
type TypeStringSym0 = TypeString Source #
type TypeObjectPathSym0 = TypeObjectPath Source #
type TypeSignatureSym0 = TypeSignature Source #
type SDBusSimpleType = (Sing :: DBusSimpleType -> Type) Source #
type DBusSimpleTypeSym1 t = DBusSimpleType t Source #
data DBusSimpleTypeSym0 l Source #
(KindOf (Apply DBusSimpleTypeSym0 arg) ~ KindOf (DBusSimpleTypeSym1 arg)) => DBusSimpleTypeSym0KindInference |
type TypeArraySym1 t = TypeArray t Source #
data TypeArraySym0 l Source #
(KindOf (Apply TypeArraySym0 arg) ~ KindOf (TypeArraySym1 arg)) => TypeArraySym0KindInference |
type TypeStructSym1 t = TypeStruct t Source #
data TypeStructSym0 l Source #
(KindOf (Apply TypeStructSym0 arg) ~ KindOf (TypeStructSym1 arg)) => TypeStructSym0KindInference |
SuppressUnusedWarnings (TyFun [DBusType] DBusType -> *) TypeStructSym0 Source # | |
type Apply [DBusType] DBusType TypeStructSym0 l0 Source # | |
type TypeDictSym2 t t = TypeDict t t Source #
data TypeDictSym1 l l Source #
(KindOf (Apply (TypeDictSym1 l) arg) ~ KindOf (TypeDictSym2 l arg)) => TypeDictSym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictSym1 Source # | |
type Apply DBusType DBusType (TypeDictSym1 l1) l0 Source # | |
data TypeDictSym0 l Source #
(KindOf (Apply TypeDictSym0 arg) ~ KindOf (TypeDictSym1 arg)) => TypeDictSym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> Type) -> *) TypeDictSym0 Source # | |
type Apply DBusSimpleType (TyFun DBusType DBusType -> Type) TypeDictSym0 l0 Source # | |
type TypeVariantSym0 = TypeVariant Source #
type TypeDictEntrySym2 t t = TypeDictEntry t t Source #
data TypeDictEntrySym1 l l Source #
(KindOf (Apply (TypeDictEntrySym1 l) arg) ~ KindOf (TypeDictEntrySym2 l arg)) => TypeDictEntrySym1KindInference |
SuppressUnusedWarnings (DBusSimpleType -> TyFun DBusType DBusType -> *) TypeDictEntrySym1 Source # | |
type Apply DBusType DBusType (TypeDictEntrySym1 l1) l0 Source # | |
data TypeDictEntrySym0 l Source #
(KindOf (Apply TypeDictEntrySym0 arg) ~ KindOf (TypeDictEntrySym1 arg)) => TypeDictEntrySym0KindInference |
SuppressUnusedWarnings (TyFun DBusSimpleType (TyFun DBusType DBusType -> Type) -> *) TypeDictEntrySym0 Source # | |
type Apply DBusSimpleType (TyFun DBusType DBusType -> Type) TypeDictEntrySym0 l0 Source # | |
type TypeUnitSym0 = TypeUnit Source #
type family Equals_6989586621679109107 (a :: DBusSimpleType) (b :: DBusSimpleType) :: Bool where ... Source #
type family Equals_6989586621679109114 (a :: DBusType) (b :: DBusType) :: Bool where ... Source #
Equals_6989586621679109114 (DBusSimpleType a) (DBusSimpleType b) = (:==) a b | |
Equals_6989586621679109114 (TypeArray a) (TypeArray b) = (:==) a b | |
Equals_6989586621679109114 (TypeStruct a) (TypeStruct b) = (:==) a b | |
Equals_6989586621679109114 (TypeDict a a) (TypeDict b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_6989586621679109114 TypeVariant TypeVariant = TrueSym0 | |
Equals_6989586621679109114 (TypeDictEntry a a) (TypeDictEntry b b) = (:&&) ((:==) a b) ((:==) a b) | |
Equals_6989586621679109114 TypeUnit TypeUnit = TrueSym0 | |
Equals_6989586621679109114 (a :: DBusType) (b :: DBusType) = FalseSym0 |
type family Equals_6989586621679109156 (a :: Parity) (b :: Parity) :: Bool where ... Source #
Equals_6989586621679109156 Null Null = TrueSym0 | |
Equals_6989586621679109156 (Arg a) (Arg b) = (:==) a b | |
Equals_6989586621679109156 (a :: Parity) (b :: Parity) = FalseSym0 |
type family Let6989586621679115077T wild_6989586621679115069 where ... Source #
Let6989586621679115077T wild_6989586621679115069 = Apply DBusSimpleTypeSym0 wild_6989586621679115069 |
data Let6989586621679115077TSym0 l Source #
type family Let6989586621679115082T wild_6989586621679115067 where ... Source #
Let6989586621679115082T wild_6989586621679115067 = Apply TypeArraySym0 wild_6989586621679115067 |
data Let6989586621679115082TSym0 l Source #
type family Let6989586621679115088T wild_6989586621679115063 wild_6989586621679115065 where ... Source #
Let6989586621679115088T wild_6989586621679115063 wild_6989586621679115065 = Apply (Apply TypeDictSym0 wild_6989586621679115063) wild_6989586621679115065 |
type Let6989586621679115088TSym2 t t = Let6989586621679115088T t t Source #
data Let6989586621679115088TSym1 l l Source #
(KindOf (Apply (Let6989586621679115088TSym1 l) arg) ~ KindOf (Let6989586621679115088TSym2 l arg)) => Let6989586621679115088TSym1KindInference |
data Let6989586621679115088TSym0 l Source #
type family Let6989586621679115098T wild_6989586621679115059 wild_6989586621679115061 where ... Source #
Let6989586621679115098T wild_6989586621679115059 wild_6989586621679115061 = Apply (Apply TypeDictEntrySym0 wild_6989586621679115059) wild_6989586621679115061 |
type Let6989586621679115098TSym2 t t = Let6989586621679115098T t t Source #
data Let6989586621679115098TSym1 l l Source #
(KindOf (Apply (Let6989586621679115098TSym1 l) arg) ~ KindOf (Let6989586621679115098TSym2 l arg)) => Let6989586621679115098TSym1KindInference |
data Let6989586621679115098TSym0 l Source #
type family Let6989586621679115106T where ... Source #
type family FlattenRepType (a :: DBusType) :: [DBusType] where ... Source #
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) '[] |
type FlattenRepTypeSym1 t = FlattenRepType t Source #
data FlattenRepTypeSym0 l Source #
(KindOf (Apply FlattenRepTypeSym0 arg) ~ KindOf (FlattenRepTypeSym1 arg)) => FlattenRepTypeSym0KindInference |
SuppressUnusedWarnings (TyFun DBusType [DBusType] -> *) FlattenRepTypeSym0 Source # | |
type Apply DBusType [DBusType] FlattenRepTypeSym0 l0 Source # | |
sFlattenRepType :: forall t. Sing t -> Sing (Apply FlattenRepTypeSym0 t :: [DBusType]) Source #
flattenRepType :: DBusType -> [DBusType] Source #
newtype MethodHandlerT m a Source #
A Transformer for (IO) actions that might want to send a signal.
MonadTrans MethodHandlerT Source # | |
Monad m => Monad (MethodHandlerT m) Source # | |
Functor m => Functor (MethodHandlerT m) Source # | |
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 # | |
MonadThrow m => MonadThrow (MethodHandlerT m) Source # | |
MonadCatch m => MonadCatch (MethodHandlerT m) Source # | |
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 # | |
methodError :: Monad m => MsgError -> MethodHandlerT m a Source #
catchMethodError :: Monad m => MethodHandlerT m a -> (MsgError -> MethodHandlerT m a) -> MethodHandlerT m a Source #
runMethodHandlerT :: MethodHandlerT m a -> m (Either MsgError a, [SomeSignal]) Source #
data SomeSignal where Source #
SomeSignal :: SingI a => Signal a -> SomeSignal |
data SignalDescription a Source #
Eq (SignalDescription a) Source # | |
SingI [DBusType] a => Show (SignalDescription a) Source # | |
signalDArgumentTypes :: SingI ts => SignalDescription ts -> [DBusType] Source #
data SomeSignalDescription where Source #
SSD :: forall a. SingI a => SignalDescription a -> SomeSignalDescription |
data ArgumentDescription parity where Source #
(:>) :: Text -> ArgumentDescription n -> ArgumentDescription (Arg n) infixr 0 | |
Done :: ArgumentDescription Null |
adToList :: ArgumentDescription n -> [Text] Source #
data DBusArguments :: [DBusType] -> * where Source #
ArgsNil :: DBusArguments '[] | |
ArgsCons :: DBusValue a -> DBusArguments as -> DBusArguments (a ': as) |
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 ArgTypes (MethodHandlerT IO (DBusArguments ts)) Source # | |
type ResultType (MethodHandlerT IO (DBusArguments ts)) Source # | |
data SomeDBusArguments where Source #
SDBA :: SingI ts => DBusArguments ts -> SomeDBusArguments |
argsToStruct :: DBusArguments (t ': ts) -> DBusStruct (t ': ts) Source #
structToArgs :: DBusStruct ts -> DBusArguments ts Source #
maybeArgsToStruct :: (SingI ts, SingI ss) => DBusArguments ts -> Maybe (DBusStruct ss) Source #
singletonArg :: DBusValue a -> DBusArguments '[a] Source #
data DBusStruct :: [DBusType] -> * where Source #
StructSingleton :: DBusValue a -> DBusStruct '[a] | |
StructCons :: DBusValue a -> DBusStruct as -> DBusStruct (a ': as) |
Eq (DBusStruct t) Source # | |
SingI [DBusType] a => Show (DBusStruct a) Source # | |
data SomeDBusStruct where Source #
SDBS :: SingI ts => DBusStruct ts -> SomeDBusStruct |
showStruct :: Sing a -> DBusStruct a -> String Source #
data DBusValue :: DBusType -> * where Source #
data SomeDBusValue where Source #
DBV :: SingI t => DBusValue t -> SomeDBusValue |
dbusSValue :: SingI t => SomeDBusValue -> Maybe (DBusValue (DBusSimpleType t)) Source #
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
=> BooleanWord8
=> ByteDouble
=> DoubleText
=> StringObjectPath
=> ObjectPathDBusType
=> 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 aDBusSimpleType
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
type family FromTypeList t where ... Source #
FromTypeList '[] = TypeUnit | |
FromTypeList '[t] = t | |
FromTypeList ts = TypeStruct ts |
data MethodWrapper av rv where Source #
MReturn :: SingI ts => MethodHandlerT IO (DBusArguments ts) -> MethodWrapper '[] ts | |
MAsk :: SingI t => (DBusValue t -> MethodWrapper avs rv) -> MethodWrapper (t ': avs) rv |
Method :: (SingI avs, SingI ts) => MethodWrapper avs ts -> Text -> ArgumentDescription (ArgParity avs) -> ArgumentDescription (ArgParity ts) -> Method |
data PropertyAccess Source #
data SomeProperty where Source #
SomeProperty :: forall t. SingI t => {..} -> SomeProperty | |
|
data RemoteProperty a Source #
RP | |
|
Eq (RemoteProperty k a) Source # | |
Show (RemoteProperty k a) Source # | |
data Annotation Source #
data SignalArgument Source #
data MethodError Source #
type Slot = Either [SomeDBusValue] [SomeDBusValue] -> STM () Source #
maybeToMatch :: Maybe a -> Match a Source #
data MatchSignal Source #
type SignalSlots = [((Match Text, Match Text, Match ObjectPath, Match Text), SomeSignal -> IO ())] Source #
type PropertySlots = Map (ObjectPath, Text, Text) [Maybe SomeDBusValue -> IO ()] Source #
data DBusConnection Source #
A value representing a connection to a DBus bus. Use connectBus
or
makeServer
to Create
DBusConnection | |
|
data MethodDescription args rets where Source #
MD :: {..} -> MethodDescription args rets | |
|
Show (MethodDescription args rets) Source # | |
data SomeMethodDescription where Source #
SMD :: (SingI args, SingI rets) => MethodDescription args rets -> SomeMethodDescription |