celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1652984 [3/5] - in /celix/branches/celix_config_admin: ./ cmake/cmake_celix/ dependency_manager_2/ deployment_admin/private/include/ deployment_admin/private/src/ device_access/device_access/ device_access/device_access/private/src/ event_...
Date Mon, 19 Jan 2015 12:26:55 GMT
Modified: celix/branches/celix_config_admin/log_writer/log_writer/private/src/log_writer_activator.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/log_writer/log_writer/private/src/log_writer_activator.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/log_writer/log_writer/private/src/log_writer_activator.c (original)
+++ celix/branches/celix_config_admin/log_writer/log_writer/private/src/log_writer_activator.c Mon Jan 19 12:26:54 2015
@@ -29,12 +29,9 @@
 #include "bundle_activator.h"
 
 celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
-	apr_pool_t *pool;
 	log_writer_pt writer = NULL;
 
-	bundleContext_getMemoryPool(context, &pool);
-
-	logWriter_create(pool, context, &writer);
+	logWriter_create(context, &writer);
 
 	*userData = writer;
 
@@ -42,15 +39,19 @@ celix_status_t bundleActivator_create(bu
 }
 
 celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
-	logWriter_start(userData);
-	return CELIX_SUCCESS;
+	log_writer_pt writer = (log_writer_pt) userData;
+
+	return logWriter_start(writer);
 }
 
 celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
-	logWriter_stop(userData);
-	return CELIX_SUCCESS;
+	log_writer_pt writer = (log_writer_pt) userData;
+
+	return logWriter_stop(writer);
 }
 
 celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
-    return CELIX_SUCCESS;
+	log_writer_pt writer = (log_writer_pt) userData;
+
+	return logWriter_destroy(&writer);
 }

Modified: celix/branches/celix_config_admin/log_writer/log_writer_stdout/private/src/log_writer_stdout.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/log_writer/log_writer_stdout/private/src/log_writer_stdout.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/log_writer/log_writer_stdout/private/src/log_writer_stdout.c (original)
+++ celix/branches/celix_config_admin/log_writer/log_writer_stdout/private/src/log_writer_stdout.c Mon Jan 19 12:26:54 2015
@@ -37,15 +37,11 @@
 
 celix_status_t logListener_logged(log_listener_pt listener, log_entry_pt entry) {
 	celix_status_t status = CELIX_SUCCESS;
-    module_pt module = NULL;
-    char *sName = NULL;
 
-    status = bundle_getCurrentModule(entry->bundle, &module);
-    if (status == CELIX_SUCCESS) {
-		status = module_getSymbolicName(module, &sName);
-		if (status == CELIX_SUCCESS) {
-			printf("LogWriter: %s from %s\n", entry->message, sName);
-		}
+    if (!entry) {
+        status = CELIX_ILLEGAL_ARGUMENT;
+    } else {
+		printf("LogWriter: %s from %s\n", entry->message, entry->bundleSymbolicName);
     }
 
     return status;

Modified: celix/branches/celix_config_admin/log_writer/log_writer_syslog/private/src/log_writer_syslog.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/log_writer/log_writer_syslog/private/src/log_writer_syslog.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/log_writer/log_writer_syslog/private/src/log_writer_syslog.c (original)
+++ celix/branches/celix_config_admin/log_writer/log_writer_syslog/private/src/log_writer_syslog.c Mon Jan 19 12:26:54 2015
@@ -43,35 +43,28 @@ celix_status_t logListener_logged(log_li
     module_pt module = NULL;
     char *sName = NULL;
 
-    status = bundle_getCurrentModule(entry->bundle, &module);
-    if (status == CELIX_SUCCESS) {
-		status = module_getSymbolicName(module, &sName);
-		if (status == CELIX_SUCCESS) {
+	int sysLogLvl = -1;
 
-			int sysLogLvl = -1;
+	switch(entry->level)
+	{
+		case 0x00000001: /*OSGI_LOGSERVICE_ERROR */
+			sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_ERR);
+			break;
+		case 0x00000002: /* OSGI_LOGSERVICE_WARNING */
+			sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_WARNING);
+			break;
+		case 0x00000003: /* OSGI_LOGSERVICE_INFO */
+			sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_INFO);
+			break;
+		case 0x00000004: /* OSGI_LOGSERVICE_DEBUG */
+			sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_DEBUG);
+			break;
+		default:		/* OSGI_LOGSERVICE_INFO */
+			sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_INFO);
+			break;
+	}
 
-			switch(entry->level)
-			{
-				case 0x00000001: /*OSGI_LOGSERVICE_ERROR */
-					sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_ERR);
-					break;
-				case 0x00000002: /* OSGI_LOGSERVICE_WARNING */
-					sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_WARNING);
-					break;
-				case 0x00000003: /* OSGI_LOGSERVICE_INFO */
-					sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_INFO);
-					break;
-				case 0x00000004: /* OSGI_LOGSERVICE_DEBUG */
-					sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_DEBUG);
-					break;
-				default:		/* OSGI_LOGSERVICE_INFO */
-					sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_INFO);
-					break;
-			}
-
-			syslog(sysLogLvl, "[%s]: %s", sName, entry->message);
-		}
-    }
+	syslog(sysLogLvl, "[%s]: %s", entry->bundleSymbolicName, entry->message);
 
     return status;
 }

Modified: celix/branches/celix_config_admin/remote_services/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -43,6 +43,7 @@ if (REMOTE_SERVICE_ADMIN)
     add_subdirectory(calculator_endpoint)
     add_subdirectory(calculator_endpoint2)
     add_subdirectory(calculator_proxy)
+    add_subdirectory(calculator_proxy2)
     add_subdirectory(calculator_shell)
 endif (REMOTE_SERVICE_ADMIN)
 

Modified: celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/include/calculator_endpoint_impl.h Mon Jan 19 12:26:54 2015
@@ -27,14 +27,13 @@
 #ifndef CALCULATOR_ENDPOINT_IMPL_H_
 #define CALCULATOR_ENDPOINT_IMPL_H_
 
-#include <apr_general.h>
-
 #include "celix_errno.h"
 #include "remote_endpoint_impl.h"
 
 #include "calculator_service.h"
 
-celix_status_t calculatorEndpoint_create(apr_pool_t *pool, remote_endpoint_pt *endpoint);
+celix_status_t calculatorEndpoint_create(remote_endpoint_pt *endpoint);
+celix_status_t calculatorEndpoint_destroy(remote_endpoint_pt *endpoint);
 
 celix_status_t calculatorEndpoint_setService(remote_endpoint_pt endpoint, void *service);
 

Modified: celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c Mon Jan 19 12:26:54 2015
@@ -31,33 +31,23 @@
 #include "service_registration.h"
 
 struct activator {
-	apr_pool_t *pool;
-
-	service_registration_pt endpoint;
+	remote_endpoint_service_pt endpointService;
+	service_registration_pt endpointServiceRegistration;
 };
 
 celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	apr_pool_t *parentPool = NULL;
-	apr_pool_t *pool = NULL;
 	struct activator *activator;
 
-	status = bundleContext_getMemoryPool(context, &parentPool);
-	if (status == CELIX_SUCCESS) {
-		if (apr_pool_create(&pool, parentPool) != APR_SUCCESS) {
-			status = CELIX_BUNDLE_EXCEPTION;
-		} else {
-			activator = apr_palloc(pool, sizeof(*activator));
-			if (!activator) {
-				status = CELIX_ENOMEM;
-			} else {
-				activator->pool = pool;
-				activator->endpoint = NULL;
-
-				*userData = activator;
-			}
-		}
+	activator = calloc(1, sizeof(*activator));
+	if (!activator) {
+		status = CELIX_ENOMEM;
+	} else {
+		activator->endpointService = NULL;
+		activator->endpointServiceRegistration = NULL;
+
+		*userData = activator;
 	}
 
 	return status;
@@ -69,8 +59,8 @@ celix_status_t bundleActivator_start(voi
 	remote_endpoint_pt endpoint = NULL;
 	remote_endpoint_service_pt endpointService = NULL;
 
-	calculatorEndpoint_create(activator->pool, &endpoint);
-	endpointService = apr_palloc(activator->pool, sizeof(*endpointService));
+	calculatorEndpoint_create(&endpoint);
+	endpointService = calloc(1, sizeof(*endpointService));
 	endpointService->endpoint = endpoint;
 	endpointService->handleRequest = calculatorEndpoint_handleRequest;
 	endpointService->setService = calculatorEndpoint_setService;
@@ -78,8 +68,9 @@ celix_status_t bundleActivator_start(voi
 	properties_pt props = properties_create();
 	properties_set(props, (char *) "remote.interface", (char *) CALCULATOR_SERVICE);
 
-	bundleContext_registerService(context, OSGI_RSA_REMOTE_ENDPOINT, endpointService, props, &activator->endpoint);
+	bundleContext_registerService(context, OSGI_RSA_REMOTE_ENDPOINT, endpointService, props, &activator->endpointServiceRegistration);
 
+	activator->endpointService = endpointService;
 
 	return status;
 }
@@ -88,12 +79,18 @@ celix_status_t bundleActivator_stop(void
 	celix_status_t status = CELIX_SUCCESS;
 	struct activator *activator = userData;
 
-	serviceRegistration_unregister(activator->endpoint);
+	serviceRegistration_unregister(activator->endpointServiceRegistration);
+
+	free(activator->endpointService->endpoint);
+	free(activator->endpointService);
 
 	return status;
 }
 
 celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
 	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = userData;
+
+	free(activator);
 	return status;
 }

Modified: celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_endpoint/private/src/calculator_endpoint_impl.c Mon Jan 19 12:26:54 2015
@@ -24,14 +24,15 @@
  *  \copyright	Apache License, Version 2.0
  */
 #include <jansson.h>
+#include <string.h>
 
 #include "celix_errno.h"
 
 #include "calculator_endpoint_impl.h"
 
-celix_status_t calculatorEndpoint_create(apr_pool_t *pool, remote_endpoint_pt *endpoint) {
+celix_status_t calculatorEndpoint_create(remote_endpoint_pt *endpoint) {
 	celix_status_t status = CELIX_SUCCESS;
-	*endpoint = apr_palloc(pool, sizeof(**endpoint));
+	*endpoint = calloc(1, sizeof(**endpoint));
 	if (!*endpoint) {
 		status = CELIX_ENOMEM;
 	} else {
@@ -41,6 +42,14 @@ celix_status_t calculatorEndpoint_create
 	return status;
 }
 
+celix_status_t calculatorEndpoint_destroy(remote_endpoint_pt *endpoint) {
+	celix_status_t status = CELIX_SUCCESS;
+	free(*endpoint);
+	*endpoint = NULL;
+
+	return status;
+}
+
 celix_status_t calculatorEndpoint_setService(remote_endpoint_pt endpoint, void *service) {
 	celix_status_t status = CELIX_SUCCESS;
 	endpoint->service = service;
@@ -68,6 +77,8 @@ celix_status_t calculatorEndpoint_handle
 		status = CELIX_ILLEGAL_ARGUMENT;
 	}
 
+	json_decref(root);
+
 	return status;
 }
 
@@ -93,10 +104,13 @@ celix_status_t calculatorEndpoint_add(re
 
 			char *c = json_dumps(resultRoot, 0);
 			*reply = c;
+
+			json_decref(resultRoot);
 		} else {
 			printf("CALCULATOR_ENDPOINT: No service available");
 			status = CELIX_BUNDLE_EXCEPTION;
 		}
+		json_decref(root);
 	}
 
 	return status;
@@ -124,10 +138,13 @@ celix_status_t calculatorEndpoint_sub(re
 
 			char *c = json_dumps(resultRoot, JSON_ENCODE_ANY);
 			*reply = c;
+
+			json_decref(resultRoot);
 		} else {
 			printf("CALCULATOR_ENDPOINT: No service available");
 			status = CELIX_BUNDLE_EXCEPTION;
 		}
+		json_decref(root);
 	}
 
 	return status;
@@ -154,10 +171,13 @@ celix_status_t calculatorEndpoint_sqrt(r
 
 			char *c = json_dumps(resultRoot, JSON_ENCODE_ANY);
 			*reply = c;
+
+			json_decref(resultRoot);
 		} else {
 			printf("CALCULATOR_ENDPOINT: No service available");
 			status = CELIX_BUNDLE_EXCEPTION;
 		}
+		json_decref(root);
 	}
 
 	return status;

Modified: celix/branches/celix_config_admin/remote_services/calculator_endpoint2/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_endpoint2/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_endpoint2/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_endpoint2/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -20,7 +20,7 @@ find_package(Jansson REQUIRED)
 include_directories("${JANSSON_INCLUDE_DIRS}")
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_endpoint/private/include")
+include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_endpoint2/private/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/calculator_service/public/include")
 
 SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator2_endpoint")

Modified: celix/branches/celix_config_admin/remote_services/calculator_proxy/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_proxy/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_proxy/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_proxy/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -30,6 +30,7 @@ SET(BUNDLE_VERSION "0.0.1")
 bundle(org.apache.celix.calc.api.Calculator_proxy SOURCES 
 	private/src/calculator_proxy_activator
 	private/src/calculator_proxy_impl.c
+    ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/remote_proxy_factory_impl.c
     
     private/include/calculator_proxy_impl.h
 )

Modified: celix/branches/celix_config_admin/remote_services/calculator_proxy/private/include/calculator_proxy_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_proxy/private/include/calculator_proxy_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_proxy/private/include/calculator_proxy_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_proxy/private/include/calculator_proxy_impl.h Mon Jan 19 12:26:54 2015
@@ -27,8 +27,6 @@
 #ifndef CALCULATOR_PROXY_IMPL_H_
 #define CALCULATOR_PROXY_IMPL_H_
 
-#include <apr_general.h>
-
 #include "celix_errno.h"
 
 #include "calculator_service.h"
@@ -41,7 +39,6 @@
 
 
 struct calculator {
-	apr_pool_t *pool;
 	bundle_context_pt context;
 
 	endpoint_description_pt endpoint;
@@ -50,7 +47,8 @@ struct calculator {
 };
 
 
-celix_status_t calculatorProxy_create(apr_pool_t *pool, bundle_context_pt context, calculator_pt *endpoint);
+celix_status_t calculatorProxy_create(bundle_context_pt context, calculator_pt *endpoint);
+celix_status_t calculatorProxy_destroy(calculator_pt *endpoint);
 celix_status_t calculatorProxy_add(calculator_pt calculator, double a, double b, double *result);
 celix_status_t calculatorProxy_sub(calculator_pt calculator, double a, double b, double *result);
 celix_status_t calculatorProxy_sqrt(calculator_pt calculator, double a, double *result);

Modified: celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_activator.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_activator.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_activator.c (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_activator.c Mon Jan 19 12:26:54 2015
@@ -27,36 +27,31 @@
 
 #include "bundle_activator.h"
 #include "service_registration.h"
+#include "remote_proxy.h"
 
 #include "calculator_proxy_impl.h"
 
 struct activator {
-	apr_pool_t *pool;
-	service_registration_pt proxyFactoryService;
+	bundle_context_pt context;
+	remote_proxy_factory_pt factory_ptr;
 };
 
+static celix_status_t calculatorProxyFactory_create(void *handle, endpoint_description_pt endpointDescription, remote_service_admin_pt rsa, sendToHandle sendToCallback, properties_pt properties, void **service);
+static celix_status_t calculatorProxyFactory_destroy(void *handle, void *service);
+
 celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	apr_pool_t *parentPool = NULL;
-	apr_pool_t *pool = NULL;
 	struct activator *activator;
 
-	status = bundleContext_getMemoryPool(context, &parentPool);
-	if (status == CELIX_SUCCESS) {
-		if (apr_pool_create(&pool, parentPool) != APR_SUCCESS) {
-			status = CELIX_BUNDLE_EXCEPTION;
-		} else {
-			activator = apr_palloc(pool, sizeof(*activator));
-			if (!activator) {
-				status = CELIX_ENOMEM;
-			} else {
-				activator->pool = pool;
-				activator->proxyFactoryService = NULL;
-
-				*userData = activator;
-			}
-		}
+	activator = calloc(1, sizeof(*activator));
+	if (!activator) {
+		status = CELIX_ENOMEM;
+	} else {
+		activator->factory_ptr = NULL;
+		activator->context = context;
+
+		*userData = activator;
 	}
 
 	return status;
@@ -65,22 +60,11 @@ celix_status_t bundleActivator_create(bu
 celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
 	celix_status_t status = CELIX_SUCCESS;
 	struct activator *activator = userData;
-	remote_proxy_factory_service_pt calculatorProxyFactoryService;
 
-	calculatorProxyFactoryService = apr_palloc(activator->pool, sizeof(*calculatorProxyFactoryService));
-	calculatorProxyFactoryService->pool = activator->pool;
-	calculatorProxyFactoryService->context = context;
-	calculatorProxyFactoryService->proxy_registrations = hashMap_create(NULL, NULL, NULL, NULL);
-	calculatorProxyFactoryService->registerProxyService = calculatorProxy_registerProxyService;
-	calculatorProxyFactoryService->unregisterProxyService = calculatorProxy_unregisterProxyService;
-
-	properties_pt props = properties_create();
-	properties_set(props, (char *) "proxy.interface", (char *) CALCULATOR_SERVICE);
-
-	if (bundleContext_registerService(context, OSGI_RSA_REMOTE_PROXY_FACTORY, calculatorProxyFactoryService, props, &activator->proxyFactoryService) == CELIX_SUCCESS)
-	{
-		printf("CALCULATOR_PROXY: Proxy registered OSGI_RSA_REMOTE_PROXY_FACTORY (%s)\n", OSGI_RSA_REMOTE_PROXY_FACTORY);
-	}
+	remoteProxyFactory_create(context, (char *) CALCULATOR_SERVICE, activator,
+			calculatorProxyFactory_create, calculatorProxyFactory_destroy,
+			&activator->factory_ptr);
+	remoteProxyFactory_register(activator->factory_ptr);
 
 	return status;
 }
@@ -89,15 +73,52 @@ celix_status_t bundleActivator_stop(void
 	celix_status_t status = CELIX_SUCCESS;
 	struct activator *activator = userData;
 
-	// TODO: unregister proxy registrations
-	serviceRegistration_unregister(activator->proxyFactoryService);
-	activator->proxyFactoryService = NULL;
+	remoteProxyFactory_unregister(activator->factory_ptr);
+	remoteProxyFactory_destroy(&activator->factory_ptr);
 
 	return status;
 }
 
 celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
 	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = userData;
+
+	free(activator);
+
+	return status;
+}
+
+static celix_status_t calculatorProxyFactory_create(void *handle, endpoint_description_pt endpointDescription, remote_service_admin_pt rsa, sendToHandle sendToCallback, properties_pt properties, void **service) {
+	celix_status_t status = CELIX_SUCCESS;
+	struct activator *activator = handle;
+
+	calculator_service_pt calculatorService = calloc(1, sizeof(*calculatorService));
+	calculatorProxy_create(activator->context, &calculatorService->calculator);
+	calculatorService->add = calculatorProxy_add;
+	calculatorService->sub = calculatorProxy_sub;
+	calculatorService->sqrt = calculatorProxy_sqrt;
+
+	calculatorService->calculator->endpoint = endpointDescription;
+	calculatorService->calculator->sendToHandler = rsa;
+	calculatorService->calculator->sendToCallback = sendToCallback;
+
+	*service = calculatorService;
+
+	return status;
+}
+
+static celix_status_t calculatorProxyFactory_destroy(void *handle, void *service) {
+	celix_status_t status = CELIX_SUCCESS;
+	calculator_service_pt calculatorService = service;
+
+	if (!calculatorService) {
+		status = CELIX_ILLEGAL_ARGUMENT;
+	}
+
+	if (status == CELIX_SUCCESS) {
+		calculatorProxy_destroy(&calculatorService->calculator);
+		free(calculatorService);
+	}
 
 	return status;
 }

Modified: celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c (original)
+++ celix/branches/celix_config_admin/remote_services/calculator_proxy/private/src/calculator_proxy_impl.c Mon Jan 19 12:26:54 2015
@@ -26,8 +26,6 @@
 #include <jansson.h>
 
 #include <string.h>
-#include <apr_strings.h>
-
 #include <stddef.h>
 
 #include "celix_errno.h"
@@ -39,18 +37,12 @@
 #define JSON_DECODE_ANY 0
 #endif
 
-celix_status_t calculatorProxy_setEndpointDescription(void *proxy, endpoint_description_pt endpoint);
-celix_status_t calculatorProxy_setHandler(void *proxy, void *handler);
-celix_status_t calculatorProxy_setCallback(void *proxy, sendToHandle callback);
-
-
-celix_status_t calculatorProxy_create(apr_pool_t *pool, bundle_context_pt context, calculator_pt *calculator)  {
+celix_status_t calculatorProxy_create(bundle_context_pt context, calculator_pt *calculator)  {
 	celix_status_t status = CELIX_SUCCESS;
-	*calculator = apr_palloc(pool, sizeof(**calculator));
+	*calculator = calloc(1, sizeof(**calculator));
 	if (!*calculator) {
 		status = CELIX_ENOMEM;
 	} else {
-		(*calculator)->pool = pool;
 		(*calculator)->context = context;
 		(*calculator)->endpoint = NULL;
 		(*calculator)->sendToCallback=NULL;
@@ -60,6 +52,16 @@ celix_status_t calculatorProxy_create(ap
 	return status;
 }
 
+
+celix_status_t calculatorProxy_destroy(calculator_pt *calculator)  {
+	celix_status_t status = CELIX_SUCCESS;
+
+	free(*calculator);
+	*calculator = NULL;
+
+	return status;
+}
+
 // { "m": "" "a":["arg1", "arg2"] }
 celix_status_t calculatorProxy_add(calculator_pt calculator, double a, double b, double *result) {
 	celix_status_t status = CELIX_SUCCESS;
@@ -69,7 +71,7 @@ celix_status_t calculatorProxy_add(calcu
 		root = json_pack("{s:s, s:[ff]}", "m", "add(DD)D", "a", a, b);
 
 		char *data = json_dumps(root, 0);
-		char *reply = malloc(256);
+		char *reply = NULL;
 		int replyStatus = 0;
 
 		calculator->sendToCallback(calculator->sendToHandler, calculator->endpoint, data, &reply, &replyStatus);
@@ -80,11 +82,13 @@ celix_status_t calculatorProxy_add(calcu
 			json_t *js_reply = json_loads(reply, 0, &error);
 			if (js_reply) {
 				json_unpack(js_reply, "{s:f}", "r", result);
+				json_decref(js_reply);
 			} else {
 				printf("PROXY: got error '%s' for '%s'\n", error.text, reply);
 				status = CELIX_BUNDLE_EXCEPTION;
 			}
 		}
+		json_decref(root);
 
 		free(data);
 		free(reply);
@@ -103,7 +107,7 @@ celix_status_t calculatorProxy_sub(calcu
 		root = json_pack("{s:s, s:[ff]}", "m", "sub(DD)D", "a", a, b);
 
 		char *data = json_dumps(root, 0);
-		char *reply = malloc(128);
+		char *reply = NULL;
 		int replyStatus = 0;
 
 		calculator->sendToCallback(calculator->sendToHandler, calculator->endpoint, data, &reply, &replyStatus);
@@ -113,12 +117,15 @@ celix_status_t calculatorProxy_sub(calcu
 			json_t *js_reply = json_loads(reply, 0, &error);
 			if (js_reply) {
 			    json_unpack(js_reply, "{s:f}", "r", result);
+			    json_decref(js_reply);
 			} else {
 				printf("PROXY: got error '%s' for '%s'\n", error.text, reply);
 				status = CELIX_BUNDLE_EXCEPTION;
 			}
 		}
 
+		json_decref(root);
+
 		free(data);
 		free(reply);
 	} else {
@@ -136,7 +143,7 @@ celix_status_t calculatorProxy_sqrt(calc
 		root = json_pack("{s:s, s:[f]}", "m", "sqrt(D)D", "a", a);
 
 		char *data = json_dumps(root, 0);
-		char *reply = malloc(128);
+		char *reply = NULL;
 		int replyStatus;
 
 		calculator->sendToCallback(calculator->sendToHandler, calculator->endpoint, data, &reply, &replyStatus);
@@ -146,12 +153,15 @@ celix_status_t calculatorProxy_sqrt(calc
 			json_t *js_reply = json_loads(reply, JSON_DECODE_ANY, &error);
 			if (js_reply) {
 			    json_unpack(js_reply, "{s:f}", "r", result);
+			    json_decref(js_reply);
 			} else {
 				printf("PROXY: got error '%s' for '%s'\n", error.text, reply);
 				status = CELIX_BUNDLE_EXCEPTION;
 			}
 		}
 
+		json_decref(root);
+
 		free(data);
 		free(reply);
 	} else {
@@ -161,86 +171,3 @@ celix_status_t calculatorProxy_sqrt(calc
 
 	return status;
 }
-
-
-
-celix_status_t calculatorProxy_registerProxyService(void* proxyFactoryService, endpoint_description_pt endpointDescription, void* rsa, sendToHandle sendToCallback) {
-	celix_status_t status = CELIX_SUCCESS;
-
-	remote_proxy_factory_service_pt calculatorProxyFactoryService = (remote_proxy_factory_service_pt) proxyFactoryService;
-	calculator_pt calculator = NULL;
-	calculator_service_pt calculatorService = NULL;
-
-	calculatorProxy_create(calculatorProxyFactoryService->pool, calculatorProxyFactoryService->context, &calculator);
-	calculatorService = apr_palloc(calculatorProxyFactoryService->pool, sizeof(*calculatorService));
-	calculatorService->calculator = calculator;
-	calculatorService->add = calculatorProxy_add;
-	calculatorService->sub = calculatorProxy_sub;
-	calculatorService->sqrt = calculatorProxy_sqrt;
-
-	properties_pt srvcProps = properties_create();
-	properties_set(srvcProps, (char *) "proxy.interface", (char *) CALCULATOR_SERVICE);
-	properties_set(srvcProps, (char *) "endpoint.framework.uuid", (char *) endpointDescription->frameworkUUID);
-
-	service_registration_pt proxyReg = NULL;
-
-	calculatorProxy_setEndpointDescription(calculator, endpointDescription);
-	calculatorProxy_setHandler(calculator, rsa);
-	calculatorProxy_setCallback(calculator, sendToCallback);
-
-	if (bundleContext_registerService(calculatorProxyFactoryService->context, CALCULATOR_SERVICE, calculatorService, srvcProps, &proxyReg) != CELIX_SUCCESS)
-	{
-		printf("CALCULATOR_PROXY: error while registering calculator service\n");
-	}
-
-	hashMap_put(calculatorProxyFactoryService->proxy_registrations, endpointDescription, proxyReg);
-
-
-	return status;
-}
-
-
-celix_status_t calculatorProxy_unregisterProxyService(void* proxyFactoryService, endpoint_description_pt endpointDescription) {
-	celix_status_t status = CELIX_SUCCESS;
-
-	remote_proxy_factory_service_pt calculatorProxyFactoryService = (remote_proxy_factory_service_pt) proxyFactoryService;
-	service_registration_pt proxyReg = hashMap_get(calculatorProxyFactoryService->proxy_registrations, endpointDescription);
-
-	if (proxyReg != NULL)
-	{
-		serviceRegistration_unregister(proxyReg);
-	}
-
-	return status;
-}
-
-
-celix_status_t calculatorProxy_setEndpointDescription(void *proxy, endpoint_description_pt endpoint) {
-	celix_status_t status = CELIX_SUCCESS;
-
-	calculator_pt calculator = proxy;
-	calculator->endpoint = endpoint;
-
-	return status;
-}
-
-
-celix_status_t calculatorProxy_setHandler(void *proxy, void *handler) {
-	celix_status_t status = CELIX_SUCCESS;
-
-	calculator_pt calculator = proxy;
-	calculator->sendToHandler = handler;
-
-	return status;
-}
-
-
-celix_status_t calculatorProxy_setCallback(void *proxy, sendToHandle callback) {
-	celix_status_t status = CELIX_SUCCESS;
-
-	calculator_pt calculator = proxy;
-	calculator->sendToCallback = callback;
-
-	return status;
-}
-

Modified: celix/branches/celix_config_admin/remote_services/deploy.cmake
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/deploy.cmake?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/deploy.cmake (original)
+++ celix/branches/celix_config_admin/remote_services/deploy.cmake Mon Jan 19 12:26:54 2015
@@ -21,7 +21,7 @@ if (REMOTE_SERVICE_ADMIN)
                                     org.apache.celix.calc.api.Calculator_endpoint
                                     org.apache.celix.calc.api.Calculator2_endpoint)
     deploy("remote-services-cfg-client" BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_configured
-                                        ENDPOINTS org.apache.celix.calc.api.Calculator_proxy)
+                                        ENDPOINTS org.apache.celix.calc.api.Calculator_proxy org.apache.celix.calc.api.Calculator2_proxy)
 
 	#TODO for remote-service-client the discovery should be added as last. If this is not done, 
 	#discovery will discover services before the topology manager is registered as 

Modified: celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_descriptor_reader.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_descriptor_reader.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_descriptor_reader.h (original)
+++ celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_descriptor_reader.h Mon Jan 19 12:26:54 2015
@@ -27,12 +27,13 @@
 #ifndef ENDPOINT_DESCRIPTOR_READER_H_
 #define ENDPOINT_DESCRIPTOR_READER_H_
 
+#include "endpoint_discovery_poller.h"
 #include "celix_errno.h"
 #include "array_list.h"
 
 typedef struct endpoint_descriptor_reader *endpoint_descriptor_reader_pt;
 
-celix_status_t endpointDescriptorReader_create(endpoint_descriptor_reader_pt *reader);
+celix_status_t endpointDescriptorReader_create(endpoint_discovery_poller_pt poller, endpoint_descriptor_reader_pt *reader);
 celix_status_t endpointDescriptorReader_destroy(endpoint_descriptor_reader_pt reader);
 
 celix_status_t endpointDescriptorReader_parseDocument(endpoint_descriptor_reader_pt reader, char *document, array_list_pt *endpoints);

Modified: celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_discovery_poller.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_discovery_poller.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_discovery_poller.h (original)
+++ celix/branches/celix_config_admin/remote_services/discovery/private/include/endpoint_discovery_poller.h Mon Jan 19 12:26:54 2015
@@ -29,6 +29,19 @@
 
 #include "celix_errno.h"
 #include "discovery.h"
+#include "log_helper.h"
+
+struct endpoint_discovery_poller {
+    discovery_pt discovery;
+    hash_map_pt entries;
+    log_helper_pt* loghelper;
+
+    celix_thread_mutex_t pollerLock;
+    celix_thread_t pollerThread;
+
+    unsigned int poll_interval;
+    volatile bool running;
+};
 
 typedef struct endpoint_discovery_poller *endpoint_discovery_poller_pt;
 

Modified: celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery.c Mon Jan 19 12:26:54 2015
@@ -40,7 +40,8 @@
 #include "service_reference.h"
 #include "service_registration.h"
 #include "remote_constants.h"
-#include "celix_log.h"
+#include "log_helper.h"
+#include "log_service.h"
 #include "discovery.h"
 #include "discovery_impl.h"
 #include "endpoint_discovery_poller.h"
@@ -51,7 +52,7 @@ celix_status_t discovery_endpointAdded(v
 	celix_status_t status = CELIX_SUCCESS;
 	discovery_pt discovery = handle;
 
-	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Endpoint for %s, with filter \"%s\" added...", endpoint->service, matchedFilter);
+	logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "Endpoint for %s, with filter \"%s\" added...", endpoint->service, matchedFilter);
 
 	status = endpointDiscoveryServer_addEndpoint(discovery->server, endpoint);
 
@@ -62,7 +63,7 @@ celix_status_t discovery_endpointRemoved
 	celix_status_t status = CELIX_SUCCESS;
 	discovery_pt discovery = handle;
 
-	fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Endpoint for %s, with filter \"%s\" removed...", endpoint->service, matchedFilter);
+	logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "Endpoint for %s, with filter \"%s\" removed...", endpoint->service, matchedFilter);
 
 	status = endpointDiscoveryServer_removeEndpoint(discovery->server, endpoint);
 
@@ -90,22 +91,22 @@ celix_status_t discovery_endpointListene
 	filter_pt filter = filter_create(scope);
 
 	if (discoveryListener != NULL && strcmp(discoveryListener, "true") == 0) {
-		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "EndpointListener Ignored - Discovery listener");
+		logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "EndpointListener Ignored - Discovery listener");
 	} else {
 		celixThreadMutex_lock(&discovery->discoveredServicesMutex);
 
 		hash_map_iterator_pt iter = hashMapIterator_create(discovery->discoveredServices);
 		while (hashMapIterator_hasNext(iter)) {
-			endpoint_description_pt endpoint = hashMapIterator_nextKey(iter);
+			endpoint_description_pt endpoint = hashMapIterator_nextValue(iter);
 
 			bool matchResult = false;
 			filter_match(filter, endpoint->properties, &matchResult);
 			if (matchResult) {
 				endpoint_listener_pt listener = service;
 
-				fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "EndpointListener Added - Add Scope");
+				logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "EndpointListener Added - Add Scope");
 
-				listener->endpointAdded(listener, endpoint, NULL);
+				listener->endpointAdded(listener->handle, endpoint, NULL);
 			}
 		}
 		hashMapIterator_destroy(iter);
@@ -141,7 +142,7 @@ celix_status_t discovery_endpointListene
 
 	if (discovery->listenerReferences != NULL) {
 		if (hashMap_remove(discovery->listenerReferences, reference)) {
-			fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "EndpointListener Removed");
+			logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "EndpointListener Removed");
 		}
 	}
 
@@ -174,15 +175,17 @@ celix_status_t discovery_informEndpointL
 			if (matchResult) {
 				bundleContext_getService(discovery->context, reference, (void**) &listener);
 				if (endpointAdded) {
-					fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Adding service (%s)", endpoint->service);
+					logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "Adding service (%s)", endpoint->service);
 
 					listener->endpointAdded(listener->handle, endpoint, scope);
 				} else {
-					fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Removing service (%s)", endpoint->service);
+					logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "Removing service (%s)", endpoint->service);
 
 					listener->endpointRemoved(listener->handle, endpoint, scope);
 				}
 			}
+
+			filter_destroy(filter);
 		}
 		hashMapIterator_destroy(iter);
 	}

Modified: celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery_activator.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery_activator.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery_activator.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery/private/src/discovery_activator.c Mon Jan 19 12:26:54 2015
@@ -32,7 +32,8 @@
 #include "service_registration.h"
 #include "constants.h"
 
-#include "celix_log.h"
+#include "log_helper.h"
+#include "log_service.h"
 #include "discovery.h"
 #include "endpoint_listener.h"
 #include "remote_constants.h"
@@ -40,8 +41,10 @@
 struct activator {
 	bundle_context_pt context;
 	discovery_pt discovery;
+	log_helper_pt loghelper;
 
 	service_tracker_pt endpointListenerTracker;
+	endpoint_listener_pt endpointListener;
 	service_registration_pt endpointListenerService;
 };
 
@@ -76,8 +79,11 @@ celix_status_t bundleActivator_create(bu
 
 	activator->context = context;
 	activator->endpointListenerTracker = NULL;
+	activator->endpointListener = NULL;
 	activator->endpointListenerService = NULL;
 
+	logHelper_create(context, &activator->loghelper);
+
 	status = bundleActivator_createEPLTracker(activator, &activator->endpointListenerTracker);
 
 	*userData = activator;
@@ -88,11 +94,13 @@ celix_status_t bundleActivator_create(bu
 celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
 	celix_status_t status = CELIX_SUCCESS;
 	struct activator *activator = userData;
-
 	char *uuid = NULL;
+
+	logHelper_start(activator->loghelper);
+
 	status = bundleContext_getProperty(context, OSGI_FRAMEWORK_FRAMEWORK_UUID, &uuid);
 	if (!uuid) {
-		fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "no framework UUID defined?!");
+		logHelper_log(activator->loghelper, OSGI_LOGSERVICE_DEBUG, "no framework UUID defined?!");
 		return CELIX_ILLEGAL_STATE;
 	}
 
@@ -105,9 +113,10 @@ celix_status_t bundleActivator_start(voi
 	sprintf(scope, "(&(%s=*)(%s=%s))", OSGI_FRAMEWORK_OBJECTCLASS, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
 	scope[len] = 0;
 
-	fw_log(logger, OSGI_FRAMEWORK_LOG_DEBUG, "using scope %s.", scope);
+	logHelper_log(activator->loghelper, OSGI_LOGSERVICE_DEBUG, "using scope %s.", scope);
 
 	endpoint_listener_pt endpointListener = malloc(sizeof(struct endpoint_listener));
+
 	if (!endpointListener) {
 		return CELIX_ENOMEM;
 	}
@@ -122,6 +131,8 @@ celix_status_t bundleActivator_start(voi
 
 	status = bundleContext_registerService(context, (char *) OSGI_ENDPOINT_LISTENER_SERVICE, endpointListener, props, &activator->endpointListenerService);
 
+	activator->endpointListener = endpointListener;
+
 	if (status == CELIX_SUCCESS) {
 		status = serviceTracker_open(activator->endpointListenerTracker);
 	}
@@ -139,13 +150,15 @@ celix_status_t bundleActivator_start(voi
 celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
 	celix_status_t status = CELIX_SUCCESS;
 	struct activator *activator = userData;
-
 	status = serviceTracker_close(activator->endpointListenerTracker);
 
 	status = serviceRegistration_unregister(activator->endpointListenerService);
+	free(activator->endpointListener);
 
 	status = discovery_stop(activator->discovery);
 
+	logHelper_stop(activator->loghelper);
+
 	return status;
 }
 
@@ -159,6 +172,9 @@ celix_status_t bundleActivator_destroy(v
 
 	status = discovery_destroy(activator->discovery);
 
+	logHelper_destroy(&activator->loghelper);
+
+	activator->loghelper = NULL;
 	activator->endpointListenerTracker = NULL;
 	activator->endpointListenerService = NULL;
 	activator->discovery = NULL;

Modified: celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_descriptor_reader.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_descriptor_reader.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_descriptor_reader.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_descriptor_reader.c Mon Jan 19 12:26:54 2015
@@ -28,23 +28,26 @@
 #include <string.h>
 #include <libxml/xmlreader.h>
 
-#include "celix_log.h"
+#include "log_helper.h"
+#include "log_service.h"
 #include "constants.h"
 #include "remote_constants.h"
 
 #include "endpoint_description.h"
 #include "endpoint_descriptor_common.h"
 #include "endpoint_descriptor_reader.h"
+#include "endpoint_discovery_poller.h"
 #include "properties.h"
 #include "utils.h"
 
 struct endpoint_descriptor_reader {
     xmlTextReaderPtr reader;
+    log_helper_pt* loghelper;
 };
 
 static valueType valueTypeFromString(char *name);
 
-celix_status_t endpointDescriptorReader_create(endpoint_descriptor_reader_pt *reader) {
+celix_status_t endpointDescriptorReader_create(endpoint_discovery_poller_pt poller, endpoint_descriptor_reader_pt *reader) {
     celix_status_t status = CELIX_SUCCESS;
 
     *reader = malloc(sizeof(**reader));
@@ -52,6 +55,7 @@ celix_status_t endpointDescriptorReader_
         status = CELIX_ENOMEM;
     } else {
         (*reader)->reader = NULL;
+        (*reader)->loghelper = poller->loghelper;
     }
 
     return status;
@@ -60,13 +64,15 @@ celix_status_t endpointDescriptorReader_
 celix_status_t endpointDescriptorReader_destroy(endpoint_descriptor_reader_pt reader) {
     celix_status_t status = CELIX_SUCCESS;
 
+    reader->loghelper = NULL;
+
     free(reader);
 
     return status;
 }
 
 void endpointDescriptorReader_addSingleValuedProperty(properties_pt properties, const xmlChar* name, const xmlChar* value) {
-	properties_set(properties, strdup((char *) name), strdup((char *) value));
+	properties_set(properties, (char *) name, (char*) value);
 }
 
 void endpointDescriptorReader_addMultiValuedProperty(properties_pt properties, const xmlChar* name, array_list_pt values) {
@@ -81,7 +87,7 @@ void endpointDescriptorReader_addMultiVa
 			value = strcat(value, item);
 		}
 
-		properties_set(properties, strdup((char *) name), strdup(value));
+		properties_set(properties, (char *) name, value);
 
 		free(value);
 	}
@@ -149,6 +155,10 @@ celix_status_t endpointDescriptorReader_
 
                     valueBuffer = xmlStrcat(valueBuffer, BAD_CAST ">");
                 } else if (xmlStrcmp(localname, ENDPOINT_DESCRIPTION) == 0) {
+
+                	if (endpointProperties != NULL)
+                		properties_destroy(endpointProperties);
+
                     endpointProperties = properties_create();
                 } else if (xmlStrcmp(localname, PROPERTY) == 0) {
                     inProperty = true;
@@ -164,8 +174,9 @@ celix_status_t endpointDescriptorReader_
 
                         if (propertyValue != NULL) {
                         	if (propertyType != VALUE_TYPE_STRING && strcmp(OSGI_RSA_ENDPOINT_SERVICE_ID, (char*) propertyName)) {
-                        		fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "ENDPOINT_DESCRIPTOR_READER: Only single-valued string supported for %s\n", propertyName);
+                        		logHelper_log(*reader->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_DESCRIPTOR_READER: Only single-valued string supported for %s\n", propertyName);
                         	}
+
                         	endpointDescriptorReader_addSingleValuedProperty(endpointProperties, propertyName, propertyValue);
                         }
 
@@ -208,7 +219,7 @@ celix_status_t endpointDescriptorReader_
                     }
                     else if (propertyValue != NULL) {
                     	if (propertyType != VALUE_TYPE_STRING) {
-                    		fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "ENDPOINT_DESCRIPTOR_READER: Only string support for %s\n", propertyName);
+                    		logHelper_log(*reader->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_DESCRIPTOR_READER: Only string support for %s\n", propertyName);
                     	}
                     	endpointDescriptorReader_addSingleValuedProperty(endpointProperties, propertyName, propertyValue);
 
@@ -219,6 +230,10 @@ celix_status_t endpointDescriptorReader_
                     }
 
                     xmlFree((void *) propertyName);
+					int k=0;
+					for(;k<arrayList_size(propertyValues);k++){
+						free(arrayList_get(propertyValues,k));
+					}
                     arrayList_clear(propertyValues);
 
                     propertyType = VALUE_TYPE_STRING;
@@ -242,6 +257,14 @@ celix_status_t endpointDescriptorReader_
             read = xmlTextReaderRead(reader->reader);
         }
 
+		if(endpointProperties!=NULL){
+			properties_destroy(endpointProperties);
+		}
+
+		int k=0;
+		for(;k<arrayList_size(propertyValues);k++){
+			free(arrayList_get(propertyValues,k));
+		}
         arrayList_destroy(propertyValues);
         xmlFree(valueBuffer);
 

Modified: celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_poller.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_poller.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_poller.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_poller.c Mon Jan 19 12:26:54 2015
@@ -31,9 +31,10 @@
 
 #include <curl/curl.h>
 
+#include "bundle_context.h"
 #include "hash_map.h"
 #include "array_list.h"
-#include "celix_log.h"
+#include "log_helper.h"
 #include "celix_threads.h"
 #include "utils.h"
 
@@ -43,16 +44,6 @@
 #include "endpoint_discovery_poller.h"
 #include "endpoint_descriptor_reader.h"
 
-struct endpoint_discovery_poller {
-    discovery_pt discovery;
-    hash_map_pt entries;
-
-    celix_thread_mutex_t pollerLock;
-    celix_thread_t pollerThread;
-
-    unsigned int poll_interval;
-    volatile bool running;
-};
 
 #define DISCOVERY_POLL_INTERVAL "DISCOVERY_CFG_POLL_INTERVAL"
 #define DEFAULT_POLL_INTERVAL "10"
@@ -72,6 +63,8 @@ celix_status_t endpointDiscoveryPoller_c
         return CELIX_ENOMEM;
     }
 
+    (*poller)->loghelper = &discovery->loghelper;
+
 	status = celixThreadMutex_create(&(*poller)->pollerLock, NULL);
 	if (status != CELIX_SUCCESS) {
 		return status;
@@ -132,15 +125,29 @@ celix_status_t endpointDiscoveryPoller_d
 
     celixThread_join(poller->pollerThread, NULL);
 
-    status = celixThreadMutex_lock(&poller->pollerLock);
-    if (status != CELIX_SUCCESS) {
-        return CELIX_BUNDLE_EXCEPTION;
-    }
+    hash_map_iterator_pt iterator = hashMapIterator_create(poller->entries);
+	while (hashMapIterator_hasNext(iterator)) {
+		hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
+
+		if ( endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, (char*) hashMapEntry_getKey(entry)) == CELIX_SUCCESS) {
+			hashMapIterator_destroy(iterator);
+			iterator = hashMapIterator_create(poller->entries);
+		}
+	}
+	hashMapIterator_destroy(iterator);
+
+	status = celixThreadMutex_lock(&poller->pollerLock);
+
+	if (status != CELIX_SUCCESS) {
+		return CELIX_BUNDLE_EXCEPTION;
+	}
 
 	hashMap_destroy(poller->entries, true, false);
 
     status = celixThreadMutex_unlock(&poller->pollerLock);
 
+    poller->loghelper = NULL;
+
     free(poller);
 
 	return status;
@@ -183,14 +190,24 @@ celix_status_t endpointDiscoveryPoller_r
         return CELIX_BUNDLE_EXCEPTION;
     }
 
-	array_list_pt entries = hashMap_remove(poller->entries, url);
-	for (int i = 0; i < arrayList_size(entries); i++) {
-		endpoint_description_pt endpoint = arrayList_get(entries, i);
+    hash_map_entry_pt entry  = hashMap_getEntry(poller->entries, url);
+    char* origKey = hashMapEntry_getKey(entry);
+
+    array_list_pt entries = hashMap_remove(poller->entries, url);
 
+	for (int i = arrayList_size(entries); i > 0  ; i--) {
+		endpoint_description_pt endpoint = arrayList_get(entries, i-1);
 		discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
+		arrayList_remove(entries, i-1);
+		endpointDescription_destroy(endpoint);
+	}
+
+	if (entries != NULL) {
+		arrayList_destroy(entries);
 	}
-	arrayList_destroy(entries);
 
+
+	free(origKey);
 	status = celixThreadMutex_unlock(&poller->pollerLock);
 
     return status;
@@ -206,7 +223,7 @@ static void *endpointDiscoveryPoller_pol
 
         celix_status_t status = celixThreadMutex_lock(&poller->pollerLock);
         if (status != CELIX_SUCCESS) {
-        	fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "ENDPOINT_POLLER: failed to obtain lock; retrying...");
+        	logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to obtain lock; retrying...");
         	continue;
         }
 
@@ -226,31 +243,39 @@ static void *endpointDiscoveryPoller_pol
 				continue;
 			}
 
-			for (int i = 0; i < arrayList_size(currentEndpoints); i++) {
-				endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i);
+			for (int i = arrayList_size(currentEndpoints); i > 0  ; i--) {
+				endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i-1);
 				if (!arrayList_contains(updatedEndpoints, endpoint)) {
 					status = discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
+					arrayList_remove(currentEndpoints, i-1);
+					endpointDescription_destroy(endpoint);
+				}
+			}
+
+			for (int i = arrayList_size(updatedEndpoints); i > 0  ; i--) {
+				endpoint_description_pt endpoint = arrayList_remove(updatedEndpoints, 0);
+
+				if (!arrayList_contains(currentEndpoints, endpoint)) {
+					arrayList_add(currentEndpoints, endpoint);
+					status = discovery_addDiscoveredEndpoint(poller->discovery, endpoint);
+				}
+				else {
+					endpointDescription_destroy(endpoint);
+
 				}
 			}
 
-			arrayList_clear(currentEndpoints);
 			if (updatedEndpoints) {
-				arrayList_addAll(currentEndpoints, updatedEndpoints);
 				arrayList_destroy(updatedEndpoints);
 			}
 
-			for (int i = 0; i < arrayList_size(currentEndpoints); i++) {
-				endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i);
-
-				status = discovery_addDiscoveredEndpoint(poller->discovery, endpoint);
-			}
 		}
 
 		hashMapIterator_destroy(iterator);
 
 		status = celixThreadMutex_unlock(&poller->pollerLock);
 		if (status != CELIX_SUCCESS) {
-			fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "ENDPOINT_POLLER: failed to release lock; retrying...");
+			logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to release lock; retrying...");
 		}
     }
 
@@ -268,7 +293,7 @@ static size_t endpointDiscoveryPoller_wr
 
     mem->memory = realloc(mem->memory, mem->size + realsize + 1);
     if(mem->memory == NULL) {
-    	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "ENDPOINT_POLLER: not enough memory (realloc returned NULL)!");
+    	printf("ENDPOINT_POLLER: not enough memory (realloc returned NULL)!");
         return 0;
     }
 
@@ -305,7 +330,7 @@ static celix_status_t endpointDiscoveryP
     if (res == CURLE_OK) {
         endpoint_descriptor_reader_pt reader = NULL;
 
-    	status = endpointDescriptorReader_create(&reader);
+    	status = endpointDescriptorReader_create(poller, &reader);
     	if (status == CELIX_SUCCESS) {
 			status = endpointDescriptorReader_parseDocument(reader, chunk.memory, updatedEndpoints);
     	}
@@ -314,7 +339,7 @@ static celix_status_t endpointDiscoveryP
 			endpointDescriptorReader_destroy(reader);
     	}
     } else {
-    	fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "ENDPOINT_POLLER: unable to read endpoints, reason: %s", curl_easy_strerror(res));
+    	logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_ERROR, "ENDPOINT_POLLER: unable to read endpoints, reason: %s", curl_easy_strerror(res));
     }
 
     // clean up endpoints file

Modified: celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_server.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_server.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_server.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery/private/src/endpoint_discovery_server.c Mon Jan 19 12:26:54 2015
@@ -32,7 +32,8 @@
 #include "civetweb.h"
 #include "celix_errno.h"
 #include "utils.h"
-#include "celix_log.h"
+#include "log_helper.h"
+#include "log_service.h"
 #include "discovery.h"
 #include "discovery_impl.h"
 
@@ -53,6 +54,7 @@ static const char *response_headers =
   "\r\n";
 
 struct endpoint_discovery_server {
+	log_helper_pt* loghelper;
     hash_map_pt entries; // key = endpointId, value = endpoint_descriptor_pt
 
     celix_thread_mutex_t serverLock;
@@ -73,6 +75,7 @@ celix_status_t endpointDiscoveryServer_c
 
 	char *port = 0;
 	char *ip = NULL;
+	char *detectedIp = NULL;
 	char *path = NULL;
 
 	*server = malloc(sizeof(struct endpoint_discovery_server));
@@ -80,6 +83,8 @@ celix_status_t endpointDiscoveryServer_c
 		return CELIX_ENOMEM;
 	}
 
+	(*server)->loghelper = &discovery->loghelper;
+
 	(*server)->entries = hashMap_create(&utils_stringHash, NULL, &utils_stringEquals, NULL);
 	if (!(*server)->entries) {
 		return CELIX_ENOMEM;
@@ -95,24 +100,30 @@ celix_status_t endpointDiscoveryServer_c
 		char *interface = NULL;
 
 		bundleContext_getProperty(context, DISCOVERY_SERVER_INTERFACE, &interface);
-		if ((interface != NULL) && (endpointDiscoveryServer_getIpAdress(interface, &ip) != CELIX_SUCCESS)) {
-			fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "Could not retrieve IP adress for interface %s", interface);
+		if ((interface != NULL) && (endpointDiscoveryServer_getIpAdress(interface, &detectedIp) != CELIX_SUCCESS)) {
+			logHelper_log(*(*server)->loghelper, OSGI_LOGSERVICE_WARNING, "Could not retrieve IP adress for interface %s", interface);
 		}
 
-		if (ip == NULL) {
-			endpointDiscoveryServer_getIpAdress(NULL, &ip);
+		if (detectedIp == NULL) {
+			endpointDiscoveryServer_getIpAdress(NULL, &detectedIp);
 		}
+
+		ip = detectedIp;
 	}
 
 	if (ip != NULL) {
-		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Using %s for service annunciation", ip);
+		logHelper_log(*(*server)->loghelper, OSGI_LOGSERVICE_INFO, "Using %s for service annunciation", ip);
 		(*server)->ip = strdup(ip);
 	}
 	else {
-		fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "No IP address for service annunciation set. Using %s", DEFAULT_SERVER_IP);
+		logHelper_log(*(*server)->loghelper, OSGI_LOGSERVICE_WARNING, "No IP address for service annunciation set. Using %s", DEFAULT_SERVER_IP);
 		(*server)->ip = (char*) DEFAULT_SERVER_IP;
 	}
 
+	if (detectedIp != NULL) {
+		free(detectedIp);
+	}
+
 	bundleContext_getProperty(context, DISCOVERY_SERVER_PORT, &port);
 	if (port == NULL) {
 		port = DEFAULT_SERVER_PORT;
@@ -132,6 +143,7 @@ celix_status_t endpointDiscoveryServer_c
 	unsigned int port_counter = 0;
 
 	do {
+		char newPort[10];
 		const char *options[] = {
 			"listening_ports", port,
 			"num_threads", DEFAULT_SERVER_THREADS,
@@ -142,11 +154,10 @@ celix_status_t endpointDiscoveryServer_c
 
 		if ((*server)->ctx != NULL)
 		{
-			fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Starting discovery server on port %s...", port);
+			logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_INFO, "Starting discovery server on port %s...", port);
 		}
 		else {
 			errno = 0;
-			char newPort[10];
 	        char* endptr = port;
 	        int currentPort = strtol(port, &endptr, 10);
 
@@ -157,7 +168,7 @@ celix_status_t endpointDiscoveryServer_c
 	        port_counter++;
 			snprintf(&newPort[0], 10,  "%d", (currentPort+1));
 
-			fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "Error while starting discovery server on port %s - retrying on port %s...", port, newPort);
+			logHelper_log(discovery->loghelper, OSGI_LOGSERVICE_ERROR, "Error while starting discovery server on port %s - retrying on port %s...", port, newPort);
 			port = newPort;
 
 		}
@@ -218,7 +229,7 @@ celix_status_t endpointDiscoveryServer_a
 	char* endpointId = strdup(endpoint->id);
 	endpoint_description_pt cur_value = hashMap_get(server->entries, endpointId);
 	if (!cur_value) {
-		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "exposing new endpoint \"%s\"...", endpointId);
+		logHelper_log(*server->loghelper, OSGI_LOGSERVICE_INFO, "exposing new endpoint \"%s\"...", endpointId);
 
 		hashMap_put(server->entries, endpointId, endpoint);
 	}
@@ -243,7 +254,7 @@ celix_status_t endpointDiscoveryServer_r
 	if (entry) {
 		char* key = hashMapEntry_getKey(entry);
 
-		fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "removing endpoint \"%s\"...\n", key);
+		logHelper_log(*server->loghelper, OSGI_LOGSERVICE_INFO, "removing endpoint \"%s\"...\n", key);
 
 		hashMap_remove(server->entries, key);
 

Modified: celix/branches/celix_config_admin/remote_services/discovery_bonjour/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_bonjour/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_bonjour/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_bonjour/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-celix_subproject(RSA_BUNDLES_DISCOVERY_BONJOUR "Option to enable building the Discovery BONJOUR bundle" ON DEPS LAUNCHER topology_manager remote_service_admin)
+celix_subproject(RSA_BUNDLES_DISCOVERY_BONJOUR "Option to enable building the Discovery BONJOUR bundle" OFF DEPS LAUNCHER topology_manager remote_service_admin)
 if (RSA_BUNDLES_DISCOVERY_BONJOUR)
 	#TODO find_package(DNS-SD REQUIRED)
 

Modified: celix/branches/celix_config_admin/remote_services/discovery_configured/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_configured/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_configured/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_configured/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -27,6 +27,7 @@ include_directories("${PROJECT_SOURCE_DI
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery_configured/private/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 include_directories(private/include)
 
 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_rsa_discovery_configured")
@@ -43,6 +44,8 @@ bundle(discovery_configured SOURCES
 	${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_discovery_server.c
     ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/endpoint_description.c
     ${PROJECT_SOURCE_DIR}/remote_services/utils/private/src/civetweb.c
+    
+    ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
 )
     
 install_bundle(discovery_configured)

Modified: celix/branches/celix_config_admin/remote_services/discovery_configured/private/include/discovery_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_configured/private/include/discovery_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_configured/private/include/discovery_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_configured/private/include/discovery_impl.h Mon Jan 19 12:26:54 2015
@@ -36,6 +36,7 @@
 #include "endpoint_discovery_poller.h"
 #include "endpoint_discovery_server.h"
 
+#include "log_helper.h"
 
 #define DEFAULT_SERVER_IP 	"127.0.0.1"
 #define DEFAULT_SERVER_PORT "9999"
@@ -54,6 +55,8 @@ struct discovery {
 
 	endpoint_discovery_poller_pt poller;
 	endpoint_discovery_server_pt server;
+
+	log_helper_pt loghelper;
 };
 
 #endif /* DISCOVERY_IMPL_H_ */

Modified: celix/branches/celix_config_admin/remote_services/discovery_configured/private/src/discovery_impl.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_configured/private/src/discovery_impl.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_configured/private/src/discovery_impl.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_configured/private/src/discovery_impl.c Mon Jan 19 12:26:54 2015
@@ -40,7 +40,7 @@
 #include "service_reference.h"
 #include "service_registration.h"
 #include "remote_constants.h"
-#include "celix_log.h"
+#include "log_helper.h"
 
 #include "discovery.h"
 #include "discovery_impl.h"
@@ -54,18 +54,21 @@ celix_status_t discovery_create(bundle_c
 
 	*discovery = malloc(sizeof(struct discovery));
 	if (!*discovery) {
-		return CELIX_ENOMEM;
+		status = CELIX_ENOMEM;
 	}
+	else {
+		(*discovery)->context = context;
+		(*discovery)->poller = NULL;
+		(*discovery)->server = NULL;
 
-	(*discovery)->context = context;
-	(*discovery)->poller = NULL;
-	(*discovery)->server = NULL;
+		(*discovery)->listenerReferences = hashMap_create(serviceReference_hashCode, NULL, serviceReference_equals2, NULL);
+		(*discovery)->discoveredServices = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
 
-	(*discovery)->listenerReferences = hashMap_create(serviceReference_hashCode, NULL, serviceReference_equals2, NULL);
-	(*discovery)->discoveredServices = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
+		status = celixThreadMutex_create(&(*discovery)->listenerReferencesMutex, NULL);
+		status = celixThreadMutex_create(&(*discovery)->discoveredServicesMutex, NULL);
 
-	status = celixThreadMutex_create(&(*discovery)->listenerReferencesMutex, NULL);
-	status = celixThreadMutex_create(&(*discovery)->discoveredServicesMutex, NULL);
+		logHelper_create(context, &(*discovery)->loghelper);
+	}
 
 	return status;
 }
@@ -73,6 +76,8 @@ celix_status_t discovery_create(bundle_c
 celix_status_t discovery_start(discovery_pt discovery) {
     celix_status_t status = CELIX_SUCCESS;
 
+	logHelper_start(discovery->loghelper);
+
     status = endpointDiscoveryPoller_create(discovery, discovery->context, &discovery->poller);
     if (status != CELIX_SUCCESS) {
     	return CELIX_BUNDLE_EXCEPTION;
@@ -114,6 +119,8 @@ celix_status_t discovery_stop(discovery_
 
 	celixThreadMutex_unlock(&discovery->discoveredServicesMutex);
 
+	logHelper_stop(discovery->loghelper);
+
 	return status;
 }
 
@@ -142,6 +149,8 @@ celix_status_t discovery_destroy(discove
 
 	celixThreadMutex_destroy(&discovery->listenerReferencesMutex);
 
+	logHelper_destroy(&discovery->loghelper);
+
 	free(discovery);
 
 	return status;

Modified: celix/branches/celix_config_admin/remote_services/discovery_etcd/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_etcd/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_etcd/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_etcd/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(RSA_BUNDLES_DISCOVERY_ETCD "Option to enable building the Discovery (ETCD) bundle" ON DEPS LAUNCHER topology_manager remote_service_admin)
+celix_subproject(RSA_BUNDLES_DISCOVERY_ETCD "Option to enable building the Discovery (ETCD) bundle" OFF DEPS LAUNCHER topology_manager remote_service_admin)
 if (RSA_BUNDLES_DISCOVERY_ETCD)
 	find_package(CURL REQUIRED)
 	find_package(LibXml2 REQUIRED)
@@ -31,6 +31,7 @@ if (RSA_BUNDLES_DISCOVERY_ETCD)
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery_etcd/private/include")
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
+	include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 	include_directories("private/include")
 
 	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_rsa_discovery_etcd")
@@ -50,6 +51,8 @@ if (RSA_BUNDLES_DISCOVERY_ETCD)
 		${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_discovery_server.c
 	    ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/endpoint_description.c
 	    ${PROJECT_SOURCE_DIR}/remote_services/utils/private/src/civetweb.c
+	    
+	    ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
 	)
 
 	install_bundle(discovery_etcd)

Modified: celix/branches/celix_config_admin/remote_services/discovery_etcd/private/include/discovery_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_etcd/private/include/discovery_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_etcd/private/include/discovery_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_etcd/private/include/discovery_impl.h Mon Jan 19 12:26:54 2015
@@ -37,6 +37,7 @@
 #include "endpoint_discovery_server.h"
 #include "etcd_watcher.h"
 
+#include "log_helper.h"
 
 #define DEFAULT_SERVER_IP 	"127.0.0.1"
 #define DEFAULT_SERVER_PORT "9999"
@@ -60,6 +61,8 @@ struct discovery {
 	etcd_watcher_pt watcher;
 	endpoint_discovery_poller_pt poller;
 	endpoint_discovery_server_pt server;
+
+	log_helper_pt loghelper;
 };
 
 #endif /* DISCOVERY_H_ */

Modified: celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd.c Mon Jan 19 12:26:54 2015
@@ -318,8 +318,10 @@ bool etcd_watch(char* key, int index, ch
 		if ((js_prevValue != NULL) && (json_is_string(js_prevValue))) {
 			strncpy(prevValue, json_string_value(js_prevValue), MAX_VALUE_LENGTH);
 		}
-		if ((js_value != NULL) && (js_action != NULL) && (json_is_string(js_value)) && (json_is_string(js_action))) {
+		if ((js_value != NULL) && (json_is_string(js_value))) {
 			strncpy(value, json_string_value(js_value), MAX_VALUE_LENGTH);
+		}
+		if ((js_action != NULL) && (json_is_string(js_action))) {
 			strncpy(action, json_string_value(js_action), MAX_ACTION_LENGTH);
 
 			retVal = true;

Modified: celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd_watcher.c
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd_watcher.c?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd_watcher.c (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_etcd/private/src/etcd_watcher.c Mon Jan 19 12:26:54 2015
@@ -27,7 +27,8 @@
 #include <stdbool.h>
 #include <stdlib.h>
 
-#include "celix_log.h"
+#include "log_helper.h"
+#include "log_service.h"
 #include "constants.h"
 #include "discovery.h"
 #include "discovery_impl.h"
@@ -39,6 +40,7 @@
 
 struct etcd_watcher {
     discovery_pt discovery;
+    log_helper_pt* loghelper;
 
 	celix_thread_mutex_t watcherLock;
 	celix_thread_t watcherThread;
@@ -188,7 +190,7 @@ static celix_status_t etcdWatcher_addOwn
 		etcd_set(localNodePath, endpoints, ttl, false);
 	}
 	else if (etcd_set(localNodePath, endpoints, ttl, true) == false)  {
-        fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "Cannot register local discovery");
+		logHelper_log(*watcher->loghelper, OSGI_LOGSERVICE_WARNING, "Cannot register local discovery");
     }
     else {
         status = CELIX_SUCCESS;
@@ -218,18 +220,19 @@ static void* etcdWatcher_run(void* data)
 		char preValue[MAX_VALUE_LENGTH];
 		char action[MAX_ACTION_LENGTH];
 
-
-		if (etcd_watch(rootPath, 0, &action[0], &preValue[0], &value[0]) == true) {
-
+		if (etcd_watch(rootPath, highestModified+1, &action[0], &preValue[0], &value[0]) == true) {
 			if (strcmp(action, "set") == 0) {
 				endpointDiscoveryPoller_addDiscoveryEndpoint(poller, strdup(&value[0]));
 			} else if (strcmp(action, "delete") == 0) {
 				endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, &preValue[0]);
+			} else if (strcmp(action, "expire") == 0) {
+				endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, &preValue[0]);
 			} else if (strcmp(action, "update") == 0) {
 				// TODO
 			} else {
-				fw_log(logger, OSGI_FRAMEWORK_LOG_INFO, "Unexpected action: %s", action);
+				logHelper_log(*watcher->loghelper, OSGI_LOGSERVICE_INFO, "Unexpected action: %s", action);
 			}
+			highestModified++;
 		}
 
 		// update own framework uuid
@@ -259,6 +262,7 @@ celix_status_t etcdWatcher_create(discov
 		return CELIX_BUNDLE_EXCEPTION;
 	}
 
+
 	(*watcher) = calloc(1, sizeof(struct etcd_watcher));
 	if (!watcher) {
 		return CELIX_ENOMEM;
@@ -266,6 +270,7 @@ celix_status_t etcdWatcher_create(discov
 	else
 	{
 		(*watcher)->discovery = discovery;
+		(*watcher)->loghelper = &discovery->loghelper;
 	}
 
 	if ((bundleContext_getProperty(context, CFG_ETCD_SERVER_IP, &etcd_server) != CELIX_SUCCESS) || !etcd_server) {
@@ -290,7 +295,7 @@ celix_status_t etcdWatcher_create(discov
 		return CELIX_BUNDLE_EXCEPTION;
 	}
 
-	etcdWatcher_addOwnFramework((*watcher));
+	etcdWatcher_addOwnFramework(*watcher);
 
 	if ((status = celixThreadMutex_create(&(*watcher)->watcherLock, NULL)) != CELIX_SUCCESS) {
 		return status;
@@ -322,16 +327,15 @@ celix_status_t etcdWatcher_destroy(etcd_
 	celixThread_join(watcher->watcherThread, NULL);
 
 	// register own framework
-	if ((status = etcdWatcher_getLocalNodePath(
-			watcher->discovery->context, &localNodePath[0])) != CELIX_SUCCESS) {
-		return status;
-	}
+	status = etcdWatcher_getLocalNodePath(watcher->discovery->context, &localNodePath[0]);
 
-	if (etcd_del(localNodePath) == false)
+	if (status != CELIX_SUCCESS || etcd_del(localNodePath) == false)
 	{
-		fw_log(logger, OSGI_FRAMEWORK_LOG_WARNING, "Cannot remove local discovery registration.");
+		logHelper_log(*watcher->loghelper, OSGI_LOGSERVICE_WARNING, "Cannot remove local discovery registration.");
 	}
 
+	watcher->loghelper = NULL;
+
 	free(watcher);
 
 	return status;

Modified: celix/branches/celix_config_admin/remote_services/discovery_shm/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_shm/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_shm/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_shm/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(RSA_BUNDLES_DISCOVERY_SHM "Option to enable building the Discovery (SHM) bundle" ON DEPS LAUNCHER topology_manager remote_service_admin)
+celix_subproject(RSA_BUNDLES_DISCOVERY_SHM "Option to enable building the Discovery (SHM) bundle" OFF DEPS LAUNCHER topology_manager remote_service_admin)
 if (RSA_BUNDLES_DISCOVERY_SHM)
 	include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/public/include")

Modified: celix/branches/celix_config_admin/remote_services/discovery_slp/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/discovery_slp/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/discovery_slp/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/discovery_slp/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(RSA_BUNDLES_DISCOVERY_SLP "Option to enable building the Discovery SLP bundle" ON DEPS LAUNCHER topology_manager remote_service_admin)
+celix_subproject(RSA_BUNDLES_DISCOVERY_SLP "Option to enable building the Discovery SLP bundle" OFF DEPS LAUNCHER topology_manager remote_service_admin)
 if (RSA_BUNDLES_DISCOVERY_SLP)
 	find_package(Slp REQUIRED)
 

Modified: celix/branches/celix_config_admin/remote_services/remote_service_admin/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/remote_service_admin/CMakeLists.txt?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/remote_service_admin/CMakeLists.txt (original)
+++ celix/branches/celix_config_admin/remote_services/remote_service_admin/CMakeLists.txt Mon Jan 19 12:26:54 2015
@@ -33,6 +33,13 @@ install (FILES
     COMPONENT 
         remote_service_admin
 )
+install (FILES
+        private/src/remote_proxy_factory_impl.c
+    DESTINATION
+        share/celix/remote_service_admin
+    COMPONENT
+        remote_service_admin
+)
 install (FILES 
         ${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include/endpoint_listener.h
     DESTINATION 

Modified: celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/export_registration_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/export_registration_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/export_registration_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/export_registration_impl.h Mon Jan 19 12:26:54 2015
@@ -30,13 +30,14 @@
 #include "remote_service_admin.h"
 #include "remote_endpoint.h"
 #include "service_tracker.h"
+#include "log_helper.h"
 
 struct export_registration {
-	apr_pool_t *pool;
 	bundle_context_pt context;
 	remote_service_admin_pt rsa;
 	endpoint_description_pt endpointDescription;
 	service_reference_pt reference;
+	log_helper_pt loghelper;
 
 	service_tracker_pt tracker;
 	service_tracker_pt endpointTracker;
@@ -49,7 +50,8 @@ struct export_registration {
 	bool closed;
 };
 
-celix_status_t exportRegistration_create(apr_pool_t *pool, service_reference_pt reference, endpoint_description_pt endpoint, remote_service_admin_pt rsa, bundle_context_pt context, export_registration_pt *registration);
+celix_status_t exportRegistration_create(log_helper_pt helper, service_reference_pt reference, endpoint_description_pt endpoint, remote_service_admin_pt rsa, bundle_context_pt context, export_registration_pt *registration);
+celix_status_t exportRegistration_destroy(export_registration_pt *registration);
 celix_status_t exportRegistration_open(export_registration_pt registration);
 celix_status_t exportRegistration_close(export_registration_pt registration);
 celix_status_t exportRegistration_getException(export_registration_pt registration);

Modified: celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/import_registration_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/import_registration_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/import_registration_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/import_registration_impl.h Mon Jan 19 12:26:54 2015
@@ -30,9 +30,9 @@
 #include "remote_service_admin.h"
 #include "remote_proxy.h"
 #include "service_tracker.h"
+#include "log_helper.h"
 
 struct import_registration {
-	apr_pool_t *pool;
 	bundle_context_pt context;
 	endpoint_description_pt endpointDescription;
 
@@ -49,8 +49,8 @@ struct import_registration {
 
 struct import_registration_factory
 {
-	apr_pool_t *pool;
 	char* serviceName;
+	log_helper_pt loghelper;
 	remote_proxy_factory_service_pt trackedFactory;
 	service_tracker_pt proxyFactoryTracker;
 	bundle_context_pt context;
@@ -59,7 +59,7 @@ struct import_registration_factory
 };
 
 
-celix_status_t importRegistration_create(apr_pool_t *pool, endpoint_description_pt endpoint, remote_service_admin_pt rsa, sendToHandle callback, bundle_context_pt context, import_registration_pt *registration);
+celix_status_t importRegistration_create(endpoint_description_pt endpoint, remote_service_admin_pt rsa, sendToHandle callback, bundle_context_pt context, import_registration_pt *registration);
 celix_status_t importRegistration_destroy(import_registration_pt registration);
 
 celix_status_t importRegistration_setEndpointDescription(import_registration_pt registration, endpoint_description_pt endpointDescription);
@@ -75,7 +75,7 @@ celix_status_t importRegistration_create
 celix_status_t importRegistrationFactory_destroy(import_registration_factory_pt* registration_factory);
 //celix_status_t importRegistrationFactory_open(import_registration_factory_pt registration_factory);
 celix_status_t importRegistrationFactory_close(import_registration_factory_pt registration_factory);
-celix_status_t importRegistrationFactory_install(apr_pool_t *pool, char* serviceName, bundle_context_pt context, import_registration_factory_pt *registration_factory);
+celix_status_t importRegistrationFactory_install(log_helper_pt helper, char* serviceName, bundle_context_pt context, import_registration_factory_pt *registration_factory);
 
 
 

Modified: celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h Mon Jan 19 12:26:54 2015
@@ -42,8 +42,8 @@ struct import_reference {
 	service_reference_pt reference;
 };
 
-celix_status_t remoteServiceAdmin_create(apr_pool_t *pool, bundle_context_pt context, remote_service_admin_pt *admin);
-celix_status_t remoteServiceAdmin_destroy(remote_service_admin_pt admin);
+celix_status_t remoteServiceAdmin_create(bundle_context_pt context, remote_service_admin_pt *admin);
+celix_status_t remoteServiceAdmin_destroy(remote_service_admin_pt *admin);
 
 celix_status_t remoteServiceAdmin_send(remote_service_admin_pt rsa, endpoint_description_pt endpointDescription, char *methodSignature, char **reply, int* replyStatus);
 
@@ -61,4 +61,6 @@ celix_status_t exportReference_getExport
 celix_status_t importReference_getImportedEndpoint(import_reference_pt reference);
 celix_status_t importReference_getImportedService(import_reference_pt reference);
 
+celix_status_t remoteServiceAdmin_destroyEndpointDescription(endpoint_description_pt *description);
+
 #endif /* REMOTE_SERVICE_ADMIN_IMPL_H_ */

Modified: celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h (original)
+++ celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_endpoint_impl.h Mon Jan 19 12:26:54 2015
@@ -28,10 +28,11 @@
 #define REMOTE_ENDPOINT_IMPL_H_
 
 #include "remote_endpoint.h"
+#include "celix_threads.h"
 
 struct remote_endpoint {
+	celix_thread_mutex_t serviceLock;
 	void *service;
-//	apr_pool_t* pool;
 };
 
 #endif /* REMOTE_ENDPOINT_IMPL_H_ */

Modified: celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_proxy.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_proxy.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_proxy.h (original)
+++ celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_proxy.h Mon Jan 19 12:26:54 2015
@@ -32,20 +32,44 @@
 
 #define OSGI_RSA_REMOTE_PROXY_FACTORY 	"remote_proxy_factory"
 
-typedef celix_status_t (*sendToHandle)(void *handler, endpoint_description_pt endpointDescription, char *request, char **reply, int* replyStatus);
+typedef celix_status_t (*sendToHandle)(remote_service_admin_pt remote_service_admin_ptr, endpoint_description_pt endpointDescription, char *request, char **reply, int* replyStatus);
+typedef celix_status_t (*createProxyService)(void *handle, endpoint_description_pt endpointDescription, remote_service_admin_pt rsa, sendToHandle sendToCallback, properties_pt properties, void **service);
+typedef celix_status_t (*destroyProxyService)(void *handle, void *service);
 
-typedef struct remote_proxy_service *remote_proxy_service_pt;
+typedef struct remote_proxy_factory *remote_proxy_factory_pt;
+typedef struct remote_proxy_factory_service *remote_proxy_factory_service_pt;
+
+struct remote_proxy_factory {
+	bundle_context_pt context_ptr;
+	char *service;
+
+	remote_proxy_factory_service_pt remote_proxy_factory_service_ptr;
+	properties_pt properties;
+	service_registration_pt registration;
 
-struct remote_proxy_factory_service {
-	void* context;
-	void* pool;
-	hash_map_pt proxy_registrations;
 	hash_map_pt proxy_instances;
-	celix_status_t (*registerProxyService)(void* proxyFactoryService, endpoint_description_pt endpoint, void* handler, sendToHandle callback);
-	celix_status_t (*unregisterProxyService)(void* proxyFactoryService, endpoint_description_pt endpoint);
+
+	void *handle;
+
+	createProxyService create_proxy_service_ptr;
+	destroyProxyService destroy_proxy_service_ptr;
 };
 
-typedef struct remote_proxy_factory_service *remote_proxy_factory_service_pt;
+struct remote_proxy_factory_service {
+	remote_proxy_factory_pt factory;
+	celix_status_t (*registerProxyService)(remote_proxy_factory_pt proxyFactoryService, endpoint_description_pt endpoint, remote_service_admin_pt remote_service_admin_ptr, sendToHandle callback);
+	celix_status_t (*unregisterProxyService)(remote_proxy_factory_pt proxyFactoryService, endpoint_description_pt endpoint);
+};
+
+celix_status_t remoteProxyFactory_create(bundle_context_pt context, char *service, void *handle,
+		createProxyService create, destroyProxyService destroy,
+		remote_proxy_factory_pt *remote_proxy_factory_ptr);
+celix_status_t remoteProxyFactory_destroy(remote_proxy_factory_pt *remote_proxy_factory_ptr);
+
+celix_status_t remoteProxyFactory_register(remote_proxy_factory_pt remote_proxy_factory_ptr);
+celix_status_t remoteProxyFactory_unregister(remote_proxy_factory_pt remote_proxy_factory_ptr);
+
+
 
 
 #endif /* REMOTE_PROXY_H_ */

Modified: celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_service_admin.h
URL: http://svn.apache.org/viewvc/celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_service_admin.h?rev=1652984&r1=1652983&r2=1652984&view=diff
==============================================================================
--- celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_service_admin.h (original)
+++ celix/branches/celix_config_admin/remote_services/remote_service_admin/public/include/remote_service_admin.h Mon Jan 19 12:26:54 2015
@@ -42,6 +42,7 @@ typedef struct remote_service_admin *rem
 struct remote_service_admin_service {
 	remote_service_admin_pt admin;
 	celix_status_t (*exportService)(remote_service_admin_pt admin, char *serviceId, properties_pt properties, array_list_pt *registrations);
+	celix_status_t (*removeExportedService)(export_registration_pt registration);
 	celix_status_t (*getExportedServices)(remote_service_admin_pt admin, array_list_pt *services);
 	celix_status_t (*getImportedEndpoints)(remote_service_admin_pt admin, array_list_pt *services);
 	celix_status_t (*importService)(remote_service_admin_pt admin, endpoint_description_pt endpoint, import_registration_pt *registration);
@@ -52,6 +53,8 @@ struct remote_service_admin_service {
 	celix_status_t (*exportRegistration_close)(export_registration_pt registration);
 	celix_status_t (*exportRegistration_getException)(export_registration_pt registration);
 	celix_status_t (*exportRegistration_getExportReference)(export_registration_pt registration, export_reference_pt *reference);
+	celix_status_t (*exportRegistration_freeExportReference)(export_reference_pt *reference);
+	celix_status_t (*exportRegistration_getEndpointDescription)(export_registration_pt registration, endpoint_description_pt endpointDescription);
 
 	celix_status_t (*importReference_getImportedEndpoint)(import_reference_pt reference);
 	celix_status_t (*importReference_getImportedService)(import_reference_pt reference);



Mime
View raw message