summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-upload.h
blob: 68d85be6bcd3471b400ccaf0959d70163201d7ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <inttypes.h>

#include "sd-event.h"

typedef struct Uploader {
        sd_event *events;

        const char *url;
        CURL *easy;
        bool uploading;
        struct curl_slist *header;

        int input;

        sd_event_source *input_event;
} Uploader;

int start_upload(Uploader *u,
                 size_t (*input_callback)(void *ptr,
                                          size_t size,
                                          size_t nmemb,
                                          void *userdata),
                 void *data);