-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | DBus bindings -- -- Bindings for the D-Bus API. For details on D-Bus, see the D-Bus wiki -- at: http://www.freedesktop.org/wiki/Software/dbus @package DBus @version 0.4 module DBus type ServiceName = String type PathName = FilePath type InterfaceName = String serviceDBus :: ServiceName pathDBus :: PathName pathLocal :: PathName interfaceDBus :: InterfaceName interfaceIntrospectable :: InterfaceName interfaceLocal :: InterfaceName -- | Errors carry a name (like "org.freedesktop.dbus.Foo") and a -- message (like "connection failed"). data Error Error :: String -> String -> Error instance [overlap ok] Show Error instance [overlap ok] Typeable Error module DBus.Message type Message = ForeignPtr MessageTag newSignal :: PathName -> InterfaceName -> String -> IO Message newMethodCall :: ServiceName -> PathName -> InterfaceName -> String -> IO Message data Type MethodCall :: Type MethodReturn :: Type Error :: Type Signal :: Type Other :: Int -> Type getType :: Message -> IO Type getSignature :: Message -> IO String getPath :: Message -> IO (Maybe String) getInterface :: Message -> IO (Maybe String) getMember :: Message -> IO (Maybe String) getErrorName :: Message -> IO (Maybe String) getDestination :: Message -> IO (Maybe String) getSender :: Message -> IO (Maybe String) data Arg Byte :: Word8 -> Arg Boolean :: Bool -> Arg Int16 :: Int16 -> Arg Word16 :: Word16 -> Arg Int32 :: Int32 -> Arg Word32 :: Word32 -> Arg Int64 :: Int64 -> Arg Word64 :: Word64 -> Arg Double :: Double -> Arg String :: String -> Arg ObjectPath :: Arg TypeSignature :: Arg Array :: String -> [Arg] -> Arg Variant :: Arg -> Arg Struct :: [Arg] -> Arg DictEntry :: Arg -> Arg -> Arg ByteString :: ByteString -> Arg Invalid :: Arg -- | Retrieve the arguments from a message. args :: Message -> [Arg] -- | Add arguments to a message. addArgs :: Message -> [Arg] -> IO () signature :: Arg -> [Char] stringSig :: String variantSig :: [Char] instance [overlap ok] Typeable Arg instance [overlap ok] Show Arg instance [overlap ok] Read Arg instance [overlap ok] Show Type instance [overlap ok] Enum Type module DBus.Connection type Connection = ForeignPtr ConnectionTag -- | Multiple buses may be active simultaneously on a single system. The -- BusType indicates which one to use. data BusType -- | The session bus is restricted to the user's current GNOME session. Session :: BusType -- | This bus is system-wide. System :: BusType -- | The bus that started us, if any. Starter :: BusType -- | Connect to a standard bus. busGet :: BusType -> IO Connection -- | Force the dereference of a connection. Note that this is usually not -- necessary since the connections are garbage collected automatically. busConnectionUnref :: Connection -> IO () -- | Adds a Message to the outgoing message queue. send :: Connection -> Message -> Word32 -> IO Word32 sendWithReplyAndBlock :: Connection -> Message -> Int -> IO Message -- | Block until all pending messages have been sent. flush :: Connection -> IO () close :: Connection -> IO () -- | Open a connection and run an IO action, ensuring it is properly closed -- when you're done. withConnection :: BusType -> (Connection -> IO a) -> IO a -- | Block until a message is read or written, then return True unless a -- disconnect message is received. readWriteDispatch :: Connection -> Int -> IO Bool addFilter :: Connection -> (Message -> IO Bool) -> IO () addMatch :: Connection -> Bool -> String -> IO () data RequestNameReply PrimaryOwner :: RequestNameReply InQueue :: RequestNameReply Exists :: RequestNameReply AlreadyOwner :: RequestNameReply busRequestName :: Connection -> String -> [Int] -> IO RequestNameReply