Revision 0e9bde83 src/TopologyManager/cloud_helper_delegate.c

View differences:

src/TopologyManager/cloud_helper_delegate.c
1 1
#include <stdlib.h>
2 2
#include <stdint.h>
3 3
#include <dlfcn.h>
4
#include <stdio.h>
4 5

  
5 6
#include "cloud_helper_iface.h"
6 7
#include "config.h"
......
9 10
  void* (*cloud_helper_init)(struct nodeID *local, const char *config);
10 11
  int (*get_from_cloud)(void *context, char *key, uint8_t *header_ptr, int header_size);
11 12
  int (*put_on_cloud)(void *context, char *key, uint8_t *buffer_ptr, int buffer_size);
12
  struct nodeID* (*get_cloud_node)(void *context);
13
  struct nodeID* (*get_cloud_node)(void *context, uint8_t variant);
14
  time_t (*timestamp_cloud)(void *context);
13 15
  int (*is_cloud_node)(void *context, struct nodeID* node);
14 16
  int (*wait4cloud)(void *context, struct timeval *tout);
15 17
  int (*recv_from_cloud)(void *context, uint8_t *buffer_ptr, int buffer_size);
......
62 64
  return context->delegate->put_on_cloud(context->delegate_context, key, buffer_ptr, buffer_size);
63 65
}
64 66

  
65
static struct nodeID* delegate_cloud_get_cloud_node(struct cloud_helper_impl_context *context)
67
static struct nodeID* delegate_cloud_get_cloud_node(struct cloud_helper_impl_context *context, uint8_t variant)
66 68
{
67
  return context->delegate->get_cloud_node(context->delegate_context);
69
  return context->delegate->get_cloud_node(context->delegate_context, variant);
70
}
71

  
72
static time_t delegate_timestamp_cloud(struct cloud_helper_impl_context *context)
73
{
74
  return context->delegate->timestamp_cloud(context->delegate_context);
68 75
}
69 76

  
70 77
int delegate_is_cloud_node(struct cloud_helper_impl_context *context, struct nodeID* node)
......
87 94
  .get_from_cloud = delegate_cloud_get_from_cloud,
88 95
  .put_on_cloud = delegate_cloud_put_on_cloud,
89 96
  .get_cloud_node = delegate_cloud_get_cloud_node,
97
  .timestamp_cloud = delegate_timestamp_cloud,
90 98
  .is_cloud_node = delegate_is_cloud_node,
91 99
  .wait4cloud = delegate_cloud_wait4cloud,
92 100
  .recv_from_cloud = delegate_cloud_recv_from_cloud,

Also available in: Unified diff