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

Safe HaskellNone
LanguageHaskell2010

DBus.Internal.Message

Synopsis

Documentation

data MethodCall Source #

A method call is a request to run some procedure exported by the remote process. Procedures are identified by an (object_path, interface_name, method_name) tuple.

Constructors

MethodCall 

Fields

  • methodCallPath :: ObjectPath

    The object path of the method call. Conceptually, object paths act like a procedural language's pointers. Each object referenced by a path is a collection of procedures.

  • methodCallInterface :: Maybe InterfaceName

    The interface of the method call. Each object may implement any number of interfaces. Each method is part of at least one interface.

    In certain cases, this may be Nothing, but most users should set it to a value.

  • methodCallMember :: MemberName

    The method name of the method call. Method names are unique within an interface, but might not be unique within an object.

  • methodCallSender :: Maybe BusName

    The name of the application that sent this call.

    Most users will just leave this empty, because the bus overwrites the sender for security reasons. Setting the sender manually is used for peer-peer connections.

    Defaults to Nothing.

  • methodCallDestination :: Maybe BusName

    The name of the application to send the call to.

    Most users should set this. If a message with no destination is sent to the bus, the bus will behave as if the destination was set to org.freedesktop.DBus. For peer-peer connections, the destination can be empty because there is only one peer.

    Defaults to Nothing.

  • methodCallReplyExpected :: Bool

    Set whether a reply is expected. This can save network and cpu resources by inhibiting unnecessary replies.

    Defaults to True.

  • methodCallAutoStart :: Bool

    Set whether the bus should auto-start the remote

    Defaults to True.

  • methodCallBody :: [Variant]

    The arguments to the method call. See toVariant.

    Defaults to [].

data MethodReturn Source #

A method return is a reply to a method call, indicating that the call succeeded.

Constructors

MethodReturn 

Fields

  • methodReturnSerial :: Serial

    The serial of the original method call. This lets the original caller match up this reply to the pending call.

  • methodReturnSender :: Maybe BusName

    The name of the application that is returning from a call.

    Most users will just leave this empty, because the bus overwrites the sender for security reasons. Setting the sender manually is used for peer-peer connections.

    Defaults to Nothing.

  • methodReturnDestination :: Maybe BusName

    The name of the application that initiated the call.

    Most users should set this. If a message with no destination is sent to the bus, the bus will behave as if the destination was set to org.freedesktop.DBus. For peer-peer connections, the destination can be empty because there is only one peer.

    Defaults to Nothing.

  • methodReturnBody :: [Variant]

    Values returned from the method call. See toVariant.

    Defaults to [].

data MethodError Source #

A method error is a reply to a method call, indicating that the call received an error and did not succeed.

Constructors

MethodError 

Fields

  • methodErrorName :: ErrorName

    The name of the error type. Names are used so clients can handle certain classes of error differently from others.

  • methodErrorSerial :: Serial

    The serial of the original method call. This lets the original caller match up this reply to the pending call.

  • methodErrorSender :: Maybe BusName

    The name of the application that is returning from a call.

    Most users will just leave this empty, because the bus overwrites the sender for security reasons. Setting the sender manually is used for peer-peer connections.

    Defaults to Nothing.

  • methodErrorDestination :: Maybe BusName

    The name of the application that initiated the call.

    Most users should set this. If a message with no destination is sent to the bus, the bus will behave as if the destination was set to org.freedesktop.DBus. For peer-peer connections, the destination can be empty because there is only one peer.

    Defaults to Nothing.

  • methodErrorBody :: [Variant]

    Additional information about the error. By convention, if the error body contains any items, the first item should be a string describing the error.

methodErrorMessage :: MethodError -> String Source #

Get a human-readable description of the error, by returning the first item in the error body if it's a string.

data Signal Source #

Signals are broadcast by applications to notify other clients of some event.

Constructors

Signal 

Fields

  • signalPath :: ObjectPath

    The path of the object that emitted this signal.

  • signalInterface :: InterfaceName

    The interface that this signal belongs to.

  • signalMember :: MemberName

    The name of this signal.

  • signalSender :: Maybe BusName

    The name of the application that emitted this signal.

    Most users will just leave this empty, because the bus overwrites the sender for security reasons. Setting the sender manually is used for peer-peer connections.

    Defaults to Nothing.

  • signalDestination :: Maybe BusName

    The name of the application to emit the signal to. If Nothing, the signal is sent to any application that has registered an appropriate match rule.

    Defaults to Nothing.

  • signalBody :: [Variant]

    Additional information about the signal, such as the new value or the time.

    Defaults to [].

data ReceivedMessage Source #

Not an actual message type, but a wrapper around messages received from the bus. Each value contains the message's Serial.

If casing against these constructors, always include a default case to handle messages of an unknown type. New message types may be added to the D-Bus specification, and applications should handle them gracefully by either ignoring or logging them.