summaryrefslogtreecommitdiff
path: root/dbus/dbus-server-protected.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2006-09-16 17:38:24 +0000
committerHavoc Pennington <hp@redhat.com>2006-09-16 17:38:24 +0000
commit8027efc97b4bec85f674570f878919cb72456745 (patch)
tree441ffafa5367bdb93c8bfa7f8ec51acfeb432b0b /dbus/dbus-server-protected.h
parenta0a12210e1f5aa5bd185a57d4394b8eb51cbe472 (diff)
downloaddbus-8027efc97b4bec85f674570f878919cb72456745.tar.gz
voc Pennington <hp@redhat.com>
* dbus/dbus-server.c (dbus_server_listen): change how this works to be able to delegate to a set of handlers that can succeed, fail, or choose not to handle. Allows us to have dbus_server_listen_platform_specific. * dbus/dbus-server-socket.c (_dbus_server_new_for_tcp_socket): factor out the tcp socket stuff to be used on windows, leaving unix domain socket only in dbus-socket-unix.c * dbus/dbus-transport-socket.c (_dbus_transport_new_for_tcp_socket): factor out the tcp socket stuff to be used on windows, leaving unix domain socket only in dbus-transport-unix.c * dbus/dbus-connection.c (dbus_connection_get_unix_user): insert temporary hack to be sure this fails on windows (dbus_connection_get_unix_process_id): ditto
Diffstat (limited to 'dbus/dbus-server-protected.h')
-rw-r--r--dbus/dbus-server-protected.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/dbus/dbus-server-protected.h b/dbus/dbus-server-protected.h
index 09eeb3bd..2d307926 100644
--- a/dbus/dbus-server-protected.h
+++ b/dbus/dbus-server-protected.h
@@ -27,6 +27,7 @@
#include <dbus/dbus-internals.h>
#include <dbus/dbus-threads-internal.h>
#include <dbus/dbus-server.h>
+#include <dbus/dbus-address.h>
#include <dbus/dbus-timeout.h>
#include <dbus/dbus-watch.h>
#include <dbus/dbus-resources.h>
@@ -121,6 +122,22 @@ void _dbus_server_toggle_timeout (DBusServer *server,
void _dbus_server_ref_unlocked (DBusServer *server);
void _dbus_server_unref_unlocked (DBusServer *server);
+typedef enum
+{
+ DBUS_SERVER_LISTEN_NOT_HANDLED, /**< we aren't in charge of this address type */
+ DBUS_SERVER_LISTEN_OK, /**< we set up the listen */
+ DBUS_SERVER_LISTEN_BAD_ADDRESS, /**< malformed address */
+ DBUS_SERVER_LISTEN_DID_NOT_CONNECT /**< well-formed address but failed to set it up */
+} DBusServerListenResult;
+
+DBusServerListenResult _dbus_server_listen_platform_specific (DBusAddressEntry *entry,
+ DBusServer **server_p,
+ DBusError *error);
+void _dbus_server_set_bad_address (DBusError *error,
+ const char *address_problem_type,
+ const char *address_problem_field,
+ const char *address_problem_other);
+
#ifdef DBUS_DISABLE_CHECKS
#define TOOK_LOCK_CHECK(server)
#define RELEASING_LOCK_CHECK(server)