summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-10 04:06:32 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-10 21:10:31 +0100
commit2c34514620c4b79ea4ec71d1db583379138d01ac (patch)
tree3d59d2d4bf54bdfb6255bb1247fbced6ee06e856
parent09c9d6406b75f161429e16b2e45dcae3eb60cef9 (diff)
protocol: introduce four new errors
UnknownInterface, UnknownObject, UnknownProperty and PropertyReadOnly, as discussed on the ML. The first two are already used by various bindings, such as the Qt and Java binding, but have never been made official. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34527 Reviewed-by: David Zeuthen <davidz@redhat.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--dbus/dbus-protocol.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/dbus/dbus-protocol.h b/dbus/dbus-protocol.h
index 17798e94..8aa15e53 100644
--- a/dbus/dbus-protocol.h
+++ b/dbus/dbus-protocol.h
@@ -189,7 +189,7 @@ extern "C" {
* arg0='hello' is OK, arg3489720987='hello' is not
*/
#define DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER 63
-
+
/** Max length of a marshaled array in bytes (64M, 2^26) We use signed
* int for lengths so must be INT_MAX or less. We need something a
* bit smaller than INT_MAX because the array is inside a message with
@@ -390,6 +390,14 @@ extern "C" {
#define DBUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists"
/** Method name you invoked isn't known by the object you invoked it on. */
#define DBUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod"
+/** Object you invoked a method on isn't known. */
+#define DBUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject"
+/** Interface you invoked a method on isn't known by the object. */
+#define DBUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface"
+/** Property you tried to access isn't known by the object. */
+#define DBUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty"
+/** Property you tried to set is read-only. */
+#define DBUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error.PropertyReadOnly"
/** Certain timeout errors, e.g. while starting a service.
* @warning this is confusingly-named given that #DBUS_ERROR_TIMEOUT also exists. We can't fix
* it for compatibility reasons so just be careful.