Statistics
| Branch: | Revision:

grapes / src / CloudSupport / cloud_helper_iface.h @ 176b8de8

History | View | Annotate | Download (1.44 KB)

1 5033613a Andrea Zito
#ifndef CLOUD_HELPER_IFACE
2
#define CLOUD_HELPER_IFACE
3
4 0e9bde83 Andrea Zito
#include <time.h>
5 5033613a Andrea Zito
#include "net_helper.h"
6
7
struct cloud_helper_impl_context;
8
9
struct cloud_helper_iface {
10 b9e7dd7b Andrea Zito
  struct cloud_helper_impl_context*
11
  (*cloud_helper_init)(struct nodeID *local, const char *config);
12
13
  int (*get_from_cloud)(struct cloud_helper_impl_context *context,
14
                        const char *key, uint8_t *header_ptr, int header_size,
15
                        int free_header);
16
17 98b047dd Andrea Zito
  int (*get_from_cloud_default)(struct cloud_helper_impl_context *context, const char *key,
18
                                uint8_t *header_ptr, int header_size, int free_header,
19
                                uint8_t *defval_ptr, int defval_size, int free_defval);
20
21 b9e7dd7b Andrea Zito
  int (*put_on_cloud)(struct cloud_helper_impl_context *context,
22
                      const char *key, uint8_t *buffer_ptr, int buffer_size,
23
                      int free_buffer);
24
25
  struct nodeID* (*get_cloud_node)(struct cloud_helper_impl_context *context,
26
                                   uint8_t variant);
27
28 0e9bde83 Andrea Zito
  time_t (*timestamp_cloud)(struct cloud_helper_impl_context *context);
29 b9e7dd7b Andrea Zito
30
  int (*is_cloud_node)(struct cloud_helper_impl_context *context,
31
                       struct nodeID* node);
32
33
  int (*wait4cloud)(struct cloud_helper_impl_context *context,
34
                    struct timeval *tout);
35
36
  int (*recv_from_cloud)(struct cloud_helper_impl_context *context,
37
                         uint8_t *buffer_ptr, int buffer_size);
38 5033613a Andrea Zito
};
39
40
#endif