blob: 7d3d209996115620329c6ed7171961f363fd24d7 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef S3_WORKER_H_
#define S3_WORKER_H_
#ifdef __cplusplus
extern "C" {
#endif
extern void *s3client;
typedef enum {
kUploadTask,
kDeleteTask,
kClearTask,
} S3TaskType;
typedef struct {
S3TaskType task_type;
char *local_file;
char *remote_name;
} S3Task;
S3Task s3_upload_task(const char *local, const char *remote);
S3Task s3_delete_task(const char *name);
S3Task s3_clear_task();
void exec_s3_task(void *);
void s3_worker_init();
void* s3_worker_main(void *);
void s3_worker_push(S3Task task);
void s3client_init();
void s3client_put(const char *filename, const char *object_name);
void s3client_delete(const char *object_name);
#ifdef __cplusplus
}
#endif
#endif
|