From 27ef03e590f6a5729eb6cf7a93829876b562cbcd Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 5 May 2011 19:03:44 +0000 Subject: Prepared for new API client implementation --- src/mesh/mesh_api_new.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3