auth: add fd passing negotiation support
[platform/upstream/dbus.git] / dbus / dbus-transport-protected.h
index 4d56a72..8c389a6 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef DBUS_TRANSPORT_PROTECTED_H
 #define DBUS_TRANSPORT_PROTECTED_H
 
+#include <config.h>
+
 #include <dbus/dbus-internals.h>
 #include <dbus/dbus-errors.h>
 #include <dbus/dbus-transport.h>
@@ -71,6 +73,10 @@ struct DBusTransportVTable
   /**< Get socket file descriptor */
 };
 
+/** How many unix file descriptors may be queued up before they are
+   handed off to messages */
+#define DBUS_MAX_QUEUED_FDS 1024
+
 /**
  * Object representing a transport such as a socket.
  * A transport can shuttle messages from point A to point B,
@@ -138,6 +144,9 @@ DBusTransportOpenResult _dbus_transport_open_platform_specific (DBusAddressEntry
                                                                 DBusTransport    **transport_p,
                                                                 DBusError         *error);
 
+#define DBUS_TRANSPORT_CAN_SEND_UNIX_FD(x)      \
+  _dbus_auth_get_unix_fd_negotiated((x)->auth)
+
 DBUS_END_DECLS
 
 #endif /* DBUS_TRANSPORT_PROTECTED_H */