celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject celix git commit: CELIX-241: corrected remote-interface, added define
Date Sat, 20 Jun 2015 09:10:56 GMT
Repository: celix
Updated Branches:
  refs/heads/develop de21ef06f -> bdf8e0683


CELIX-241: corrected remote-interface, added define


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/bdf8e068
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/bdf8e068
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/bdf8e068

Branch: refs/heads/develop
Commit: bdf8e0683fdac996455ee5c60f1af109c3f7b526
Parents: de21ef0
Author: Bjoern Petri <bpetri@apache.org>
Authored: Sat Jun 20 11:10:27 2015 +0200
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Sat Jun 20 11:10:27 2015 +0200

----------------------------------------------------------------------
 .../private/src/calculator_endpoint_activator.c         |  8 ++++----
 .../private/src/calculator_proxy_activator.c            | 12 ++++++------
 .../private/src/calculator_activator.c                  | 12 ++++++------
 .../public/include/calculator_service.h                 |  2 ++
 4 files changed, 18 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/bdf8e068/remote_services/examples/calculator_endpoint2/private/src/calculator_endpoint_activator.c
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_endpoint2/private/src/calculator_endpoint_activator.c
b/remote_services/examples/calculator_endpoint2/private/src/calculator_endpoint_activator.c
index e76ebfa..ce2a5ea 100644
--- a/remote_services/examples/calculator_endpoint2/private/src/calculator_endpoint_activator.c
+++ b/remote_services/examples/calculator_endpoint2/private/src/calculator_endpoint_activator.c
@@ -63,12 +63,12 @@ celix_status_t bundleActivator_start(void * userData, bundle_context_pt
context)
 	endpointService = calloc(1, sizeof(*endpointService));
 	endpointService->endpoint = endpoint;
 	endpointService->handleRequest = calculatorEndpoint_handleRequest;
-	endpointService->setService = calculatorEndpoint_setService;
+        endpointService->setService = calculatorEndpoint_setService;
 
-	properties_pt props = properties_create();
-	properties_set(props, (char *) "remote.interface", (char *) CALCULATOR_SERVICE);
+        properties_pt props = properties_create();
+        properties_set(props, (char *) "remote.interface", (char *) CALCULATOR2_SERVICE);
 
-	bundleContext_registerService(context, OSGI_RSA_REMOTE_ENDPOINT, endpointService, props,
&activator->endpointServiceRegistration);
+        bundleContext_registerService(context, OSGI_RSA_REMOTE_ENDPOINT, endpointService,
props, &activator->endpointServiceRegistration);
 
 	activator->endpointService = endpointService;
 

http://git-wip-us.apache.org/repos/asf/celix/blob/bdf8e068/remote_services/examples/calculator_proxy2/private/src/calculator_proxy_activator.c
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_proxy2/private/src/calculator_proxy_activator.c
b/remote_services/examples/calculator_proxy2/private/src/calculator_proxy_activator.c
index 1f13d9c..6b9af72 100644
--- a/remote_services/examples/calculator_proxy2/private/src/calculator_proxy_activator.c
+++ b/remote_services/examples/calculator_proxy2/private/src/calculator_proxy_activator.c
@@ -58,13 +58,13 @@ celix_status_t bundleActivator_create(bundle_context_pt context, void
**userData
 }
 
 celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
+        celix_status_t status = CELIX_SUCCESS;
+        struct activator *activator = userData;
 
-	remoteProxyFactory_create(context, "org.apache.celix.calc.api.Calculator2", activator,
-			calculatorProxyFactory_create, calculatorProxyFactory_destroy,
-			&activator->factory_ptr);
-	remoteProxyFactory_register(activator->factory_ptr);
+        remoteProxyFactory_create(context, CALCULATOR2_SERVICE, activator,
+                        calculatorProxyFactory_create, calculatorProxyFactory_destroy,
+                        &activator->factory_ptr);
+        remoteProxyFactory_register(activator->factory_ptr);
 
 	return status;
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/bdf8e068/remote_services/examples/calculator_service/private/src/calculator_activator.c
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_service/private/src/calculator_activator.c
b/remote_services/examples/calculator_service/private/src/calculator_activator.c
index 22f72b5..13ea995 100644
--- a/remote_services/examples/calculator_service/private/src/calculator_activator.c
+++ b/remote_services/examples/calculator_service/private/src/calculator_activator.c
@@ -76,13 +76,13 @@ celix_status_t bundleActivator_start(void * userData, bundle_context_pt
context)
 			properties = properties_create();
 			properties_set(properties, (char *) OSGI_RSA_SERVICE_EXPORTED_INTERFACES, (char *) CALCULATOR_SERVICE);
 
-			bundleContext_registerService(context, (char *) CALCULATOR_SERVICE, activator->service,
properties, &activator->calculatorReg);
+                        bundleContext_registerService(context, (char *) CALCULATOR_SERVICE,
activator->service, properties, &activator->calculatorReg);
 
-			properties_pt properties2 = properties_create();
-            properties_set(properties2, (char *) OSGI_RSA_SERVICE_EXPORTED_INTERFACES, (char
*) "org.apache.celix.calc.api.Calculator2");
-			bundleContext_registerService(context, "org.apache.celix.calc.api.Calculator2", activator->service,
properties2, &activator->calculatorReg2);
-		}
-	}
+                        properties_pt properties2 = properties_create();
+            properties_set(properties2, (char *) OSGI_RSA_SERVICE_EXPORTED_INTERFACES, (char
*) CALCULATOR2_SERVICE);
+                        bundleContext_registerService(context, CALCULATOR2_SERVICE, activator->service,
properties2, &activator->calculatorReg2);
+                }
+        }
 
 	return status;
 }

http://git-wip-us.apache.org/repos/asf/celix/blob/bdf8e068/remote_services/examples/calculator_service/public/include/calculator_service.h
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_service/public/include/calculator_service.h
b/remote_services/examples/calculator_service/public/include/calculator_service.h
index 0a802d2..4416e38 100644
--- a/remote_services/examples/calculator_service/public/include/calculator_service.h
+++ b/remote_services/examples/calculator_service/public/include/calculator_service.h
@@ -28,6 +28,8 @@
 #define CALCULATOR_SERVICE_H_
 
 #define CALCULATOR_SERVICE "org.apache.celix.calc.api.Calculator"
+#define CALCULATOR2_SERVICE "org.apache.celix.calc.api.Calculator2"
+
 
 typedef struct calculator *calculator_pt;
 


Mime
View raw message