From 81b720e0eda6ab79adb5655b4124d0f6f841a8f9 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Fri, 6 Dec 2013 11:15:12 +0800 Subject: [PATCH 1/4] DBus Spec: replace tab with 8 spaces Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72301 --- doc/dbus-specification.xml | 426 ++++++++++++++++++++++---------------------- 1 file changed, 213 insertions(+), 213 deletions(-) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 629ab10..741a335 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -10,44 +10,44 @@ (not yet released) - Havoc - Pennington - - Red Hat, Inc. -
- hp@pobox.com -
-
+ Havoc + Pennington + + Red Hat, Inc. +
+ hp@pobox.com +
+
- Anders - Carlsson - - CodeFactory AB -
+ Anders + Carlsson + + CodeFactory AB +
andersca@codefactory.se
-
+ - Alexander - Larsson - - Red Hat, Inc. -
+ Alexander + Larsson + + Red Hat, Inc. +
alexl@redhat.com
-
+ - Sven - Herzberg - - Imendio AB -
+ Sven + Herzberg + + Imendio AB +
sven@imendio.com
-
+ Simon @@ -765,14 +765,14 @@ 0 (ASCII NUL) Not a valid type code, used to terminate signatures - BYTE - 121 (ASCII 'y') - 8-bit unsigned integer + BYTE + 121 (ASCII 'y') + 8-bit unsigned integer + + BOOLEAN + 98 (ASCII 'b') + Boolean value, 0 is FALSE and 1 is TRUE. Everything else is invalid. - BOOLEAN - 98 (ASCII 'b') - Boolean value, 0 is FALSE and 1 is TRUE. Everything else is invalid. - INT16 110 (ASCII 'n') 16-bit signed integer @@ -780,7 +780,7 @@ UINT16 113 (ASCII 'q') 16-bit unsigned integer - + INT32 105 (ASCII 'i') 32-bit signed integer @@ -788,7 +788,7 @@ UINT32 117 (ASCII 'u') 32-bit unsigned integer - + INT64 120 (ASCII 'x') 64-bit signed integer @@ -1109,7 +1109,7 @@ 8 - + VARIANT The marshaled SIGNATURE of a single @@ -1119,7 +1119,7 @@ 1 (alignment of the signature) - + DICT_ENTRY Identical to STRUCT. @@ -1136,7 +1136,7 @@ file descriptor in the array of file descriptors that accompany the message. 4 - + @@ -1528,12 +1528,12 @@ - Interface names must contain at least one '.' (period) + Interface names must contain at least one '.' (period) character (and thus at least two elements). - Interface names must not begin with a '.' (period) character. - Interface names must not exceed the maximum name length. + Interface names must not begin with a '.' (period) character. + Interface names must not exceed the maximum name length. @@ -1592,12 +1592,12 @@ - Bus names must contain at least one '.' (period) + Bus names must contain at least one '.' (period) character (and thus at least two elements). - Bus names must not begin with a '.' (period) character. - Bus names must not exceed the maximum name length. + Bus names must not begin with a '.' (period) character. + Bus names must not exceed the maximum name length. @@ -1635,12 +1635,12 @@ Member (i.e. method or signal) names: - Must only contain the ASCII characters + Must only contain the ASCII characters "[A-Z][a-z][0-9]_" and may not begin with a digit. - Must not contain the '.' (period) character. - Must not exceed the maximum name length. - Must be at least 1 byte in length. + Must not contain the '.' (period) character. + Must not exceed the maximum name length. + Must be at least 1 byte in length. @@ -1984,23 +1984,23 @@ Commands from the client to the server are as follows: - AUTH [mechanism] [initial-response] - CANCEL - BEGIN - DATA <data in hex encoding> - ERROR [human-readable error explanation] - NEGOTIATE_UNIX_FD - + AUTH [mechanism] [initial-response] + CANCEL + BEGIN + DATA <data in hex encoding> + ERROR [human-readable error explanation] + NEGOTIATE_UNIX_FD + From server to client are as follows: - REJECTED <space-separated list of mechanism names> - OK <GUID in hex> - DATA <data in hex encoding> - ERROR - AGREE_UNIX_FD - + REJECTED <space-separated list of mechanism names> + OK <GUID in hex> + DATA <data in hex encoding> + ERROR + AGREE_UNIX_FD + Unofficial extensions to the command set must begin with the letters @@ -2230,18 +2230,18 @@
- Example of successful magic cookie authentication - + Example of successful magic cookie authentication + (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 S: OK 1234deadbeef C: BEGIN -
+
- Example of finding out mechanisms then picking one - + Example of finding out mechanisms then picking one + C: AUTH S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2250,20 +2250,20 @@ S: OK 1234deadbeef C: BEGIN -
+
- Example of client sends unknown command then falls back to regular auth - + Example of client sends unknown command then falls back to regular auth + C: FOOBAR S: ERROR C: AUTH MAGIC_COOKIE 3736343435313230333039 S: OK 1234deadbeef C: BEGIN -
+
- Example of server doesn't support initial auth mechanism - + Example of server doesn't support initial auth mechanism + C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2272,10 +2272,10 @@ S: OK 1234deadbeef C: BEGIN -
+
- Example of wrong password or the like followed by successful retry - + Example of wrong password or the like followed by successful retry + C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2288,10 +2288,10 @@ S: OK 1234deadbeef C: BEGIN -
+
- Example of skey cancelled and restarted - + Example of skey cancelled and restarted + C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2304,10 +2304,10 @@ S: OK 1234deadbeef C: BEGIN -
+
- Example of successful magic cookie authentication with successful negotiation of Unix FD passing - + Example of successful magic cookie authentication with successful negotiation of Unix FD passing + (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 @@ -2316,10 +2316,10 @@ S: AGREE_UNIX_FD C: BEGIN -
+
- Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing - + Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing + (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 @@ -2328,7 +2328,7 @@ S: ERROR C: BEGIN -
+
@@ -2968,17 +2968,17 @@ Unix Domain Sockets Unix domain sockets can be either paths in the file system or on Linux - kernels, they can be abstract which are similar to paths but - do not show up in the file system. + kernels, they can be abstract which are similar to paths but + do not show up in the file system. When a socket is opened by the D-Bus library it truncates the path - name right before the first trailing Nul byte. This is true for both - normal paths and abstract paths. Note that this is a departure from - previous versions of D-Bus that would create sockets with a fixed - length path name. Names which were shorter than the fixed length - would be padded by Nul bytes. + name right before the first trailing Nul byte. This is true for both + normal paths and abstract paths. Note that this is a departure from + previous versions of D-Bus that would create sockets with a fixed + length path name. Names which were shorter than the fixed length + would be padded by Nul bytes. Unix domain sockets are not available on Windows. @@ -3765,38 +3765,38 @@ Method, interface, property, and signal elements may have "annotations", which are generic key/value pairs of metadata. - They are similar conceptually to Java's annotations and C# attributes. + They are similar conceptually to Java's annotations and C# attributes. Well-known annotations: - - - Name - Values (separated by ,) - Description - - - - - org.freedesktop.DBus.Deprecated - true,false - Whether or not the entity is deprecated; defaults to false - - - org.freedesktop.DBus.GLib.CSymbol - (string) - The C symbol; may be used for methods and interfaces - - - org.freedesktop.DBus.Method.NoReply - true,false - If set, don't expect a reply to the method call; defaults to false. - - - org.freedesktop.DBus.Property.EmitsChangedSignal - true,invalidates,false - + + + Name + Values (separated by ,) + Description + + + + + org.freedesktop.DBus.Deprecated + true,false + Whether or not the entity is deprecated; defaults to false + + + org.freedesktop.DBus.GLib.CSymbol + (string) + The C symbol; may be used for methods and interfaces + + + org.freedesktop.DBus.Method.NoReply + true,false + If set, don't expect a reply to the method call; defaults to false. + + + org.freedesktop.DBus.Property.EmitsChangedSignal + true,invalidates,false + If set to false, the org.freedesktop.DBus.Properties.PropertiesChanged @@ -3821,8 +3821,8 @@ interface element. - - + + @@ -3935,11 +3935,11 @@ STRING Name to request - - 1 - UINT32 - Flags - + + 1 + UINT32 + Flags + @@ -4050,10 +4050,10 @@ - - DBUS_NAME_FLAG_ALLOW_REPLACEMENT - 0x1 - + + DBUS_NAME_FLAG_ALLOW_REPLACEMENT + 0x1 + If an application A specifies this flag and succeeds in becoming the owner of the name, and another application B @@ -4067,11 +4067,11 @@ application A as the owner. - - - DBUS_NAME_FLAG_REPLACE_EXISTING - 0x2 - + + + DBUS_NAME_FLAG_REPLACE_EXISTING + 0x2 + Try to replace the current owner if there is one. If this flag is not set the application will only become the owner of @@ -4080,11 +4080,11 @@ the current owner specified DBUS_NAME_FLAG_ALLOW_REPLACEMENT. - - - DBUS_NAME_FLAG_DO_NOT_QUEUE - 0x4 - + + + DBUS_NAME_FLAG_DO_NOT_QUEUE + 0x4 + Without this flag, if an application requests a name that is already owned, the application will be placed in a queue to @@ -4097,10 +4097,10 @@ became the name owner. - - - - + + + + The return code can be one of the following values: @@ -4114,41 +4114,41 @@ - + DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER - 1 The caller is now the primary owner of - the name, replacing any previous owner. Either the name had no - owner before, or the caller specified - DBUS_NAME_FLAG_REPLACE_EXISTING and the current owner specified + 1 The caller is now the primary owner of + the name, replacing any previous owner. Either the name had no + owner before, or the caller specified + DBUS_NAME_FLAG_REPLACE_EXISTING and the current owner specified DBUS_NAME_FLAG_ALLOW_REPLACEMENT. - - - DBUS_REQUEST_NAME_REPLY_IN_QUEUE - 2 + + + DBUS_REQUEST_NAME_REPLY_IN_QUEUE + 2 - The name already had an owner, + The name already had an owner, DBUS_NAME_FLAG_DO_NOT_QUEUE was not specified, and either the current owner did not specify DBUS_NAME_FLAG_ALLOW_REPLACEMENT or the requesting application did not specify DBUS_NAME_FLAG_REPLACE_EXISTING. - - - DBUS_REQUEST_NAME_REPLY_EXISTS 3 - The name already has an owner, - DBUS_NAME_FLAG_DO_NOT_QUEUE was specified, and either - DBUS_NAME_FLAG_ALLOW_REPLACEMENT was not specified by the - current owner, or DBUS_NAME_FLAG_REPLACE_EXISTING was not - specified by the requesting application. - - - DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER - 4 - The application trying to request ownership of a name is already the owner of it. - - - - + + + DBUS_REQUEST_NAME_REPLY_EXISTS 3 + The name already has an owner, + DBUS_NAME_FLAG_DO_NOT_QUEUE was specified, and either + DBUS_NAME_FLAG_ALLOW_REPLACEMENT was not specified by the + current owner, or DBUS_NAME_FLAG_REPLACE_EXISTING was not + specified by the requesting application. + + + DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER + 4 + The application trying to request ownership of a name is already the owner of it. + + + + @@ -4221,7 +4221,7 @@ - + DBUS_RELEASE_NAME_REPLY_RELEASED 1 The caller has released his claim on the given name. Either the caller was the primary owner of @@ -4229,21 +4229,21 @@ waiting in the queue for the name, or the caller was waiting in the queue for the name and has now been removed from the queue. - - - DBUS_RELEASE_NAME_REPLY_NON_EXISTENT - 2 - The given name does not exist on this bus. - - - DBUS_RELEASE_NAME_REPLY_NOT_OWNER - 3 - The caller was not the primary owner of this name, + + + DBUS_RELEASE_NAME_REPLY_NON_EXISTENT + 2 + The given name does not exist on this bus. + + + DBUS_RELEASE_NAME_REPLY_NOT_OWNER + 3 + The caller was not the primary owner of this name, and was also not waiting in the queue to own this name. - - - - + + + +
@@ -4405,7 +4405,7 @@ Match Rules - An important part of the message bus routing protocol is match + An important part of the message bus routing protocol is match rules. Match rules describe the messages that should be sent to a client, based on the contents of the message. Broadcast signals are only sent to clients which have a suitable match rule: this @@ -4692,14 +4692,14 @@ and Exec (the command to be executed).
- Example service description file - + Example service description file + # Sample service description file [D-BUS Service] Name=com.example.ConfigurationDatabase Exec=/usr/bin/sample-configd -
+
@@ -5281,16 +5281,16 @@ STRING Name with a new owner - - 1 - STRING - Old owner or empty string if none - - - 2 - STRING - New owner or empty string if none - + + 1 + STRING + Old owner or empty string if none + + + 2 + STRING + New owner or empty string if none + @@ -5390,11 +5390,11 @@ STRING Name of the service to start - - 1 - UINT32 - Flags (currently not used) - + + 1 + UINT32 + Flags (currently not used) + @@ -5432,7 +5432,7 @@ - + DBUS_START_REPLY_SUCCESS 1 The service was successfully started. @@ -5889,8 +5889,8 @@ Adds a match rule to match messages going through the message bus (see ). - If the bus does not have enough resources the org.freedesktop.DBus.Error.OOM - error is returned. + If the bus does not have enough resources the org.freedesktop.DBus.Error.OOM + error is returned.
@@ -5920,8 +5920,8 @@ Removes the first rule that matches (see ). - If the rule is not found the org.freedesktop.DBus.Error.MatchRuleNotFound - error is returned. + If the rule is not found the org.freedesktop.DBus.Error.MatchRuleNotFound + error is returned. @@ -6065,7 +6065,7 @@ One-to-One - + An application talking directly to another application, without going through a message bus. One-to-one connections may be "peer to peer" or "client to server." The D-Bus protocol has no concept of client @@ -6105,7 +6105,7 @@ Services normally guarantee some particular features, for example they may guarantee that they will request a specific name such as "com.example.Screensaver", have a singleton object - "/com/example/Application", and that object will implement the + "/com/example/Application", and that object will implement the interface "com.example.Screensaver.Control". -- 1.7.9.5