[maemo-commits] [maemo-commits] r19179 - projects/haf/trunk/dbus/debian/patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Aug 24 15:47:35 EEST 2009
- Previous message: [maemo-commits] r19178 - projects/haf/tags/sapwood
- Next message: [maemo-commits] r19180 - projects/haf/trunk/dbus
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: makarhun
Date: 2009-08-24 15:47:31 +0300 (Mon, 24 Aug 2009)
New Revision: 19179
Modified:
projects/haf/trunk/dbus/debian/patches/55-rewrite-rulematching.patch
Log:
patch cleanup; fix unlikely leak.
Modified: projects/haf/trunk/dbus/debian/patches/55-rewrite-rulematching.patch
===================================================================
--- projects/haf/trunk/dbus/debian/patches/55-rewrite-rulematching.patch 2009-08-21 13:44:15 UTC (rev 19178)
+++ projects/haf/trunk/dbus/debian/patches/55-rewrite-rulematching.patch 2009-08-24 12:47:31 UTC (rev 19179)
@@ -1,7 +1,8 @@
-diff -Naurp dbus-1.2.12.org/bus/signals.c dbus-1.2.12/bus/signals.c
---- dbus-1.2.12.org/bus/signals.c 2009-08-04 09:08:36.000000000 +0300
-+++ dbus-1.2.12/bus/signals.c 2009-08-04 09:09:40.000000000 +0300
-@@ -1018,25 +1018,173 @@ bus_match_rule_parse (DBusConnection *
+Index: dbus-1.2.14/bus/signals.c
+===================================================================
+--- dbus-1.2.14.orig/bus/signals.c
++++ dbus-1.2.14/bus/signals.c
+@@ -1018,25 +1018,176 @@ bus_match_rule_parse (DBusConnection *
return rule;
}
@@ -80,6 +81,9 @@
return matchmaker;
+
+ nomem:
++ if (matchmaker)
++ dbus_free(matchmaker);
++
+ for (i = DBUS_MESSAGE_TYPE_INVALID; i < DBUS_NUM_MESSAGE_TYPES; i++)
+ {
+ RulePool *p = matchmaker->rules_by_type + i;
@@ -177,7 +181,7 @@
}
BusMatchmaker *
-@@ -1057,14 +1205,14 @@ bus_matchmaker_unref (BusMatchmaker *mat
+@@ -1057,14 +1208,14 @@ bus_matchmaker_unref (BusMatchmaker *mat
matchmaker->refcount -= 1;
if (matchmaker->refcount == 0)
{
@@ -198,7 +202,7 @@
}
dbus_free (matchmaker);
-@@ -1076,17 +1224,31 @@ dbus_bool_t
+@@ -1076,17 +1227,31 @@ dbus_bool_t
bus_matchmaker_add_rule (BusMatchmaker *matchmaker,
BusMatchRule *rule)
{
@@ -233,7 +237,7 @@
bus_match_rule_ref (rule);
#ifdef DBUS_ENABLE_VERBOSE_MODE
-@@ -1171,13 +1333,13 @@ match_rule_equal (BusMatchRule *a,
+@@ -1171,13 +1336,13 @@ match_rule_equal (BusMatchRule *a,
}
static void
@@ -249,7 +253,7 @@
#ifdef DBUS_ENABLE_VERBOSE_MODE
{
-@@ -1196,8 +1358,25 @@ void
+@@ -1196,8 +1361,25 @@ void
bus_matchmaker_remove_rule (BusMatchmaker *matchmaker,
BusMatchRule *rule)
{
@@ -276,7 +280,7 @@
#ifdef DBUS_ENABLE_VERBOSE_MODE
{
-@@ -1218,29 +1397,38 @@ bus_matchmaker_remove_rule_by_value (Bus
+@@ -1218,29 +1400,38 @@ bus_matchmaker_remove_rule_by_value (Bus
BusMatchRule *value,
DBusError *error)
{
@@ -332,7 +336,7 @@
}
if (link == NULL)
-@@ -1250,38 +1438,30 @@ bus_matchmaker_remove_rule_by_value (Bus
+@@ -1250,38 +1441,30 @@ bus_matchmaker_remove_rule_by_value (Bus
return FALSE;
}
@@ -380,7 +384,7 @@
}
else if (((rule->flags & BUS_MATCH_SENDER) && *rule->sender == ':') ||
((rule->flags & BUS_MATCH_DESTINATION) && *rule->destination == ':'))
-@@ -1300,7 +1480,7 @@ bus_matchmaker_disconnected (BusMatchmak
+@@ -1300,7 +1483,7 @@ bus_matchmaker_disconnected (BusMatchmak
((rule->flags & BUS_MATCH_DESTINATION) &&
strcmp (rule->destination, name) == 0))
{
@@ -389,7 +393,7 @@
}
}
-@@ -1308,6 +1488,44 @@ bus_matchmaker_disconnected (BusMatchmak
+@@ -1308,6 +1491,44 @@ bus_matchmaker_disconnected (BusMatchmak
}
}
@@ -434,7 +438,7 @@
static dbus_bool_t
connection_is_primary_owner (DBusConnection *connection,
const char *service_name)
-@@ -1333,8 +1551,11 @@ static dbus_bool_t
+@@ -1333,8 +1554,11 @@ static dbus_bool_t
match_rule_matches (BusMatchRule *rule,
DBusConnection *sender,
DBusConnection *addressed_recipient,
@@ -447,7 +451,7 @@
/* All features of the match rule are AND'd together,
* so FALSE if any of them don't match.
*/
-@@ -1343,8 +1564,11 @@ match_rule_matches (BusMatchRule *rul
+@@ -1343,8 +1567,11 @@ match_rule_matches (BusMatchRule *rul
* or for addressed_recipient may mean a message with no
* specific recipient (i.e. a signal)
*/
@@ -461,7 +465,7 @@
{
_dbus_assert (rule->message_type != DBUS_MESSAGE_TYPE_INVALID);
-@@ -1352,7 +1576,7 @@ match_rule_matches (BusMatchRule *rul
+@@ -1352,7 +1579,7 @@ match_rule_matches (BusMatchRule *rul
return FALSE;
}
@@ -470,7 +474,7 @@
{
const char *iface;
-@@ -1366,7 +1590,7 @@ match_rule_matches (BusMatchRule *rul
+@@ -1366,7 +1593,7 @@ match_rule_matches (BusMatchRule *rul
return FALSE;
}
@@ -479,7 +483,7 @@
{
const char *member;
-@@ -1380,7 +1604,7 @@ match_rule_matches (BusMatchRule *rul
+@@ -1380,7 +1607,7 @@ match_rule_matches (BusMatchRule *rul
return FALSE;
}
@@ -488,7 +492,7 @@
{
_dbus_assert (rule->sender != NULL);
-@@ -1397,7 +1621,7 @@ match_rule_matches (BusMatchRule *rul
+@@ -1397,7 +1624,7 @@ match_rule_matches (BusMatchRule *rul
}
}
@@ -497,7 +501,7 @@
{
const char *destination;
-@@ -1420,7 +1644,7 @@ match_rule_matches (BusMatchRule *rul
+@@ -1420,7 +1647,7 @@ match_rule_matches (BusMatchRule *rul
}
}
@@ -506,7 +510,7 @@
{
const char *path;
-@@ -1434,7 +1658,7 @@ match_rule_matches (BusMatchRule *rul
+@@ -1434,7 +1661,7 @@ match_rule_matches (BusMatchRule *rul
return FALSE;
}
@@ -515,7 +519,7 @@
{
int i;
DBusMessageIter iter;
-@@ -1504,38 +1728,19 @@ match_rule_matches (BusMatchRule *rul
+@@ -1504,38 +1731,19 @@ match_rule_matches (BusMatchRule *rul
return TRUE;
}
@@ -563,7 +567,7 @@
while (link != NULL)
{
BusMatchRule *rule;
-@@ -1545,23 +1750,24 @@ bus_matchmaker_get_recipients (BusMatchm
+@@ -1545,23 +1753,24 @@ bus_matchmaker_get_recipients (BusMatchm
#ifdef DBUS_ENABLE_VERBOSE_MODE
{
char *s = match_rule_to_string (rule);
@@ -593,7 +597,7 @@
}
#ifdef DBUS_ENABLE_VERBOSE_MODE
else
-@@ -1571,14 +1777,72 @@ bus_matchmaker_get_recipients (BusMatchm
+@@ -1571,14 +1780,72 @@ bus_matchmaker_get_recipients (BusMatchm
#endif /* DBUS_ENABLE_VERBOSE_MODE */
}
@@ -670,7 +674,7 @@
}
#ifdef DBUS_BUILD_TESTS
-@@ -1943,7 +2207,7 @@ check_matches (dbus_bool_t expected_to_
+@@ -1943,7 +2210,7 @@ check_matches (dbus_bool_t expected_to_
_dbus_assert (rule != NULL);
/* We can't test sender/destination rules since we pass NULL here */
@@ -679,9 +683,10 @@
if (matched != expected_to_match)
{
-diff -Naurp dbus-1.2.12.org/dbus/dbus-protocol.h dbus-1.2.12/dbus/dbus-protocol.h
---- dbus-1.2.12.org/dbus/dbus-protocol.h 2009-08-04 09:08:36.000000000 +0300
-+++ dbus-1.2.12/dbus/dbus-protocol.h 2009-08-04 09:08:52.000000000 +0300
+Index: dbus-1.2.14/dbus/dbus-protocol.h
+===================================================================
+--- dbus-1.2.14.orig/dbus/dbus-protocol.h
++++ dbus-1.2.14/dbus/dbus-protocol.h
@@ -227,6 +227,8 @@ extern "C" {
/** Message type of a signal message, see dbus_message_get_type() */
#define DBUS_MESSAGE_TYPE_SIGNAL 4
@@ -691,446 +696,3 @@
/* Header flags */
/** If set, this flag means that the sender of a message does not care about getting
-diff -Naurp dbus-1.2.12.org/dbus/dbus-protocol.h.orig dbus-1.2.12/dbus/dbus-protocol.h.orig
---- dbus-1.2.12.org/dbus/dbus-protocol.h.orig 1970-01-01 02:00:00.000000000 +0200
-+++ dbus-1.2.12/dbus/dbus-protocol.h.orig 2008-08-07 21:44:36.000000000 +0300
-@@ -0,0 +1,439 @@
-+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-+/* dbus-protocol.h D-Bus protocol constants
-+ *
-+ * Copyright (C) 2002, 2003 CodeFactory AB
-+ * Copyright (C) 2004, 2005 Red Hat, Inc.
-+ *
-+ * Licensed under the Academic Free License version 2.1
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ */
-+
-+#ifndef DBUS_PROTOCOL_H
-+#define DBUS_PROTOCOL_H
-+
-+/* Don't include anything in here from anywhere else. It's
-+ * intended for use by any random library.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#if 0
-+} /* avoids confusing emacs indentation */
-+#endif
-+#endif
-+
-+/* Normally docs are in .c files, but there isn't a .c file for this. */
-+/**
-+ * @defgroup DBusProtocol Protocol constants
-+ * @ingroup DBus
-+ *
-+ * @brief Defines constants which are part of the D-Bus protocol
-+ *
-+ * This header is intended for use by any library, not only libdbus.
-+ *
-+ * @{
-+ */
-+
-+
-+/* Message byte order */
-+#define DBUS_LITTLE_ENDIAN ('l') /**< Code marking LSB-first byte order in the wire protocol. */
-+#define DBUS_BIG_ENDIAN ('B') /**< Code marking MSB-first byte order in the wire protocol. */
-+
-+/** Protocol version. */
-+#define DBUS_MAJOR_PROTOCOL_VERSION 1
-+
-+/** Type code that is never equal to a legitimate type code */
-+#define DBUS_TYPE_INVALID ((int) '\0')
-+/** #DBUS_TYPE_INVALID as a string literal instead of a int literal */
-+#define DBUS_TYPE_INVALID_AS_STRING "\0"
-+
-+/* Primitive types */
-+/** Type code marking an 8-bit unsigned integer */
-+#define DBUS_TYPE_BYTE ((int) 'y')
-+/** #DBUS_TYPE_BYTE as a string literal instead of a int literal */
-+#define DBUS_TYPE_BYTE_AS_STRING "y"
-+/** Type code marking a boolean */
-+#define DBUS_TYPE_BOOLEAN ((int) 'b')
-+/** #DBUS_TYPE_BOOLEAN as a string literal instead of a int literal */
-+#define DBUS_TYPE_BOOLEAN_AS_STRING "b"
-+/** Type code marking a 16-bit signed integer */
-+#define DBUS_TYPE_INT16 ((int) 'n')
-+/** #DBUS_TYPE_INT16 as a string literal instead of a int literal */
-+#define DBUS_TYPE_INT16_AS_STRING "n"
-+/** Type code marking a 16-bit unsigned integer */
-+#define DBUS_TYPE_UINT16 ((int) 'q')
-+/** #DBUS_TYPE_UINT16 as a string literal instead of a int literal */
-+#define DBUS_TYPE_UINT16_AS_STRING "q"
-+/** Type code marking a 32-bit signed integer */
-+#define DBUS_TYPE_INT32 ((int) 'i')
-+/** #DBUS_TYPE_INT32 as a string literal instead of a int literal */
-+#define DBUS_TYPE_INT32_AS_STRING "i"
-+/** Type code marking a 32-bit unsigned integer */
-+#define DBUS_TYPE_UINT32 ((int) 'u')
-+/** #DBUS_TYPE_UINT32 as a string literal instead of a int literal */
-+#define DBUS_TYPE_UINT32_AS_STRING "u"
-+/** Type code marking a 64-bit signed integer */
-+#define DBUS_TYPE_INT64 ((int) 'x')
-+/** #DBUS_TYPE_INT64 as a string literal instead of a int literal */
-+#define DBUS_TYPE_INT64_AS_STRING "x"
-+/** Type code marking a 64-bit unsigned integer */
-+#define DBUS_TYPE_UINT64 ((int) 't')
-+/** #DBUS_TYPE_UINT64 as a string literal instead of a int literal */
-+#define DBUS_TYPE_UINT64_AS_STRING "t"
-+/** Type code marking an 8-byte double in IEEE 754 format */
-+#define DBUS_TYPE_DOUBLE ((int) 'd')
-+/** #DBUS_TYPE_DOUBLE as a string literal instead of a int literal */
-+#define DBUS_TYPE_DOUBLE_AS_STRING "d"
-+/** Type code marking a UTF-8 encoded, nul-terminated Unicode string */
-+#define DBUS_TYPE_STRING ((int) 's')
-+/** #DBUS_TYPE_STRING as a string literal instead of a int literal */
-+#define DBUS_TYPE_STRING_AS_STRING "s"
-+/** Type code marking a D-Bus object path */
-+#define DBUS_TYPE_OBJECT_PATH ((int) 'o')
-+/** #DBUS_TYPE_OBJECT_PATH as a string literal instead of a int literal */
-+#define DBUS_TYPE_OBJECT_PATH_AS_STRING "o"
-+/** Type code marking a D-Bus type signature */
-+#define DBUS_TYPE_SIGNATURE ((int) 'g')
-+/** #DBUS_TYPE_SIGNATURE as a string literal instead of a int literal */
-+#define DBUS_TYPE_SIGNATURE_AS_STRING "g"
-+
-+/* Compound types */
-+/** Type code marking a D-Bus array type */
-+#define DBUS_TYPE_ARRAY ((int) 'a')
-+/** #DBUS_TYPE_ARRAY as a string literal instead of a int literal */
-+#define DBUS_TYPE_ARRAY_AS_STRING "a"
-+/** Type code marking a D-Bus variant type */
-+#define DBUS_TYPE_VARIANT ((int) 'v')
-+/** #DBUS_TYPE_VARIANT as a string literal instead of a int literal */
-+#define DBUS_TYPE_VARIANT_AS_STRING "v"
-+
-+/** STRUCT and DICT_ENTRY are sort of special since their codes can't
-+ * appear in a type string, instead
-+ * DBUS_STRUCT_BEGIN_CHAR/DBUS_DICT_ENTRY_BEGIN_CHAR have to appear
-+ */
-+/** Type code used to represent a struct; however, this type code does not appear
-+ * in type signatures, instead #DBUS_STRUCT_BEGIN_CHAR and #DBUS_STRUCT_END_CHAR will
-+ * appear in a signature.
-+ */
-+#define DBUS_TYPE_STRUCT ((int) 'r')
-+/** #DBUS_TYPE_STRUCT as a string literal instead of a int literal */
-+#define DBUS_TYPE_STRUCT_AS_STRING "r"
-+/** Type code used to represent a dict entry; however, this type code does not appear
-+ * in type signatures, instead #DBUS_DICT_ENTRY_BEGIN_CHAR and #DBUS_DICT_ENTRY_END_CHAR will
-+ * appear in a signature.
-+ */
-+#define DBUS_TYPE_DICT_ENTRY ((int) 'e')
-+/** #DBUS_TYPE_DICT_ENTRY as a string literal instead of a int literal */
-+#define DBUS_TYPE_DICT_ENTRY_AS_STRING "e"
-+
-+/** Does not include #DBUS_TYPE_INVALID, #DBUS_STRUCT_BEGIN_CHAR, #DBUS_STRUCT_END_CHAR,
-+ * #DBUS_DICT_ENTRY_BEGIN_CHAR, or #DBUS_DICT_ENTRY_END_CHAR - i.e. it is the number of
-+ * valid types, not the number of distinct characters that may appear in a type signature.
-+ */
-+#define DBUS_NUMBER_OF_TYPES (16)
-+
-+/* characters other than typecodes that appear in type signatures */
-+
-+/** Code marking the start of a struct type in a type signature */
-+#define DBUS_STRUCT_BEGIN_CHAR ((int) '(')
-+/** #DBUS_STRUCT_BEGIN_CHAR as a string literal instead of a int literal */
-+#define DBUS_STRUCT_BEGIN_CHAR_AS_STRING "("
-+/** Code marking the end of a struct type in a type signature */
-+#define DBUS_STRUCT_END_CHAR ((int) ')')
-+/** #DBUS_STRUCT_END_CHAR a string literal instead of a int literal */
-+#define DBUS_STRUCT_END_CHAR_AS_STRING ")"
-+/** Code marking the start of a dict entry type in a type signature */
-+#define DBUS_DICT_ENTRY_BEGIN_CHAR ((int) '{')
-+/** #DBUS_DICT_ENTRY_BEGIN_CHAR as a string literal instead of a int literal */
-+#define DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING "{"
-+/** Code marking the end of a dict entry type in a type signature */
-+#define DBUS_DICT_ENTRY_END_CHAR ((int) '}')
-+/** #DBUS_DICT_ENTRY_END_CHAR as a string literal instead of a int literal */
-+#define DBUS_DICT_ENTRY_END_CHAR_AS_STRING "}"
-+
-+/** Max length in bytes of a bus name, interface, or member (not object
-+ * path, paths are unlimited). This is limited because lots of stuff
-+ * is O(n) in this number, plus it would be obnoxious to type in a
-+ * paragraph-long method name so most likely something like that would
-+ * be an exploit.
-+ */
-+#define DBUS_MAXIMUM_NAME_LENGTH 255
-+
-+/** This one is 255 so it fits in a byte */
-+#define DBUS_MAXIMUM_SIGNATURE_LENGTH 255
-+
-+/** Max length of a match rule string; to keep people from hosing the
-+ * daemon with some huge rule
-+ */
-+#define DBUS_MAXIMUM_MATCH_RULE_LENGTH 1024
-+
-+/** Max arg number you can match on in a match rule, e.g.
-+ * 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
-+ * header info, etc. so an INT_MAX array wouldn't allow the message
-+ * overhead. The 64M number is an attempt at a larger number than
-+ * we'd reasonably ever use, but small enough that your bus would chew
-+ * through it fairly quickly without locking up forever. If you have
-+ * data that's likely to be larger than this, you should probably be
-+ * sending it in multiple incremental messages anyhow.
-+ */
-+#define DBUS_MAXIMUM_ARRAY_LENGTH (67108864)
-+/** Number of bits you need in an unsigned to store the max array size */
-+#define DBUS_MAXIMUM_ARRAY_LENGTH_BITS 26
-+
-+/** The maximum total message size including header and body; similar
-+ * rationale to max array size.
-+ */
-+#define DBUS_MAXIMUM_MESSAGE_LENGTH (DBUS_MAXIMUM_ARRAY_LENGTH * 2)
-+/** Number of bits you need in an unsigned to store the max message size */
-+#define DBUS_MAXIMUM_MESSAGE_LENGTH_BITS 27
-+
-+/** Depth of recursion in the type tree. This is automatically limited
-+ * to DBUS_MAXIMUM_SIGNATURE_LENGTH since you could only have an array
-+ * of array of array of ... that fit in the max signature. But that's
-+ * probably a bit too large.
-+ */
-+#define DBUS_MAXIMUM_TYPE_RECURSION_DEPTH 32
-+
-+/* Types of message */
-+
-+/** This value is never a valid message type, see dbus_message_get_type() */
-+#define DBUS_MESSAGE_TYPE_INVALID 0
-+/** Message type of a method call message, see dbus_message_get_type() */
-+#define DBUS_MESSAGE_TYPE_METHOD_CALL 1
-+/** Message type of a method return message, see dbus_message_get_type() */
-+#define DBUS_MESSAGE_TYPE_METHOD_RETURN 2
-+/** Message type of an error reply message, see dbus_message_get_type() */
-+#define DBUS_MESSAGE_TYPE_ERROR 3
-+/** Message type of a signal message, see dbus_message_get_type() */
-+#define DBUS_MESSAGE_TYPE_SIGNAL 4
-+
-+/* Header flags */
-+
-+/** If set, this flag means that the sender of a message does not care about getting
-+ * a reply, so the recipient need not send one. See dbus_message_set_no_reply().
-+ */
-+#define DBUS_HEADER_FLAG_NO_REPLY_EXPECTED 0x1
-+/**
-+ * If set, this flag means that even if the message bus knows how to start an owner for
-+ * the destination bus name (see dbus_message_set_destination()), it should not
-+ * do so. If this flag is not set, the bus may launch a program to process the
-+ * message.
-+ */
-+#define DBUS_HEADER_FLAG_NO_AUTO_START 0x2
-+
-+/* Header fields */
-+
-+/** Not equal to any valid header field code */
-+#define DBUS_HEADER_FIELD_INVALID 0
-+/** Header field code for the path - the path is the object emitting a signal or the object receiving a method call.
-+ * See dbus_message_set_path().
-+ */
-+#define DBUS_HEADER_FIELD_PATH 1
-+/** Header field code for the interface containing a member (method or signal).
-+ * See dbus_message_set_interface().
-+ */
-+#define DBUS_HEADER_FIELD_INTERFACE 2
-+/** Header field code for a member (method or signal). See dbus_message_set_member(). */
-+#define DBUS_HEADER_FIELD_MEMBER 3
-+/** Header field code for an error name (found in #DBUS_MESSAGE_TYPE_ERROR messages).
-+ * See dbus_message_set_error_name().
-+ */
-+#define DBUS_HEADER_FIELD_ERROR_NAME 4
-+/** Header field code for a reply serial, used to match a #DBUS_MESSAGE_TYPE_METHOD_RETURN message with the
-+ * message that it's a reply to. See dbus_message_set_reply_serial().
-+ */
-+#define DBUS_HEADER_FIELD_REPLY_SERIAL 5
-+/**
-+ * Header field code for the destination bus name of a message. See dbus_message_set_destination().
-+ */
-+#define DBUS_HEADER_FIELD_DESTINATION 6
-+/**
-+ * Header field code for the sender of a message; usually initialized by the message bus.
-+ * See dbus_message_set_sender().
-+ */
-+#define DBUS_HEADER_FIELD_SENDER 7
-+/**
-+ * Header field code for the type signature of a message.
-+ */
-+#define DBUS_HEADER_FIELD_SIGNATURE 8
-+
-+/**
-+ * Value of the highest-numbered header field code, can be used to determine
-+ * the size of an array indexed by header field code. Remember though
-+ * that unknown codes must be ignored, so check for that before
-+ * indexing the array.
-+ */
-+#define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SIGNATURE
-+
-+/** Header format is defined as a signature:
-+ * byte byte order
-+ * byte message type ID
-+ * byte flags
-+ * byte protocol version
-+ * uint32 body length
-+ * uint32 serial
-+ * array of struct (byte,variant) (field name, value)
-+ *
-+ * The length of the header can be computed as the
-+ * fixed size of the initial data, plus the length of
-+ * the array at the end, plus padding to an 8-boundary.
-+ */
-+#define DBUS_HEADER_SIGNATURE \
-+ DBUS_TYPE_BYTE_AS_STRING \
-+ DBUS_TYPE_BYTE_AS_STRING \
-+ DBUS_TYPE_BYTE_AS_STRING \
-+ DBUS_TYPE_BYTE_AS_STRING \
-+ DBUS_TYPE_UINT32_AS_STRING \
-+ DBUS_TYPE_UINT32_AS_STRING \
-+ DBUS_TYPE_ARRAY_AS_STRING \
-+ DBUS_STRUCT_BEGIN_CHAR_AS_STRING \
-+ DBUS_TYPE_BYTE_AS_STRING \
-+ DBUS_TYPE_VARIANT_AS_STRING \
-+ DBUS_STRUCT_END_CHAR_AS_STRING
-+
-+
-+/**
-+ * The smallest header size that can occur. (It won't be valid due to
-+ * missing required header fields.) This is 4 bytes, two uint32, an
-+ * array length. This isn't any kind of resource limit, just the
-+ * necessary/logical outcome of the header signature.
-+ */
-+#define DBUS_MINIMUM_HEADER_SIZE 16
-+
-+/* Errors */
-+/* WARNING these get autoconverted to an enum in dbus-glib.h. Thus,
-+ * if you change the order it breaks the ABI. Keep them in order.
-+ * Also, don't change the formatting since that will break the sed
-+ * script.
-+ */
-+/** A generic error; "something went wrong" - see the error message for more. */
-+#define DBUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
-+/** There was not enough memory to complete an operation. */
-+#define DBUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
-+/** The bus doesn't know how to launch a service to supply the bus name you wanted. */
-+#define DBUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown"
-+/** The bus name you referenced doesn't exist (i.e. no application owns it). */
-+#define DBUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner"
-+/** No reply to a message expecting one, usually means a timeout occurred. */
-+#define DBUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply"
-+/** Something went wrong reading or writing to a socket, for example. */
-+#define DBUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError"
-+/** A D-Bus bus address was malformed. */
-+#define DBUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress"
-+/** Requested operation isn't supported (like ENOSYS on UNIX). */
-+#define DBUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported"
-+/** Some limited resource is exhausted. */
-+#define DBUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded"
-+/** Security restrictions don't allow doing what you're trying to do. */
-+#define DBUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied"
-+/** Authentication didn't work. */
-+#define DBUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed"
-+/** Unable to connect to server (probably caused by ECONNREFUSED on a socket). */
-+#define DBUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer"
-+/** Certain timeout errors, possibly ETIMEDOUT on a socket.
-+ * Note that #DBUS_ERROR_NO_REPLY is used for message reply timeouts.
-+ * @warning this is confusingly-named given that #DBUS_ERROR_TIMED_OUT also exists. We can't fix
-+ * it for compatibility reasons so just be careful.
-+ */
-+#define DBUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout"
-+/** No network access (probably ENETUNREACH on a socket). */
-+#define DBUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork"
-+/** Can't bind a socket since its address is in use (i.e. EADDRINUSE). */
-+#define DBUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse"
-+/** The connection is disconnected and you're trying to use it. */
-+#define DBUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected"
-+/** Invalid arguments passed to a method call. */
-+#define DBUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
-+/** Missing file. */
-+#define DBUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound"
-+/** Existing file and the operation you're using does not silently overwrite. */
-+#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"
-+/** 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.
-+ */
-+#define DBUS_ERROR_TIMED_OUT "org.freedesktop.DBus.Error.TimedOut"
-+/** Tried to remove or modify a match rule that didn't exist. */
-+#define DBUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound"
-+/** The match rule isn't syntactically valid. */
-+#define DBUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid"
-+/** While starting a new process, the exec() call failed. */
-+#define DBUS_ERROR_SPAWN_EXEC_FAILED "org.freedesktop.DBus.Error.Spawn.ExecFailed"
-+/** While starting a new process, the fork() call failed. */
-+#define DBUS_ERROR_SPAWN_FORK_FAILED "org.freedesktop.DBus.Error.Spawn.ForkFailed"
-+/** While starting a new process, the child exited with a status code. */
-+#define DBUS_ERROR_SPAWN_CHILD_EXITED "org.freedesktop.DBus.Error.Spawn.ChildExited"
-+/** While starting a new process, the child exited on a signal. */
-+#define DBUS_ERROR_SPAWN_CHILD_SIGNALED "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
-+/** While starting a new process, something went wrong. */
-+#define DBUS_ERROR_SPAWN_FAILED "org.freedesktop.DBus.Error.Spawn.Failed"
-+/** We failed to setup the environment correctly. */
-+#define DBUS_ERROR_SPAWN_SETUP_FAILED "org.freedesktop.DBus.Error.Spawn.FailedToSetup"
-+/** We failed to setup the config parser correctly. */
-+#define DBUS_ERROR_SPAWN_CONFIG_INVALID "org.freedesktop.DBus.Error.Spawn.ConfigInvalid"
-+/** Bus name was not valid. */
-+#define DBUS_ERROR_SPAWN_SERVICE_INVALID "org.freedesktop.DBus.Error.Spawn.ServiceNotValid"
-+/** Service file not found in system-services directory. */
-+#define DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND "org.freedesktop.DBus.Error.Spawn.ServiceNotFound"
-+/** Permissions are incorrect on the setuid helper. */
-+#define DBUS_ERROR_SPAWN_PERMISSIONS_INVALID "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid"
-+/** Service file invalid (Name, User or Exec missing). */
-+#define DBUS_ERROR_SPAWN_FILE_INVALID "org.freedesktop.DBus.Error.Spawn.FileInvalid"
-+/** Tried to get a UNIX process ID and it wasn't available. */
-+#define DBUS_ERROR_SPAWN_NO_MEMORY "org.freedesktop.DBus.Error.Spawn.NoMemory"
-+/** Tried to get a UNIX process ID and it wasn't available. */
-+#define DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
-+/** A type signature is not valid. */
-+#define DBUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature"
-+/** A file contains invalid syntax or is otherwise broken. */
-+#define DBUS_ERROR_INVALID_FILE_CONTENT "org.freedesktop.DBus.Error.InvalidFileContent"
-+/** Asked for SELinux security context and it wasn't available. */
-+#define DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
-+/** Asked for ADT audit data and it wasn't available. */
-+#define DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN "org.freedesktop.DBus.Error.AdtAuditDataUnknown"
-+/** There's already an object with the requested object path. */
-+#define DBUS_ERROR_OBJECT_PATH_IN_USE "org.freedesktop.DBus.Error.ObjectPathInUse"
-+
-+/* XML introspection format */
-+
-+/** XML namespace of the introspection format version 1.0 */
-+#define DBUS_INTROSPECT_1_0_XML_NAMESPACE "http://www.freedesktop.org/standards/dbus"
-+/** XML public identifier of the introspection format version 1.0 */
-+#define DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
-+/** XML system identifier of the introspection format version 1.0 */
-+#define DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
-+/** XML document type declaration of the introspection format version 1.0 */
-+#define DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<!DOCTYPE node PUBLIC \""DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER"\"\n\""DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER"\">\n"
-+
-+/** @} */
-+
-+#ifdef __cplusplus
-+#if 0
-+{ /* avoids confusing emacs indentation */
-+#endif
-+}
-+#endif
-+
-+#endif /* DBUS_PROTOCOL_H */
- Previous message: [maemo-commits] r19178 - projects/haf/tags/sapwood
- Next message: [maemo-commits] r19180 - projects/haf/trunk/dbus
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
