chiark / gitweb /
tests: skip bus test if bus cannot be opened
[elogind.git] / src / libsystemd-bus / bus-internal.h
index 82f60849d5edd6cd9ec7863efc59bccafbe98f4a..c25a208aea35ed59f5a76160d84329788ef6cd80 100644 (file)
@@ -57,6 +57,7 @@ struct object_callback {
 };
 
 enum bus_state {
+        BUS_UNSET,
         BUS_OPENING,
         BUS_AUTHENTICATING,
         BUS_HELLO,
@@ -68,8 +69,10 @@ struct sd_bus {
         enum bus_state state;
         int fd;
         int message_version;
+
+        bool negotiate_fds:1;
         bool can_fds:1;
-        bool sent_hello:1;
+        bool bus_client:1;
         bool ucred_valid:1;
 
         void *rbuffer;
@@ -114,6 +117,12 @@ struct sd_bus {
 
         struct ucred ucred;
         char label[NAME_MAX];
+
+        int *fds;
+        unsigned n_fds;
+
+        char *exec_path;
+        char **exec_argv;
 };
 
 static inline void bus_unrefp(sd_bus **b) {
@@ -137,6 +146,10 @@ static inline void bus_unrefp(sd_bus **b) {
  * bytes */
 #define BUS_ARRAY_MAX_SIZE 67108864
 
+#define BUS_FDS_MAX 1024
+
+#define BUS_EXEC_ARGV_MAX 256
+
 bool object_path_is_valid(const char *p);
 bool interface_name_is_valid(const char *p);
 bool service_name_is_valid(const char *p);
@@ -145,3 +158,5 @@ bool member_name_is_valid(const char *p);
 #define error_name_is_valid interface_name_is_valid
 
 int bus_ensure_running(sd_bus *bus);
+int bus_start_running(sd_bus *bus);
+int bus_next_address(sd_bus *bus);