dbus/dbus Makefile.am, 1.58, 1.59 dbus-address.c, 1.12,
1.13 dbus-auth.c, 1.35, 1.36 dbus-bus.h, 1.9,
1.10 dbus-connection.c, 1.80, 1.81 dbus-connection.h, 1.28,
1.29 dbus-errors.c, 1.24, 1.25 dbus-errors.h, 1.23,
1.24 dbus-glib-lowlevel.h, NONE, 1.1 dbus-glib.h, NONE,
1.1 dbus-keyring.c, 1.22, 1.23 dbus-protocol.h, 1.28,
1.29 dbus-server-debug-pipe.c, 1.14, 1.15 dbus-server-unix.c,
1.21, 1.22 dbus-server.c, 1.34, 1.35 dbus-server.h, 1.15,
1.16 dbus-shared.h, NONE, 1.1 dbus-spawn.c, 1.15,
1.16 dbus-sysdeps.c, 1.71, 1.72 dbus-transport.h, 1.13,
1.14 dbus-userdb.c, 1.7, 1.8 dbus.h, 1.17,
1.18 make-dbus-glib-error-enum.sh, NONE, 1.1
Havoc Pennington
hp at pdx.freedesktop.org
Sun Jun 20 08:28:17 PDT 2004
Update of /cvs/dbus/dbus/dbus
In directory pdx:/tmp/cvs-serv11424/dbus
Modified Files:
Makefile.am dbus-address.c dbus-auth.c dbus-bus.h
dbus-connection.c dbus-connection.h dbus-errors.c
dbus-errors.h dbus-keyring.c dbus-protocol.h
dbus-server-debug-pipe.c dbus-server-unix.c dbus-server.c
dbus-server.h dbus-spawn.c dbus-sysdeps.c dbus-transport.h
dbus-userdb.c dbus.h
Added Files:
dbus-glib-lowlevel.h dbus-glib.h dbus-shared.h
make-dbus-glib-error-enum.sh
Log Message:
2004-06-20 Havoc Pennington <hp at redhat.com>
* dbus/dbus-glib-error-enum.h: autogenerate the GError enum
codes from the dbus error names
* glib/dbus-glib.h: move to subdir dbus/ since it's included
as dbus/dbus-glib.h and that breakage is now visible due to
including dbus/dbus-glib.h in dbus-glib-lowlevel.h
* glib/dbus-glib.h: s/gproxy/g_proxy/
* dbus/dbus-shared.h: new header to hold stuff shared with
binding APIs
* dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
than dbus-errors.h
* glib/dbus-glib.h (dbus_set_g_error): move to
dbus-glib-lowlevel.h
* glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
of stuff to enable this
* dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
* a bunch of other changes with the same basic "separate glib
bindings from dbus.h" theme
Index: Makefile.am
===================================================================
RCS file: /cvs/dbus/dbus/dbus/Makefile.am,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- Makefile.am 15 Oct 2003 21:09:40 -0000 1.58
+++ Makefile.am 20 Jun 2004 15:28:14 -0000 1.59
@@ -1,6 +1,20 @@
INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) -DDBUS_COMPILATION
+if HAVE_GLIB
+DBUS_GLIB_BUILT_INCLUDES= \
+ dbus-glib-error-enum.h
+
+GLIB_INCLUDES= \
+ dbus-glib.h \
+ dbus-glib-lowlevel.h \
+ $(DBUS_GLIB_BUILT_INCLUDES)
+
+dbus-glib-error-enum.h: dbus-protocol.h make-dbus-glib-error-enum.sh
+ $(srcdir)/make-dbus-glib-error-enum.sh dbus-protocol.h $@
+
+endif
+
dbusincludedir=$(includedir)/dbus-1.0/dbus
dbusarchincludedir=$(libdir)/dbus-1.0/include/dbus
@@ -18,8 +32,10 @@
dbus-pending-call.h \
dbus-protocol.h \
dbus-server.h \
+ dbus-shared.h \
dbus-threads.h \
- dbus-types.h
+ dbus-types.h \
+ $(GLIB_INCLUDES)
dbusarchinclude_HEADERS= \
dbus-arch-deps.h
@@ -117,8 +133,9 @@
$(DBUS_SHARED_SOURCES) \
$(DBUS_UTIL_SOURCES)
-BUILT_SOURCES=$(dbusarchinclude_HEADERS)
-EXTRA_DIST=dbus-arch-deps.h.in
+BUILT_SOURCES=$(dbusarchinclude_HEADERS) $(DBUS_GLIB_BUILT_INCLUDES)
+EXTRA_DIST=dbus-arch-deps.h.in make-dbus-glib-error-enum.sh
+CLEANFILES=$(DBUS_GLIB_BUILT_INCLUDES)
## this library is the same as libdbus, but exports all the symbols
## and is only used for static linking within the dbus package.
Index: dbus-address.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-address.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dbus-address.c 2 Dec 2003 10:44:21 -0000 1.12
+++ dbus-address.c 20 Jun 2004 15:28:14 -0000 1.13
@@ -2,6 +2,7 @@
/* dbus-address.c Server address parser.
*
* Copyright (C) 2003 CodeFactory AB
+ * Copyright (C) 2004 Red Hat, Inc.
*
* Licensed under the Academic Free License version 2.0
*
@@ -26,6 +27,7 @@
#include "dbus-internals.h"
#include "dbus-list.h"
#include "dbus-string.h"
+#include "dbus-protocol.h"
/**
* @defgroup DBusAddressInternals Address parsing
Index: dbus-auth.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-auth.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- dbus-auth.c 2 Jun 2004 14:03:58 -0000 1.35
+++ dbus-auth.c 20 Jun 2004 15:28:14 -0000 1.36
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-auth.c Authentication
*
- * Copyright (C) 2002, 2003 Red Hat Inc.
+ * Copyright (C) 2002, 2003, 2004 Red Hat Inc.
*
* Licensed under the Academic Free License version 2.0
*
@@ -27,6 +27,7 @@
#include "dbus-keyring.h"
#include "dbus-sha.h"
#include "dbus-userdb.h"
+#include "dbus-protocol.h"
/**
* @defgroup DBusAuth Authentication
Index: dbus-bus.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-bus.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- dbus-bus.h 2 Dec 2003 10:44:21 -0000 1.9
+++ dbus-bus.h 20 Jun 2004 15:28:15 -0000 1.10
@@ -31,13 +31,6 @@
DBUS_BEGIN_DECLS;
-typedef enum
-{
- DBUS_BUS_SESSION, /**< The login session bus */
- DBUS_BUS_SYSTEM, /**< The systemwide bus */
- DBUS_BUS_ACTIVATION /**< The bus that activated us, if any */
-} DBusBusType;
-
DBusConnection *dbus_bus_get (DBusBusType type,
DBusError *error);
dbus_bool_t dbus_bus_register (DBusConnection *connection,
Index: dbus-connection.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- dbus-connection.c 5 Jun 2004 16:32:00 -0000 1.80
+++ dbus-connection.c 20 Jun 2004 15:28:15 -0000 1.81
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include "dbus-shared.h"
#include "dbus-connection.h"
#include "dbus-list.h"
#include "dbus-timeout.h"
Index: dbus-connection.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- dbus-connection.h 5 Jun 2004 16:32:00 -0000 1.28
+++ dbus-connection.h 20 Jun 2004 15:28:15 -0000 1.29
@@ -30,6 +30,7 @@
#include <dbus/dbus-errors.h>
#include <dbus/dbus-memory.h>
#include <dbus/dbus-message.h>
+#include <dbus/dbus-shared.h>
DBUS_BEGIN_DECLS;
@@ -58,13 +59,6 @@
DBUS_DISPATCH_NEED_MEMORY /**< More memory is needed to continue. */
} DBusDispatchStatus;
-typedef enum
-{
- DBUS_HANDLER_RESULT_HANDLED, /**< Message has had its effect */
- DBUS_HANDLER_RESULT_NOT_YET_HANDLED, /**< Message has not had any effect */
- DBUS_HANDLER_RESULT_NEED_MEMORY /**< Need more memory to return another result */
-} DBusHandlerResult;
-
typedef dbus_bool_t (* DBusAddWatchFunction) (DBusWatch *watch,
void *data);
typedef void (* DBusWatchToggledFunction) (DBusWatch *watch,
Index: dbus-errors.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-errors.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- dbus-errors.c 17 May 2004 22:19:04 -0000 1.24
+++ dbus-errors.c 20 Jun 2004 15:28:15 -0000 1.25
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-errors.c Error reporting
*
- * Copyright (C) 2002 Red Hat Inc.
+ * Copyright (C) 2002, 2004 Red Hat Inc.
* Copyright (C) 2003 CodeFactory AB
*
* Licensed under the Academic Free License version 2.0
@@ -24,6 +24,7 @@
#include "dbus-errors.h"
#include "dbus-internals.h"
#include "dbus-string.h"
+#include "dbus-protocol.h"
#include <stdarg.h>
#include <string.h>
Index: dbus-errors.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-errors.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- dbus-errors.h 15 Apr 2004 22:08:04 -0000 1.23
+++ dbus-errors.h 20 Jun 2004 15:28:15 -0000 1.24
@@ -52,35 +52,6 @@
void *padding1; /**< placeholder */
};
-#define DBUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
-#define DBUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
-#define DBUS_ERROR_ACTIVATE_SERVICE_NOT_FOUND "org.freedesktop.DBus.Error.ServiceNotFound"
-#define DBUS_ERROR_SERVICE_DOES_NOT_EXIST "org.freedesktop.DBus.Error.ServiceDoesNotExist"
-#define DBUS_ERROR_SERVICE_HAS_NO_OWNER "org.freedesktop.DBus.Error.ServiceHasNoOwner"
-#define DBUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply"
-#define DBUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError"
-#define DBUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress"
-#define DBUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported"
-#define DBUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded"
-#define DBUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied"
-#define DBUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed"
-#define DBUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer"
-#define DBUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout"
-#define DBUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork"
-#define DBUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse"
-#define DBUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected"
-#define DBUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
-#define DBUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound"
-#define DBUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod"
-#define DBUS_ERROR_TIMED_OUT "org.freedesktop.DBus.Error.TimedOut"
-#define DBUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound"
-#define DBUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid"
-#define DBUS_ERROR_SPAWN_EXEC_FAILED "org.freedesktop.DBus.Error.Spawn.ExecFailed"
-#define DBUS_ERROR_SPAWN_FORK_FAILED "org.freedesktop.DBus.Error.Spawn.ForkFailed"
-#define DBUS_ERROR_SPAWN_CHILD_EXITED "org.freedesktop.DBus.Error.Spawn.ChildExited"
-#define DBUS_ERROR_SPAWN_CHILD_SIGNALED "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
-#define DBUS_ERROR_SPAWN_FAILED "org.freedesktop.DBus.Error.Spawn.Failed"
-
void dbus_error_init (DBusError *error);
void dbus_error_free (DBusError *error);
void dbus_set_error (DBusError *error,
--- NEW FILE: dbus-glib-lowlevel.h ---
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-glib-lowlevel.h GLib integration details that require dbus/dbus.h
*
* Copyright (C) 2002, 2003 CodeFactory AB
* Copyright (C) 2003, 2004 Red Hat, Inc.
*
* Licensed under the Academic Free License version 2.0
*
* 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_GLIB_LOWLEVEL_H
#define DBUS_GLIB_LOWLEVEL_H
#include <dbus/dbus-glib.h>
#include <dbus/dbus.h>
G_BEGIN_DECLS
void dbus_set_g_error (GError **gerror,
DBusError *derror);
#define DBUS_TYPE_CONNECTION (dbus_connection_get_g_type ())
#define DBUS_TYPE_MESSAGE (dbus_message_get_g_type ())
GType dbus_connection_get_g_type (void) G_GNUC_CONST;
GType dbus_message_get_g_type (void) G_GNUC_CONST;
#define DBUS_TYPE_G_CONNECTION (dbus_g_connection_get_g_type ())
#define DBUS_TYPE_G_MESSAGE (dbus_g_message_get_g_type ())
GType dbus_g_connection_get_g_type (void) G_GNUC_CONST;
GType dbus_g_message_get_g_type (void) G_GNUC_CONST;
void dbus_connection_setup_with_g_main (DBusConnection *connection,
GMainContext *context);
void dbus_server_setup_with_g_main (DBusServer *server,
GMainContext *context);
DBusConnection* dbus_bus_get_with_g_main (DBusBusType type,
GError **error);
void dbus_g_proxy_send (DBusGProxy *proxy,
DBusMessage *message,
dbus_uint32_t *client_serial);
DBusConnection* dbus_g_connection_get_connection (DBusGConnection *gconnection);
DBusMessage* dbus_g_message_get_message (DBusGMessage *gmessage);
/* dbus_g_pending_call_get_pending_call() deliberately skipped for now;
* not sure it makes sense to use any of the DBusPendingCall functions
* on the wrapped pending call (once we have the right exported
* g-functions anyhow)
*/
G_END_DECLS
#endif /* DBUS_GLIB_LOWLEVEL_H */
--- NEW FILE: dbus-glib.h ---
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-glib.h GLib integration
*
* Copyright (C) 2002, 2003 CodeFactory AB
* Copyright (C) 2003, 2004 Red Hat, Inc.
*
* Licensed under the Academic Free License version 2.0
*
* 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_GLIB_H
#define DBUS_GLIB_H
#include <glib-object.h>
#include <dbus/dbus-protocol.h>
#include <dbus/dbus-shared.h>
G_BEGIN_DECLS
#define DBUS_INSIDE_DBUS_GLIB_H 1
/**
* Convert to/from DBusConnection with DBUS_CONNECTION_FROM_G_CONNECTION()
*/
typedef struct DBusGConnection DBusGConnection;
/**
* Convert to/from DBusMessage with DBUS_MESSAGE_FROM_G_MESSAGE()
*/
typedef struct DBusGMessage DBusGMessage;
/**
* Convert to/from DBusPendingCall with DBUS_PENDING_CALL_FROM_G_PENDING_CALL()
*/
typedef struct DBusGPendingCall DBusGPendingCall;
void dbus_g_connection_flush (DBusGConnection *connection);
GQuark dbus_g_error_quark (void);
#define DBUS_GERROR dbus_g_error_quark ()
typedef enum
{
#include <dbus/dbus-glib-error-enum.h>
} DBusGError;
void dbus_g_thread_init (void);
DBusGConnection* dbus_g_bus_get (DBusBusType type,
GError **error);
typedef struct DBusGObjectInfo DBusGObjectInfo;
typedef struct DBusGMethodInfo DBusGMethodInfo;
typedef DBusHandlerResult (* DBusGMethodMarshaller) (DBusGConnection *connection,
DBusGMessage *message,
void *user_data);
/**
* Object typically generated by dbus-glib-tool that
* stores a mapping from introspection data to a
* function pointer for a C method to be invoked.
*/
struct DBusGMethodInfo
{
GCallback function; /**< C method to invoke */
DBusGMethodMarshaller marshaller; /**< Marshaller to go DBusGMessage to C method */
int data_offset; /**< Offset into the introspection data */
};
/**
* Introspection data for a GObject, normally autogenerated by
* a tool such as dbus-glib-tool.
*/
struct DBusGObjectInfo
{
int format_version; /**< Allows us to change the rest of this struct
* by adding DBusGObjectInfo2, DBusGObjectInfo3, etc.
*/
const DBusGMethodInfo *infos; /**< Array of method pointers */
const unsigned char *data; /**< Introspection data */
};
void dbus_g_object_class_install_info (GObjectClass *object_class,
const DBusGObjectInfo *info);
void dbus_g_connection_register_g_object (DBusGConnection *connection,
const char *at_path,
GObject *object);
typedef struct DBusGProxy DBusGProxy;
typedef struct DBusGProxyClass DBusGProxyClass;
#define DBUS_TYPE_G_PROXY (dbus_g_proxy_get_type ())
#define DBUS_G_PROXY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), DBUS_TYPE_G_PROXY, DBusGProxy))
#define DBUS_G_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUS_TYPE_G_PROXY, DBusGProxyClass))
#define DBUS_IS_G_PROXY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), DBUS_TYPE_G_PROXY))
#define DBUS_IS_G_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUS_TYPE_G_PROXY))
#define DBUS_G_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUS_TYPE_G_PROXY, DBusGProxyClass))
GType dbus_g_proxy_get_type (void) G_GNUC_CONST;
DBusGProxy* dbus_g_proxy_new_for_service (DBusGConnection *connection,
const char *service_name,
const char *path_name,
const char *interface_name);
DBusGProxy* dbus_g_proxy_new_for_service_owner (DBusGConnection *connection,
const char *service_name,
const char *path_name,
const char *interface_name,
GError **error);
DBusGProxy* dbus_g_proxy_new_for_peer (DBusGConnection *connection,
const char *path_name,
const char *interface_name);
void dbus_g_proxy_connect_signal (DBusGProxy *proxy,
const char *signal_name,
GCallback handler,
void *data,
GClosureNotify free_data_func);
void dbus_g_proxy_disconnect_signal (DBusGProxy *proxy,
const char *signal_name,
GCallback handler,
void *data);
DBusGPendingCall* dbus_g_proxy_begin_call (DBusGProxy *proxy,
const char *method,
int first_arg_type,
...);
gboolean dbus_g_proxy_end_call (DBusGProxy *proxy,
DBusGPendingCall *pending,
GError **error,
int first_arg_type,
...);
void dbus_g_proxy_call_no_reply (DBusGProxy *proxy,
const char *method,
int first_arg_type,
...);
#undef DBUS_INSIDE_DBUS_GLIB_H
G_END_DECLS
#endif /* DBUS_GLIB_H */
Index: dbus-keyring.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-keyring.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- dbus-keyring.c 17 May 2004 22:19:04 -0000 1.22
+++ dbus-keyring.c 20 Jun 2004 15:28:15 -0000 1.23
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-keyring.c Store secret cookies in your homedir
*
- * Copyright (C) 2003 Red Hat Inc.
+ * Copyright (C) 2003, 2004 Red Hat Inc.
*
* Licensed under the Academic Free License version 2.0
*
@@ -23,6 +23,7 @@
#include "dbus-keyring.h"
#include "dbus-userdb.h"
+#include "dbus-protocol.h"
#include <dbus/dbus-string.h>
#include <dbus/dbus-list.h>
#include <dbus/dbus-sysdeps.h>
Index: dbus-protocol.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-protocol.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- dbus-protocol.h 7 Jun 2004 19:27:50 -0000 1.28
+++ dbus-protocol.h 20 Jun 2004 15:28:15 -0000 1.29
@@ -119,7 +119,42 @@
/* Activation replies */
#define DBUS_ACTIVATION_REPLY_ACTIVATED 0x0
#define DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE 0x1
-
+
+/* 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.
+ */
+#define DBUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
+#define DBUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
+#define DBUS_ERROR_ACTIVATE_SERVICE_NOT_FOUND "org.freedesktop.DBus.Error.ServiceNotFound"
+#define DBUS_ERROR_SERVICE_DOES_NOT_EXIST "org.freedesktop.DBus.Error.ServiceDoesNotExist"
+#define DBUS_ERROR_SERVICE_HAS_NO_OWNER "org.freedesktop.DBus.Error.ServiceHasNoOwner"
+#define DBUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply"
+#define DBUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError"
+#define DBUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress"
+#define DBUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported"
+#define DBUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded"
+#define DBUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied"
+#define DBUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed"
+#define DBUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer"
+#define DBUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout"
+#define DBUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork"
+#define DBUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse"
+#define DBUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected"
+#define DBUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
+#define DBUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound"
+#define DBUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod"
+#define DBUS_ERROR_TIMED_OUT "org.freedesktop.DBus.Error.TimedOut"
+#define DBUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound"
+#define DBUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid"
+#define DBUS_ERROR_SPAWN_EXEC_FAILED "org.freedesktop.DBus.Error.Spawn.ExecFailed"
+#define DBUS_ERROR_SPAWN_FORK_FAILED "org.freedesktop.DBus.Error.Spawn.ForkFailed"
+#define DBUS_ERROR_SPAWN_CHILD_EXITED "org.freedesktop.DBus.Error.Spawn.ChildExited"
+#define DBUS_ERROR_SPAWN_CHILD_SIGNALED "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
+#define DBUS_ERROR_SPAWN_FAILED "org.freedesktop.DBus.Error.Spawn.Failed"
+
#ifdef __cplusplus
}
#endif
Index: dbus-server-debug-pipe.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server-debug-pipe.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- dbus-server-debug-pipe.c 2 Dec 2003 10:44:21 -0000 1.14
+++ dbus-server-debug-pipe.c 20 Jun 2004 15:28:15 -0000 1.15
@@ -2,7 +2,7 @@
/* dbus-server-debug-pipe.c In-proc debug server implementation
*
* Copyright (C) 2003 CodeFactory AB
- * Copyright (C) 2003 Red Hat, Inc.
+ * Copyright (C) 2003, 2004 Red Hat, Inc.
*
* Licensed under the Academic Free License version 2.0
*
@@ -28,6 +28,7 @@
#include "dbus-connection-internal.h"
#include "dbus-hash.h"
#include "dbus-string.h"
+#include "dbus-protocol.h"
#ifdef DBUS_BUILD_TESTS
Index: dbus-server-unix.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server-unix.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- dbus-server-unix.c 21 Apr 2004 22:13:07 -0000 1.21
+++ dbus-server-unix.c 20 Jun 2004 15:28:15 -0000 1.22
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-server-unix.c Server implementation for Unix network protocols.
*
- * Copyright (C) 2002, 2003 Red Hat Inc.
+ * Copyright (C) 2002, 2003, 2004 Red Hat Inc.
*
* Licensed under the Academic Free License version 2.0
*
Index: dbus-server.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- dbus-server.c 21 Apr 2004 22:13:07 -0000 1.34
+++ dbus-server.c 20 Jun 2004 15:28:15 -0000 1.35
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-server.c DBusServer object
*
- * Copyright (C) 2002, 2003 Red Hat Inc.
+ * Copyright (C) 2002, 2003, 2004 Red Hat Inc.
*
* Licensed under the Academic Free License version 2.0
*
@@ -28,6 +28,7 @@
#include "dbus-server-debug-pipe.h"
#endif
#include "dbus-address.h"
+#include "dbus-protocol.h"
/**
* @defgroup DBusServer DBusServer
Index: dbus-server.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- dbus-server.h 2 Dec 2003 10:44:21 -0000 1.15
+++ dbus-server.h 20 Jun 2004 15:28:15 -0000 1.16
@@ -30,6 +30,7 @@
#include <dbus/dbus-errors.h>
#include <dbus/dbus-message.h>
#include <dbus/dbus-connection.h>
+#include <dbus/dbus-protocol.h>
DBUS_BEGIN_DECLS;
--- NEW FILE: dbus-shared.h ---
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-shared.h Stuff used by both dbus/dbus.h low-level and C/C++ binding APIs
*
* Copyright (C) 2004 Red Hat, Inc.
*
* Licensed under the Academic Free License version 2.0
*
* 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_SHARED_H
#define DBUS_SHARED_H
/* Don't include anything in here from anywhere else. It's
* intended for use by any random library.
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
DBUS_BUS_SESSION, /**< The login session bus */
DBUS_BUS_SYSTEM, /**< The systemwide bus */
DBUS_BUS_ACTIVATION /**< The bus that activated us, if any */
} DBusBusType;
typedef enum
{
DBUS_HANDLER_RESULT_HANDLED, /**< Message has had its effect */
DBUS_HANDLER_RESULT_NOT_YET_HANDLED, /**< Message has not had any effect */
DBUS_HANDLER_RESULT_NEED_MEMORY /**< Need more memory to return another result */
} DBusHandlerResult;
#ifdef __cplusplus
}
#endif
#endif /* DBUS_PROTOCOL_H */
Index: dbus-spawn.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-spawn.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- dbus-spawn.c 2 Dec 2003 10:44:21 -0000 1.15
+++ dbus-spawn.c 20 Jun 2004 15:28:15 -0000 1.16
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-spawn.c Wrapper around fork/exec
*
- * Copyright (C) 2002, 2003 Red Hat, Inc.
+ * Copyright (C) 2002, 2003, 2004 Red Hat, Inc.
* Copyright (C) 2003 CodeFactory AB
*
* Licensed under the Academic Free License version 2.0
@@ -25,6 +25,7 @@
#include "dbus-sysdeps.h"
#include "dbus-internals.h"
#include "dbus-test.h"
+#include "dbus-protocol.h"
#include <unistd.h>
#include <fcntl.h>
Index: dbus-sysdeps.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- dbus-sysdeps.c 21 Apr 2004 22:13:07 -0000 1.71
+++ dbus-sysdeps.c 20 Jun 2004 15:28:15 -0000 1.72
@@ -25,6 +25,7 @@
#include "dbus-internals.h"
#include "dbus-sysdeps.h"
#include "dbus-threads.h"
+#include "dbus-protocol.h"
#include "dbus-test.h"
#include <sys/types.h>
#include <stdlib.h>
Index: dbus-transport.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-transport.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- dbus-transport.h 2 Dec 2003 10:44:21 -0000 1.13
+++ dbus-transport.h 20 Jun 2004 15:28:15 -0000 1.14
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-transport.h DBusTransport object (internal to D-BUS implementation)
*
- * Copyright (C) 2002 Red Hat Inc.
+ * Copyright (C) 2002, 2004 Red Hat Inc.
*
* Licensed under the Academic Free License version 2.0
*
@@ -25,6 +25,7 @@
#include <dbus/dbus-internals.h>
#include <dbus/dbus-connection.h>
+#include <dbus/dbus-protocol.h>
DBUS_BEGIN_DECLS;
Index: dbus-userdb.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dbus-userdb.c 2 Dec 2003 10:44:21 -0000 1.7
+++ dbus-userdb.c 20 Jun 2004 15:28:15 -0000 1.8
@@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-userdb.c User database abstraction
*
- * Copyright (C) 2003 Red Hat, Inc.
+ * Copyright (C) 2003, 2004 Red Hat, Inc.
*
* Licensed under the Academic Free License version 2.0
*
@@ -24,6 +24,7 @@
#include "dbus-hash.h"
#include "dbus-test.h"
#include "dbus-internals.h"
+#include "dbus-protocol.h"
#include <string.h>
/**
Index: dbus.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- dbus.h 2 Dec 2003 10:44:21 -0000 1.17
+++ dbus.h 20 Jun 2004 15:28:15 -0000 1.18
@@ -40,6 +40,7 @@
#include <dbus/dbus-pending-call.h>
#include <dbus/dbus-protocol.h>
#include <dbus/dbus-server.h>
+#include <dbus/dbus-shared.h>
#include <dbus/dbus-threads.h>
#include <dbus/dbus-types.h>
--- NEW FILE: make-dbus-glib-error-enum.sh ---
#!/bin/sh
SRC=$1
DEST=$2
function die()
{
echo $1 1>&2
/bin/rm $DEST.tmp
exit 1
}
cat $SRC | grep '#define DBUS_ERROR' | sed -e 's/#define //g' | \
sed -e 's/".*//g' | sed -e 's/_ERROR/_GERROR/g' | sed -e 's/ *$/,/g' > $DEST.tmp
if ! test -s $DEST.tmp ; then
die "$DEST.tmp is empty, something went wrong, see any preceding error message"
fi
echo "#ifndef DBUS_INSIDE_DBUS_GLIB_H" >> $DEST.tmp
echo '#error "' "$DEST" 'may only be included by dbus-glib.h"' >> $DEST.tmp
echo "#endif" >> $DEST.tmp
mv $DEST.tmp $DEST || die "could not move $DEST.tmp to $DEST"
More information about the dbus-commit
mailing list