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

Safe HaskellSafe
LanguageHaskell98

DBus.Internal.Address

Synopsis

Documentation

data Address Source #

When a D-Bus server must listen for connections, or a client must connect to a server, the listening socket's configuration is specified with an address. An address contains the method, which determines the protocol and transport mechanism, and parameters, which provide additional method-specific information about the address.

Constructors

Address String (Map String String) 
Instances
Eq Address Source # 
Instance details

Defined in DBus.Internal.Address

Methods

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

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

Show Address Source # 
Instance details

Defined in DBus.Internal.Address

address :: String -> Map String String -> Maybe Address Source #

Try to convert a method string and parameter map to an Address.

Returns Nothing if the method or parameters are invalid.

formatAddress :: Address -> String Source #

Convert an address to a string in the format expected by parseAddress.

formatAddresses :: [Address] -> String Source #

Convert a list of addresses to a string in the format expected by parseAddresses.

parseAddress :: String -> Maybe Address Source #

Try to parse a string containing one valid address.

An address string is in the format method:key1=val1,key2=val2. There are some limitations on the characters allowed within methods and parameters; see the D-Bus specification for full details.

parseAddresses :: String -> Maybe [Address] Source #

Try to parse a string containing one or more valid addresses.

Addresses are separated by semicolons. See parseAddress for the format of addresses.

getSystemAddress :: IO (Maybe Address) Source #

Returns the address in the environment variable DBUS_SYSTEM_BUS_ADDRESS, or unix:path=/var/run/dbus/system_bus_socket if DBUS_SYSTEM_BUS_ADDRESS is not set.

Returns Nothing if DBUS_SYSTEM_BUS_ADDRESS contains an invalid address.

getSessionAddress :: IO (Maybe Address) Source #

Returns the address in the environment variable DBUS_SESSION_BUS_ADDRESS, which must be set.

Returns Nothing if DBUS_SYSTEM_BUS_ADDRESS is unset or contains an invalid address.

getStarterAddress :: IO (Maybe Address) Source #

Returns the address in the environment variable DBUS_STARTER_ADDRESS, which must be set.

Returns Nothing if DBUS_STARTER_ADDRESS is unset or contains an invalid address.