summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote-parse.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-02 00:15:37 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 22:34:41 -0400
commit9ff48d0982fcb97923955685fe9fa4e0e67cb238 (patch)
treeb26c25523cf45bfd1659565d2d902c24e8168724 /src/journal-remote/journal-remote-parse.h
parenta83f403760cb63b1bf7787e9ff325ffb6d891d39 (diff)
journal-remote: rework fd and writer reference handling
Diffstat (limited to 'src/journal-remote/journal-remote-parse.h')
-rw-r--r--src/journal-remote/journal-remote-parse.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/journal-remote/journal-remote-parse.h b/src/journal-remote/journal-remote-parse.h
index 5b7f23650c..07d6ddb67f 100644
--- a/src/journal-remote/journal-remote-parse.h
+++ b/src/journal-remote/journal-remote-parse.h
@@ -35,6 +35,7 @@ typedef enum {
typedef struct RemoteSource {
char *name;
int fd;
+ bool passive_fd;
char *buf;
size_t size;
@@ -47,9 +48,13 @@ typedef struct RemoteSource {
source_state state;
dual_timestamp ts;
+ Writer *writer;
+
sd_event_source *event;
} RemoteSource;
+RemoteSource* source_new(int fd, bool passive_fd, char *name, Writer *writer);
+
static inline size_t source_non_empty(RemoteSource *source) {
assert(source);
@@ -59,4 +64,4 @@ static inline size_t source_non_empty(RemoteSource *source) {
void source_free(RemoteSource *source);
int process_data(RemoteSource *source);
int push_data(RemoteSource *source, const char *data, size_t size);
-int process_source(RemoteSource *source, Writer *writer, bool compress, bool seal);
+int process_source(RemoteSource *source, bool compress, bool seal);