25 #include "dbus-internals.h"
26 #include "dbus-server-unix.h"
27 #include "dbus-server-socket.h"
28 #include "dbus-server-launchd.h"
29 #include "dbus-transport-unix.h"
30 #include "dbus-connection-internal.h"
31 #include "dbus-sysdeps-unix.h"
32 #include "dbus-string.h"
53 DBusServerListenResult
64 if (strcmp (method,
"unix") == 0)
73 "path or tmpdir or abstract",
75 return DBUS_SERVER_LISTEN_BAD_ADDRESS;
78 if ((path && tmpdir) ||
83 "cannot specify two of \"path\" and \"tmpdir\" and \"abstract\" at the same time");
84 return DBUS_SERVER_LISTEN_BAD_ADDRESS;
95 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
102 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
114 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
121 #ifdef HAVE_ABSTRACT_SOCKETS
139 if (*server_p !=
NULL)
141 _DBUS_ASSERT_ERROR_IS_CLEAR(error);
142 return DBUS_SERVER_LISTEN_OK;
146 _DBUS_ASSERT_ERROR_IS_SET(error);
147 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
150 else if (strcmp (method,
"systemd") == 0)
158 _DBUS_ASSERT_ERROR_IS_SET (error);
159 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
165 if (*server_p ==
NULL)
169 for (i = 0; i < n; i++)
176 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
181 return DBUS_SERVER_LISTEN_OK;
183 #ifdef DBUS_ENABLE_LAUNCHD
184 else if (strcmp (method,
"launchd") == 0)
187 if (launchd_env_var ==
NULL)
190 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
194 if (*server_p !=
NULL)
196 _DBUS_ASSERT_ERROR_IS_CLEAR(error);
197 return DBUS_SERVER_LISTEN_OK;
201 _DBUS_ASSERT_ERROR_IS_SET(error);
202 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
211 _DBUS_ASSERT_ERROR_IS_CLEAR(error);
212 return DBUS_SERVER_LISTEN_NOT_HANDLED;
235 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
261 if (path_copy ==
NULL)
272 _DBUS_ASSERT_ERROR_IS_SET (error);
283 if (path_copy !=
NULL)