Statistics
| Branch: | Revision:

grapes / src / TopologyManager / cloudcast_proto.h @ 36dc16e0

History | View | Annotate | Download (1.22 KB)

1
#ifndef CLOUDCAST_PROTO
2
#define CLOUDCAST_PROTO
3

    
4
#include <time.h>
5
#include "cloud_helper.h"
6

    
7
struct cloudcast_proto_context;
8

    
9
struct cloudcast_proto_context* cloudcast_proto_init(struct nodeID *s, void *meta, int meta_size);
10

    
11

    
12
int cloudcast_reply_peer(struct cloudcast_proto_context *context, const struct peer_cache *c, struct peer_cache *local_cache);
13
int cloudcast_query_peer(struct cloudcast_proto_context *context, struct peer_cache *local_cache, struct nodeID *dst);
14

    
15
int cloudcast_reply_cloud(struct cloudcast_proto_context *context, struct peer_cache *cloud_cache);
16

    
17
struct peer_cache * cloudcast_cloud_default_reply(struct peer_cache *template, struct nodeID *cloud_entry);
18

    
19
int cloudcast_query_cloud(struct cloudcast_proto_context *context);
20
time_t cloudcast_timestamp_cloud(struct cloudcast_proto_context *context);
21

    
22
int cloudcast_proto_change_metadata(struct cloudcast_proto_context *context, void *metadata, int metadata_size);
23

    
24
struct nodeID** cloudcast_get_cloud_nodes(struct cloudcast_proto_context *context, uint8_t number);
25

    
26
struct nodeID* cloudcast_get_cloud_node(struct cloudcast_proto_context *context);
27

    
28
int cloudcast_is_cloud_node(struct cloudcast_proto_context *context, struct nodeID* node);
29
#endif        /* CLOUDCAST_PROTO */