diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-03 18:13:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-03 18:14:50 +0100 |
commit | 0461f8cdc1d7b4afee2f2ff40fcaa3c7e26c662c (patch) | |
tree | 86005fcf71c45208e919676235d80905d3d12f26 /src/systemd/sd-bus-protocol.h | |
parent | 6c045c0b4c49c88a1d3b9360c05efa5084796d2d (diff) |
bus: internalize a lot of protocol definitions
We shouldn export what isn't necessary or useful to clients, so let's
add the protocol definitions we only need internally into a private
header.
Diffstat (limited to 'src/systemd/sd-bus-protocol.h')
-rw-r--r-- | src/systemd/sd-bus-protocol.h | 112 |
1 files changed, 2 insertions, 110 deletions
diff --git a/src/systemd/sd-bus-protocol.h b/src/systemd/sd-bus-protocol.h index 07fade6039..b2db7e46b8 100644 --- a/src/systemd/sd-bus-protocol.h +++ b/src/systemd/sd-bus-protocol.h @@ -66,125 +66,17 @@ enum { SD_BUS_TYPE_DICT_ENTRY_END = '}', }; -/* Endianness */ - -enum { - _SD_BUS_INVALID_ENDIAN = 0, - SD_BUS_LITTLE_ENDIAN = 'l', - SD_BUS_BIG_ENDIAN = 'B', -#if __BYTE_ORDER == __BIG_ENDIAN - SD_BUS_NATIVE_ENDIAN = SD_BUS_BIG_ENDIAN, - SD_BUS_REVERSE_ENDIAN = SD_BUS_LITTLE_ENDIAN -#else - SD_BUS_NATIVE_ENDIAN = SD_BUS_LITTLE_ENDIAN, - SD_BUS_REVERSE_ENDIAN = SD_BUS_BIG_ENDIAN -#endif -}; - -/* Flags */ - -enum { - SD_BUS_MESSAGE_NO_REPLY_EXPECTED = 1, - SD_BUS_MESSAGE_NO_AUTO_START = 2 -}; - -/* Header fields */ - -enum { - _SD_BUS_MESSAGE_HEADER_INVALID = 0, - SD_BUS_MESSAGE_HEADER_PATH, - SD_BUS_MESSAGE_HEADER_INTERFACE, - SD_BUS_MESSAGE_HEADER_MEMBER, - SD_BUS_MESSAGE_HEADER_ERROR_NAME, - SD_BUS_MESSAGE_HEADER_REPLY_SERIAL, - SD_BUS_MESSAGE_HEADER_DESTINATION, - SD_BUS_MESSAGE_HEADER_SENDER, - SD_BUS_MESSAGE_HEADER_SIGNATURE, - SD_BUS_MESSAGE_HEADER_UNIX_FDS, - _SD_BUS_MESSAGE_HEADER_MAX -}; - /* RequestName parameters */ + enum { SD_BUS_NAME_ALLOW_REPLACEMENT = 1, SD_BUS_NAME_REPLACE_EXISTING = 2, SD_BUS_NAME_DO_NOT_QUEUE = 4 }; -/* RequestName returns */ -enum { - SD_BUS_NAME_PRIMARY_OWNER = 1, - SD_BUS_NAME_IN_QUEUE = 2, - SD_BUS_NAME_EXISTS = 3, - SD_BUS_NAME_ALREADY_OWNER = 4 -}; - -/* ReleaseName returns */ -enum { - SD_BUS_NAME_RELEASED = 1, - SD_BUS_NAME_NON_EXISTENT = 2, - SD_BUS_NAME_NOT_OWNER = 3, -}; - -#define SD_BUS_INTROSPECT_DOCTYPE \ - "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n" \ - "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n" - -#define SD_BUS_INTROSPECT_INTERFACE_PEER \ - " <interface name=\"org.freedesktop.DBus.Peer\">\n" \ - " <method name=\"Ping\"/>\n" \ - " <method name=\"GetMachineId\">\n" \ - " <arg type=\"s\" name=\"machine_uuid\" direction=\"out\"/>\n" \ - " </method>\n" \ - " </interface>\n" - -#define SD_BUS_INTROSPECT_INTERFACE_INTROSPECTABLE \ - " <interface name=\"org.freedesktop.DBus.Introspectable\">\n" \ - " <method name=\"Introspect\">\n" \ - " <arg name=\"data\" type=\"s\" direction=\"out\"/>\n" \ - " </method>\n" \ - " </interface>\n" - -#define SD_BUS_INTROSPECT_INTERFACE_PROPERTIES \ - " <interface name=\"org.freedesktop.DBus.Properties\">\n" \ - " <method name=\"Get\">\n" \ - " <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n" \ - " <arg name=\"property\" direction=\"in\" type=\"s\"/>\n" \ - " <arg name=\"value\" direction=\"out\" type=\"v\"/>\n" \ - " </method>\n" \ - " <method name=\"GetAll\">\n" \ - " <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n" \ - " <arg name=\"properties\" direction=\"out\" type=\"a{sv}\"/>\n" \ - " </method>\n" \ - " <method name=\"Set\">\n" \ - " <arg name=\"interface\" direction=\"in\" type=\"s\"/>\n" \ - " <arg name=\"property\" direction=\"in\" type=\"s\"/>\n" \ - " <arg name=\"value\" direction=\"in\" type=\"v\"/>\n" \ - " </method>\n" \ - " <signal name=\"PropertiesChanged\">\n" \ - " <arg type=\"s\" name=\"interface\"/>\n" \ - " <arg type=\"a{sv}\" name=\"changed_properties\"/>\n" \ - " <arg type=\"as\" name=\"invalidated_properties\"/>\n" \ - " </signal>\n" \ - " </interface>\n" - -#define SD_BUS_INTROSPECT_INTERFACE_OBJECT_MANAGER \ - " <interface name=\"org.freedesktop.DBus.ObjectManager\">\n" \ - " <method name=\"GetManagedObjects\">\n" \ - " <arg type=\"a{oa{sa{sv}}}\" name=\"object_paths_interfaces_and_properties\" direction=\"out\"/>\n" \ - " </method>\n" \ - " <signal name=\"InterfacesAdded\">\n" \ - " <arg type=\"o\" name=\"object_path\"/>\n" \ - " <arg type=\"a{sa{sv}}\" name=\"interfaces_and_properties\"/>\n" \ - " </signal>\n" \ - " <signal name=\"InterfacesRemoved\">\n" \ - " <arg type=\"o\" name=\"object_path\"/>\n" \ - " <arg type=\"as\" name=\"interfaces\"/>\n" \ - " </signal>\n" \ - " </interface>\n" - /* Well-known errors. Note that this is only a sanitized subset of the * errors that the reference implementation generates. */ + #define SD_BUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed" #define SD_BUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory" #define SD_BUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown" |