celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [1/8] celix git commit: CELIX-413: Moves the example to an additional dir, so that examples can also be build outside the celix project
Date Wed, 31 Jan 2018 20:05:25 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 22f2d656c -> a8b8410f1


http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/mongoose/root/index.html
----------------------------------------------------------------------
diff --git a/examples/mongoose/root/index.html b/examples/mongoose/root/index.html
deleted file mode 100644
index 255758f..0000000
--- a/examples/mongoose/root/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
--->
-<div align="center"><FONT 
-color="#ffffff" size="+1"><MARQUEE bgcolor="#000080" 
-direction="right" loop="20" width="75%"><STRONG>
-Serving content from within a bundle works!!1!11!!
-</STRONG></MARQUEE></FONT></DIV>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/service_hook_example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/service_hook_example/CMakeLists.txt b/examples/service_hook_example/CMakeLists.txt
deleted file mode 100644
index 9dbe7c0..0000000
--- a/examples/service_hook_example/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-add_celix_bundle(hook_example
-    BUNDLE_SYMBOLICNAME "Hook_Example"
-    VERSION "1.0.0"
-    SOURCES
-        src/activator
-)
-
-add_celix_container(hook_service_example
-    BUNDLES
-        Celix::shell
-        Celix::shell_tui
-        hook_example
-)

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/service_hook_example/src/activator.c
----------------------------------------------------------------------
diff --git a/examples/service_hook_example/src/activator.c b/examples/service_hook_example/src/activator.c
deleted file mode 100644
index f2d2a15..0000000
--- a/examples/service_hook_example/src/activator.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-/*
- * activator.c
- *
- *  \date       Aug 20, 2010
- *  \author    	<a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
- *  \copyright	Apache License, Version 2.0
- */
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#include "bundle_activator.h"
-#include "service_tracker_customizer.h"
-#include "service_tracker.h"
-#include "bundle_context.h"
-#include "listener_hook_service.h"
-#include "service_registry.h"
-
-struct userData {
-    service_registration_pt hookReg;
-    service_tracker_pt trackerBefore;
-    service_tracker_pt trackerAfter;
-    listener_hook_service_pt hookService; 
-};
-
-
-celix_status_t tracker_added(void*hook, array_list_pt listeners) {
-    for(unsigned int i = 0; i < arrayList_size(listeners); i++) {
-        listener_hook_info_pt info = arrayList_get(listeners, i);
-        printf("Added tracker for service %s\n", info->filter);
-    }
-
-    return CELIX_SUCCESS;
-}
-
-celix_status_t tracker_removed(void*hook, array_list_pt listeners) {
-    for(unsigned int i = 0; i < arrayList_size(listeners); i++) {
-        listener_hook_info_pt info = arrayList_get(listeners, i);
-        printf("Removed tracker for service %s\n", info->filter);
-    }
-
-    return CELIX_SUCCESS;
-}
-
-celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
-	celix_status_t status = CELIX_SUCCESS;
-    *userData = malloc(sizeof(struct userData));
-    if (*userData != NULL) {
-       
-	} else {
-		status = CELIX_START_ERROR;
-	}
-	return status;
-}
-
-celix_status_t bundleActivator_start(void * handle, bundle_context_pt context) {
-	printf("Starting hook example bundle\n");
-    struct userData *userData = (struct userData*)handle;   
-    
-    userData->trackerBefore = 0;
-    serviceTracker_create(context, "MY_SERVICE_BEFORE_REGISTERING_HOOK", NULL, &userData->trackerBefore);
-    serviceTracker_open(userData->trackerBefore);
-    
-    listener_hook_service_pt hookService = calloc(1, sizeof(*hookService));
-    hookService->handle = userData;
-    hookService->added = tracker_added;
-    hookService->removed = tracker_removed;
-
-    userData->hookService = hookService;
-    userData->hookReg = NULL;
-
-    printf("Registering hook service\n");
-    bundleContext_registerService(context, OSGI_FRAMEWORK_LISTENER_HOOK_SERVICE_NAME, hookService, NULL, &userData->hookReg);
-
-    printf("Unregistering hook service\n");
-    serviceRegistration_unregister(userData->hookReg);
-
-    printf("Re-Registering hook service\n");
-    userData->hookReg = NULL;
-    bundleContext_registerService(context, OSGI_FRAMEWORK_LISTENER_HOOK_SERVICE_NAME, hookService, NULL, &userData->hookReg);
-
-    userData->trackerAfter = 0;
-    serviceTracker_create(context, "MY_SERVICE_AFTER_REGISTERING_HOOK", NULL, &userData->trackerAfter);
-    serviceTracker_open(userData->trackerAfter);
-  
-    sleep(1);
-    printf("Closing tracker\n");
-    serviceTracker_close(userData->trackerAfter);
-    printf("Reopening tracker\n");
-    serviceTracker_open(userData->trackerAfter);
-    
-    sleep(1);
-    printf("Closing tracker\n");
-    serviceTracker_close(userData->trackerAfter);
-    printf("Reopening tracker\n");
-    serviceTracker_open(userData->trackerAfter);
-
-	return CELIX_SUCCESS;
-}
-
-celix_status_t bundleActivator_stop(void * handle, bundle_context_pt context) {
-	printf("Stopping hook example bundle\n");
-    struct userData *userData = (struct userData*)handle;   
-
-    serviceTracker_close(userData->trackerAfter);
-    serviceTracker_close(userData->trackerBefore);
-    serviceTracker_destroy(userData->trackerAfter);
-    serviceTracker_destroy(userData->trackerBefore);
-
-    serviceRegistration_unregister(userData->hookReg);
-    free(userData->hookService);
-
-	return CELIX_SUCCESS;
-}
-
-celix_status_t bundleActivator_destroy(void * handle, bundle_context_pt context) {
-    free(handle);
-	return CELIX_SUCCESS;
-}

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_c/CMakeLists.txt b/examples/services_example_c/CMakeLists.txt
deleted file mode 100644
index 65760b7..0000000
--- a/examples/services_example_c/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-if (BUILD_DEPENDENCY_MANAGER)
-
-    include_directories(
-            ${PROJECT_SOURCE_DIR}/dependency_manager/public/include
-            ${PROJECT_SOURCE_DIR}/utils/public/include
-            api
-    )
-
-    add_subdirectory(foo1)
-    add_subdirectory(foo2)
-    add_subdirectory(bar)
-
-    add_celix_container(services_example_c
-        GROUP services_example
-        COPY
-        BUNDLES
-            Celix::shell
-            Celix::shell_tui
-            dm_shell
-            bar
-            foo1
-            foo2
-        PROPERTIES
-            example=value
-    )
-
-endif ()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/api/example.h
----------------------------------------------------------------------
diff --git a/examples/services_example_c/api/example.h b/examples/services_example_c/api/example.h
deleted file mode 100644
index b0e0166..0000000
--- a/examples/services_example_c/api/example.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-#ifndef EXAMPLE_H_
-#define EXAMPLE_H_
-
-#define EXAMPLE_NAME 			"org.example"
-#define EXAMPLE_VERSION 		"1.0.0"
-#define EXAMPLE_CONSUMER_RANGE   "[1.0.0,2.0.0)"
-
-
-struct example_struct {
-	void *handle;
-	int (*method)(void *handle, int arg1, double arg2, double *result);
-} ;
-
-typedef struct example_struct example_t;
-
-#endif /* EXAMPLE_H_ */

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/bar/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_c/bar/CMakeLists.txt b/examples/services_example_c/bar/CMakeLists.txt
deleted file mode 100644
index 7df3051..0000000
--- a/examples/services_example_c/bar/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-include_directories(
-        private/include
-)
-
-add_celix_bundle(bar
-    SYMBOLIC_NAME bar
-    VERSION 1.0.0
-    SOURCES
-        private/src/bar_activator
-        private/src/bar.c
-)
-
-IF(APPLE)
-    target_link_libraries(bar PRIVATE Celix::framework  -Wl,-all_load dependency_manager_static)
-else()
-    if(ENABLE_ADDRESS_SANITIZER)
-        #With asan there can be undefined symbols
-        target_link_libraries(bar PRIVATE -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive Celix::framework )
-    else()
-        target_link_libraries(bar PRIVATE -Wl,--no-undefined -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive Celix::framework )
-    endif()
-endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/bar/private/include/bar.h
----------------------------------------------------------------------
diff --git a/examples/services_example_c/bar/private/include/bar.h b/examples/services_example_c/bar/private/include/bar.h
deleted file mode 100644
index 5e1da8b..0000000
--- a/examples/services_example_c/bar/private/include/bar.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#ifndef BAR_H_
-#define BAR_H_
-
-#include "example.h"
-
-typedef struct bar_struct bar_t;
-
-bar_t* bar_create(void);
-void bar_destroy(bar_t *self);
-
-int bar_method(bar_t *self, int arg1, double arg2, double *out);
-
-#endif //BAR_H_

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/bar/private/src/bar.c
----------------------------------------------------------------------
diff --git a/examples/services_example_c/bar/private/src/bar.c b/examples/services_example_c/bar/private/src/bar.c
deleted file mode 100644
index 5099201..0000000
--- a/examples/services_example_c/bar/private/src/bar.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#include "bar.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#include <stdbool.h>
-#include <pthread.h>
-#include <assert.h>
-
-
-#define OK 0
-#define ERROR 1
-
-struct bar_struct {
-    double prefValue;
-};
-
-bar_t* bar_create(void) {
-    bar_t *self = calloc(1, sizeof(*self));
-    if (self != NULL) {
-        self->prefValue = 42;
-    } else {
-        //log error
-    }
-    return self;
-};
-
-void bar_destroy(bar_t *self) {
-    free(self);
-}
-
-int bar_method(bar_t *self, int arg1, double arg2, double *out) {
-    double update = (self->prefValue + arg1) * arg2;
-    self->prefValue = update;
-    *out = update;
-    return OK;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/bar/private/src/bar_activator.c
----------------------------------------------------------------------
diff --git a/examples/services_example_c/bar/private/src/bar_activator.c b/examples/services_example_c/bar/private/src/bar_activator.c
deleted file mode 100644
index 0fa7889..0000000
--- a/examples/services_example_c/bar/private/src/bar_activator.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#include "dm_activator.h"
-#include "bar.h"
-
-#include <stdlib.h>
-
-struct activator {
-	bar_t *bar;
-	example_t exampleService;
-};
-
-celix_status_t dm_create(bundle_context_pt context, void **userData) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *act = calloc(1, sizeof(*act));
-	if (act != NULL) {
-
-		act->bar = bar_create();
-		act->exampleService.handle = act->bar;
-		act->exampleService.method = (void*) bar_method;
-
-		if (act->bar != NULL) {
-            *userData = act;
-        } else {
-            free(act);
-        }
-	} else {
-		status = CELIX_ENOMEM;
-	}
-	return status;
-}
-
-celix_status_t dm_init(void *userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-    celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-
-	dm_component_pt cmp = NULL;
-	component_create(context, "BAR", &cmp);
-	component_setImplementation(cmp, activator->bar);
-	component_addInterface(cmp, EXAMPLE_NAME, EXAMPLE_VERSION, &activator->exampleService, NULL);
-
-	dependencyManager_add(manager, cmp);
-    return status;
-}
-
-celix_status_t dm_destroy(void *userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-	bar_destroy(activator->bar);
-	free(activator);
-	return status;
-};
-

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo1/CMakeLists.txt b/examples/services_example_c/foo1/CMakeLists.txt
deleted file mode 100644
index d732c76..0000000
--- a/examples/services_example_c/foo1/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-include_directories(
-        private/include
-)
-
-add_celix_bundle(foo1
-    SYMBOLIC_NAME foo1
-    VERSION 1.0.0
-    SOURCES
-        private/src/foo1_activator
-        private/src/foo1.c
-)
-
-IF(APPLE)
-    target_link_libraries(foo1 PRIVATE -Wl,-all_load dependency_manager_static)
-else()
-    if(ENABLE_ADDRESS_SANITIZER)
-        #With asan there can be undefined symbols
-        target_link_libraries(foo1 PRIVATE -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive)
-    else()
-        target_link_libraries(foo1 PRIVATE -Wl,--no-undefined -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive)
-    endif()
-endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo1/private/include/foo1.h
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo1/private/include/foo1.h b/examples/services_example_c/foo1/private/include/foo1.h
deleted file mode 100644
index f556b44..0000000
--- a/examples/services_example_c/foo1/private/include/foo1.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#ifndef FOO1_H_
-#define FOO1_H_
-
-#include "example.h"
-
-typedef struct foo1_struct foo1_t;
-
-foo1_t* foo1_create(void);
-void foo1_destroy(foo1_t *self);
-
-int foo1_start(foo1_t *self);
-int foo1_stop(foo1_t *self);
-
-int foo1_setExample(foo1_t *self, const example_t *example);
-
-
-#endif //FOO1_H_

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo1/private/src/foo1.c
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo1/private/src/foo1.c b/examples/services_example_c/foo1/private/src/foo1.c
deleted file mode 100644
index 1f1f56f..0000000
--- a/examples/services_example_c/foo1/private/src/foo1.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#include "foo1.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#include <stdbool.h>
-#include <pthread.h>
-#include <assert.h>
-
-
-#define OK 0
-#define ERROR 1
-
-static void* foo1_thread(void*);
-
-struct foo1_struct {
-    const example_t *example;
-    pthread_mutex_t mutex; //protecting example
-    pthread_t thread;
-    bool running;
-};
-
-foo1_t* foo1_create(void) {
-    foo1_t *self = calloc(1, sizeof(*self));
-    if (self != NULL) {
-        pthread_mutex_init(&self->mutex, NULL);
-        self->running = false;
-    } else {
-        //log error
-    }
-    return self;
-};
-
-void foo1_destroy(foo1_t *self) {
-    assert(!self->running);
-    pthread_mutex_destroy(&self->mutex);
-    free(self);
-}
-
-int foo1_start(foo1_t *self) {
-    printf("starting foo1\n");
-    self->running = true;
-    pthread_create(&self->thread, NULL, foo1_thread, self);
-    return OK;
-}
-
-int foo1_stop(foo1_t *self) {
-    printf("stopping foo1\n");
-    self->running = false;
-    pthread_kill(self->thread, SIGUSR1);
-    pthread_join(self->thread, NULL);
-    return OK;
-}
-
-int foo1_setExample(foo1_t *self, const example_t *example) {
-    printf("Setting example %p for foo1\n", example);
-    pthread_mutex_lock(&self->mutex);
-    self->example = example; //NOTE could be NULL if req is not mandatory
-    pthread_mutex_unlock(&self->mutex);
-    return OK;
-}
-
-static void* foo1_thread(void *userdata) {
-    foo1_t *self = userdata;
-    double result;
-    int rc;
-    while (self->running) {
-        pthread_mutex_lock(&self->mutex);
-        if (self->example != NULL) {
-            rc = self->example->method(self->example->handle, 1, 2.0, &result);
-            if (rc == 0) {
-                printf("Result is %f\n", result);
-            } else {
-                printf("Error invoking method for example\n");
-            }
-        }
-        pthread_mutex_unlock(&self->mutex);
-        usleep(30000000);
-    }
-    return NULL;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo1/private/src/foo1_activator.c
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo1/private/src/foo1_activator.c b/examples/services_example_c/foo1/private/src/foo1_activator.c
deleted file mode 100644
index f94888b..0000000
--- a/examples/services_example_c/foo1/private/src/foo1_activator.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#include "dm_activator.h"
-#include "foo1.h"
-
-#include <stdlib.h>
-
-struct activator {
-	foo1_t *foo;
-};
-
-celix_status_t dm_create(bundle_context_pt context, void **userData) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *act = calloc(1, sizeof(*act));
-	if (act != NULL) {
-		act->foo = foo1_create();
-        if (act->foo != NULL) {
-            *userData = act;
-        } else {
-            free(act);
-        }
-	} else {
-		status = CELIX_ENOMEM;
-	}
-	return status;
-}
-
-celix_status_t dm_init(void *userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-    celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-
-	dm_component_pt cmp = NULL;
-	component_create(context, "FOO1", &cmp);
-	component_setImplementation(cmp, activator->foo);
-
-	/*
-	With the component_setCallbacksSafe we register callbacks when a component is started / stopped using a component
-	 with type foo1_t*
-	*/
-    component_setCallbacksSafe(cmp, foo1_t*, NULL, foo1_start, foo1_stop, NULL);
-
-	dm_service_dependency_pt dep = NULL;
-	serviceDependency_create(&dep);
-	serviceDependency_setRequired(dep, true);
-	serviceDependency_setService(dep, EXAMPLE_NAME, EXAMPLE_CONSUMER_RANGE, NULL);
-	serviceDependency_setStrategy(dep, DM_SERVICE_DEPENDENCY_STRATEGY_LOCKING);
-
-	/*
-	With the serviceDependency_setCallbacksSafe we register callbacks when a service
-	is added and about to be removed for the component type foo1_t* and service type example_t*.
-
-	We should protect the usage of the
- 	service because after removal of the service the memory location of that service
-	could be freed
-	*/
-    serviceDependency_setCallbacksSafe(dep, foo1_t*, const example_t*, foo1_setExample, NULL, NULL, NULL, NULL);
-	component_addServiceDependency(cmp, dep);
-
-	dependencyManager_add(manager, cmp);
-
-    return status;
-}
-
-celix_status_t dm_destroy(void *userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-	foo1_destroy(activator->foo);
-	free(activator);
-	return status;
-};
-

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo2/CMakeLists.txt b/examples/services_example_c/foo2/CMakeLists.txt
deleted file mode 100644
index adb8f64..0000000
--- a/examples/services_example_c/foo2/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-include_directories(
-        private/include
-)
-
-add_celix_bundle(foo2
-    SYMBOLIC_NAME foo2
-    VERSION 1.0.0
-    SOURCES
-        private/src/foo2_activator
-        private/src/foo2.c
-)
-
-IF(APPLE)
-    target_link_libraries(foo2 PRIVATE -Wl,-all_load dependency_manager_static)
-else()
-    if(ENABLE_ADDRESS_SANITIZER)
-        #With asan there can be undefined symbols
-        target_link_libraries(foo2 PRIVATE -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive)
-    else()
-        target_link_libraries(foo2 PRIVATE -Wl,--no-undefined -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive)
-    endif()
-endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo2/private/include/foo2.h
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo2/private/include/foo2.h b/examples/services_example_c/foo2/private/include/foo2.h
deleted file mode 100644
index 9f09276..0000000
--- a/examples/services_example_c/foo2/private/include/foo2.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#ifndef FOO2_H_
-#define FOO2_H_
-
-#include "example.h"
-
-typedef struct foo2_struct foo2_t;
-
-foo2_t* foo2_create(void);
-void foo2_destroy(foo2_t *self);
-
-int foo2_start(foo2_t *self);
-int foo2_stop(foo2_t *self);
-
-int foo2_addExample(foo2_t *self, const example_t *example);
-int foo2_removeExample(foo2_t *self, const example_t *example);
-
-#endif //FOO2_H_
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo2/private/src/foo2.c
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo2/private/src/foo2.c b/examples/services_example_c/foo2/private/src/foo2.c
deleted file mode 100644
index b98e20b..0000000
--- a/examples/services_example_c/foo2/private/src/foo2.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#include "foo2.h"
-
-#include "array_list.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#include <stdbool.h>
-#include <pthread.h>
-#include <assert.h>
-
-
-#define OK 0
-#define ERROR 1
-
-static void* foo2_thread(void*);
-
-struct foo2_struct {
-    array_list_pt examples;
-    pthread_t thread;
-    bool running;
-};
-
-foo2_t* foo2_create(void) {
-    foo2_t *self = calloc(1, sizeof(*self));
-    if (self != NULL) {
-        self->examples = NULL;
-        arrayList_create(&self->examples);
-        self->running = false;
-    } else {
-        //log error
-    }
-    return self;
-};
-
-void foo2_destroy(foo2_t *self) {
-    assert(!self->running);
-    arrayList_destroy(self->examples);
-    free(self);
-}
-
-int foo2_start(foo2_t *self) {
-    printf("starting foo2\n");
-    self->running = true;
-    pthread_create(&self->thread, NULL, foo2_thread, self);
-    return OK;
-}
-
-int foo2_stop(foo2_t *self) {
-    printf("stopping foo2\n");
-    self->running = false;
-    pthread_kill(self->thread, SIGUSR1);
-    pthread_join(self->thread, NULL);
-    return OK;
-}
-
-int foo2_addExample(foo2_t *self, const example_t *example) {
-    //NOTE foo2 is suspended -> thread is not running  -> safe to update
-    int status = OK;
-    printf("Adding example %p for foo2\n", example);
-    status = arrayList_add(self->examples, (void *)example);
-    return status;
-}
-
-int foo2_removeExample(foo2_t *self, const example_t *example) {
-    //NOTE foo2 is suspended -> thread is not running  -> safe to update
-    int status = OK;
-    printf("Removing example %p for foo2\n", example);
-    status = arrayList_removeElement(self->examples, (void*)example);
-    return status;
-}
-
-static void* foo2_thread(void *userdata) {
-    foo2_t *self = userdata;
-    double result;
-    int rc;
-    while (self->running) {
-        unsigned int size = arrayList_size(self->examples);
-        int i;
-        for (i = 0; i < size; i += 1) {
-            const example_t* example = arrayList_get(self->examples, i);
-            rc = example->method(example->handle, 1, 2.0, &result);
-            if (rc == 0) {
-                printf("Result is %f\n", result);
-            } else {
-                printf("Error invoking method for example\n");
-            }
-        }
-        usleep(15000000);
-    }
-    return NULL;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_c/foo2/private/src/foo2_activator.c
----------------------------------------------------------------------
diff --git a/examples/services_example_c/foo2/private/src/foo2_activator.c b/examples/services_example_c/foo2/private/src/foo2_activator.c
deleted file mode 100644
index 5c047da..0000000
--- a/examples/services_example_c/foo2/private/src/foo2_activator.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#include "dm_activator.h"
-#include "foo2.h"
-
-#include <stdlib.h>
-
-struct activator {
-	foo2_t *foo;
-};
-
-celix_status_t dm_create(bundle_context_pt context, void **userData) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *act = calloc(1, sizeof(*act));
-	if (act != NULL) {
-		act->foo = foo2_create();
-        if (act->foo != NULL) {
-            *userData = act;
-        } else {
-            free(act);
-        }
-	} else {
-		status = CELIX_ENOMEM;
-	}
-	return status;
-}
-
-celix_status_t dm_init(void *userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-    celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-
-	dm_component_pt cmp = NULL;
-	component_create(context, "FOO2", &cmp);
-	component_setImplementation(cmp, activator->foo);
-
-	/*
-	With the component_setCallbacksSafe we register callbacks when a component is started / stopped using a component
-	 with type foo1_t*
-	*/
-    component_setCallbacksSafe(cmp, foo2_t*, NULL, foo2_start, foo2_stop, NULL);
-
-	dm_service_dependency_pt dep = NULL;
-	serviceDependency_create(&dep);
-	serviceDependency_setRequired(dep, false);
-	serviceDependency_setService(dep, EXAMPLE_NAME, EXAMPLE_CONSUMER_RANGE, NULL);
-	serviceDependency_setStrategy(dep, DM_SERVICE_DEPENDENCY_STRATEGY_SUSPEND);
-
-	/*
-	With the serviceDependency_setCallbacksSafe we register callbacks when a service
-	is added and about to be removed for the component type foo1_t* and service type example_t*.
-
-	We should protect the usage of the
- 	service because after removal of the service the memory location of that service
-	could be freed
-	*/
-    serviceDependency_setCallbacksSafe(dep, foo2_t*, const example_t*, NULL, foo2_addExample, NULL, foo2_removeExample, NULL);
-	component_addServiceDependency(cmp, dep);
-
-	dependencyManager_add(manager, cmp);
-
-    return status;
-}
-
-celix_status_t dm_destroy(void *userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-	foo2_destroy(activator->foo);
-	free(activator);
-	return status;
-};
-

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/CMakeLists.txt b/examples/services_example_cxx/CMakeLists.txt
deleted file mode 100644
index ba13251..0000000
--- a/examples/services_example_cxx/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-if (BUILD_DEPENDENCY_MANAGER_CXX)
-    include_directories(
-            ${PROJECT_SOURCE_DIR}/dependency_manager/public/include
-            ${PROJECT_SOURCE_DIR}/dependency_manager_cxx/include
-            ${PROJECT_SOURCE_DIR}/utils/public/include
-            api
-    )
-
-    add_subdirectory(bar)
-    add_subdirectory(foo)
-    add_subdirectory(baz)
-
-    add_celix_container(services_example_cxx
-        GROUP services_example
-        COPY
-        BUNDLES
-            Celix::shell
-            Celix::shell_tui
-            dm_shell
-            bar_cxx
-            foo_cxx
-            baz_cxx
-        PROPERTIES
-            example=value
-    )
-
-endif ()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/api/IAnotherExample.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/api/IAnotherExample.h b/examples/services_example_cxx/api/IAnotherExample.h
deleted file mode 100644
index 0cd6c22..0000000
--- a/examples/services_example_cxx/api/IAnotherExample.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef IANOTHER_EXAMPLE_H
-#define IANOTHER_EXAMPLE_H
-
-#define IANOTHER_EXAMPLE_VERSION "1.0.0"
-#define IANOTHER_EXAMPLE_CONSUMER_RANGE "[1.0.0,2.0.0)"
-
-class IAnotherExample {
-protected:
-    IAnotherExample() = default;
-    virtual ~IAnotherExample() = default;
-public:
-    virtual double method(int arg1, double arg2) = 0;
-};
-
-#endif //IANOTHER_EXAMPLE_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/api/example.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/api/example.h b/examples/services_example_cxx/api/example.h
deleted file mode 100644
index 68ce0e3..0000000
--- a/examples/services_example_cxx/api/example.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements.  See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership.  The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the
- *"License"); you may not use this file except in compliance
- *with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *Unless required by applicable law or agreed to in writing,
- *software distributed under the License is distributed on an
- *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- *specific language governing permissions and limitations
- *under the License.
- */
-
-#ifndef EXAMPLE_H_
-#define EXAMPLE_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define EXAMPLE_NAME 			"org.example"
-#define EXAMPLE_VERSION 		"1.0.0"
-#define EXAMPLE_CONSUMER_RANGE   "[1.0.0,2.0.0)"
-
-
-struct example_struct {
-	void *handle;
-	int (*method)(void *handle, int arg1, double arg2, double *result);
-} ;
-
-typedef struct example_struct example_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* EXAMPLE_H_ */

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/bar/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/bar/CMakeLists.txt b/examples/services_example_cxx/bar/CMakeLists.txt
deleted file mode 100644
index c660ce6..0000000
--- a/examples/services_example_cxx/bar/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-include_directories(
-        private/include
-)
-
-add_celix_bundle(bar_cxx
-    SYMBOLIC_NAME Bar
-    VERSION 1.0.0
-    SOURCES
-        private/src/Bar.cc
-        private/src/BarActivator.cc
-)
-
-target_compile_options(bar_cxx PUBLIC -Wall -Wextra -Weffc++ -Werror)
-
-IF(APPLE)
-    target_link_libraries(bar_cxx PRIVATE -Wl,-all_load  dependency_manager_cxx_static)
-else()
-    if(ENABLE_ADDRESS_SANITIZER)
-        #With asan there can be undefined symbols
-        target_link_libraries(bar_cxx PRIVATE -Wl,--whole-archive  dependency_manager_cxx_static -Wl,--no-whole-archive)
-    else()
-        target_link_libraries(bar_cxx PRIVATE -Wl,--no-undefined -Wl,--whole-archive  dependency_manager_cxx_static -Wl,--no-whole-archive)
-    endif()
-endif()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/bar/private/include/Bar.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/bar/private/include/Bar.h b/examples/services_example_cxx/bar/private/include/Bar.h
deleted file mode 100644
index 799f8a9..0000000
--- a/examples/services_example_cxx/bar/private/include/Bar.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef BAR_H
-#define BAR_H
-
-#include "IAnotherExample.h"
-
-class Bar : public IAnotherExample {
-    const double seed = 42;
-public:
-    Bar() = default;
-    virtual ~Bar() = default;
-
-    void init();
-    void start();
-    void stop();
-    void deinit();
-
-    virtual double method(int arg1, double arg2) override; //implementation of IAnotherExample::method
-    int cMethod(int arg1, double arg2, double *out); //implementation of example_t->method;
-};
-
-#endif //BAR_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/bar/private/include/BarActivator.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/bar/private/include/BarActivator.h b/examples/services_example_cxx/bar/private/include/BarActivator.h
deleted file mode 100644
index 0c635a8..0000000
--- a/examples/services_example_cxx/bar/private/include/BarActivator.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef BAR_ACTIVATOR_H
-#define BAR_ACTIVATOR_H
-
-#include "celix/dm/DmActivator.h"
-#include "example.h"
-
-using namespace celix::dm;
-
-class BarActivator : public DmActivator {
-private:
-    example_t cExample {nullptr, nullptr};
-public:
-    BarActivator(DependencyManager& mng) : DmActivator(mng) {}
-    virtual void init() override;
-};
-
-#endif //BAR_ACTIVATOR_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/bar/private/src/Bar.cc
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/bar/private/src/Bar.cc b/examples/services_example_cxx/bar/private/src/Bar.cc
deleted file mode 100644
index 7490005..0000000
--- a/examples/services_example_cxx/bar/private/src/Bar.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "Bar.h"
-#include <iostream>
-
-void Bar::init() {
-    std::cout << "init Bar\n";
-}
-
-void Bar::start() {
-    std::cout << "start Bar\n";
-}
-
-void Bar::stop() {
-    std::cout << "stop Bar\n";
-}
-
-void Bar::deinit() {
-    std::cout << "deinit Bar\n";
-}
-
-double Bar::method(int arg1, double arg2) {
-    double update = (this->seed + arg1) * arg2;
-    return update;
-}
-
-int Bar::cMethod(int arg1, double arg2, double *out) {
-    double r = this->method(arg1, arg2);
-    *out = r;
-    return 0;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/bar/private/src/BarActivator.cc
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/bar/private/src/BarActivator.cc b/examples/services_example_cxx/bar/private/src/BarActivator.cc
deleted file mode 100644
index e4b8bec..0000000
--- a/examples/services_example_cxx/bar/private/src/BarActivator.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "Bar.h"
-#include "BarActivator.h"
-
-using namespace celix::dm;
-
-DmActivator* DmActivator::create(DependencyManager& mng) {
-    return new BarActivator(mng);
-}
-
-void BarActivator::init() {
-    auto bar = std::unique_ptr<Bar>{new Bar{}};
-
-    Properties props;
-    props["meta.info.key"] = "meta.info.value";
-
-    Properties cProps;
-    cProps["also.meta.info.key"] = "also.meta.info.value";
-
-    this->cExample.handle = bar.get();
-    this->cExample.method = [](void *handle, int arg1, double arg2, double *out) {
-        Bar* bar = static_cast<Bar*>(handle);
-        return bar->cMethod(arg1, arg2, out);
-    };
-
-    mng.createComponent(std::move(bar))  //using a pointer a instance. Also supported is lazy initialization (default constructor needed) or a rvalue reference (move)
-        .addInterface<IAnotherExample>(IANOTHER_EXAMPLE_VERSION, props)
-        .addCInterface(&this->cExample, EXAMPLE_NAME, EXAMPLE_VERSION, cProps)
-        .setCallbacks(&Bar::init, &Bar::start, &Bar::stop, &Bar::deinit);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/baz/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/baz/CMakeLists.txt b/examples/services_example_cxx/baz/CMakeLists.txt
deleted file mode 100644
index ce5bfd0..0000000
--- a/examples/services_example_cxx/baz/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-include_directories(
-        private/include
-)
-
-add_celix_bundle(baz_cxx
-    SYMBOLIC_NAME Baz
-    VERSION 1.0.0
-    SOURCES
-        private/src/Baz.cc
-        private/src/BazActivator.cc
-)
-
-target_compile_options(baz_cxx PUBLIC -Wall -Wextra -Weffc++ -Werror)
-
-IF(APPLE)
-    target_link_libraries(baz_cxx PRIVATE  -Wl,-all_load  dependency_manager_cxx_static)
-else()
-    if(ENABLE_ADDRESS_SANITIZER)
-        #With asan there can be undefined symbols
-        target_link_libraries(baz_cxx PRIVATE -Wl,--whole-archive  dependency_manager_cxx_static -Wl,--no-whole-archive)
-    else()
-        target_link_libraries(baz_cxx PRIVATE -Wl,--no-undefined -Wl,--whole-archive  dependency_manager_cxx_static -Wl,--no-whole-archive)
-    endif()
-endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/baz/private/include/Baz.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/baz/private/include/Baz.h b/examples/services_example_cxx/baz/private/include/Baz.h
deleted file mode 100644
index d881627..0000000
--- a/examples/services_example_cxx/baz/private/include/Baz.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef BAZ_H
-#define BAZ_H
-
-#include "example.h"
-#include "IAnotherExample.h"
-#include <thread>
-#include <list>
-#include <mutex>
-
-class Baz  {
-    std::list<IAnotherExample*> examples {};
-    std::mutex lock_for_examples {};
-
-    std::list<const example_t*> cExamples {};
-    std::mutex lock_for_cExamples {};
-
-    std::thread pollThread {};
-    bool running = false;
-public:
-    Baz() = default;
-    virtual ~Baz() = default;
-
-    void start();
-    void stop();
-
-    void addAnotherExample(IAnotherExample* e);
-    void removeAnotherExample(IAnotherExample* e);
-
-    void addExample(const example_t* e);
-    void removeExample(const example_t* e);
-
-    void poll();
-};
-
-#endif //BAZ_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/baz/private/include/BazActivator.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/baz/private/include/BazActivator.h b/examples/services_example_cxx/baz/private/include/BazActivator.h
deleted file mode 100644
index fe24918..0000000
--- a/examples/services_example_cxx/baz/private/include/BazActivator.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef BAZ_ACTIVATOR_H
-#define BAZ_ACTIVATOR_H
-
-#include "celix/dm/DmActivator.h"
-
-using namespace celix::dm;
-
-class BazActivator : public DmActivator {
-private:
-public:
-    BazActivator(DependencyManager& mng) : DmActivator(mng) {}
-    virtual void init() override;
-};
-
-#endif //BAZ_ACTIVATOR_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/baz/private/src/Baz.cc
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/baz/private/src/Baz.cc b/examples/services_example_cxx/baz/private/src/Baz.cc
deleted file mode 100644
index bf258fb..0000000
--- a/examples/services_example_cxx/baz/private/src/Baz.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "Baz.h"
-#include <iostream>
-
-void Baz::start() {
-    std::cout << "start Baz\n";
-    this->running = true;
-    pollThread = std::thread {&Baz::poll, this};
-}
-
-void Baz::stop() {
-    std::cout << "stop Baz\n";
-    this->running = false;
-    this->pollThread.join();
-}
-
-void Baz::addAnotherExample(IAnotherExample *e) {
-    std::lock_guard<std::mutex> lock(this->lock_for_examples);
-    this->examples.push_back(e);
-}
-
-void Baz::removeAnotherExample(IAnotherExample *e) {
-    std::lock_guard<std::mutex> lock(this->lock_for_examples);
-    this->examples.remove(e);
-}
-
-void Baz::addExample(const example_t *e) {
-    std::lock_guard<std::mutex> lock(this->lock_for_cExamples);
-    this->cExamples.push_back(e);
-}
-
-void Baz::removeExample(const example_t *e) {
-    std::lock_guard<std::mutex> lock(this->lock_for_cExamples);
-    this->cExamples.remove(e);
-}
-
-void Baz::poll() {
-    double r1 = 1.0;
-    double r2 = 1.0;
-    while (this->running) {
-        //c++ service required -> if component started always available
-
-        {
-            std::lock_guard<std::mutex> lock(this->lock_for_examples);
-            int index = 0;
-            for (IAnotherExample *e : this->examples) {
-                r1 = e->method(3, r1);
-                std::cout << "Result IAnotherExample " << index++ << " is " << r1 << "\n";
-            }
-        }
-
-
-        {
-            std::lock_guard<std::mutex> lock(this->lock_for_cExamples);
-            int index = 0;
-            for (const example_t *e : this->cExamples) {
-                double out;
-                e->method(e->handle, 4, r2, &out);
-                r2 = out;
-                std::cout << "Result example_t " << index++ << " is " << r2 << "\n";
-            }
-        }
-
-        std::this_thread::sleep_for(std::chrono::milliseconds(4000));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/baz/private/src/BazActivator.cc
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/baz/private/src/BazActivator.cc b/examples/services_example_cxx/baz/private/src/BazActivator.cc
deleted file mode 100644
index 3f17b5a..0000000
--- a/examples/services_example_cxx/baz/private/src/BazActivator.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "Baz.h"
-#include "BazActivator.h"
-
-using namespace celix::dm;
-
-DmActivator* DmActivator::create(DependencyManager& mng) {
-    return new BazActivator(mng);
-}
-
-void BazActivator::init() {
-
-    Component<Baz>& cmp = mng.createComponent<Baz>()
-        .setCallbacks(nullptr, &Baz::start, &Baz::stop, nullptr);
-
-    cmp.createServiceDependency<IAnotherExample>()
-            .setRequired(true)
-            .setStrategy(DependencyUpdateStrategy::locking)
-            .setVersionRange(IANOTHER_EXAMPLE_CONSUMER_RANGE)
-            .setCallbacks(&Baz::addAnotherExample, &Baz::removeAnotherExample);
-
-    cmp.createCServiceDependency<example_t>(EXAMPLE_NAME)
-            .setRequired(false)
-            .setStrategy(DependencyUpdateStrategy::locking)
-            .setVersionRange(EXAMPLE_CONSUMER_RANGE)
-            .setCallbacks(&Baz::addExample, &Baz::removeExample);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/foo/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/foo/CMakeLists.txt b/examples/services_example_cxx/foo/CMakeLists.txt
deleted file mode 100644
index ba2aa55..0000000
--- a/examples/services_example_cxx/foo/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-include_directories(
-        private/include
-)
-
-add_celix_bundle(foo_cxx
-    SYMBOLIC_NAME Foo
-    VERSION 1.0.0
-    SOURCES
-        private/src/Foo.cc
-        private/src/FooActivator.cc
-)
-
-target_compile_options(foo_cxx PUBLIC -Wall -Wextra -Weffc++ -Werror)
-
-IF(APPLE)
-    target_link_libraries(foo_cxx PRIVATE -Wl,-all_load  dependency_manager_cxx_static)
-else()
-    if(ENABLE_ADDRESS_SANITIZER)
-        #With asan there can be undefined symbols
-        target_link_libraries(foo_cxx PRIVATE -Wl,--whole-archive  dependency_manager_cxx_static -Wl,--no-whole-archive)
-    else()
-        target_link_libraries(foo_cxx PRIVATE -Wl,--no-undefined -Wl,--whole-archive  dependency_manager_cxx_static -Wl,--no-whole-archive)
-    endif()
-endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/foo/private/include/Foo.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/foo/private/include/Foo.h b/examples/services_example_cxx/foo/private/include/Foo.h
deleted file mode 100644
index 0035b77..0000000
--- a/examples/services_example_cxx/foo/private/include/Foo.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef FOO_H
-#define FOO_H
-
-#include "example.h"
-#include "IAnotherExample.h"
-#include <thread>
-
-class Foo  {
-    IAnotherExample* example {nullptr};
-    const example_t* cExample {nullptr};
-    std::thread pollThread {};
-    bool running = false;
-public:
-    Foo() = default;
-    virtual ~Foo() = default;
-
-    Foo(const Foo&) = delete;
-    Foo& operator=(const Foo&) = delete;
-
-    void start();
-    void stop();
-
-    void setAnotherExample(IAnotherExample* e);
-    void setExample(const example_t* e);
-
-    void poll();
-};
-
-#endif //FOO_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/foo/private/include/FooActivator.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/foo/private/include/FooActivator.h b/examples/services_example_cxx/foo/private/include/FooActivator.h
deleted file mode 100644
index 2917cbd..0000000
--- a/examples/services_example_cxx/foo/private/include/FooActivator.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef FOO_ACTIVATOR_H
-#define FOO_ACTIVATOR_H
-
-#include "celix/dm/DmActivator.h"
-
-using namespace celix::dm;
-
-class FooActivator : public DmActivator {
-private:
-public:
-    FooActivator(DependencyManager& mng) : DmActivator(mng) {}
-    virtual void init() override;
-};
-
-#endif //FOO_ACTIVATOR_H

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/foo/private/src/Foo.cc
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/foo/private/src/Foo.cc b/examples/services_example_cxx/foo/private/src/Foo.cc
deleted file mode 100644
index 241513c..0000000
--- a/examples/services_example_cxx/foo/private/src/Foo.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "Foo.h"
-#include <iostream>
-
-void Foo::start() {
-    std::cout << "start Foo\n";
-    this->running = true;
-    pollThread = std::thread {&Foo::poll, this};
-}
-
-void Foo::stop() {
-    std::cout << "stop Foo\n";
-    this->running = false;
-    this->pollThread.join();
-}
-
-void Foo::setAnotherExample(IAnotherExample *e) {
-    this->example = e;
-}
-
-void Foo::setExample(const example_t *e) {
-    this->cExample = e;
-}
-
-void Foo::poll() {
-    double r1 = 1.0;
-    double r2 = 1.0;
-    while (this->running) {
-        //c++ service required -> if component started always available
-        r1 = this->example->method(3, r1);
-        std::cout << "Result IAnotherExample is " << r1 << "\n";
-
-        //c service is optional, can be nullptr
-        if (this->cExample != nullptr) {
-            double out;
-            this->cExample->method(this->cExample->handle, 4, r2, &out);
-            r2 = out;
-            std::cout << "Result example_t is " << r2 << "\n";
-        }
-        std::this_thread::sleep_for(std::chrono::milliseconds(5000));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/examples/services_example_cxx/foo/private/src/FooActivator.cc
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/foo/private/src/FooActivator.cc b/examples/services_example_cxx/foo/private/src/FooActivator.cc
deleted file mode 100644
index fba10ce..0000000
--- a/examples/services_example_cxx/foo/private/src/FooActivator.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "Foo.h"
-#include "FooActivator.h"
-
-using namespace celix::dm;
-
-DmActivator* DmActivator::create(DependencyManager& mng) {
-    return new FooActivator(mng);
-}
-
-void FooActivator::init() {
-
-    Component<Foo>& cmp = mng.createComponent<Foo>()
-        .setCallbacks(nullptr, &Foo::start, &Foo::stop, nullptr);
-
-    cmp.createServiceDependency<IAnotherExample>()
-            .setRequired(true)
-            .setVersionRange(IANOTHER_EXAMPLE_CONSUMER_RANGE)
-            .setCallbacks(&Foo::setAnotherExample);
-
-    cmp.createCServiceDependency<example_t>(EXAMPLE_NAME)
-            .setRequired(false)
-            .setVersionRange(EXAMPLE_CONSUMER_RANGE)
-            .setCallbacks(&Foo::setExample);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/a8b8410f/launcher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 33e6e6e..67385e5 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -33,8 +33,7 @@ if (LAUNCHER)
         target_link_libraries(launcher PRIVATE Celix::dfi) #note not strictly needed, but ensure libdfi is a dep for the framework, useful when create docker images
     endif()
     
-    install(TARGETS launcher RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT framework)
-
+    install(TARGETS launcher EXPORT celix RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT framework)
     #Setup target aliases to match external usage
     add_executable(Celix::launcher ALIAS launcher)
 


Mime
View raw message