summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-sysdeps.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2007-03-12 22:52:40 +0000
committerHavoc Pennington <hp@redhat.com>2007-03-12 22:52:40 +0000
commit9362aac398e3f2ec680e30c61ebfcb1e407eff72 (patch)
treefaeb94c89d680598d1a809f6a3d952910dd3c741 /dbus/dbus-sysdeps.h
parentcc0aea750cb03ffa6a9e94e493455920ab3e612b (diff)
2007-03-11 Havoc Pennington <hp@redhat.com>
* tools/dbus-launch.c (do_close_stderr): fix C89 problem and formatting problem * Mostly fix the DBusPipe mess. - put line break after function return types - put space before parens - do not pass structs around by value - don't use dbus_strerror after calling supposedly cross-platform api - don't name pipe variables "fd" - abstract special fd numbers like -1 and 1
Diffstat (limited to 'dbus/dbus-sysdeps.h')
-rw-r--r--dbus/dbus-sysdeps.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h
index 879a47bc..4bdf2cc4 100644
--- a/dbus/dbus-sysdeps.h
+++ b/dbus/dbus-sysdeps.h
@@ -303,21 +303,23 @@ dbus_bool_t _dbus_path_is_absolute (const DBusString *filename);
dbus_bool_t _dbus_get_standard_session_servicedirs (DBusList **dirs);
typedef struct {
- int fd;
+ int fd_or_handle;
} DBusPipe;
-DBusPipe _dbus_pipe_init(int fd);
-
-int _dbus_pipe_write (DBusPipe pipe,
- const DBusString *buffer,
- int start,
- int len);
-
-int _dbus_pipe_close (DBusPipe pipe,
- DBusError *error);
+void _dbus_pipe_init (DBusPipe *pipe,
+ int fd);
+void _dbus_pipe_init_stdout (DBusPipe *pipe);
+int _dbus_pipe_write (DBusPipe *pipe,
+ const DBusString *buffer,
+ int start,
+ int len,
+ DBusError *error);
+int _dbus_pipe_close (DBusPipe *pipe,
+ DBusError *error);
+dbus_bool_t _dbus_pipe_is_valid (DBusPipe *pipe);
+void _dbus_pipe_invalidate (DBusPipe *pipe);
+dbus_bool_t _dbus_pipe_is_stdout_or_stderr (DBusPipe *pipe);
-dbus_bool_t _dbus_pipe_is_valid(DBusPipe pipe);
-dbus_bool_t _dbus_pipe_is_special(DBusPipe pipe);
/** Opaque type for reading a directory listing */
typedef struct DBusDirIter DBusDirIter;
@@ -385,7 +387,7 @@ dbus_bool_t _dbus_full_duplex_pipe (int *fd1,
void _dbus_print_backtrace (void);
dbus_bool_t _dbus_become_daemon (const DBusString *pidfile,
- DBusPipe print_pid_fd,
+ DBusPipe *print_pid_pipe,
DBusError *error);
dbus_bool_t _dbus_write_pid_file (const DBusString *filename,
unsigned long pid,