summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-05-05 19:03:44 +0000
committerBart Polot <bart@net.in.tum.de>2011-05-05 19:03:44 +0000
commit27ef03e590f6a5729eb6cf7a93829876b562cbcd (patch)
tree4e2609371852812887d90b02e23632eb20e0f83d /src
parent19966394513d403b506f0305d1c548567cfe30b1 (diff)
Prepared for new API client implementation
Diffstat (limited to 'src')
-rw-r--r--src/mesh/mesh_api_new.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c
index 2c292f7f1..5cb50b0d1 100644
--- a/src/mesh/mesh_api_new.c
+++ b/src/mesh/mesh_api_new.c
@@ -41,9 +41,11 @@ extern "C"
* Opaque handle to the service.
*/
struct GNUNET_MESH_Handle {
+ GNUNET_CLIENT_Connection *mesh;
struct GNUNET_MESH_Tunnel *head;
struct GNUNET_MESH_Tunnel *tail;
GNUNET_MESH_TunnelEndHandler cleaner;
+ void *cls;
};
/**
@@ -79,10 +81,22 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_MESH_TunnelEndHandler cleaner,
const struct GNUNET_MESH_MessageHandler *handlers,
const GNUNET_MESH_ApplicationType *stypes) {
- GNUNET_MESH_Handle *h;
+ GNUNET_MESH_Handle *h;
+ struct GNUNET_MESH_MessageHandler *aux;
+ int i;
+ uint16_t *types;
+
h = GNUNET_malloc(sizeof(GNUNET_MESH_Handle));
h->cleaner = cleaner;
+ h->mesh = GNUNET_CLIENT_connect("mesh", cfg);
+ h->cls = cls;
+
+ aux = handlers;
+ for(i = 0; handlers[i].type; i++) {
+
+ }
+
return h;
}