5 #include "sd-journal.h"
9 ENTRY_CURSOR = 0, /* Nothing actually written yet. */
13 ENTRY_NEW_FIELD, /* In between fields. */
14 ENTRY_TEXT_FIELD, /* In the middle of a text field. */
15 ENTRY_BINARY_FIELD_START, /* Writing the name of a binary field. */
16 ENTRY_BINARY_FIELD_SIZE, /* Writing the size of a binary field. */
17 ENTRY_BINARY_FIELD, /* In the middle of a binary field. */
18 ENTRY_OUTRO, /* Writing '\n' */
19 ENTRY_DONE, /* Need to move to a new field. */
22 typedef struct Uploader {
28 char error[CURL_ERROR_SIZE];
29 struct curl_slist *header;
32 sd_event_source *input_event;
41 entry_state entry_state;
42 const void *field_data;
43 size_t field_pos, field_length;
50 #define JOURNAL_UPLOAD_POLL_TIMEOUT (10 * USEC_PER_SEC)
52 int start_upload(Uploader *u,
53 size_t (*input_callback)(void *ptr,
59 int open_journal_for_upload(Uploader *u,
64 void close_journal_input(Uploader *u);
65 int check_journal_input(Uploader *u);