You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2018/01/24 21:06:53 UTC
[01/11] celix git commit: CELIX-412: Refactors usage of add_bundle
and add_deploy to add_celix_bundle and add_celix_container
Repository: celix
Updated Branches:
refs/heads/feature/CELIX-417-cmake-refactor 81804e001 -> 0ea8de64a
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/remote_service_admin_http/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_http/CMakeLists.txt b/remote_services/remote_service_admin_http/CMakeLists.txt
index cc1b99a..a1b756e 100644
--- a/remote_services/remote_service_admin_http/CMakeLists.txt
+++ b/remote_services/remote_service_admin_http/CMakeLists.txt
@@ -30,7 +30,7 @@ if (RSA_REMOTE_SERVICE_ADMIN_HTTP)
include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin_http/private/include")
include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
- add_bundle(remote_service_admin_http
+ add_celix_bundle(remote_service_admin_http
VERSION 0.9.0
SYMBOLIC_NAME "apache_celix_remote_service_admin_http"
NAME "Apache Celix Remote Service Admin HTTP"
@@ -43,7 +43,7 @@ if (RSA_REMOTE_SERVICE_ADMIN_HTTP)
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(remote_service_admin_http)
+ install_celix_bundle(remote_service_admin_http)
target_link_libraries(remote_service_admin_http celix_framework ${CURL_LIBRARIES} ${UUID})
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/remote_service_admin_shm/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_shm/CMakeLists.txt b/remote_services/remote_service_admin_shm/CMakeLists.txt
index ab7a1c3..51105f0 100644
--- a/remote_services/remote_service_admin_shm/CMakeLists.txt
+++ b/remote_services/remote_service_admin_shm/CMakeLists.txt
@@ -29,7 +29,7 @@ if (RSA_REMOTE_SERVICE_ADMIN_SHM)
include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin_shm/private/include")
include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
- add_bundle(remote_service_admin_shm
+ add_celix_bundle(remote_service_admin_shm
VERSION 0.9.0
SYMBOLIC_NAME "apache_celix_remote_service_admin_shm"
NAME "Apache Celix Remote Service Admin SHM"
@@ -42,7 +42,7 @@ if (RSA_REMOTE_SERVICE_ADMIN_SHM)
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(remote_service_admin_shm
+ install_celix_bundle(remote_service_admin_shm
HEADERS
${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin_shm/public/include/remote_service_admin_shm.h
)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/topology_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/CMakeLists.txt b/remote_services/topology_manager/CMakeLists.txt
index 46a3bac..69d14ed 100644
--- a/remote_services/topology_manager/CMakeLists.txt
+++ b/remote_services/topology_manager/CMakeLists.txt
@@ -24,7 +24,7 @@ if (RSA_TOPOLOGY_MANAGER)
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
include_directories("${PROJECT_SOURCE_DIR}/remote_services/topology_manager/public/include")
- add_bundle(topology_manager SOURCES
+ add_celix_bundle(topology_manager SOURCES
private/src/topology_manager
private/src/scope
private/src/activator
@@ -39,7 +39,7 @@ if (RSA_TOPOLOGY_MANAGER)
"Apache Celix RS Topology Manager"
)
- install_bundle(topology_manager)
+ install_celix_bundle(topology_manager)
if (ENABLE_TESTING)
find_package(CppUTest REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
index 6e269f5..df49a95 100644
--- a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
@@ -22,7 +22,7 @@ include_directories(
${PROJECT_SOURCE_DIR}/utils/public/include
)
-add_bundle(topology_manager_test_bundle
+add_celix_bundle(topology_manager_test_bundle
VERSION 0.0.1
SOURCES
tst_activator.c
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt b/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
index a19efc7..cb88a21 100644
--- a/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
@@ -23,7 +23,7 @@ include_directories(
)
-add_bundle(topology_manager_disc_mock_bundle
+add_celix_bundle(topology_manager_disc_mock_bundle
VERSION 0.0.1
SOURCES
disc_mock_activator.c
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_shell/CMakeLists.txt b/remote_shell/CMakeLists.txt
index 7c37d13..aac0366 100644
--- a/remote_shell/CMakeLists.txt
+++ b/remote_shell/CMakeLists.txt
@@ -17,7 +17,7 @@
celix_subproject(REMOTE_SHELL "Option to enable building the Remote Shell bundles" ON DEPS LAUNCHER SHELL_TUI)
if (REMOTE_SHELL)
- add_bundle(remote_shell
+ add_celix_bundle(remote_shell
SYMBOLIC_NAME "apache_celix_remote_shell"
VERSION "0.0.2"
NAME: "Apache Celix Remote Shell"
@@ -33,7 +33,7 @@ if (REMOTE_SHELL)
private/include/connection_listener.h
)
- install_bundle(remote_shell)
+ install_celix_bundle(remote_shell)
include_directories("private/include")
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
@@ -42,5 +42,5 @@ if (REMOTE_SHELL)
target_link_libraries(remote_shell celix_framework)
- add_deploy("remote_shell_deploy" NAME "remote_shell" BUNDLES shell remote_shell shell_tui log_service)
+ add_celix_container("remote_shell_deploy" NAME "remote_shell" BUNDLES shell remote_shell shell_tui log_service)
endif (REMOTE_SHELL)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt
index 11a16c1..a2bf88e 100644
--- a/shell/CMakeLists.txt
+++ b/shell/CMakeLists.txt
@@ -18,7 +18,7 @@ celix_subproject(SHELL "Option to enable building the Shell bundles" ON DEPS LAU
if (SHELL)
find_package(CURL REQUIRED)
- add_bundle(shell
+ add_celix_bundle(shell
SYMBOLIC_NAME "apache_celix_shell"
VERSION "2.1.0"
NAME "Apache Celix Shell"
@@ -41,7 +41,7 @@ if (SHELL)
)
- install_bundle(shell
+ install_celix_bundle(shell
HEADERS
public/include/shell.h public/include/command.h public/include/shell_constants.h
)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/shell_bonjour/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell_bonjour/CMakeLists.txt b/shell_bonjour/CMakeLists.txt
index 300fef0..e12d250 100644
--- a/shell_bonjour/CMakeLists.txt
+++ b/shell_bonjour/CMakeLists.txt
@@ -36,7 +36,7 @@ if (SHELL_BONJOUR)
set(MEMSTREAM_SOURCES ${PROJECT_SOURCE_DIR}/utils/private/src/memstream/open_memstream.c ${PROJECT_SOURCE_DIR}/utils/private/src/memstream/fmemopen.c)
include_directories(${PROJECT_SOURCE_DIR}/utils/public/include/memstream)
endif()
- add_bundle(bonjour_shell
+ add_celix_bundle(bonjour_shell
VERSION "1.0.0"
SOURCES
private/src/activator.c
@@ -46,7 +46,7 @@ if (SHELL_BONJOUR)
target_link_libraries(bonjour_shell celix_framework celix_utils ${LIBXML2_LIBRARIES} ${DNS_SD_LIB})
- add_deploy("bonjour_shell_deploy" BUNDLES
+ add_celix_container("bonjour_shell_deploy" BUNDLES
shell
bonjour_shell
PROPERTIES "bonjour.shell.id=Apache Celix"
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/shell_tui/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell_tui/CMakeLists.txt b/shell_tui/CMakeLists.txt
index 0216261..35153fe 100644
--- a/shell_tui/CMakeLists.txt
+++ b/shell_tui/CMakeLists.txt
@@ -17,7 +17,7 @@
celix_subproject(SHELL_TUI "Option to enable building the Shell Textual User Interface bundles" ON DEPS LAUNCHER SHELL)
if (SHELL_TUI)
- add_bundle(shell_tui
+ add_celix_bundle(shell_tui
SYMBOLIC_NAME "apache_celix_shell_tui"
VERSION "1.1.0"
NAME "Apache Celix Shell TUI"
@@ -27,7 +27,7 @@ if (SHELL_TUI)
private/src/history
)
- install_bundle(shell_tui)
+ install_celix_bundle(shell_tui)
include_directories("private/include")
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
[08/11] celix git commit: CELIX-412: Updates celix version
Posted by pn...@apache.org.
CELIX-412: Updates celix version
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/353ac0d2
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/353ac0d2
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/353ac0d2
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: 353ac0d2e0f819f8f59d4cdf8ea1dfd701201d74
Parents: 34ed6ba
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Jan 24 13:19:35 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Jan 24 13:19:35 2018 +0100
----------------------------------------------------------------------
CMakeLists.txt | 4 ++--
RELEASE_NOTES | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/353ac0d2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8151cd2..f67d32f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,8 +63,8 @@ ELSE ()
ENDIF()
# Set version for the framework package/release
-set(CELIX_MAJOR "1")
-set(CELIX_MINOR "0")
+set(CELIX_MAJOR "2")
+set(CELIX_MINOR "1")
set(CELIX_MICRO "0")
set(CELIX_QUALIFIER "")
http://git-wip-us.apache.org/repos/asf/celix/blob/353ac0d2/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index b82d2bb..b9947fc 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -15,7 +15,7 @@
# Release Notes for Apache Celix 2.1.0
-# # Versions
+## Versions
### Libraries:
- Celix Framework library: 2.1.0
[11/11] celix git commit: Merge branch 'release/2.1.0' into
feature/CELIX-417-cmake-refactor
Posted by pn...@apache.org.
Merge branch 'release/2.1.0' into feature/CELIX-417-cmake-refactor
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/0ea8de64
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/0ea8de64
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/0ea8de64
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: 0ea8de64a3aab5a1ee4e2a11edfad1c1ac3e0d84
Parents: 81804e0 353ac0d
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Jan 24 22:06:37 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Jan 24 22:06:37 2018 +0100
----------------------------------------------------------------------
CHANGES | 215 ----------------
CHANGES.md | 252 +++++++++++++++++++
README.md | 17 ++
RELEASE_NOTES | 24 +-
cmake/cmake_celix/BundlePackaging.cmake | 26 +-
cmake/cmake_celix/DeployPackaging.cmake | 8 +-
config_admin/CMakeLists.txt | 2 +-
.../example_test/CMakeLists.txt | 2 +-
.../example_test2/CMakeLists.txt | 2 +-
config_admin/example/CMakeLists.txt | 2 +-
config_admin/readme.md | 17 ++
config_admin/service/CMakeLists.txt | 2 +-
dependency_manager/CMakeLists.txt | 34 ++-
dependency_manager/readme.md | 17 ++
dependency_manager_cxx/CMakeLists.txt | 17 +-
dependency_manager_cxx/readme.md | 17 ++
deployment_admin/CMakeLists.txt | 6 +-
deployment_admin/README.md | 17 ++
device_access/README.md | 17 ++
device_access/device_access/CMakeLists.txt | 4 +-
device_access/driver_locator/CMakeLists.txt | 4 +-
device_access/example/CMakeLists.txt | 4 +-
.../example/base_driver/CMakeLists.txt | 2 +-
.../example/consuming_driver/CMakeLists.txt | 2 +-
.../example/refining_driver/CMakeLists.txt | 2 +-
dfi/CMakeLists.txt | 45 ++--
documents/building/readme.md | 31 ++-
documents/cmake_commands/readme.md | 23 +-
.../getting_started/creating_a_simple_bundle.md | 128 ++++++----
.../getting_started/getting_started_img3.png | Bin 127686 -> 0 bytes
documents/getting_started/readme.md | 22 +-
.../getting_started/using_services_with_c.md | 125 +++++----
.../getting_started/using_services_with_cxx.md | 17 ++
documents/intro/readme.md | 17 ++
documents/roadmap/api_v3/readme.md | 19 +-
documents/roadmap/improvement_ideas.md | 19 +-
documents/roadmap/roadmap.md | 17 ++
documents/subprojects/readme.md | 17 ++
etcdlib/README.md | 17 ++
event_admin/CMakeLists.txt | 6 +-
event_admin/event_admin/CMakeLists.txt | 4 +-
event_admin/event_handler/CMakeLists.txt | 4 +-
event_admin/event_publisher/CMakeLists.txt | 4 +-
examples/dm_example/CMakeLists.txt | 2 +-
examples/dm_example/api/CMakeLists.txt | 2 +-
examples/dm_example/phase1/CMakeLists.txt | 2 +-
examples/dm_example/phase2a/CMakeLists.txt | 2 +-
examples/dm_example/phase2b/CMakeLists.txt | 2 +-
examples/dm_example/phase3/CMakeLists.txt | 2 +-
examples/dm_example_cxx/phase1/CMakeLists.txt | 2 +-
examples/dm_example_cxx/phase2/CMakeLists.txt | 4 +-
examples/dm_example_cxx/phase3/CMakeLists.txt | 2 +-
.../phase3_locking/CMakeLists.txt | 2 +-
examples/hello_world/CMakeLists.txt | 10 +-
examples/hello_world_test/CMakeLists.txt | 18 +-
examples/log_service_example/CMakeLists.txt | 4 +-
examples/mongoose/CMakeLists.txt | 6 +-
examples/service_hook_example/CMakeLists.txt | 6 +-
examples/services_example_c/CMakeLists.txt | 2 +-
examples/services_example_c/bar/CMakeLists.txt | 2 +-
examples/services_example_c/foo1/CMakeLists.txt | 2 +-
examples/services_example_c/foo2/CMakeLists.txt | 2 +-
examples/services_example_cxx/CMakeLists.txt | 2 +-
.../services_example_cxx/bar/CMakeLists.txt | 2 +-
.../services_example_cxx/baz/CMakeLists.txt | 2 +-
.../services_example_cxx/foo/CMakeLists.txt | 2 +-
.../test_bundle1/CMakeLists.txt | 2 +-
framework/src/celix_launcher.c | 12 +-
launcher/README.md | 17 ++
log_service/CMakeLists.txt | 5 +-
log_writer/log_writer/CMakeLists.txt | 2 +-
log_writer/log_writer_stdout/CMakeLists.txt | 6 +-
log_writer/log_writer_syslog/CMakeLists.txt | 4 +-
pubsub/CMakeLists.txt | 2 +-
pubsub/README.md | 17 ++
pubsub/examples/CMakeLists.txt | 26 +-
pubsub/examples/keys/README.md | 17 ++
.../examples/mp_pubsub/publisher/CMakeLists.txt | 8 +-
.../mp_pubsub/subscriber/CMakeLists.txt | 10 +-
pubsub/examples/pubsub/publisher/CMakeLists.txt | 10 +-
.../examples/pubsub/publisher2/CMakeLists.txt | 10 +-
.../examples/pubsub/subscriber/CMakeLists.txt | 12 +-
pubsub/mock/CMakeLists.txt | 8 +-
pubsub/pubsub_admin_udp_mc/CMakeLists.txt | 4 +-
pubsub/pubsub_admin_udp_mc/README.md | 17 ++
pubsub/pubsub_admin_zmq/CMakeLists.txt | 4 +-
pubsub/pubsub_admin_zmq/src/pubsub_admin_impl.c | 2 +-
pubsub/pubsub_admin_zmq/src/topic_publication.c | 2 +-
pubsub/pubsub_admin_zmq/src/topic_publication.h | 2 +-
.../pubsub_admin_zmq/src/topic_subscription.c | 4 +-
pubsub/pubsub_discovery/CMakeLists.txt | 4 +-
pubsub/pubsub_serializer_json/CMakeLists.txt | 4 +-
pubsub/pubsub_spi/CMakeLists.txt | 13 +-
pubsub/pubsub_topology_manager/CMakeLists.txt | 6 +-
pubsub/test/CMakeLists.txt | 16 +-
rat-excludes.txt | 7 +-
remote_services/README.md | 17 ++
remote_services/civetweb/CMakeLists.txt | 2 +-
remote_services/discovery_common/CMakeLists.txt | 2 +-
.../discovery_configured/CMakeLists.txt | 4 +-
remote_services/discovery_etcd/CMakeLists.txt | 4 +-
remote_services/discovery_etcd/README.md | 17 ++
remote_services/discovery_shm/CMakeLists.txt | 4 +-
remote_services/examples/CMakeLists.txt | 12 +-
.../examples/calculator_service/CMakeLists.txt | 4 +-
.../examples/calculator_shell/CMakeLists.txt | 4 +-
.../remote_service_admin_dfi/CMakeLists.txt | 4 +-
.../test/CMakeLists.txt | 4 +-
.../remote_service_admin_shm/CMakeLists.txt | 4 +-
.../remote_services_api/CMakeLists.txt | 8 +-
remote_services/rsa_common/CMakeLists.txt | 11 +-
remote_services/topology_manager/CMakeLists.txt | 4 +-
remote_services/topology_manager/README.md | 17 ++
.../tms_tst/bundle/CMakeLists.txt | 4 +-
.../tms_tst/disc_mock/CMakeLists.txt | 2 +-
remote_shell/CMakeLists.txt | 6 +-
remote_shell/README.md | 17 ++
shell/CMakeLists.txt | 4 +-
shell/README.md | 17 ++
shell_bonjour/CMakeLists.txt | 4 +-
shell_tui/CMakeLists.txt | 4 +-
shell_tui/README.md | 17 ++
utils/README.md | 17 ++
123 files changed, 1162 insertions(+), 614 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/cmake/cmake_celix/BundlePackaging.cmake
----------------------------------------------------------------------
diff --cc cmake/cmake_celix/BundlePackaging.cmake
index 8e1755c,e336dbb..44e7382
--- a/cmake/cmake_celix/BundlePackaging.cmake
+++ b/cmake/cmake_celix/BundlePackaging.cmake
@@@ -88,9 -88,8 +88,9 @@@ function(check_bundle BUNDLE
endif()
endfunction()
+
function(add_bundle)
- #message(DEPRECATION"add_bundle is DEPRECATION, use add_celix_bundle instead.")
- message(DEPRECATION "add_bundle is DEPRECATION, use add_celix_bundle instead.")
++ message(DEPRECATION "add_bundle is deprecated, use add_celix_bundle instead.")
add_celix_bundle(${ARGN})
endfunction()
function(add_celix_bundle)
@@@ -278,7 -261,7 +278,7 @@@
endfunction()
function(bundle_export_libs)
- #message(DEPRECATION"bundle_export_libs is DEPRECATION, use celix_bundle_export_libs instead.")
- message(DEPRECATION "bundle_export_libs is DEPRECATION, use celix_bundle_export_libs instead.")
++ message(DEPRECATION "bundle_export_libs is deprecated, use celix_bundle_export_libs instead.")
celix_bundle_export_libs(${ARGN})
endfunction()
function(celix_bundle_export_libs)
@@@ -288,7 -271,7 +288,7 @@@
endfunction()
function(bundle_private_libs)
- #message(DEPRECATION"bundle_private_libs is DEPRECATION, use celix_bundle_private_libs instead.")
- message(DEPRECATION "bundle_private_libs is DEPRECATION, use celix_bundle_private_libs instead.")
++ message(DEPRECATION "bundle_private_libs is deprecated, use celix_bundle_private_libs instead.")
celix_bundle_private_libs(${ARGN})
endfunction()
function(celix_bundle_private_libs)
@@@ -298,7 -281,7 +298,7 @@@
endfunction()
function(bundle_libs)
- #message(DEPRECATION"bundle_libs is DEPRECATION, use celix_bundle_libs instead.")
- message(DEPRECATION "bundle_libs is DEPRECATION, use celix_bundle_libs instead.")
++ message(DEPRECATION "bundle_libs is deprecated, use celix_bundle_libs instead.")
celix_bundle_libs(${ARGN})
endfunction()
function(celix_bundle_libs)
@@@ -365,7 -348,7 +365,7 @@@
endfunction()
function(bundle_import_libs)
- #message(DEPRECATION"bundle_import_libs is DEPRECATION, use celix_bundle_import_libs instead.")
- message(DEPRECATION "bundle_import_libs is DEPRECATION, use celix_bundle_import_libs instead.")
++ message(DEPRECATION "bundle_import_libs is deprecated, use celix_bundle_import_libs instead.")
celix_bundle_import_libs(${ARGN})
endfunction()
function(celix_bundle_import_libs)
@@@ -395,7 -378,7 +395,7 @@@
endfunction()
function(bundle_files)
- #message(DEPRECATION"bundle_files is DEPRECATION, use celix_bundle_files instead.")
- message(DEPRECATION "bundle_files is DEPRECATION, use celix_bundle_files instead.")
++ message(DEPRECATION "bundle_files is deprecated, use celix_bundle_files instead.")
celix_bundle_files(${ARGN})
endfunction()
function(celix_bundle_files)
@@@ -422,7 -405,7 +422,7 @@@
endfunction()
function(bundle_headers)
- #message(DEPRECATION"bundle_headers is DEPRECATION, use celix_bundle_headers instead.")
- message(DEPRECATION "bundle_headers is DEPRECATION, use celix_bundle_headers instead.")
++ message(DEPRECATION "bundle_headers is deprecated, use celix_bundle_headers instead.")
celix_bundle_headers(${ARGN})
endfunction()
function(celix_bundle_headers)
@@@ -441,7 -424,7 +441,7 @@@
endfunction()
function(bundle_symbolic_name)
- #message(DEPRECATION"bundle_symbolic_name is DEPRECATION, use celix_bundle_symbolic_name instead.")
- message(DEPRECATION "bundle_symbolic_name is DEPRECATION, use celix_bundle_symbolic_name instead.")
++ message(DEPRECATION "bundle_symbolic_name is deprecated, use celix_bundle_symbolic_name instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_symbolic_name BUNDLE SYMBOLIC_NAME)
@@@ -449,7 -432,7 +449,7 @@@
endfunction()
function(bundle_name)
- #message(DEPRECATION"bundle_name is DEPRECATION, use celix_bundle_name instead.")
- message(DEPRECATION "bundle_name is DEPRECATION, use celix_bundle_name instead.")
++ message(DEPRECATION "bundle_name is deprecated, use celix_bundle_name instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_name BUNDLE NAME)
@@@ -457,7 -440,7 +457,7 @@@
endfunction()
function(bundle_version)
- #message(DEPRECATION"bundle_version is DEPRECATION, use celix_bundle_version instead.")
- message(DEPRECATION "bundle_version is DEPRECATION, use celix_bundle_version instead.")
++ message(DEPRECATION "bundle_version is deprecated, use celix_bundle_version instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_version BUNDLE VERSION)
@@@ -465,7 -448,7 +465,7 @@@
endfunction()
function(bundle_description)
- #message(DEPRECATION"bundle_description is DEPRECATION, use celix_bundle_description instead.")
- message(DEPRECATION "bundle_description is DEPRECATION, use celix_bundle_description instead.")
++ message(DEPRECATION "bundle_description is deprecated, use celix_bundle_description instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_description BUNDLE DESC)
@@@ -473,7 -456,7 +473,7 @@@
endfunction()
function(install_bundle)
- #message(DEPRECATION"install_bundle is DEPRECATION, use install_celix_bundle instead.")
- message(DEPRECATION "install_bundle is DEPRECATION, use install_celix_bundle instead.")
++ message(DEPRECATION "install_bundle is deprecated, use install_celix_bundle instead.")
install_celix_bundle(${ARGN})
endfunction()
function(install_celix_bundle)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/cmake/cmake_celix/DeployPackaging.cmake
----------------------------------------------------------------------
diff --cc cmake/cmake_celix/DeployPackaging.cmake
index 2065b47,707201f..b7880f4
--- a/cmake/cmake_celix/DeployPackaging.cmake
+++ b/cmake/cmake_celix/DeployPackaging.cmake
@@@ -28,9 -28,10 +28,9 @@@ set_directory_properties(PROPERTIES ADD
#####
function(add_deploy)
- #message(DEPRECATION "deploy_bundles_dir is depecrated, use celix_container_bundles_dir instead.")
- message(DEPRECATION "add_deploy is depecrated, use add_celix_container instead.")
++ message(DEPRECATION "deploy_bundles_dir is depecrated, use celix_container_bundles_dir instead.")
add_celix_container(${ARGN})
endfunction()
-
function(add_celix_container)
list(GET ARGN 0 CONTAINER_TARGET)
list(REMOVE_AT ARGN 0)
@@@ -212,8 -219,9 +212,8 @@@ endfunction(
#NOTE can be used for drivers/proxies/endpoints bundle dirs
-
function(deploy_bundles_dir)
- #message(DEPRECATION "deploy_bundles_dir is depecrated, use celix_container_bundles_dir instead.")
+ message(DEPRECATION "deploy_bundles_dir is depecrated, use celix_container_bundles_dir instead.")
celix_container_bundles_dir(${ARGN})
endfunction()
function(celix_container_bundles_dir)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/config_admin/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/config_admin/config_admin_tst/example_test/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/config_admin/config_admin_tst/example_test2/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/config_admin/example/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/config_admin/service/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/dependency_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --cc dependency_manager/CMakeLists.txt
index 477a163,952cfe7..f98701e
--- a/dependency_manager/CMakeLists.txt
+++ b/dependency_manager/CMakeLists.txt
@@@ -30,70 -30,63 +30,64 @@@ if (DEPENDENCY_MANAGER
endif(CMAKE_UNAME)
endif(UNIX AND NOT WIN32)
- add_celix_bundle(dm_shell
- SYMBOLIC_NAME "apache_celix_dm_shell"
- VERSION "1.0.0"
- NAME "Apache Celix DM Shell Commands"
- SOURCES
- private/src/dm_shell_activator
- private/src/dm_shell_list_command
- )
- target_link_libraries(dm_shell celix_framework celix_utils)
-
-
add_library(dependency_manager_static STATIC
- private/src/dm_component_impl
- private/src/dm_service_dependency
- private/src/dm_event
- private/src/dm_dependency_manager_impl
- private/src/dm_activator
+ src/dm_component_impl
+ src/dm_service_dependency
+ src/dm_event
+ src/dm_dependency_manager_impl
+ src/dm_activator
)
- set_target_properties(dependency_manager_static PROPERTIES SOVERSION 1)
- set_target_properties(dependency_manager_static PROPERTIES VERSION 1.1.0)
++ set_target_properties(dependency_manager_static PROPERTIES OUTPUT_NAME "celix_dependency_manager_static")
+ target_link_libraries(dependency_manager_static Celix::framework)
+ target_compile_options(dependency_manager_static PRIVATE ${DM_COMP_OPT})
add_library(dependency_manager_so SHARED
- private/src/dm_component_impl
- private/src/dm_service_dependency
- private/src/dm_event
- private/src/dm_dependency_manager_impl
- private/src/dm_activator
+ src/dm_component_impl
+ src/dm_service_dependency
+ src/dm_event
+ src/dm_dependency_manager_impl
+ src/dm_activator
)
++ set_target_properties(dependency_manager_so PROPERTIES OUTPUT_NAME "celix_dependency_manager_so")
set_target_properties(dependency_manager_so PROPERTIES SOVERSION 1)
if (APPLE)
- target_link_libraries(dependency_manager_so celix_framework "-undefined dynamic_lookup")
+ target_link_libraries(dependency_manager_so Celix::framework "-undefined dynamic_lookup")
else()
- target_link_libraries(dependency_manager_so celix_framework)
+ target_link_libraries(dependency_manager_so Celix::framework)
endif()
- target_include_directories(dependency_manager_static PUBLIC api)
- include_directories("public/include")
- include_directories("private/include")
- include_directories("${PROJECT_SOURCE_DIR}/shell/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- target_link_libraries(dependency_manager_static celix_framework)
-
- install(
- FILES
- public/include/dm_activator.h
- private/src/dm_activator.c
- public/include/dm_component.h
- public/include/dm_dependency_manager.h
- public/include/dm_service_dependency.h
- public/include/dm_info.h
- DESTINATION
- include/celix/dependency_manager
- COMPONENT
- dependency_manager
- )
++ target_include_directories(dependency_manager_static PUBLIC
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
++ $<INSTALL_INTERFACE:include/celix/dependency_manager>
++ )
+ target_include_directories(dependency_manager_static PRIVATE src)
- target_include_directories(dependency_manager_so PUBLIC api)
++ target_include_directories(dependency_manager_so PUBLIC
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/api>
++ $<INSTALL_INTERFACE:include/celix/dependency_manager>
++ )
+ target_include_directories(dependency_manager_so PRIVATE src)
+
- add_bundle(dm_shell
++ add_celix_bundle(dm_shell
+ SYMBOLIC_NAME "apache_celix_dm_shell"
+ VERSION "1.0.0"
+ NAME "Apache Celix DM Shell Commands"
+ SOURCES
+ src/dm_shell_activator
+ src/dm_shell_list_command
+ )
+ target_include_directories(dm_shell PRIVATE api src)
+ target_link_libraries(dm_shell PRIVATE Celix::shell_api)
+
- #TODO check
- # install(
- # FILES
- # api/dm_activator.h
- # src/dm_activator.c
- # api/dm_component.h
- # api/dm_dependency_manager.h
- # apidm_service_dependency.h
- # apidm_info.h
- # DESTINATION
- # include/celix/dependency_manager
- # COMPONENT
- # dependency_manager
- # )
- install_bundle(dm_shell)
- install(TARGETS dependency_manager_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager)
- install(TARGETS dependency_manager_so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager)
+ install_celix_bundle(dm_shell)
- install(TARGETS dependency_manager_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager)
- install(TARGETS dependency_manager_so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager)
++ install(TARGETS dependency_manager_so dependency_manager_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager)
++ install(DIRECTORY api/ DESTINATION include/celix/dependency_manager COMPONENT dependency_manager)
+
+ unset(DM_COMP_OPT)
+
+ #Setup target aliases to match external usage
+ add_library(Celix::dm_shell ALIAS dm_shell)
+ add_library(Celix::dependency_manager_static ALIAS dependency_manager_static)
+ add_library(Celix::dependency_manager_so ALIAS dependency_manager_so)
endif (DEPENDENCY_MANAGER)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/dependency_manager/readme.md
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/dependency_manager_cxx/CMakeLists.txt
----------------------------------------------------------------------
diff --cc dependency_manager_cxx/CMakeLists.txt
index 65c158d,55b02ca..5b7580a
--- a/dependency_manager_cxx/CMakeLists.txt
+++ b/dependency_manager_cxx/CMakeLists.txt
@@@ -29,36 -29,37 +29,35 @@@ if (DEPENDENCY_MANAGER_CXX
endif(CMAKE_UNAME)
endif(UNIX AND NOT WIN32)
- include_directories(
- include
- ${PROJECT_SOURCE_DIR}/dependency_manager/public/include
- ${PROJECT_SOURCE_DIR}/dependency_manager/private/include
- ${PROJECT_SOURCE_DIR}/utils/public/include
- )
-
add_library(dependency_manager_cxx_static STATIC
- ${CMAKE_SOURCE_DIR}/dependency_manager/private/src/dm_component_impl
- ${CMAKE_SOURCE_DIR}/dependency_manager/private/src/dm_service_dependency
- ${CMAKE_SOURCE_DIR}/dependency_manager/private/src/dm_event
- ${CMAKE_SOURCE_DIR}/dependency_manager/private/src/dm_dependency_manager_impl
+ ${CMAKE_SOURCE_DIR}/dependency_manager/src/dm_component_impl
+ ${CMAKE_SOURCE_DIR}/dependency_manager/src/dm_service_dependency
+ ${CMAKE_SOURCE_DIR}/dependency_manager/src/dm_event
+ ${CMAKE_SOURCE_DIR}/dependency_manager/src/dm_dependency_manager_impl
src/dm_activator.cc
)
- target_include_directories(dependency_manager_cxx_static PUBLIC include ${CMAKE_SOURCE_DIR}/dependency_manager/api)
- set_target_properties(dependency_manager_cxx_static PROPERTIES SOVERSION 1)
- set_target_properties(dependency_manager_cxx_static PROPERTIES VERSION 2.0.0)
++ set_target_properties(dependency_manager_cxx_static PROPERTIES OUTPUT_NAME "celix_dependency_manager_cxx_static")
++ target_include_directories(dependency_manager_cxx_static PUBLIC
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
++ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/dependency_manager/api>
++ $<INSTALL_INTERFACE:include/celix/dependency_manager_cxx>
++ $<INSTALL_INTERFACE:include/celix/dependency_manager>
++ )
+ target_include_directories(dependency_manager_cxx_static PRIVATE src)
+ target_compile_options(dependency_manager_cxx_static PRIVATE ${DM_COMP_OPT})
if (APPLE)
- target_link_libraries(dependency_manager_cxx_static celix_framework "-undefined dynamic_lookup")
+ target_link_libraries(dependency_manager_cxx_static Celix::framework "-undefined dynamic_lookup")
else()
- target_link_libraries(dependency_manager_cxx_static celix_framework)
+ target_link_libraries(dependency_manager_cxx_static Celix::framework)
endif()
-- install(
-- DIRECTORY
-- include/celix
-- DESTINATION
-- include/celix/dependency_manager_cxx
-- COMPONENT
-- dependency_manager_cxx
-- )
install(TARGETS dependency_manager_cxx_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager_cxx)
++ install(DIRECTORY include DESTINATION include/celix/dependency_manager_cxx COMPONENT dependency_manager_cxx)
+
+ unset(DM_COMP_OPT)
+
+ #Setup target aliases to match external usage
+ add_library(Celix::dependency_manager_cxx_static ALIAS dependency_manager_cxx_static)
endif (DEPENDENCY_MANAGER_CXX)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/dependency_manager_cxx/readme.md
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/deployment_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --cc deployment_admin/CMakeLists.txt
index 3eb38ec,51fe2ba..8d74b1f
--- a/deployment_admin/CMakeLists.txt
+++ b/deployment_admin/CMakeLists.txt
@@@ -20,44 -20,52 +20,44 @@@ if (DEPLOYMENT_ADMIN
find_package(CURL REQUIRED)
find_package(UUID REQUIRED)
+ find_package(ZLIB REQUIRED)
- add_definitions(-DUSE_FILE32API)
+ add_library(deployment_admin_api INTERFACE)
+ target_include_directories(deployment_admin_api INTERFACE api)
- add_bundle(deployment_admin
- include_directories("${CURL_INCLUDE_DIR}")
- include_directories("${UUID_INCLUDE_DIR}")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/private/include")
- include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/public/include")
-
+ add_celix_bundle(deployment_admin
SYMBOLIC_NAME "apache_celix_deployment_admin"
VERSION "0.0.2"
NAME "Apache Celix Deployment Admin"
SOURCES
- private/src/deployment_package
- private/src/deployment_admin
- private/src/deployment_admin_activator
- private/src/ioapi
- private/src/miniunz
- private/src/unzip
- private/src/log
- private/src/log_store
- private/src/log_sync
+ src/deployment_package
+ src/deployment_admin
+ src/deployment_admin_activator
+ src/ioapi
+ src/miniunz
+ src/unzip
+ src/log
+ src/log_store
+ src/log_sync
+ )
- private/include/deployment_admin.h
- private/include/deployment_package.h
- private/include/ioapi.h
- private/include/log.h
- private/include/log_event.h
- private/include/log_store.h
- private/include/log_sync.h
- private/include/miniunz.h
- private/include/unzip.h
+ target_compile_definitions(deployment_admin PRIVATE -DUSE_FILE32API)
+ target_include_directories(deployment_admin PRIVATE
+ src
+ ${CURL_INCLUDE_DIRS}
+ ${UUID_INCLUDE_DIRS}
+ ${ZLIB_INCLUDE_DIRS}
)
+ target_link_libraries(deployment_admin PRIVATE ${CURL_LIBRARIES} ${UUID_LIBRARIES} ${ZLIB_LIBRARIES} deployment_admin_api)
- install_bundle(deployment_admin)
-
- install_celix_bundle(deployment_admin
- HEADERS
- public/include/resource_processor.h
- )
-
- target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES})
++ install_celix_bundle(deployment_admin)
+ #Setup target aliases to match external usage
+ add_library(Celix::deployment_admin_api ALIAS deployment_admin_api)
+ add_library(Celix::deployment_admin ALIAS deployment_admin)
- add_deploy(deployment-admin
+ add_celix_container(deployment-admin
- BUNDLES deployment_admin shell shell_tui log_service log_writer
+ BUNDLES Celix::deployment_admin Celix::shell Celix::shell_tui Celix::log_service Celix::log_writer_stdout
PROPERTIES
"deployment_admin_url=http://localhost:8080"
"deployment_admin_identification=celix"
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/deployment_admin/README.md
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/device_access/README.md
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/device_access/device_access/CMakeLists.txt
----------------------------------------------------------------------
diff --cc device_access/device_access/CMakeLists.txt
index 5f19293,52b8694..c39eb9b
--- a/device_access/device_access/CMakeLists.txt
+++ b/device_access/device_access/CMakeLists.txt
@@@ -15,37 -15,39 +15,37 @@@
# specific language governing permissions and limitations
# under the License.
+
+add_library(device_access_api INTERFACE)
+target_include_directories(device_access_api INTERFACE include)
+
- add_bundle(device_manager
+ add_celix_bundle(device_manager
SYMBOLIC_NAME "apache_celix_device_manager"
VERSION "0.0.2"
NAME "Apache Celix Device Access Device Manager"
SOURCES
- private/src/activator
- private/src/driver_attributes
- private/src/device_manager
- private/src/driver_loader
- private/src/driver_matcher
-
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
-
- private/include/device_manager.h
- private/include/driver_attributes.h
- private/include/driver_loader.h
- private/include/driver_matcher.h
+ src/activator
+ src/driver_attributes
+ src/device_manager
+ src/driver_loader
+ src/driver_matcher
)
+target_link_libraries(device_manager PRIVATE Celix::log_helper)
- install_bundle(device_manager
+ install_celix_bundle(device_manager
HEADERS
- public/include/device.h
- public/include/driver_locator.h
- public/include/driver_selector.h
- public/include/driver.h
- public/include/match.h
+ include/device.h
+ include/driver_locator.h
+ include/driver_selector.h
+ include/driver.h
+ include/match.h
)
+target_include_directories(device_manager PRIVATE src)
+target_link_libraries(device_manager PRIVATE device_access_api)
-include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-include_directories("public/include")
-include_directories("private/include")
+#Setup target aliases to match external usage
+add_library(Celix::device_access_api ALIAS device_access_api)
+add_library(Celix::device_manager ALIAS device_manager)
-target_link_libraries(device_manager celix_framework celix_utils)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/device_access/driver_locator/CMakeLists.txt
----------------------------------------------------------------------
diff --cc device_access/driver_locator/CMakeLists.txt
index 2e0dde2,88c1fed..f7c679a
--- a/device_access/driver_locator/CMakeLists.txt
+++ b/device_access/driver_locator/CMakeLists.txt
@@@ -20,13 -20,15 +20,13 @@@ add_celix_bundle(driver_locato
VERSION "0.0.2"
NAME "Apache Celix Device Access Driver Locator"
SOURCES
- private/src/activator
- private/src/driver_locator
+ src/activator
+ src/driver_locator
)
- install_bundle(driver_locator)
+ install_celix_bundle(driver_locator)
+target_include_directories(driver_locator PRIVATE src)
+target_link_libraries(driver_locator PRIVATE Celix::device_access_api)
-include_directories(${PROJECT_SOURCE_DIR}/device_access/device_access/public/include)
-include_directories(private/include)
-include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-
-target_link_libraries(driver_locator celix_utils celix_framework)
+#Setup target aliases to match external usage
+add_library(Celix::driver_locator ALIAS driver_locator)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/device_access/example/CMakeLists.txt
----------------------------------------------------------------------
diff --cc device_access/example/CMakeLists.txt
index e21e5e0,f7062b4..5deaf85
--- a/device_access/example/CMakeLists.txt
+++ b/device_access/example/CMakeLists.txt
@@@ -21,11 -21,11 +21,11 @@@ if(DEVICE_ACCESS_EXAMPLE
add_subdirectory(consuming_driver)
add_subdirectory(refining_driver)
- add_deploy(device_access_example
+ add_celix_container(device_access_example
- BUNDLES device_manager driver_locator shell shell_tui log_service base_driver
+ BUNDLES Celix::device_manager Celix::driver_locator Celix::shell Celix::shell_tui log_service base_driver
)
- deploy_bundles_dir(device_access_example
+ celix_container_bundles_dir(device_access_example
DIR_NAME "drivers"
BUNDLES word_consumingdriver char_refiningdriver
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/device_access/example/base_driver/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/device_access/example/consuming_driver/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/device_access/example/refining_driver/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/dfi/CMakeLists.txt
----------------------------------------------------------------------
diff --cc dfi/CMakeLists.txt
index 950aaa5,676277c..39ed784
--- a/dfi/CMakeLists.txt
+++ b/dfi/CMakeLists.txt
@@@ -18,40 -18,49 +18,45 @@@
find_package(FFI REQUIRED)
find_package(Jansson REQUIRED)
-include_directories(
- ${FFI_INCLUDE_DIRS}
- ${JANSSON_INCLUDE_DIRS}
- private/include
- public/include
- ${PROJECT_SOURCE_DIR}/utils/public/include
+set(SOURCES
+ src/dyn_common.c
+ src/dyn_type.c
+ src/dyn_function.c
+ src/dyn_interface.c
+ src/dyn_message.c
+ src/json_serializer.c
+ src/json_rpc.c
)
- add_library(celix_dfi SHARED ${SOURCES})
- set_target_properties(celix_dfi PROPERTIES OUTPUT_NAME "celix_dfi")
- target_include_directories(celix_dfi PUBLIC include ${JANSSON_INCLUDE_DIRS})
- target_include_directories(celix_dfi PRIVATE src ${FFI_INCLUDE_DIRS})
- target_link_libraries(celix_dfi PUBLIC ${JANSSON_LIBRARY})
- target_link_libraries(celix_dfi PRIVATE Celix::utils ${FFI_LIBRARIES})
- set_target_properties(celix_dfi PROPERTIES "SOVERSION" 1)
-set(MEMSTREAM_SOURCES )
-set(MEMSTREAM_INCLUDES )
-if (APPLE OR ANDROID)
- set(MEMSTREAM_SOURCES ${PROJECT_SOURCE_DIR}/utils/private/src/memstream/open_memstream.c ${PROJECT_SOURCE_DIR}/utils/private/src/memstream/fmemopen.c)
- set(MEMSTREAM_INCLUDES ${PROJECT_SOURCE_DIR}/utils/public/include/memstream/open_memstream.h ${PROJECT_SOURCE_DIR}/utils/public/include/memstream/fmemopen.h)
- include_directories(${PROJECT_SOURCE_DIR}/utils/public/include/memstream)
-endif()
--
- add_library(celix_dfi_static STATIC ${SOURCES})
- set_target_properties(celix_dfi_static PROPERTIES OUTPUT_NAME "celix_dfi_static")
- target_include_directories(celix_dfi_static PUBLIC include ${JANSSON_INCLUDE_DIRS})
- target_include_directories(celix_dfi_static PRIVATE src ${FFI_INCLUDE_DIRS})
- target_link_libraries(celix_dfi_static PUBLIC ${JANSSON_LIBRARY})
- target_link_libraries(celix_dfi_static PRIVATE Celix::utils ${FFI_LIBRARIES})
-add_library(celix_dfi SHARED
- private/src/dyn_common.c
- private/src/dyn_type.c
- private/src/dyn_function.c
- private/src/dyn_interface.c
- private/src/dyn_message.c
- private/src/json_serializer.c
- private/src/json_rpc.c
- ${MEMSTREAM_SOURCES}
++add_library(dfi SHARED ${SOURCES})
++set_target_properties(dfi PROPERTIES OUTPUT_NAME "celix_dfi")
++target_include_directories(dfi PUBLIC
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
++ $<INSTALL_INTERFACE:include/celix/dfi>
++ ${JANSSON_INCLUDE_DIRS}
++)
++target_include_directories(dfi PRIVATE src ${FFI_INCLUDE_DIRS})
++target_link_libraries(dfi PUBLIC ${JANSSON_LIBRARY})
++target_link_libraries(dfi PRIVATE Celix::utils ${FFI_LIBRARIES})
++set_target_properties(dfi PROPERTIES "SOVERSION" 1)
- install(TARGETS celix_dfi celix_dfi_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT framework)
- public/include/dyn_common.h
- public/include/dyn_type.h
- public/include/dyn_function.h
- public/include/dyn_interface.h
- public/include/dyn_message.h
- public/include/json_serializer.h
- public/include/json_rpc.h
- ${MEMSTREAM_INCLUDES}
++add_library(dfi_static STATIC ${SOURCES})
++set_target_properties(dfi_static PROPERTIES OUTPUT_NAME "celix_dfi_static")
++target_include_directories(dfi_static PUBLIC
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
++ $<INSTALL_INTERFACE:include/celix/dfi>
++ ${JANSSON_INCLUDE_DIRS}
+ )
-set_target_properties(celix_dfi PROPERTIES "SOVERSION" 1)
-set_target_properties(celix_dfi PROPERTIES "VERSION" 1.1.0)
-target_link_libraries(celix_dfi celix_utils ${FFI_LIBRARIES} ${JANSSON_LIBRARY})
++target_include_directories(dfi_static PRIVATE src ${FFI_INCLUDE_DIRS})
++target_link_libraries(dfi_static PUBLIC ${JANSSON_LIBRARY})
++target_link_libraries(dfi_static PRIVATE Celix::utils ${FFI_LIBRARIES})
--install(TARGETS celix_dfi DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT framework)
- FILE(GLOB files "include/*.h")
-FILE(GLOB files "public/include/*.h" ${MEMSTREAM_INCLUDES})
--INSTALL(FILES ${files} DESTINATION include/celix/dfi COMPONENT framework)
++install(TARGETS dfi dfi_static EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dfi)
++install(DIRECTORY include/ DESTINATION include/celix/dfi COMPONENT dfi)
+#Alias setup to match external usage
- add_library(Celix::dfi ALIAS celix_dfi)
- add_library(Celix::dfi_static ALIAS celix_dfi_static)
++add_library(Celix::dfi ALIAS dfi)
++add_library(Celix::dfi_static ALIAS dfi_static)
if (ENABLE_TESTING)
find_package(CppUTest REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/event_admin/event_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --cc event_admin/event_admin/CMakeLists.txt
index 4a0f687,52b1120..87b6e62
--- a/event_admin/event_admin/CMakeLists.txt
+++ b/event_admin/event_admin/CMakeLists.txt
@@@ -34,6 -34,6 +34,6 @@@ add_celix_bundle(event_admi
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(event_admin)
+ install_celix_bundle(event_admin)
-target_link_libraries(event_admin celix_framework celix_utils)
+target_link_libraries(event_admin Celix::framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/event_admin/event_handler/CMakeLists.txt
----------------------------------------------------------------------
diff --cc event_admin/event_handler/CMakeLists.txt
index 2843122,fe2609c..92813a7
--- a/event_admin/event_handler/CMakeLists.txt
+++ b/event_admin/event_handler/CMakeLists.txt
@@@ -30,6 -30,6 +30,6 @@@ add_celix_bundle(event_handle
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(event_handler)
+ install_celix_bundle(event_handler)
-target_link_libraries(event_handler celix_framework celix_utils)
+target_link_libraries(event_handler Celix::framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/event_admin/event_publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --cc event_admin/event_publisher/CMakeLists.txt
index dc9e516,01b7b10..4dd314a
--- a/event_admin/event_publisher/CMakeLists.txt
+++ b/event_admin/event_publisher/CMakeLists.txt
@@@ -29,6 -29,6 +29,6 @@@ add_celix_bundle(event_publishe
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(event_publisher)
+ install_celix_bundle(event_publisher)
-target_link_libraries(event_publisher celix_framework celix_utils)
+target_link_libraries(event_publisher Celix::framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example/CMakeLists.txt
index a18a675,16a8ce1..a2a2143
--- a/examples/dm_example/CMakeLists.txt
+++ b/examples/dm_example/CMakeLists.txt
@@@ -24,16 -27,16 +24,16 @@@ if (BUILD_DEPENDENCY_MANAGER
add_subdirectory(phase3)
- add_deploy(dm_example
- add_celix_container("dm_example"
++ add_celix_container(dm_example
COPY
BUNDLES
- shell
- shell_tui
- dm_shell
- phase1
- phase2a
- phase2b
- phase3
+ Celix::shell
+ Celix::shell_tui
+ Celix::dm_shell
+ dm_example_phase1
+ dm_example_phase2a
+ dm_example_phase2b
+ dm_example_phase3
PROPERTIES
LOGHELPER_ENABLE_STDOUT_FALLBACK=true
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example/api/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example/api/CMakeLists.txt
index 900c8fb,0000000..edbb643
mode 100644,000000..100644
--- a/examples/dm_example/api/CMakeLists.txt
+++ b/examples/dm_example/api/CMakeLists.txt
@@@ -1,19 -1,0 +1,19 @@@
+# 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_library(dm_example_api INTERFACE)
- target_include_directories(dm_example_api INTERFACE include)
++target_include_directories(dm_example_api INTERFACE include)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example/phase1/CMakeLists.txt
index 5263bab,dabb88f..09402ea
--- a/examples/dm_example/phase1/CMakeLists.txt
+++ b/examples/dm_example/phase1/CMakeLists.txt
@@@ -15,8 -15,12 +15,8 @@@
# specific language governing permissions and limitations
# under the License.
-include_directories(
- private/include
- ../services
-)
- add_bundle(dm_example_phase1
-add_celix_bundle(phase1
++add_celix_bundle(dm_example_phase1
SYMBOLIC_NAME phase1
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example/phase2a/CMakeLists.txt
index cda4971,0bd8e7e..82a6fb5
--- a/examples/dm_example/phase2a/CMakeLists.txt
+++ b/examples/dm_example/phase2a/CMakeLists.txt
@@@ -15,7 -15,12 +15,7 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(dm_example_phase2a
-include_directories(
- private/include
- ../services
-)
-
-add_celix_bundle(phase2a
++add_celix_bundle(dm_example_phase2a
SYMBOLIC_NAME phase2a
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example/phase2b/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example/phase2b/CMakeLists.txt
index 9afb6c7,775e786..9172ad8
--- a/examples/dm_example/phase2b/CMakeLists.txt
+++ b/examples/dm_example/phase2b/CMakeLists.txt
@@@ -15,7 -15,12 +15,7 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(dm_example_phase2b
-include_directories(
- private/include
- ../services
-)
-
-add_celix_bundle(phase2b
++add_celix_bundle(dm_example_phase2b
SYMBOLIC_NAME phase2b
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example/phase3/CMakeLists.txt
index 1784057,163980f..7cad101
--- a/examples/dm_example/phase3/CMakeLists.txt
+++ b/examples/dm_example/phase3/CMakeLists.txt
@@@ -15,7 -15,12 +15,7 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(dm_example_phase3
-include_directories(
- private/include
- ../services
-)
-
-add_celix_bundle(phase3
++add_celix_bundle(dm_example_phase3
SYMBOLIC_NAME phase3
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example_cxx/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example_cxx/phase1/CMakeLists.txt
index 0832816,1a5d049..5007e77
--- a/examples/dm_example_cxx/phase1/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase1/CMakeLists.txt
@@@ -15,7 -15,12 +15,7 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(dm_example_cxx_phase1
-include_directories(
- include
- ../api
-)
-
-add_celix_bundle(phase1_cxx
++add_celix_bundle(dm_example_cxx_phase1
SYMBOLIC_NAME phase1_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example_cxx/phase2/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example_cxx/phase2/CMakeLists.txt
index 66f4ddd,0000000..f2b3813
mode 100644,000000..100644
--- a/examples/dm_example_cxx/phase2/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase2/CMakeLists.txt
@@@ -1,51 -1,0 +1,51 @@@
+# 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_bundle(dm_example_cxx_phase2a
++add_celix_bundle(dm_example_cxx_phase2a
+ SYMBOLIC_NAME phase2a_cxx
+ VERSION 0.0.1
+ SOURCES
+ src/Phase2aActivator.cc
+ src/Phase2aCmp.cc
+)
+target_include_directories(dm_example_cxx_phase2a PRIVATE src)
+target_link_libraries(dm_example_cxx_phase2a PRIVATE Celix::log_service_api dm_example_cxx_api)
+
- add_bundle(dm_example_cxx_phase2b
++add_celix_bundle(dm_example_cxx_phase2b
+ SYMBOLIC_NAME phase2b_cxx
+ VERSION 0.0.1
+ SOURCES
+ src/Phase2bActivator.cc
+ src/Phase2bCmp.cc
+ )
+target_include_directories(dm_example_cxx_phase2b PRIVATE src)
+target_link_libraries(dm_example_cxx_phase2b PRIVATE Celix::log_service_api dm_example_cxx_api)
+
+IF(APPLE)
+ target_link_libraries(dm_example_cxx_phase2a PRIVATE -Wl,-all_load Celix::dependency_manager_cxx_static)
+ target_link_libraries(dm_example_cxx_phase2b PRIVATE -Wl,-all_load Celix::dependency_manager_cxx_static)
+else()
+ if(ENABLE_ADDRESS_SANITIZER)
+ #With asan there can be undefined symbols
+ target_link_libraries(dm_example_cxx_phase2a PRIVATE -Wl,--whole-archive Celix::dependency_manager_cxx_static -Wl,--no-whole-archive)
+ target_link_libraries(dm_example_cxx_phase2b PRIVATE -Wl,--whole-archive Celix::dependency_manager_cxx_static -Wl,--no-whole-archive)
+ else()
+ target_link_libraries(dm_example_cxx_phase2a PRIVATE -Wl,--whole-archive Celix::dependency_manager_cxx_static -Wl,--no-whole-archive)
+ target_link_libraries(dm_example_cxx_phase2b PRIVATE -Wl,--whole-archive Celix::dependency_manager_cxx_static -Wl,--no-whole-archive)
+
+ endif()
+endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example_cxx/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example_cxx/phase3/CMakeLists.txt
index 2a62cbb,3c23582..3728abc
--- a/examples/dm_example_cxx/phase3/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase3/CMakeLists.txt
@@@ -15,7 -15,12 +15,7 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(dm_example_cxx_phase3
-include_directories(
- include
- ../api
-)
-
-add_celix_bundle(phase3_cxx
++add_celix_bundle(dm_example_cxx_phase3
SYMBOLIC_NAME phase3_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/dm_example_cxx/phase3_locking/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/dm_example_cxx/phase3_locking/CMakeLists.txt
index 2ea1eb4,ef10a33..35ca3c9
--- a/examples/dm_example_cxx/phase3_locking/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase3_locking/CMakeLists.txt
@@@ -15,8 -15,12 +15,8 @@@
# specific language governing permissions and limitations
# under the License.
-include_directories(
- include
- ../api
-)
- add_bundle(dm_example_cxx_phase3_locking
-add_celix_bundle(phase3_locking_cxx
++add_celix_bundle(dm_example_cxx_phase3_locking
SYMBOLIC_NAME phase3_locking_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/hello_world/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/hello_world/CMakeLists.txt
index ca72eec,e90149e..130cef0
--- a/examples/hello_world/CMakeLists.txt
+++ b/examples/hello_world/CMakeLists.txt
@@@ -32,7 -32,7 +32,7 @@@ add_library(hello_test2lib SHARE
)
set_library_version(hello_test2lib "3.3.3")
- add_bundle(hello_bundle
-add_celix_bundle(hello
++add_celix_bundle(hello_bundle
VERSION "1.2"
SOURCES
private/src/activator.c
@@@ -45,19 -45,19 +45,19 @@@ add_celix_bundle(hello_expor
EXPORT_LIBRARIES hello_test2lib
)
- bundle_private_libs(hello_bundle
-celix_bundle_private_libs(hello
++celix_bundle_private_libs(hello_bundle
hello_testlib
)
- add_deploy(helloworld_byref
+ add_celix_container(helloworld_byref
GROUP hello
- BUNDLES hello_export hello shell shell_tui
+ BUNDLES hello_export hello_bundle ${CELIX_SHELL_BUNDLE} ${CELIX_SHELL_TUI_BUNDLE}
)
- add_deploy(helloworld_withcopy
+ add_celix_container(helloworld_withcopy
GROUP hello
COPY #Ensures that bundles are copied in the deploy location
- BUNDLES hello_export hello shell shell_tui
+ BUNDLES hello_export hello_bundle ${SHELL_BUNDLE} ${SHELL_TUI_BUNDLE}
)
endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/hello_world_test/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/hello_world_test/CMakeLists.txt
index 08053e5,2d146fc..41045b2
--- a/examples/hello_world_test/CMakeLists.txt
+++ b/examples/hello_world_test/CMakeLists.txt
@@@ -16,22 -16,19 +16,22 @@@
# under the License.
#############################################################################
- ## NOTE Examples of using add_bundle and add_deploy and assorted commands ##
+ ## NOTE Examples of using add_celix_bundle and add_celix_container and assorted commands ##
#############################################################################
- add_bundle(hellotest1
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories(public/include)
-
+ add_celix_bundle(hellotest1
VERSION "1.2"
SOURCES
private/src/activator
)
+target_include_directories(hellotest1 PRIVATE
+ ${PROJECT_SOURCE_DIR}/utils/public/include
+ public/include
+)
+
+
- bundle_headers(hellotest1
+ celix_bundle_headers(hellotest1
"X-WebContent: web"
"X-MediaType: application/json"
)
@@@ -41,7 -38,7 +41,7 @@@ add_library(tlib SHARE
)
set_library_version(tlib "4.3.2") # sets target propery VERSION to 4.3.2 and SOVERSION to 4
--#bundle_private_libs(hellotest1
++#celix_bundle_private_libs(hellotest1
# #/usr/local/lib/libjansson.4.dylib
# /usr/lib64/libjansson.so.4
#)
@@@ -75,8 -72,7 +75,8 @@@ add_library(hello2act SHARE
private/src/activator
)
set_library_version(hello2act "3.2.4") #sets VERSION prop to 3.2.4 and SOVERSION to 3
+target_link_libraries(hello2act PRIVATE Celix::framework )
- add_bundle(hellotest2
+ add_celix_bundle(hellotest2
VERSION "1.0.0" #can be the same as activator lib, but does not have to be
ACTIVATOR hello2act
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/log_service_example/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/log_service_example/CMakeLists.txt
index 1326a0f,fffa68f..31f6fc8
--- a/examples/log_service_example/CMakeLists.txt
+++ b/examples/log_service_example/CMakeLists.txt
@@@ -17,15 -17,20 +17,15 @@@
#Importing and exporting libraries not (yet) work under OSX.
- add_bundle(log_service_example
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("public/include")
-include_directories("${CMAKE_SOURCE_DIR}/log_service/public/include")
-
+ add_celix_bundle(log_service_example
VERSION "1.0"
SOURCES
- private/src/activator.c
- ${CMAKE_SOURCE_DIR}/log_service/public/src/log_helper.c
+ src/activator.c
)
+target_include_directories(log_service_example PRIVATE src)
+target_link_libraries(log_service_example PRIVATE Celix::log_service_api Celix::log_helper)
- add_deploy(log_example
+ add_celix_container(log_example
GROUP log_service
- BUNDLES log_service_example log_service shell shell_tui
+ BUNDLES log_service_example Celix::log_service Celix::shell Celix::shell_tui
)
-
-target_link_libraries(log_service_example celix_framework celix_utils)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/mongoose/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/mongoose/CMakeLists.txt
index 118d923,2de051f..7119aa7
--- a/examples/mongoose/CMakeLists.txt
+++ b/examples/mongoose/CMakeLists.txt
@@@ -35,8 -35,8 +35,8 @@@ add_celix_bundle(mongoos
private/include/mongoose.h
)
- bundle_files(mongoose ${CMAKE_CURRENT_LIST_DIR}/root)
+ celix_bundle_files(mongoose ${CMAKE_CURRENT_LIST_DIR}/root)
-target_link_libraries(mongoose celix_framework mongooselib ${LIBS})
+target_link_libraries(mongoose PRIVATE mongooselib ${LIBS})
- add_deploy("mongoose_deploy" BUNDLES Celix::shell Celix::shell_tui log_service mongoose)
-add_celix_container("mongoose_deploy" BUNDLES shell shell_tui log_service mongoose)
++add_celix_container("mongoose_deploy" BUNDLES Celix::shell Celix::shell_tui log_service mongoose)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/service_hook_example/CMakeLists.txt
----------------------------------------------------------------------
diff --cc examples/service_hook_example/CMakeLists.txt
index 99e9b2a,8348059..9dbe7c0
--- a/examples/service_hook_example/CMakeLists.txt
+++ b/examples/service_hook_example/CMakeLists.txt
@@@ -15,16 -15,23 +15,16 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(hook_example
-if(NOT APPLE)
-#Importing and exporting libraries not (yet) work under OSX.
-
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("public/include")
-
+ add_celix_bundle(hook_example
- BUNDLE_SYMBOLICNAME "Hook_Example"
- VERSION "1.0.0"
- SOURCES
- private/src/activator
+ BUNDLE_SYMBOLICNAME "Hook_Example"
+ VERSION "1.0.0"
+ SOURCES
+ src/activator
)
- add_deploy(hook_service_example
-add_celix_container("hook_service_example"
- BUNDLES
- shell
- shell_tui
- hook_example
++add_celix_container(hook_service_example
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ hook_example
- )
+ )
-endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_c/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_c/bar/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_c/foo1/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_c/foo2/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_cxx/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_cxx/bar/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_cxx/baz/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/examples/services_example_cxx/foo/CMakeLists.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/framework/src/celix_launcher.c
----------------------------------------------------------------------
diff --cc framework/src/celix_launcher.c
index fe5d0c0,0000000..8a14e9b
mode 100644,000000..100644
--- a/framework/src/celix_launcher.c
+++ b/framework/src/celix_launcher.c
@@@ -1,315 -1,0 +1,317 @@@
+/**
+ *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.
+ */
+/*
+ * celix_launcher.c
+ *
+ * \date Mar 23, 2010
+ * \author <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+
+#include "celix_launcher.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <libgen.h>
+#include <signal.h>
+
+#ifndef CELIX_NO_CURLINIT
+#include <curl/curl.h>
+#endif
+
+#include <string.h>
+#include <curl/curl.h>
+#include <signal.h>
+#include <libgen.h>
+#include "celix_launcher.h"
+#include "framework.h"
+#include "linked_list_iterator.h"
+
+static void show_usage(char* prog_name);
+static void shutdown_framework(int signal);
+static void ignore(int signal);
+
+static int celixLauncher_launchWithConfigAndProps(const char *configFile, framework_pt *framework, properties_pt packedConfig);
+static int celixLauncher_launchWithStreamAndProps(FILE *stream, framework_pt *framework, properties_pt packedConfig);
+
+#define DEFAULT_CONFIG_FILE "config.properties"
+
+static framework_pt framework = NULL;
+
+/**
+ * Method kept because of usage in examples & unit tests
+ */
+int celixLauncher_launchWithArgs(int argc, char *argv[]) {
+ return celixLauncher_launchWithArgsAndProps(argc, argv, NULL);
+}
+
+int celixLauncher_launchWithArgsAndProps(int argc, char *argv[], properties_pt packedConfig) {
+ // Perform some minimal command-line option parsing...
+ char *opt = NULL;
+ if (argc > 1) {
+ opt = argv[1];
+ }
+
+ char *config_file = NULL;
+
+ if (opt) {
+ // Check whether the user wants some help...
+ if (strcmp("-h", opt) == 0 || strcmp("-help", opt) == 0) {
+ show_usage(argv[0]);
+ return 0;
+ } else {
+ config_file = opt;
+ }
+ } else {
+ config_file = DEFAULT_CONFIG_FILE;
+ }
+
+ struct sigaction sigact;
+ memset(&sigact, 0, sizeof(sigact));
+ sigact.sa_handler = shutdown_framework;
+ sigaction(SIGINT, &sigact, NULL);
+ sigaction(SIGTERM, &sigact, NULL);
+
+ memset(&sigact, 0, sizeof(sigact));
+ sigact.sa_handler = ignore;
+ sigaction(SIGUSR1, &sigact, NULL);
+ sigaction(SIGUSR2, &sigact, NULL);
+
+ int rc = celixLauncher_launchWithConfigAndProps(config_file, &framework, packedConfig);
+ if (rc == 0) {
+ celixLauncher_waitForShutdown(framework);
+ celixLauncher_destroy(framework);
+ }
+ return rc;
+}
+
+static void show_usage(char* prog_name) {
+ printf("Usage:\n %s [path/to/config.properties]\n\n", basename(prog_name));
+}
+
+static void shutdown_framework(int signal) {
+ if (framework != NULL) {
+ celixLauncher_stop(framework); //NOTE main thread will destroy
+ }
+}
+
+static void ignore(int signal) {
+ //ignoring for signal SIGUSR1, SIGUSR2. Can be used on threads
+}
+
+int celixLauncher_launch(const char *configFile, framework_pt *framework) {
+ return celixLauncher_launchWithConfigAndProps(configFile, framework, NULL);
+}
+
+static int celixLauncher_launchWithConfigAndProps(const char *configFile, framework_pt *framework, properties_pt packedConfig){
+ int status = 0;
+ FILE *config = fopen(configFile, "r");
+
+ if (config != NULL && packedConfig != NULL) {
+ status = celixLauncher_launchWithStreamAndProps(config, framework, packedConfig);
+ } else if (config != NULL) {
+ status = celixLauncher_launchWithStream(config, framework);
+ } else if (packedConfig != NULL) {
+ status = celixLauncher_launchWithProperties(packedConfig, framework);
+ } else {
+ fprintf(stderr, "Error: invalid or non-existing configuration file: '%s'.", configFile);
+ perror("");
+ status = 1;
+ }
+
+ return status;
+}
+
+int celixLauncher_launchWithStream(FILE *stream, framework_pt *framework) {
+ int status = 0;
+
+ properties_pt config = properties_loadWithStream(stream);
+ fclose(stream);
+ // Make sure we've read it and that nothing went wrong with the file access...
+ if (config == NULL) {
+ fprintf(stderr, "Error: invalid configuration file");
+ perror(NULL);
+ status = 1;
+ }
+ else {
+ status = celixLauncher_launchWithProperties(config, framework);
+ }
+
+ return status;
+}
+
+static int celixLauncher_launchWithStreamAndProps(FILE *stream, framework_pt *framework, properties_pt packedConfig){
+ int status = 0;
+
+ properties_pt runtimeConfig = properties_loadWithStream(stream);
+ fclose(stream);
+
+ // Make sure we've read it and that nothing went wrong with the file access...
+ // If there is no runtimeConfig, the packedConfig can be stored as global config
+ if (runtimeConfig == NULL){
+ runtimeConfig = packedConfig;
+ }
+
+ if (runtimeConfig == NULL) {
+ fprintf(stderr, "Error: invalid configuration file");
+ perror(NULL);
+ status = 1;
+ } else {
+ // Check if there's a pre-compiled config available
+ if (packedConfig != NULL){
+ // runtimeConfig and packedConfig must be merged
+ // when a duplicate of a key is available, the runtimeConfig must be prioritized
+
+ hash_map_iterator_t iter = hashMapIterator_construct(packedConfig);
+
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(&iter);
+
+ while (entry != NULL) {
+ const char * key = (const char *) hashMapEntry_getKey(entry);
+ const char * value = (const char *) hashMapEntry_getValue(entry);
+
+ // Check existence of key in runtimeConfig
+ if (!hashMap_containsKey(runtimeConfig, key)) {
+ properties_set(runtimeConfig, key, value);
+ }
+
+ entry = hashMapIterator_nextEntry(&iter);
+ if (entry != NULL) {
+ key = (const char *) hashMapEntry_getKey(entry);
+ value = (const char *) hashMapEntry_getValue(entry);
+ }
+ }
+
+ // normally, the framework_destroy will clean up the properties_pt
+ // since there are 2 properties_pt available (runtimeConfig and packedConfig)
+ // the packedConfig must be destroyed
+ properties_destroy(packedConfig);
+ }
+
+ status = celixLauncher_launchWithProperties(runtimeConfig, framework);
+ }
+
+ return status;
+}
+
+int celixLauncher_launchWithProperties(properties_pt config, framework_pt *framework) {
+ celix_status_t status;
+#ifndef CELIX_NO_CURLINIT
+ // Before doing anything else, let's setup Curl
+ curl_global_init(CURL_GLOBAL_NOTHING);
+#endif
+
+ const char* autoStartProp = properties_get(config, "cosgi.auto.start.1");
+ char* autoStart = NULL;
+ if (autoStartProp != NULL) {
+ autoStart = strndup(autoStartProp, 1024*10);
+ }
+
+ status = framework_create(framework, config);
+ bundle_pt fwBundle = NULL;
+ if (status == CELIX_SUCCESS) {
+ status = fw_init(*framework);
+ if (status == CELIX_SUCCESS) {
+ // Start the system bundle
+ status = framework_getFrameworkBundle(*framework, &fwBundle);
+
+ if(status == CELIX_SUCCESS){
+ bundle_start(fwBundle);
+
+ char delims[] = " ";
+ char *result = NULL;
+ char *save_ptr = NULL;
+ linked_list_pt bundles;
+ array_list_pt installed = NULL;
+ bundle_context_pt context = NULL;
+ linked_list_iterator_pt iter = NULL;
+ unsigned int i;
+
+ linkedList_create(&bundles);
- result = strtok_r(autoStart, delims, &save_ptr);
- while (result != NULL) {
- char *location = strdup(result);
- linkedList_addElement(bundles, location);
- result = strtok_r(NULL, delims, &save_ptr);
++ if (autoStart != NULL) {
++ result = strtok_r(autoStart, delims, &save_ptr);
++ while (result != NULL) {
++ char *location = strdup(result);
++ linkedList_addElement(bundles, location);
++ result = strtok_r(NULL, delims, &save_ptr);
++ }
+ }
+ // First install all bundles
+ // Afterwards start them
+ arrayList_create(&installed);
+ bundle_getContext(fwBundle, &context);
+ iter = linkedListIterator_create(bundles, 0);
+ while (linkedListIterator_hasNext(iter)) {
+ bundle_pt current = NULL;
+ char *location = (char *) linkedListIterator_next(iter);
+ if (bundleContext_installBundle(context, location, ¤t) == CELIX_SUCCESS) {
+ // Only add bundle if it is installed correctly
+ arrayList_add(installed, current);
+ } else {
+ printf("Could not install bundle from %s\n", location);
+ }
+ linkedListIterator_remove(iter);
+ free(location);
+ }
+ linkedListIterator_destroy(iter);
+ linkedList_destroy(bundles);
+
+ for (i = 0; i < arrayList_size(installed); i++) {
+ bundle_pt installedBundle = (bundle_pt) arrayList_get(installed, i);
+ bundle_startWithOptions(installedBundle, 0);
+ }
+
+ arrayList_destroy(installed);
+ }
+ }
+ }
+
+ if (status != CELIX_SUCCESS) {
+ printf("Problem creating framework\n");
+ }
+
+ printf("Launcher: Framework Started\n");
+
+ free(autoStart);
+
+ return status;
+}
+
+void celixLauncher_waitForShutdown(framework_pt framework) {
+ framework_waitForStop(framework);
+}
+
+void celixLauncher_destroy(framework_pt framework) {
+ framework_destroy(framework);
+
+#ifndef CELIX_NO_CURLINIT
+ // Cleanup Curl
+ curl_global_cleanup();
+#endif
+
+ printf("Launcher: Exit\n");
+}
+
+void celixLauncher_stop(framework_pt framework) {
+ bundle_pt fwBundle = NULL;
+ if( framework_getFrameworkBundle(framework, &fwBundle) == CELIX_SUCCESS){
+ bundle_stop(fwBundle);
+ }
+}
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/log_service/CMakeLists.txt
----------------------------------------------------------------------
diff --cc log_service/CMakeLists.txt
index 70afb0e,856e21d..bd59961
--- a/log_service/CMakeLists.txt
+++ b/log_service/CMakeLists.txt
@@@ -18,49 -18,37 +18,50 @@@
celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" ON DEPS framework)
if (LOG_SERVICE)
+ add_library(log_service_api INTERFACE)
+ target_include_directories(log_service_api INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<INSTALL_INTERFACE:include/celix/log_service>
+ )
+ install(TARGETS log_service_api EXPORT celix)
+ install(DIRECTORY include/ DESTINATION include/celix/log_service)
+
+ add_library(log_helper STATIC src/log_helper.c)
++ set_target_properties(log_helper PROPERTIES OUTPUT_NAME "celix_log_helper")
+ target_include_directories(log_helper PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/loghelper_include>
+ $<INSTALL_INTERFACE:include/celix/log_helper>
+ )
+ target_link_libraries(log_helper PUBLIC Celix::framework log_service_api)
+ install(TARGETS log_helper EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT log_service)
+ install(DIRECTORY loghelper_include/ DESTINATION include/celix/log_helper COMPONENT log_service)
+
- add_bundle(log_service
+ add_celix_bundle(log_service
SYMBOLIC_NAME "apache_celix_log_service"
NAME "Apache Celix Log Service"
VERSION "1.1.0"
SOURCES
- private/src/log
- private/src/log_entry
- private/src/log_factory
- private/src/log_service_impl
- private/src/log_service_activator
- private/src/log_reader_service_impl
-
- private/include/log.h
- private/include/log_factory.h
- private/include/log_reader_service_impl.h
- private/include/log_service_impl.h
+ src/log
+ src/log_entry
+ src/log_factory
+ src/log_service_impl
+ src/log_service_activator
+ src/log_reader_service_impl
)
- install_bundle(log_service
+ install_celix_bundle(log_service
HEADERS
- public/include/log_service.h
- public/include/log_reader_service.h
- public/include/log_listener.h
- public/include/log_entry.h
- public/include/log_helper.h
- RESOURCES
- public/src/log_helper.c
+ include/log_service.h
+ include/log_reader_service.h
+ include/log_listener.h
+ include/log_entry.h
)
-
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/log_service/private/include")
- target_link_libraries(log_service celix_framework)
+
+ target_include_directories(log_service PRIVATE src)
+ target_link_libraries(log_service PRIVATE log_service_api)
+
+ #Setup target aliases to match external usage
+ add_library(Celix::log_service_api ALIAS log_service_api)
+ add_library(Celix::log_service ALIAS log_service)
+ add_library(Celix::log_helper ALIAS log_helper)
endif (LOG_SERVICE)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/log_writer/log_writer/CMakeLists.txt
----------------------------------------------------------------------
diff --cc log_writer/log_writer/CMakeLists.txt
index 09aa9cf,0000000..cc6b8eb
mode 100644,000000..100644
--- a/log_writer/log_writer/CMakeLists.txt
+++ b/log_writer/log_writer/CMakeLists.txt
@@@ -1,24 -1,0 +1,24 @@@
+# 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_library(log_writer_common STATIC
+ src/log_writer.c
+ src/log_writer_activator.c
+)
+target_include_directories(log_writer_common PRIVATE src)
+target_include_directories(log_writer_common PUBLIC include)
- target_link_libraries(log_writer_common PUBLIC Celix::log_service_api Celix::framework)
++target_link_libraries(log_writer_common PUBLIC Celix::log_service_api Celix::framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/log_writer/log_writer_stdout/CMakeLists.txt
----------------------------------------------------------------------
diff --cc log_writer/log_writer_stdout/CMakeLists.txt
index 6070b2e,6502792..94effae
--- a/log_writer/log_writer_stdout/CMakeLists.txt
+++ b/log_writer/log_writer_stdout/CMakeLists.txt
@@@ -15,14 -15,22 +15,14 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(log_writer_stdout
-add_celix_bundle(log_writer
++add_celix_bundle(log_writer_stdout
SYMBOLIC_NAME "apache_celix_log_writer"
VERSION "1.1.0"
NAME "Apache Celix Log Writer"
SOURCES
- ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer_activator
- ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer
- ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include/log_writer.h
-
- private/src/log_writer_stdout
+ src/log_writer_stdout
)
- install_bundle(log_writer_stdout)
-install_celix_bundle(log_writer)
-
-target_link_libraries(log_writer celix_framework)
-
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include")
++install_celix_bundle(log_writer_stdout)
+
- target_link_libraries(log_writer_stdout PRIVATE Celix::log_service_api log_writer_common)
++target_link_libraries(log_writer_stdout PRIVATE Celix::log_service_api log_writer_common)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/log_writer/log_writer_syslog/CMakeLists.txt
----------------------------------------------------------------------
diff --cc log_writer/log_writer_syslog/CMakeLists.txt
index b98b914,faa7905..e2003d5
--- a/log_writer/log_writer_syslog/CMakeLists.txt
+++ b/log_writer/log_writer_syslog/CMakeLists.txt
@@@ -23,10 -23,18 +23,10 @@@ if (LOG_WRITER_SYSLOG
SYMBOLIC_NAME "apache_celix_log_writer_syslog"
NAME "Apache Celix Log Writer Syslog"
SOURCES
- ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer_activator
- ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer
- ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include/log_writer.h
-
- private/src/log_writer_syslog
+ private/src/log_writer_syslog
)
- install_bundle(log_writer_syslog)
+ install_celix_bundle(log_writer_syslog)
-
- target_link_libraries(log_writer_syslog celix_framework)
-
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include")
+
+ target_link_libraries(log_writer_syslog PRIVATE log_writer_common)
endif (LOG_WRITER_SYSLOG)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/CMakeLists.txt
index 79f8168,5afc296..e3db995
--- a/pubsub/CMakeLists.txt
+++ b/pubsub/CMakeLists.txt
@@@ -34,12 -35,13 +34,12 @@@ if (PUBSUB
add_subdirectory(keygen)
add_subdirectory(mock)
+ add_subdirectory(examples)
if (ENABLE_TESTING)
- option(BUILD_PUBSUB_TESTS "Enable Tests for PUBSUB" OFF)
+ option(BUILD_PUBSUB_TESTS "Enable Tests for PUBSUB" OFF)
endif()
- if (ENABLE_TESTING AND BUILD_PUBSUB_TESTS)
+ if (ENABLE_TESTING AND BUILD_PUBSUB_TESTS AND BUILD_PUBSUB_PSA_ZMQ)
add_subdirectory(test)
endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/examples/CMakeLists.txt
index b79b101,22ca5ca..6703324
--- a/pubsub/examples/CMakeLists.txt
+++ b/pubsub/examples/CMakeLists.txt
@@@ -17,216 -17,3 +17,216 @@@
add_subdirectory(pubsub)
add_subdirectory(mp_pubsub)
+
+find_program(ETCD_CMD NAMES etcd)
+find_program(XTERM_CMD NAMES xterm)
+
+# UDP Multicast
- add_deploy(pubsub_publisher_udp_mc
++add_celix_container(pubsub_publisher_udp_mc
+ GROUP pubsub
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_udp_multicast
+ celix_pubsub_poi_publisher
+ celix_pubsub_poi_publisher2
+ )
+
- add_deploy("pubsub_subscriber_udp_mc"
++add_celix_container("pubsub_subscriber_udp_mc"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_udp_multicast
+ celix_pubsub_poi_subscriber
+ )
+
- add_deploy("pubsub_subscriber2_udp_mc"
++add_celix_container("pubsub_subscriber2_udp_mc"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_udp_multicast
+ celix_pubsub_poi_subscriber
+ )
+
+if (ETCD_CMD AND XTERM_CMD)
+ #Runtime starting a publish and subscriber for udp mc
+ add_runtime(pubsub_rt_upd_mc
+ NAME udp_mc
+ GROUP pubsub
+ DEPLOYMENTS
+ pubsub_publisher_udp_mc
+ pubsub_subscriber_udp_mc
+ pubsub_subscriber2_udp_mc
+ COMMANDS
+ etcd
+ USE_TERM
+ )
+endif ()
+
+if (BUILD_PUBSUB_PSA_ZMQ)
+
+ # Dynamic ZMQ / UDP admin
- add_deploy("pubsub_publisher"
++ add_celix_container("pubsub_publisher"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_zmq
+ Celix::pubsub_admin_udp_multicast
+ celix_pubsub_poi_publisher
+ celix_pubsub_poi_publisher2
+ PROPERTIES
+ poi1.psa=zmq
+ poi2.psa=udp
+ )
+
- add_deploy("pubsub_subscriber"
++ add_celix_container("pubsub_subscriber"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_zmq
+ Celix::pubsub_admin_udp_multicast
+ celix_pubsub_poi_subscriber
+ PROPERTIES
+ poi1.psa=zmq
+ poi2.psa=udp
+ )
+
+ # ZMQ
- add_deploy("pubsub_zmq"
++ add_celix_container("pubsub_zmq"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
- org.apache.celix.pubsub_admin.PubSubAdminZmq
++ Celix::pubsub_admin_zmq
+ celix_pubsub_poi_publisher
+ celix_pubsub_poi_subscriber
+ )
+
- add_deploy("pubsub_publisher_zmq"
++ add_celix_container("pubsub_publisher_zmq"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_zmq
+ celix_pubsub_poi_publisher
+ celix_pubsub_poi_publisher2
+ PROPERTIES
+ pubsub.scope=my_small_scope
+ )
+
- add_deploy("pubsub_subscriber_zmq"
++ add_celix_container("pubsub_subscriber_zmq"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
- org.apache.celix.pubsub_admin.PubSubAdminZmq
++ Celix::pubsub_admin_zmq
+ celix_pubsub_poi_subscriber
+ )
+
- add_deploy("pubsub_subscriber2_zmq"
++ add_celix_container("pubsub_subscriber2_zmq"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_zmq
+ celix_pubsub_poi_subscriber
+
+ )
+
+ # ZMQ Multipart
- add_deploy("pubsub_mp_subscriber_zmq"
++ add_celix_container("pubsub_mp_subscriber_zmq"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_zmq
+ org.apache.celix.pubsub_subscriber.MpSubscriber
+ )
+
- add_deploy("pubsub_mp_publisher_zmq"
++ add_celix_container("pubsub_mp_publisher_zmq"
+ GROUP "pubsub"
+ BUNDLES
+ Celix::shell
+ Celix::shell_tui
+ Celix::pubsub_serializer_json
+ Celix::pubsub_discovery_etcd
+ Celix::pubsub_topology_manager
+ Celix::pubsub_admin_zmq
+ org.apache.celix.pubsub_publisher.MpPublisher
+ )
+
+ if (ETCD_CMD AND XTERM_CMD)
+ #Runtime starting two bundles using both zmq and upd mc pubsub
+ add_runtime(pubsub_rt_zmq_udpmc_combi
+ NAME combi
+ GROUP pubsub
+ DEPLOYMENTS
+ pubsub_publisher_zmq
+ pubsub_subscriber_zmq
+ pubsub_subscriber_zmq
+ COMMANDS
+ etcd
+ USE_TERM
+ )
+
+ #Runtime starting a publish and 2 subscribers for zmq
+ add_runtime(pubsub_rt_zmq
+ NAME zmq
+ GROUP pubsub
+ DEPLOYMENTS
+ pubsub_publisher
+ pubsub_subscriber_zmq
+ pubsub_subscriber2_zmq
+ COMMANDS
+ etcd
+ USE_TERM
+ )
+
+ #Runtime starting a multipart (multiple message in one send) publish and subscriber for zmq
+ add_runtime(pubsub_rt_multipart_zmq
+ NAME zmq_multipart
+ GROUP pubsub
+ DEPLOYMENTS
+ pubsub_mp_subscriber_zmq
+ pubsub_mp_publisher_zmq
+ COMMANDS
+ etcd
+ USE_TERM
+ )
+ endif ()
+
+endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
index e837d7f,fef69e4..653387e
--- a/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
@@@ -15,17 -15,22 +15,17 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(org.apache.celix.pubsub_publisher.MpPublisher
-include_directories("private/include")
-include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/common/include")
-
+ add_celix_bundle(org.apache.celix.pubsub_publisher.MpPublisher
SYMBOLIC_NAME "apache_celix_pubsub_mp_publisher"
VERSION "1.0.0"
SOURCES
private/src/mp_pub_activator.c
private/src/mp_publisher.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
+target_link_libraries(org.apache.celix.pubsub_publisher.MpPublisher PRIVATE Celix::framework Celix::pubsub_api)
+target_include_directories(org.apache.celix.pubsub_publisher.MpPublisher PRIVATE private/include)
- bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
+ celix_bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ew.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ide.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_kinematics.descriptor
[05/11] celix git commit: CELIX-412: Some more refactoring for update
Celix CMake function names
Posted by pn...@apache.org.
CELIX-412: Some more refactoring for update Celix CMake function names
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/06e4d113
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/06e4d113
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/06e4d113
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: 06e4d113abaacf3e3d1cdb6349b63cd70739c97e
Parents: 0162095
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Jan 17 20:40:36 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Jan 17 20:40:36 2018 +0100
----------------------------------------------------------------------
CMakeLists.txt | 2 +-
cmake/cmake_celix/BundlePackaging.cmake | 4 ++--
device_access/example/CMakeLists.txt | 2 +-
framework/private/src/celix_launcher.c | 12 +++++++-----
pubsub/CMakeLists.txt | 2 +-
pubsub/examples/mp_pubsub/publisher/CMakeLists.txt | 6 +++---
pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt | 6 +++---
pubsub/examples/pubsub/publisher/CMakeLists.txt | 8 ++++----
pubsub/examples/pubsub/publisher2/CMakeLists.txt | 8 ++++----
pubsub/examples/pubsub/subscriber/CMakeLists.txt | 8 ++++----
pubsub/pubsub_topology_manager/CMakeLists.txt | 2 +-
pubsub/test/CMakeLists.txt | 4 ++--
remote_services/examples/CMakeLists.txt | 12 ++++++------
.../examples/calculator_service/CMakeLists.txt | 2 +-
.../examples/calculator_shell/CMakeLists.txt | 2 +-
.../rsa_tst/bundle/CMakeLists.txt | 2 +-
.../topology_manager/tms_tst/bundle/CMakeLists.txt | 2 +-
17 files changed, 43 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2fbf62d..8151cd2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,7 +91,7 @@ add_subdirectory(framework)
include_directories(framework/public/include)
add_subdirectory(launcher)
-add_subdirectory(config_admin)
+#add_subdirectory(config_admin) config admin is unstable
add_subdirectory(device_access)
add_subdirectory(deployment_admin)
add_subdirectory(remote_services)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/cmake/cmake_celix/BundlePackaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/BundlePackaging.cmake b/cmake/cmake_celix/BundlePackaging.cmake
index 7a126e9..e336dbb 100644
--- a/cmake/cmake_celix/BundlePackaging.cmake
+++ b/cmake/cmake_celix/BundlePackaging.cmake
@@ -338,7 +338,7 @@ function(celix_bundle_libs)
if ("${LIB}" STREQUAL "${BUNDLE}")
#ignore. Do not have to link agaist own lib
elseif(IS_LIB)
- target_link_libraries(${BUNDLE} ${LIB})
+ target_link_libraries(${BUNDLE} PRIVATE ${LIB})
endif()
endforeach()
@@ -370,7 +370,7 @@ function(celix_bundle_import_libs)
list(APPEND LIBS "$<TARGET_SONAME_FILE_NAME:${LIB}>")
endif()
- target_link_libraries(${BUNDLE} ${LIB})
+ target_link_libraries(${BUNDLE} PRIVATE ${LIB})
endforeach()
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/device_access/example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/CMakeLists.txt b/device_access/example/CMakeLists.txt
index 89b4f21..f7062b4 100644
--- a/device_access/example/CMakeLists.txt
+++ b/device_access/example/CMakeLists.txt
@@ -25,7 +25,7 @@ if(DEVICE_ACCESS_EXAMPLE)
BUNDLES device_manager driver_locator shell shell_tui log_service base_driver
)
- deploy_bundles_dir(device_access_example
+ celix_container_bundles_dir(device_access_example
DIR_NAME "drivers"
BUNDLES word_consumingdriver char_refiningdriver
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/framework/private/src/celix_launcher.c
----------------------------------------------------------------------
diff --git a/framework/private/src/celix_launcher.c b/framework/private/src/celix_launcher.c
index 16410bc..126d8d3 100644
--- a/framework/private/src/celix_launcher.c
+++ b/framework/private/src/celix_launcher.c
@@ -244,11 +244,13 @@ int celixLauncher_launchWithProperties(properties_pt config, framework_pt *frame
unsigned int i;
linkedList_create(&bundles);
- result = strtok_r(autoStart, delims, &save_ptr);
- while (result != NULL) {
- char *location = strdup(result);
- linkedList_addElement(bundles, location);
- result = strtok_r(NULL, delims, &save_ptr);
+ if (autoStart != NULL) {
+ result = strtok_r(autoStart, delims, &save_ptr);
+ while (result != NULL) {
+ char *location = strdup(result);
+ linkedList_addElement(bundles, location);
+ result = strtok_r(NULL, delims, &save_ptr);
+ }
}
// First install all bundles
// Afterwards start them
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/CMakeLists.txt b/pubsub/CMakeLists.txt
index 2c2c50f..5afc296 100644
--- a/pubsub/CMakeLists.txt
+++ b/pubsub/CMakeLists.txt
@@ -41,7 +41,7 @@ if (PUBSUB)
if (ENABLE_TESTING)
option(BUILD_PUBSUB_TESTS "Enable Tests for PUBSUB" OFF)
endif()
- if (ENABLE_TESTING AND BUILD_PUBSUB_TESTS)
+ if (ENABLE_TESTING AND BUILD_PUBSUB_TESTS AND BUILD_PUBSUB_PSA_ZMQ)
add_subdirectory(test)
endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt b/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
index d2bd754..fef69e4 100644
--- a/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
@@ -30,19 +30,19 @@ add_celix_bundle(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ew.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ide.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_kinematics.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.MpPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt b/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
index 32258a8..f2d2aaa 100644
--- a/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
@@ -30,19 +30,19 @@ add_celix_bundle( org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files( org.apache.celix.pubsub_subscriber.MpSubscriber
+celix_bundle_files( org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ew.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ide.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_kinematics.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher/public
DESTINATION "META-INF/keys/publisher"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/examples/pubsub/publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/pubsub/publisher/CMakeLists.txt b/pubsub/examples/pubsub/publisher/CMakeLists.txt
index 2f7d671..dec002d 100644
--- a/pubsub/examples/pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher/CMakeLists.txt
@@ -29,24 +29,24 @@ add_celix_bundle(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/pub"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/examples/pubsub/publisher2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/pubsub/publisher2/CMakeLists.txt b/pubsub/examples/pubsub/publisher2/CMakeLists.txt
index c03ac64..1defeb0 100644
--- a/pubsub/examples/pubsub/publisher2/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher2/CMakeLists.txt
@@ -29,24 +29,24 @@ add_celix_bundle(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/pub"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
+celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/examples/pubsub/subscriber/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/pubsub/subscriber/CMakeLists.txt b/pubsub/examples/pubsub/subscriber/CMakeLists.txt
index 7f28dfe..8bcec93 100644
--- a/pubsub/examples/pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/pubsub/subscriber/CMakeLists.txt
@@ -30,24 +30,24 @@ add_celix_bundle(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/sub"
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber
DESTINATION "META-INF/keys"
)
-bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher/public
DESTINATION "META-INF/keys/publisher"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/pubsub_topology_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_topology_manager/CMakeLists.txt b/pubsub/pubsub_topology_manager/CMakeLists.txt
index 680673b..a064143 100644
--- a/pubsub/pubsub_topology_manager/CMakeLists.txt
+++ b/pubsub/pubsub_topology_manager/CMakeLists.txt
@@ -34,7 +34,7 @@ add_celix_bundle(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-bundle_files(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
+celix_bundle_files(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include/pubsub_topic_info.descriptor
DESTINATION "META-INF/descriptors/services"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/pubsub/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/test/CMakeLists.txt b/pubsub/test/CMakeLists.txt
index 4150b3e..41fffe0 100644
--- a/pubsub/test/CMakeLists.txt
+++ b/pubsub/test/CMakeLists.txt
@@ -32,7 +32,7 @@ add_celix_bundle(pubsub_sut
VERSION 1.0.0
)
target_link_libraries(pubsub_sut celix_framework celix_utils)
-bundle_files(pubsub_sut
+celix_bundle_files(pubsub_sut
msg_descriptors/msg.descriptor
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
@@ -71,7 +71,7 @@ else ()
target_link_libraries(pubsub_tst celix_framework celix_utils)
endif ()
-bundle_files(pubsub_tst
+celix_bundle_files(pubsub_tst
msg_descriptors/msg.descriptor
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/remote_services/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/CMakeLists.txt b/remote_services/examples/CMakeLists.txt
index b919760..8916a18 100644
--- a/remote_services/examples/CMakeLists.txt
+++ b/remote_services/examples/CMakeLists.txt
@@ -37,7 +37,7 @@ if (RSA_EXAMPLES)
DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8082/org.apache.celix.discovery.configured
DISCOVERY_CFG_SERVER_PORT=8081
)
- deploy_bundles_dir(remote-services-cfg-server DIR_NAME "endpoints" BUNDLES
+ celix_container_bundles_dir(remote-services-cfg-server DIR_NAME "endpoints" BUNDLES
org.apache.celix.calc.api.Calculator_endpoint
org.apache.celix.calc.api.Calculator2_endpoint
)
@@ -51,7 +51,7 @@ if (RSA_EXAMPLES)
DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8081/org.apache.celix.discovery.configured
DISCOVERY_CFG_SERVER_PORT=8082
)
- deploy_bundles_dir(remote-services-cfg-client DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-cfg-client DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_proxy org.apache.celix.calc.api.Calculator2_proxy
)
endif()
@@ -62,7 +62,7 @@ if (RSA_EXAMPLES)
GROUP "remote-services/remote-services-shm"
BUNDLES discovery_shm topology_manager remote_service_admin_shm calculator shell shell_tui log_service log_writer
)
- deploy_bundles_dir(remote-services-shm DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-shm DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_endpoint
)
@@ -71,7 +71,7 @@ if (RSA_EXAMPLES)
GROUP "remote-services/remote-services-shm"
BUNDLES topology_manager remote_service_admin_shm shell shell_tui log_service log_writer calculator_shell discovery_shm
)
- deploy_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_proxy
)
endif ()
@@ -82,7 +82,7 @@ if (RSA_EXAMPLES)
GROUP "remote-services/remote-services-etcd"
BUNDLES discovery_etcd topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
)
- deploy_bundles_dir(remote-services-etcd DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-etcd DIR_NAME "endpoints"
BUNDLES
org.apache.celix.calc.api.Calculator_endpoint
org.apache.celix.calc.api.Calculator2_endpoint
@@ -93,7 +93,7 @@ if (RSA_EXAMPLES)
GROUP "remote-services/remote-services-etcd"
BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_etcd
)
- deploy_bundles_dir(remote-services-etcd-client DIR_NAME "endpoints"
+ celix_container_bundles_dir(remote-services-etcd-client DIR_NAME "endpoints"
BUNDLES org.apache.celix.calc.api.Calculator_proxy
)
endif ()
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/remote_services/examples/calculator_service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_service/CMakeLists.txt b/remote_services/examples/calculator_service/CMakeLists.txt
index d1cf31d..32cbea2 100644
--- a/remote_services/examples/calculator_service/CMakeLists.txt
+++ b/remote_services/examples/calculator_service/CMakeLists.txt
@@ -31,7 +31,7 @@ add_celix_bundle(calculator SOURCES
VERSION 0.0.1
)
-bundle_files(calculator public/include/org.apache.celix.calc.api.Calculator2.descriptor
+celix_bundle_files(calculator public/include/org.apache.celix.calc.api.Calculator2.descriptor
DESTINATION .)
target_link_libraries(calculator celix_framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/remote_services/examples/calculator_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_shell/CMakeLists.txt b/remote_services/examples/calculator_shell/CMakeLists.txt
index f6948a0..2a49b3b 100644
--- a/remote_services/examples/calculator_shell/CMakeLists.txt
+++ b/remote_services/examples/calculator_shell/CMakeLists.txt
@@ -34,7 +34,7 @@ add_celix_bundle(calculator_shell SOURCES
SYMBOLIC_NAME "apache_celix_remoting_calculator_shell"
)
-bundle_files(calculator_shell
+celix_bundle_files(calculator_shell
../calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
#private/include/org.apache.celix.calc.api.Calculator2.descriptor ##Use this descriptor in case you want to try out versioning!
DESTINATION .
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
index d25517e..41fbccc 100644
--- a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
@@ -29,7 +29,7 @@ add_celix_bundle(rsa_dfi_tst_bundle
tst_activator.c
)
-bundle_files(rsa_dfi_tst_bundle
+celix_bundle_files(rsa_dfi_tst_bundle
${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
DESTINATION .
)
http://git-wip-us.apache.org/repos/asf/celix/blob/06e4d113/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
index df49a95..6cf53fb 100644
--- a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
@@ -27,7 +27,7 @@ add_celix_bundle(topology_manager_test_bundle
SOURCES
tst_activator.c
)
-bundle_files(topology_manager_test_bundle
+celix_bundle_files(topology_manager_test_bundle
org.apache.celix.test.MyBundle.descriptor
DESTINATION .
)
[06/11] celix git commit: CELIX-418: disable building docker dir in
osx
Posted by pn...@apache.org.
CELIX-418: disable building docker dir in osx
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/5f0bc1ce
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/5f0bc1ce
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/5f0bc1ce
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: 5f0bc1ce9c1b1f9df62a55b4632071625e604316
Parents: 06e4d11
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Jan 17 21:03:22 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Jan 17 21:03:22 2018 +0100
----------------------------------------------------------------------
cmake/cmake_celix/DockerPackaging.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/5f0bc1ce/cmake/cmake_celix/DockerPackaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/DockerPackaging.cmake b/cmake/cmake_celix/DockerPackaging.cmake
index e0ffe5e..74279c4 100644
--- a/cmake/cmake_celix/DockerPackaging.cmake
+++ b/cmake/cmake_celix/DockerPackaging.cmake
@@ -130,7 +130,7 @@ $<JOIN:$<TARGET_PROPERTY:${DOCKER_TARGET},DOCKER_PROPERTIES>,\\n\\
INPUT "${LAUNCHER_STAGE1}"
)
- add_executable(${DOCKER_TARGET} ${LAUNCHER_SRC})
+ add_executable(${DOCKER_TARGET} EXCLUDE_FROM_ALL ${LAUNCHER_SRC})
# set_target_properties(${DOCKER_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${DOCKER_LOC})
target_include_directories(${DOCKER_TARGET} PRIVATE ${CELIX_INCLUDE_DIRS})
target_link_libraries(${DOCKER_TARGET} PRIVATE ${CELIX_FRAMEWORK_LIBRARY} ${CELIX_UTILS_LIBRARY})
[02/11] celix git commit: CELIX-412: Refactors usage of add_bundle
and add_deploy to add_celix_bundle and add_celix_container
Posted by pn...@apache.org.
CELIX-412: Refactors usage of add_bundle and add_deploy to add_celix_bundle and add_celix_container
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/68775a04
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/68775a04
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/68775a04
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: 68775a042db99c51d8aad33f9e20b049c183daf3
Parents: ee29b00
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 16 16:24:23 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 16 16:24:23 2018 +0100
----------------------------------------------------------------------
cmake/cmake_celix/BundlePackaging.cmake | 26 ++++++++++----------
cmake/cmake_celix/DeployPackaging.cmake | 10 ++++----
config_admin/CMakeLists.txt | 2 +-
.../example_test/CMakeLists.txt | 2 +-
.../example_test2/CMakeLists.txt | 2 +-
config_admin/example/CMakeLists.txt | 2 +-
config_admin/service/CMakeLists.txt | 2 +-
dependency_manager/CMakeLists.txt | 4 +--
deployment_admin/CMakeLists.txt | 6 ++---
device_access/device_access/CMakeLists.txt | 4 +--
device_access/driver_locator/CMakeLists.txt | 4 +--
device_access/example/CMakeLists.txt | 2 +-
.../example/base_driver/CMakeLists.txt | 2 +-
.../example/consuming_driver/CMakeLists.txt | 2 +-
.../example/refining_driver/CMakeLists.txt | 2 +-
documents/cmake_commands/readme.md | 4 +--
.../getting_started/creating_a_simple_bundle.md | 19 ++++++--------
event_admin/CMakeLists.txt | 6 ++---
event_admin/event_admin/CMakeLists.txt | 4 +--
event_admin/event_handler/CMakeLists.txt | 4 +--
event_admin/event_publisher/CMakeLists.txt | 4 +--
examples/dm_example/CMakeLists.txt | 2 +-
examples/dm_example/phase1/CMakeLists.txt | 2 +-
examples/dm_example/phase2a/CMakeLists.txt | 2 +-
examples/dm_example/phase2b/CMakeLists.txt | 2 +-
examples/dm_example/phase3/CMakeLists.txt | 2 +-
examples/dm_example_cxx/CMakeLists.txt | 2 +-
examples/dm_example_cxx/phase1/CMakeLists.txt | 2 +-
examples/dm_example_cxx/phase2a/CMakeLists.txt | 2 +-
examples/dm_example_cxx/phase2b/CMakeLists.txt | 2 +-
examples/dm_example_cxx/phase3/CMakeLists.txt | 2 +-
.../phase3_locking/CMakeLists.txt | 2 +-
examples/hello_world/CMakeLists.txt | 10 ++++----
examples/hello_world_test/CMakeLists.txt | 16 ++++++------
examples/log_service_example/CMakeLists.txt | 4 +--
examples/mongoose/CMakeLists.txt | 6 ++---
examples/service_hook_example/CMakeLists.txt | 4 +--
examples/services_example_c/CMakeLists.txt | 2 +-
examples/services_example_c/bar/CMakeLists.txt | 2 +-
examples/services_example_c/foo1/CMakeLists.txt | 2 +-
examples/services_example_c/foo2/CMakeLists.txt | 2 +-
examples/services_example_cxx/CMakeLists.txt | 2 +-
.../services_example_cxx/bar/CMakeLists.txt | 2 +-
.../services_example_cxx/baz/CMakeLists.txt | 2 +-
.../services_example_cxx/foo/CMakeLists.txt | 2 +-
examples/whiteboard/CMakeLists.txt | 4 +--
examples/whiteboard/publisherA/CMakeLists.txt | 2 +-
examples/whiteboard/publisherB/CMakeLists.txt | 2 +-
examples/whiteboard/tracker/CMakeLists.txt | 2 +-
.../whiteboard/tracker_depman/CMakeLists.txt | 2 +-
.../test_bundle1/CMakeLists.txt | 2 +-
log_service/CMakeLists.txt | 4 +--
log_writer/log_writer_stdout/CMakeLists.txt | 4 +--
log_writer/log_writer_syslog/CMakeLists.txt | 4 +--
pubsub/deploy/CMakeLists.txt | 22 ++++++++---------
.../examples/mp_pubsub/publisher/CMakeLists.txt | 2 +-
.../mp_pubsub/subscriber/CMakeLists.txt | 2 +-
pubsub/examples/pubsub/publisher/CMakeLists.txt | 2 +-
.../examples/pubsub/publisher2/CMakeLists.txt | 2 +-
.../examples/pubsub/subscriber/CMakeLists.txt | 2 +-
pubsub/pubsub_admin_udp_mc/CMakeLists.txt | 4 +--
pubsub/pubsub_admin_zmq/CMakeLists.txt | 4 +--
pubsub/pubsub_discovery/CMakeLists.txt | 4 +--
pubsub/pubsub_serializer_json/CMakeLists.txt | 4 +--
pubsub/pubsub_topology_manager/CMakeLists.txt | 4 +--
pubsub/test/CMakeLists.txt | 12 ++++-----
.../discovery_configured/CMakeLists.txt | 4 +--
remote_services/discovery_etcd/CMakeLists.txt | 4 +--
remote_services/discovery_shm/CMakeLists.txt | 4 +--
remote_services/examples/CMakeLists.txt | 16 ++++++------
.../examples/calculator_endpoint/CMakeLists.txt | 2 +-
.../calculator_endpoint2/CMakeLists.txt | 2 +-
.../examples/calculator_proxy/CMakeLists.txt | 2 +-
.../examples/calculator_proxy2/CMakeLists.txt | 2 +-
.../examples/calculator_service/CMakeLists.txt | 2 +-
.../examples/calculator_shell/CMakeLists.txt | 2 +-
.../remote_service_admin_dfi/rsa/CMakeLists.txt | 4 +--
.../rsa_tst/bundle/CMakeLists.txt | 2 +-
.../remote_service_admin_http/CMakeLists.txt | 4 +--
.../remote_service_admin_shm/CMakeLists.txt | 4 +--
remote_services/topology_manager/CMakeLists.txt | 4 +--
.../tms_tst/bundle/CMakeLists.txt | 2 +-
.../tms_tst/disc_mock/CMakeLists.txt | 2 +-
remote_shell/CMakeLists.txt | 6 ++---
shell/CMakeLists.txt | 4 +--
shell_bonjour/CMakeLists.txt | 4 +--
shell_tui/CMakeLists.txt | 4 +--
87 files changed, 178 insertions(+), 183 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/cmake/cmake_celix/BundlePackaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/BundlePackaging.cmake b/cmake/cmake_celix/BundlePackaging.cmake
index f3adde3..7a126e9 100644
--- a/cmake/cmake_celix/BundlePackaging.cmake
+++ b/cmake/cmake_celix/BundlePackaging.cmake
@@ -89,7 +89,7 @@ function(check_bundle BUNDLE)
endfunction()
function(add_bundle)
- #message(DEPRECATION"add_bundle is DEPRECATION, use add_celix_bundle instead.")
+ message(DEPRECATION "add_bundle is DEPRECATION, use add_celix_bundle instead.")
add_celix_bundle(${ARGN})
endfunction()
function(add_celix_bundle)
@@ -228,7 +228,7 @@ function(add_celix_bundle)
################################
if(BUNDLE_SOURCES)
- bundle_libs(${BUNDLE_TARGET_NAME} "PRIVATE" TRUE ${BUNDLE_TARGET_NAME})
+ celix_bundle_libs(${BUNDLE_TARGET_NAME} "PRIVATE" TRUE ${BUNDLE_TARGET_NAME})
set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_ACTIVATOR" "$<TARGET_SONAME_FILE_NAME:${BUNDLE_TARGET_NAME}>")
set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUILD_WITH_INSTALL_RPATH" true)
@@ -261,7 +261,7 @@ function(add_celix_bundle)
endfunction()
function(bundle_export_libs)
- #message(DEPRECATION"bundle_export_libs is DEPRECATION, use celix_bundle_export_libs instead.")
+ message(DEPRECATION "bundle_export_libs is DEPRECATION, use celix_bundle_export_libs instead.")
celix_bundle_export_libs(${ARGN})
endfunction()
function(celix_bundle_export_libs)
@@ -271,7 +271,7 @@ function(celix_bundle_export_libs)
endfunction()
function(bundle_private_libs)
- #message(DEPRECATION"bundle_private_libs is DEPRECATION, use celix_bundle_private_libs instead.")
+ message(DEPRECATION "bundle_private_libs is DEPRECATION, use celix_bundle_private_libs instead.")
celix_bundle_private_libs(${ARGN})
endfunction()
function(celix_bundle_private_libs)
@@ -281,7 +281,7 @@ function(celix_bundle_private_libs)
endfunction()
function(bundle_libs)
- #message(DEPRECATION"bundle_libs is DEPRECATION, use celix_bundle_libs instead.")
+ message(DEPRECATION "bundle_libs is DEPRECATION, use celix_bundle_libs instead.")
celix_bundle_libs(${ARGN})
endfunction()
function(celix_bundle_libs)
@@ -348,7 +348,7 @@ function(celix_bundle_libs)
endfunction()
function(bundle_import_libs)
- #message(DEPRECATION"bundle_import_libs is DEPRECATION, use celix_bundle_import_libs instead.")
+ message(DEPRECATION "bundle_import_libs is DEPRECATION, use celix_bundle_import_libs instead.")
celix_bundle_import_libs(${ARGN})
endfunction()
function(celix_bundle_import_libs)
@@ -378,7 +378,7 @@ function(celix_bundle_import_libs)
endfunction()
function(bundle_files)
- #message(DEPRECATION"bundle_files is DEPRECATION, use celix_bundle_files instead.")
+ message(DEPRECATION "bundle_files is DEPRECATION, use celix_bundle_files instead.")
celix_bundle_files(${ARGN})
endfunction()
function(celix_bundle_files)
@@ -405,7 +405,7 @@ function(celix_bundle_files)
endfunction()
function(bundle_headers)
- #message(DEPRECATION"bundle_headers is DEPRECATION, use celix_bundle_headers instead.")
+ message(DEPRECATION "bundle_headers is DEPRECATION, use celix_bundle_headers instead.")
celix_bundle_headers(${ARGN})
endfunction()
function(celix_bundle_headers)
@@ -424,7 +424,7 @@ function(celix_bundle_headers)
endfunction()
function(bundle_symbolic_name)
- #message(DEPRECATION"bundle_symbolic_name is DEPRECATION, use celix_bundle_symbolic_name instead.")
+ message(DEPRECATION "bundle_symbolic_name is DEPRECATION, use celix_bundle_symbolic_name instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_symbolic_name BUNDLE SYMBOLIC_NAME)
@@ -432,7 +432,7 @@ function(celix_bundle_symbolic_name BUNDLE SYMBOLIC_NAME)
endfunction()
function(bundle_name)
- #message(DEPRECATION"bundle_name is DEPRECATION, use celix_bundle_name instead.")
+ message(DEPRECATION "bundle_name is DEPRECATION, use celix_bundle_name instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_name BUNDLE NAME)
@@ -440,7 +440,7 @@ function(celix_bundle_name BUNDLE NAME)
endfunction()
function(bundle_version)
- #message(DEPRECATION"bundle_version is DEPRECATION, use celix_bundle_version instead.")
+ message(DEPRECATION "bundle_version is DEPRECATION, use celix_bundle_version instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_version BUNDLE VERSION)
@@ -448,7 +448,7 @@ function(celix_bundle_version BUNDLE VERSION)
endfunction()
function(bundle_description)
- #message(DEPRECATION"bundle_description is DEPRECATION, use celix_bundle_description instead.")
+ message(DEPRECATION "bundle_description is DEPRECATION, use celix_bundle_description instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()
function(celix_bundle_description BUNDLE DESC)
@@ -456,7 +456,7 @@ function(celix_bundle_description BUNDLE DESC)
endfunction()
function(install_bundle)
- #message(DEPRECATION"install_bundle is DEPRECATION, use install_celix_bundle instead.")
+ message(DEPRECATION "install_bundle is DEPRECATION, use install_celix_bundle instead.")
install_celix_bundle(${ARGN})
endfunction()
function(install_celix_bundle)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/cmake/cmake_celix/DeployPackaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/DeployPackaging.cmake b/cmake/cmake_celix/DeployPackaging.cmake
index 26f5c90..707201f 100644
--- a/cmake/cmake_celix/DeployPackaging.cmake
+++ b/cmake/cmake_celix/DeployPackaging.cmake
@@ -28,7 +28,7 @@ set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")
#####
function(add_deploy)
- #message(DEPRECATION "add_deploy is depecrated, use add_celix_container instead.")
+ message(DEPRECATION "add_deploy is depecrated, use add_celix_container instead.")
add_celix_container(${ARGN})
endfunction()
@@ -221,7 +221,7 @@ endfunction()
#NOTE can be used for drivers/proxies/endpoints bundle dirs
function(deploy_bundles_dir)
- #message(DEPRECATION "deploy_bundles_dir is depecrated, use celix_container_bundles_dir instead.")
+ message(DEPRECATION "deploy_bundles_dir is depecrated, use celix_container_bundles_dir instead.")
celix_container_bundles_dir(${ARGN})
endfunction()
function(celix_container_bundles_dir)
@@ -265,7 +265,7 @@ function(celix_container_bundles_dir)
endfunction()
function(deploy_bundles)
- #message(DEPRECATION "deploy_bundles is depecrated, use celix_container_bundles instead.")
+ message(DEPRECATION "deploy_bundles is depecrated, use celix_container_bundles instead.")
celix_container_bundles(${ARGN})
endfunction()
function(celix_container_bundles)
@@ -303,7 +303,7 @@ function(celix_container_bundles)
endfunction()
function(deploy_properties)
- #message(DEPRECATION "deploy_properties is depecrated, use celix_container_properties instead.")
+ message(DEPRECATION "deploy_properties is depecrated, use celix_container_properties instead.")
celix_container_properties(${ARGN})
endfunction()
function(celix_container_properties)
@@ -322,7 +322,7 @@ function(celix_container_properties)
endfunction()
function(deploy_embedded_properties)
- #message(DEPRECATION "deploy_embedded_properties is depecrated, use celix_container_embedded_properties instead.")
+ message(DEPRECATION "deploy_embedded_properties is depecrated, use celix_container_embedded_properties instead.")
celix_container_embedded_properties(${ARGN})
endfunction()
function(celix_container_embedded_properties)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/config_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/CMakeLists.txt b/config_admin/CMakeLists.txt
index 8087662..4beb3de 100644
--- a/config_admin/CMakeLists.txt
+++ b/config_admin/CMakeLists.txt
@@ -45,7 +45,7 @@ if (CONFIG_ADMIN)
endif(ENABLE_TESTING)
- add_deploy(config_admin_deploy
+ add_celix_container(config_admin_deploy
NAME "config_admin"
BUNDLES
config_admin
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/config_admin/config_admin_tst/example_test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/config_admin_tst/example_test/CMakeLists.txt b/config_admin/config_admin_tst/example_test/CMakeLists.txt
index d4c4b3d..273ba5f 100644
--- a/config_admin/config_admin_tst/example_test/CMakeLists.txt
+++ b/config_admin/config_admin_tst/example_test/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
include_directories("private/include")
-add_bundle(example_test
+add_celix_bundle(example_test
VERSION 0.1.0
SOURCES
private/src/activator
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/config_admin/config_admin_tst/example_test2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/config_admin_tst/example_test2/CMakeLists.txt b/config_admin/config_admin_tst/example_test2/CMakeLists.txt
index d312673..8652f2d 100644
--- a/config_admin/config_admin_tst/example_test2/CMakeLists.txt
+++ b/config_admin/config_admin_tst/example_test2/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
include_directories("private/include")
-add_bundle(example_test2 SOURCES
+add_celix_bundle(example_test2 SOURCES
private/src/activator
private/src/example_managed_service_impl
VERSION 0.1.0
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/config_admin/example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/example/CMakeLists.txt b/config_admin/example/CMakeLists.txt
index c1c80bd..4c7fcef 100644
--- a/config_admin/example/CMakeLists.txt
+++ b/config_admin/example/CMakeLists.txt
@@ -17,7 +17,7 @@ include_directories(
../service/public/include
)
-add_bundle(config_admin_example
+add_celix_bundle(config_admin_example
VERSION 0.0.1
SOURCES
private/src/bundle_activator
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/config_admin/service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/service/CMakeLists.txt b/config_admin/service/CMakeLists.txt
index e194081..18289d0 100644
--- a/config_admin/service/CMakeLists.txt
+++ b/config_admin/service/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
include_directories("public/include")
include_directories("private/include")
-add_bundle(config_admin
+add_celix_bundle(config_admin
VERSION 0.0.1
SOURCES
private/src/activator
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/dependency_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/dependency_manager/CMakeLists.txt b/dependency_manager/CMakeLists.txt
index 931789a..952cfe7 100644
--- a/dependency_manager/CMakeLists.txt
+++ b/dependency_manager/CMakeLists.txt
@@ -30,7 +30,7 @@ if (DEPENDENCY_MANAGER)
endif(CMAKE_UNAME)
endif(UNIX AND NOT WIN32)
- add_bundle(dm_shell
+ add_celix_bundle(dm_shell
SYMBOLIC_NAME "apache_celix_dm_shell"
VERSION "1.0.0"
NAME "Apache Celix DM Shell Commands"
@@ -85,7 +85,7 @@ if (DEPENDENCY_MANAGER)
COMPONENT
dependency_manager
)
- install_bundle(dm_shell)
+ install_celix_bundle(dm_shell)
install(TARGETS dependency_manager_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager)
install(TARGETS dependency_manager_so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dependency_manager)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/deployment_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/deployment_admin/CMakeLists.txt b/deployment_admin/CMakeLists.txt
index a6094ad..51fe2ba 100644
--- a/deployment_admin/CMakeLists.txt
+++ b/deployment_admin/CMakeLists.txt
@@ -29,7 +29,7 @@ if (DEPLOYMENT_ADMIN)
include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/private/include")
include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/public/include")
- add_bundle(deployment_admin
+ add_celix_bundle(deployment_admin
SYMBOLIC_NAME "apache_celix_deployment_admin"
VERSION "0.0.2"
NAME "Apache Celix Deployment Admin"
@@ -56,7 +56,7 @@ if (DEPLOYMENT_ADMIN)
)
- install_bundle(deployment_admin
+ install_celix_bundle(deployment_admin
HEADERS
public/include/resource_processor.h
)
@@ -64,7 +64,7 @@ if (DEPLOYMENT_ADMIN)
target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES})
- add_deploy(deployment-admin
+ add_celix_container(deployment-admin
BUNDLES deployment_admin shell shell_tui log_service log_writer
PROPERTIES
"deployment_admin_url=http://localhost:8080"
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/device_access/device_access/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/device_access/CMakeLists.txt b/device_access/device_access/CMakeLists.txt
index 9668156..52b8694 100644
--- a/device_access/device_access/CMakeLists.txt
+++ b/device_access/device_access/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(device_manager
+add_celix_bundle(device_manager
SYMBOLIC_NAME "apache_celix_device_manager"
VERSION "0.0.2"
NAME "Apache Celix Device Access Device Manager"
@@ -34,7 +34,7 @@ add_bundle(device_manager
private/include/driver_matcher.h
)
-install_bundle(device_manager
+install_celix_bundle(device_manager
HEADERS
public/include/device.h
public/include/driver_locator.h
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/device_access/driver_locator/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/driver_locator/CMakeLists.txt b/device_access/driver_locator/CMakeLists.txt
index 9138f4a..88c1fed 100644
--- a/device_access/driver_locator/CMakeLists.txt
+++ b/device_access/driver_locator/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(driver_locator
+add_celix_bundle(driver_locator
SYMBOLIC_NAME "apache_celix_driver_locator"
VERSION "0.0.2"
NAME "Apache Celix Device Access Driver Locator"
@@ -24,7 +24,7 @@ add_bundle(driver_locator
private/src/driver_locator
)
-install_bundle(driver_locator)
+install_celix_bundle(driver_locator)
include_directories(${PROJECT_SOURCE_DIR}/device_access/device_access/public/include)
include_directories(private/include)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/device_access/example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/CMakeLists.txt b/device_access/example/CMakeLists.txt
index 1a5cd77..89b4f21 100644
--- a/device_access/example/CMakeLists.txt
+++ b/device_access/example/CMakeLists.txt
@@ -21,7 +21,7 @@ if(DEVICE_ACCESS_EXAMPLE)
add_subdirectory(consuming_driver)
add_subdirectory(refining_driver)
- add_deploy(device_access_example
+ add_celix_container(device_access_example
BUNDLES device_manager driver_locator shell shell_tui log_service base_driver
)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/device_access/example/base_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/base_driver/CMakeLists.txt b/device_access/example/base_driver/CMakeLists.txt
index c354d3b..ecc62df 100644
--- a/device_access/example/base_driver/CMakeLists.txt
+++ b/device_access/example/base_driver/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(base_driver
+add_celix_bundle(base_driver
SYMBOLIC_NAME "apache_celix_base_driver_example"
VERSION "0.0.1"
NAME "Apache Celix Device Access Base Driver Example"
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/device_access/example/consuming_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/consuming_driver/CMakeLists.txt b/device_access/example/consuming_driver/CMakeLists.txt
index 061d350..5bb6497 100644
--- a/device_access/example/consuming_driver/CMakeLists.txt
+++ b/device_access/example/consuming_driver/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(word_consumingdriver
+add_celix_bundle(word_consumingdriver
SYMBOLIC_NAME "apache_celix_word_consuming_driver_example"
VERSION "0.0.1"
NAME "Apache Celix Device Access Word Consuming Driver Example"
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/device_access/example/refining_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/refining_driver/CMakeLists.txt b/device_access/example/refining_driver/CMakeLists.txt
index d16584f..45aa5e4 100644
--- a/device_access/example/refining_driver/CMakeLists.txt
+++ b/device_access/example/refining_driver/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(char_refiningdriver
+add_celix_bundle(char_refiningdriver
SYMBOLIC_NAME "apache_celix_char_refining_driver_example"
NAME "Apache Celix Device Access Char Refining Driver Example"
VERSION "0.0.1"
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/documents/cmake_commands/readme.md
----------------------------------------------------------------------
diff --git a/documents/cmake_commands/readme.md b/documents/cmake_commands/readme.md
index 6de67e1..661f5cc 100644
--- a/documents/cmake_commands/readme.md
+++ b/documents/cmake_commands/readme.md
@@ -173,7 +173,7 @@ add_celix_container(<celix_container_name>
```
The provided bundle targets for a celix container do not have to exists (yet).
-This removes the need for correctly ordering the add_bundle commands so that all bundle target are present before an add_celix_container command.
+This removes the need for correctly ordering the add_celix_bundle commands so that all bundle target are present before an add_celix_container command.
If the bundle target is never added CMake will give an error:
```
Error evaluating generator expression:
@@ -252,7 +252,7 @@ The add_celix_docker target is a executable target and can be used to link libra
The docker dir can be found in `<cmake_build_dir>/docker[/<group_name>]/<docker_name>`.
The provided bundle targets for a docker dir do not have to exists (yet).
-This removes the need for correctly order the add_bundle commands so that all bundle target are present before
+This removes the need for correctly order the add_celix_bundle commands so that all bundle target are present before
an `add_celix_docker` command.
If the bundle target is never added CMake will give an error:
```
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/documents/getting_started/creating_a_simple_bundle.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/creating_a_simple_bundle.md b/documents/getting_started/creating_a_simple_bundle.md
index d2f7d11..784e11c 100644
--- a/documents/getting_started/creating_a_simple_bundle.md
+++ b/documents/getting_started/creating_a_simple_bundle.md
@@ -88,7 +88,7 @@ And add the following CMakeLists.txt file for the C Bundle:
```CMake
#${WS}/myproject/bundles/hello_world/CMakeLists.txt
-add_bundle(hello_world
+add_celix_bundle(hello_world
VERSION 1.0.0
SOURCES
private/src/hello_world_activator.c
@@ -110,7 +110,7 @@ include_directories(
private/include
)
-add_bundle(HelloWorld
+add_celix_bundle(HelloWorld
VERSION 1.0.0
SOURCES
private/src/HelloWorldActivator.cc
@@ -124,7 +124,7 @@ endif()
```
These CMakeLists.txt files declare that the bundles should be build based on the build result (shared library) of the declared sources (in this case the `private/src/hello_world_activator.c` or `private/src/HelloWorldActivator.cc` source).
-The add_bundle function is an Apache Celix specific CMake extension.
+The `add_celix_bundle` CMake function is an Apache Celix specific CMake extension.
The library used for the bundle will also be linked against the dependency manager static library.
@@ -222,9 +222,6 @@ mkdir myproject-build
cd myproject-build
cmake ../myproject
make all
-#Or
-#cmake -G Ninja ../myproject
-#ninja
```
Hopefully you will some some build results scrolling over the screen and actual build results in the build directory. There should be a hello_world.zip in the bundles/hello_world directory, this the actual bundle.
@@ -234,11 +231,12 @@ A bundle on its own has no real value, so lets setup a deployment and run the Ap
To create a deployment for the hello world bundles two things are needed:
-1. Add a `add_deploy` statement in the `CMakeLists.txt` file declaring what to deploy and under which name.
+1. Add a `add_celix_container` statement in the `CMakeLists.txt` file declaring what to deploy and under which name.
```CMake
#${WS}/myproject/CMakeLists.txt
-add_deploy(myproject
+add_celix_container(myproject
+ CXX
BUNDLES
${CELIX_BUNDLES_DIR}/shell.zip
${CELIX_BUNDLES_DIR}/shell_tui.zip
@@ -253,8 +251,6 @@ Rerun make again form the build project. the make files generated by CMake will
```bash
cd ${WS}/myproject-build
make -j
-#or
-#ninja
```
Now a deploy directory myproject should be available in the deploy directory. This directory contains - among other files - a release.sh script. This can be used to setup the required environment variables (like LD_LIBRARY_PATH).
@@ -262,8 +258,7 @@ Now a deploy directory myproject should be available in the deploy directory. Th
```bash
cd ${WS}/myproject-build/deploy/myproject
. ./release.sh
-celix
-#or ./hello
+./hello
```
The hello_world bundle should be started with the famous "Hello World" text printed twice from the C and C++ bundle. The shell and shell_tui bundle are also deployed and these can be used to query and control the running framework. Below some commands are shown for querying the installed bundles, listing all known shell command, showing the help of a specific command and stopping a specific bundle (note that bundle 0 is the framework "bundle"):
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/event_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/CMakeLists.txt b/event_admin/CMakeLists.txt
index e0d830c..2882069 100644
--- a/event_admin/CMakeLists.txt
+++ b/event_admin/CMakeLists.txt
@@ -27,16 +27,16 @@ if(EVENT_ADMIN)
# deploy("event_publisher_example" BUNDLES event_admin event_publisher shell shell_tui log_service log_writer)
# deploy("event_handler_example" BUNDLES event_admin event_handler shell shell_tui log_service log_writer)
# deploy("event_admin_example" BUNDLES event_admin event_publisher event_handler shell shell_tui log_service log_writer)
- add_deploy(event_admin_service
+ add_celix_container(event_admin_service
NAME "event_admin_service"
GROUP "event_admin/event_admin"
BUNDLES event_admin shell shell_tui log_service log_writer
)
- add_deploy(event_handler_consumer
+ add_celix_container(event_handler_consumer
NAME "event_handler_consumer"
GROUP "event_handler"
BUNDLES event_handler event_admin shell shell_tui log_service log_writer)
- add_deploy(event_publisher_consumer
+ add_celix_container(event_publisher_consumer
NAME "event_publisher_consumer"
GROUP "event_publisher"
BUNDLES event_publisher event_handler event_admin shell shell_tui log_service log_writer)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/event_admin/event_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/event_admin/CMakeLists.txt b/event_admin/event_admin/CMakeLists.txt
index 4fe7ccd..52b1120 100644
--- a/event_admin/event_admin/CMakeLists.txt
+++ b/event_admin/event_admin/CMakeLists.txt
@@ -22,7 +22,7 @@ include_directories(private/include)
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-add_bundle(event_admin
+add_celix_bundle(event_admin
VERSION 0.0.0
SOURCES
private/src/event_admin_activator.c
@@ -34,6 +34,6 @@ add_bundle(event_admin
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
-install_bundle(event_admin)
+install_celix_bundle(event_admin)
target_link_libraries(event_admin celix_framework celix_utils)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/event_admin/event_handler/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/event_handler/CMakeLists.txt b/event_admin/event_handler/CMakeLists.txt
index c786a78..fe2609c 100644
--- a/event_admin/event_handler/CMakeLists.txt
+++ b/event_admin/event_handler/CMakeLists.txt
@@ -22,7 +22,7 @@ include_directories(${PROJECT_SOURCE_DIR}/event_admin/event_admin/public/include
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-add_bundle(event_handler
+add_celix_bundle(event_handler
VERSION 0.0.0
SOURCES
private/src/event_handler_activator.c
@@ -30,6 +30,6 @@ add_bundle(event_handler
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
-install_bundle(event_handler)
+install_celix_bundle(event_handler)
target_link_libraries(event_handler celix_framework celix_utils)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/event_admin/event_publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/event_publisher/CMakeLists.txt b/event_admin/event_publisher/CMakeLists.txt
index 1999a9c..01b7b10 100644
--- a/event_admin/event_publisher/CMakeLists.txt
+++ b/event_admin/event_publisher/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories(private/include)
include_directories(${PROJECT_SOURCE_DIR}/event_admin/event_admin/public/include)
include_directories(${PROJECT_SOURCE_DIR}/log_service/public/include)
-add_bundle(event_publisher
+add_celix_bundle(event_publisher
VERSION 0.0.0
SOURCES
private/src/event_publisher_activator.c
@@ -29,6 +29,6 @@ add_bundle(event_publisher
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
-install_bundle(event_publisher)
+install_celix_bundle(event_publisher)
target_link_libraries(event_publisher celix_framework celix_utils)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/CMakeLists.txt b/examples/dm_example/CMakeLists.txt
index fa6ec57..16a8ce1 100644
--- a/examples/dm_example/CMakeLists.txt
+++ b/examples/dm_example/CMakeLists.txt
@@ -27,7 +27,7 @@ if (BUILD_DEPENDENCY_MANAGER)
add_subdirectory(phase3)
- add_deploy("dm_example"
+ add_celix_container("dm_example"
COPY
BUNDLES
shell
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase1/CMakeLists.txt b/examples/dm_example/phase1/CMakeLists.txt
index 99abe65..dabb88f 100644
--- a/examples/dm_example/phase1/CMakeLists.txt
+++ b/examples/dm_example/phase1/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../services
)
-add_bundle(phase1
+add_celix_bundle(phase1
SYMBOLIC_NAME phase1
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2a/CMakeLists.txt b/examples/dm_example/phase2a/CMakeLists.txt
index 31c27a6..0bd8e7e 100644
--- a/examples/dm_example/phase2a/CMakeLists.txt
+++ b/examples/dm_example/phase2a/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../services
)
-add_bundle(phase2a
+add_celix_bundle(phase2a
SYMBOLIC_NAME phase2a
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example/phase2b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2b/CMakeLists.txt b/examples/dm_example/phase2b/CMakeLists.txt
index 1d107ec..775e786 100644
--- a/examples/dm_example/phase2b/CMakeLists.txt
+++ b/examples/dm_example/phase2b/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../services
)
-add_bundle(phase2b
+add_celix_bundle(phase2b
SYMBOLIC_NAME phase2b
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase3/CMakeLists.txt b/examples/dm_example/phase3/CMakeLists.txt
index aea9f9e..163980f 100644
--- a/examples/dm_example/phase3/CMakeLists.txt
+++ b/examples/dm_example/phase3/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../services
)
-add_bundle(phase3
+add_celix_bundle(phase3
SYMBOLIC_NAME phase3
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example_cxx/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example_cxx/CMakeLists.txt b/examples/dm_example_cxx/CMakeLists.txt
index b07f5cc..09b63ab 100644
--- a/examples/dm_example_cxx/CMakeLists.txt
+++ b/examples/dm_example_cxx/CMakeLists.txt
@@ -31,7 +31,7 @@ if (BUILD_DEPENDENCY_MANAGER_CXX)
add_subdirectory(phase3_locking)
- add_deploy("dm_example_cxx"
+ add_celix_container("dm_example_cxx"
COPY
CXX
BUNDLES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example_cxx/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example_cxx/phase1/CMakeLists.txt b/examples/dm_example_cxx/phase1/CMakeLists.txt
index 3c0544a..1a5d049 100644
--- a/examples/dm_example_cxx/phase1/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase1/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../api
)
-add_bundle(phase1_cxx
+add_celix_bundle(phase1_cxx
SYMBOLIC_NAME phase1_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example_cxx/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example_cxx/phase2a/CMakeLists.txt b/examples/dm_example_cxx/phase2a/CMakeLists.txt
index 8528078..b2a625a 100644
--- a/examples/dm_example_cxx/phase2a/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase2a/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../api
)
-add_bundle(phase2a_cxx
+add_celix_bundle(phase2a_cxx
SYMBOLIC_NAME phase2a_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example_cxx/phase2b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example_cxx/phase2b/CMakeLists.txt b/examples/dm_example_cxx/phase2b/CMakeLists.txt
index 29ff664..ba93f45 100644
--- a/examples/dm_example_cxx/phase2b/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase2b/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories(
../api
)
-add_bundle(phase2b_cxx
+add_celix_bundle(phase2b_cxx
SYMBOLIC_NAME phase2b_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example_cxx/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example_cxx/phase3/CMakeLists.txt b/examples/dm_example_cxx/phase3/CMakeLists.txt
index 99c3a5b..3c23582 100644
--- a/examples/dm_example_cxx/phase3/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase3/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../api
)
-add_bundle(phase3_cxx
+add_celix_bundle(phase3_cxx
SYMBOLIC_NAME phase3_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/dm_example_cxx/phase3_locking/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example_cxx/phase3_locking/CMakeLists.txt b/examples/dm_example_cxx/phase3_locking/CMakeLists.txt
index 07c9b54..ef10a33 100644
--- a/examples/dm_example_cxx/phase3_locking/CMakeLists.txt
+++ b/examples/dm_example_cxx/phase3_locking/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories(
../api
)
-add_bundle(phase3_locking_cxx
+add_celix_bundle(phase3_locking_cxx
SYMBOLIC_NAME phase3_locking_cxx
VERSION 0.0.1
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/hello_world/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/hello_world/CMakeLists.txt b/examples/hello_world/CMakeLists.txt
index 0ed7ed6..e90149e 100644
--- a/examples/hello_world/CMakeLists.txt
+++ b/examples/hello_world/CMakeLists.txt
@@ -32,29 +32,29 @@ add_library(hello_test2lib SHARED
)
set_library_version(hello_test2lib "3.3.3")
-add_bundle(hello
+add_celix_bundle(hello
VERSION "1.2"
SOURCES
private/src/activator.c
IMPORT_LIBRARIES hello_test2lib
)
-add_bundle(hello_export
+add_celix_bundle(hello_export
VERSION "1.0"
NO_ACTIVATOR
EXPORT_LIBRARIES hello_test2lib
)
-bundle_private_libs(hello
+celix_bundle_private_libs(hello
hello_testlib
)
-add_deploy(helloworld_byref
+add_celix_container(helloworld_byref
GROUP hello
BUNDLES hello_export hello shell shell_tui
)
-add_deploy(helloworld_withcopy
+add_celix_container(helloworld_withcopy
GROUP hello
COPY #Ensures that bundles are copied in the deploy location
BUNDLES hello_export hello shell shell_tui
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/hello_world_test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/hello_world_test/CMakeLists.txt b/examples/hello_world_test/CMakeLists.txt
index 39198ed..2d146fc 100644
--- a/examples/hello_world_test/CMakeLists.txt
+++ b/examples/hello_world_test/CMakeLists.txt
@@ -16,19 +16,19 @@
# under the License.
#############################################################################
-## NOTE Examples of using add_bundle and add_deploy and assorted commands ##
+## NOTE Examples of using add_celix_bundle and add_celix_container and assorted commands ##
#############################################################################
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
include_directories(public/include)
-add_bundle(hellotest1
+add_celix_bundle(hellotest1
VERSION "1.2"
SOURCES
private/src/activator
)
-bundle_headers(hellotest1
+celix_bundle_headers(hellotest1
"X-WebContent: web"
"X-MediaType: application/json"
)
@@ -42,20 +42,20 @@ set_library_version(tlib "4.3.2") # sets target propery VERSION to 4.3.2 and SOV
# #/usr/local/lib/libjansson.4.dylib
# /usr/lib64/libjansson.so.4
#)
-bundle_private_libs(hellotest1
+celix_bundle_private_libs(hellotest1
tlib
#/usr/lib/libcurl.4.dylib
# /usr/lib64/libcurl.so.4
)
-add_deploy(hello_test_deploy
+add_celix_container(hello_test_deploy
BUNDLES hellotest1 hellotest2 #NOTE hellotest2 is still a unknown target
PROPERTIES
"Test=true"
)
-#add_deploy(hello_test_deploy_fail
+#add_celix_container(hello_test_deploy_fail
# BUNDLES nonexisting
#)
@@ -72,12 +72,12 @@ add_library(hello2act SHARED
private/src/activator
)
set_library_version(hello2act "3.2.4") #sets VERSION prop to 3.2.4 and SOVERSION to 3
-add_bundle(hellotest2
+add_celix_bundle(hellotest2
VERSION "1.0.0" #can be the same as activator lib, but does not have to be
ACTIVATOR hello2act
)
-#add_bundle(hellotest3
+#add_celix_bundle(hellotest3
# VERSION "2.1.2"
#ACTIVATOR /usr/local/lib/libjansson.4.dylib
#ACTIVATOR /usr/lib64/libjansson.so.4
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/log_service_example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/log_service_example/CMakeLists.txt b/examples/log_service_example/CMakeLists.txt
index 6b7e681..fffa68f 100644
--- a/examples/log_service_example/CMakeLists.txt
+++ b/examples/log_service_example/CMakeLists.txt
@@ -21,14 +21,14 @@ include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
include_directories("public/include")
include_directories("${CMAKE_SOURCE_DIR}/log_service/public/include")
-add_bundle(log_service_example
+add_celix_bundle(log_service_example
VERSION "1.0"
SOURCES
private/src/activator.c
${CMAKE_SOURCE_DIR}/log_service/public/src/log_helper.c
)
-add_deploy(log_example
+add_celix_container(log_example
GROUP log_service
BUNDLES log_service_example log_service shell shell_tui
)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/mongoose/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/mongoose/CMakeLists.txt b/examples/mongoose/CMakeLists.txt
index f4250ef..2de051f 100644
--- a/examples/mongoose/CMakeLists.txt
+++ b/examples/mongoose/CMakeLists.txt
@@ -28,15 +28,15 @@ if(WIN32)
set(LIBS wsock32)
endif(WIN32)
-add_bundle(mongoose
+add_celix_bundle(mongoose
VERSION 0.0.1
SOURCES
private/src/activator
private/include/mongoose.h
)
-bundle_files(mongoose ${CMAKE_CURRENT_LIST_DIR}/root)
+celix_bundle_files(mongoose ${CMAKE_CURRENT_LIST_DIR}/root)
target_link_libraries(mongoose celix_framework mongooselib ${LIBS})
-add_deploy("mongoose_deploy" BUNDLES shell shell_tui log_service mongoose)
+add_celix_container("mongoose_deploy" BUNDLES shell shell_tui log_service mongoose)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/service_hook_example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/service_hook_example/CMakeLists.txt b/examples/service_hook_example/CMakeLists.txt
index 8835a85..8348059 100644
--- a/examples/service_hook_example/CMakeLists.txt
+++ b/examples/service_hook_example/CMakeLists.txt
@@ -21,14 +21,14 @@ if(NOT APPLE)
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
include_directories("public/include")
-add_bundle(hook_example
+add_celix_bundle(hook_example
BUNDLE_SYMBOLICNAME "Hook_Example"
VERSION "1.0.0"
SOURCES
private/src/activator
)
-add_deploy("hook_service_example"
+add_celix_container("hook_service_example"
BUNDLES
shell
shell_tui
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/services_example_c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_c/CMakeLists.txt b/examples/services_example_c/CMakeLists.txt
index f6a5066..3fe4a12 100644
--- a/examples/services_example_c/CMakeLists.txt
+++ b/examples/services_example_c/CMakeLists.txt
@@ -26,7 +26,7 @@ if (BUILD_DEPENDENCY_MANAGER)
add_subdirectory(foo2)
add_subdirectory(bar)
- add_deploy(services_example_c
+ add_celix_container(services_example_c
GROUP services_example
COPY
BUNDLES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/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
index 7ebb45c..47c544d 100644
--- a/examples/services_example_c/bar/CMakeLists.txt
+++ b/examples/services_example_c/bar/CMakeLists.txt
@@ -19,7 +19,7 @@ include_directories(
private/include
)
-add_bundle(bar
+add_celix_bundle(bar
SYMBOLIC_NAME bar
VERSION 1.0.0
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/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
index 0d1b93c..eee5720 100644
--- a/examples/services_example_c/foo1/CMakeLists.txt
+++ b/examples/services_example_c/foo1/CMakeLists.txt
@@ -19,7 +19,7 @@ include_directories(
private/include
)
-add_bundle(foo1
+add_celix_bundle(foo1
SYMBOLIC_NAME foo1
VERSION 1.0.0
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/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
index 1096c6c..54f4756 100644
--- a/examples/services_example_c/foo2/CMakeLists.txt
+++ b/examples/services_example_c/foo2/CMakeLists.txt
@@ -19,7 +19,7 @@ include_directories(
private/include
)
-add_bundle(foo2
+add_celix_bundle(foo2
SYMBOLIC_NAME foo2
VERSION 1.0.0
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/services_example_cxx/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/CMakeLists.txt b/examples/services_example_cxx/CMakeLists.txt
index 6f45ef7..bd94983 100644
--- a/examples/services_example_cxx/CMakeLists.txt
+++ b/examples/services_example_cxx/CMakeLists.txt
@@ -26,7 +26,7 @@ if (BUILD_DEPENDENCY_MANAGER_CXX)
add_subdirectory(foo)
add_subdirectory(baz)
- add_deploy(services_example_cxx
+ add_celix_container(services_example_cxx
GROUP services_example
COPY
BUNDLES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/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
index b3cdb07..c6c1441 100644
--- a/examples/services_example_cxx/bar/CMakeLists.txt
+++ b/examples/services_example_cxx/bar/CMakeLists.txt
@@ -19,7 +19,7 @@ include_directories(
private/include
)
-add_bundle(bar_cxx
+add_celix_bundle(bar_cxx
SYMBOLIC_NAME Bar
VERSION 1.0.0
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/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
index 205c716..1f15ae4 100644
--- a/examples/services_example_cxx/baz/CMakeLists.txt
+++ b/examples/services_example_cxx/baz/CMakeLists.txt
@@ -19,7 +19,7 @@ include_directories(
private/include
)
-add_bundle(baz_cxx
+add_celix_bundle(baz_cxx
SYMBOLIC_NAME Baz
VERSION 1.0.0
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/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
index e01af00..3feddaf 100644
--- a/examples/services_example_cxx/foo/CMakeLists.txt
+++ b/examples/services_example_cxx/foo/CMakeLists.txt
@@ -19,7 +19,7 @@ include_directories(
private/include
)
-add_bundle(foo_cxx
+add_celix_bundle(foo_cxx
SYMBOLIC_NAME Foo
VERSION 1.0.0
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/whiteboard/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/CMakeLists.txt b/examples/whiteboard/CMakeLists.txt
index b904241..b81d299 100644
--- a/examples/whiteboard/CMakeLists.txt
+++ b/examples/whiteboard/CMakeLists.txt
@@ -20,5 +20,5 @@ add_subdirectory(publisherB)
add_subdirectory(tracker)
add_subdirectory(tracker_depman)
-add_deploy("whiteboard" GROUP whiteboard BUNDLES tracker publisherA publisherB shell shell_tui log_service log_writer)
-add_deploy("whiteboard_dependency_manager" GROUP whiteboard BUNDLES tracker_depman publisherA publisherB shell shell_tui log_service log_writer dm_shell)
\ No newline at end of file
+add_celix_container("whiteboard" GROUP whiteboard BUNDLES tracker publisherA publisherB shell shell_tui log_service log_writer)
+add_celix_container("whiteboard_dependency_manager" GROUP whiteboard BUNDLES tracker_depman publisherA publisherB shell shell_tui log_service log_writer dm_shell)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/whiteboard/publisherA/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/publisherA/CMakeLists.txt b/examples/whiteboard/publisherA/CMakeLists.txt
index a219360..5e18149 100644
--- a/examples/whiteboard/publisherA/CMakeLists.txt
+++ b/examples/whiteboard/publisherA/CMakeLists.txt
@@ -16,7 +16,7 @@
# under the License.
-add_bundle(publisherA VERSION 1.0.0 SOURCES private/src/activator private/src/publisher)
+add_celix_bundle(publisherA VERSION 1.0.0 SOURCES private/src/activator private/src/publisher)
include_directories("../publisherService/public/include")
include_directories("../publisherService/private/include")
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/whiteboard/publisherB/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/publisherB/CMakeLists.txt b/examples/whiteboard/publisherB/CMakeLists.txt
index 74f0bb5..13a8ac8 100644
--- a/examples/whiteboard/publisherB/CMakeLists.txt
+++ b/examples/whiteboard/publisherB/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(publisherB VERSION 1.0.0 SOURCES private/src/activator private/src/publisher)
+add_celix_bundle(publisherB VERSION 1.0.0 SOURCES private/src/activator private/src/publisher)
include_directories("../publisherService/public/include")
include_directories("../publisherService/private/include")
target_link_libraries(publisherB celix_framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/whiteboard/tracker/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/tracker/CMakeLists.txt b/examples/whiteboard/tracker/CMakeLists.txt
index c44b206..643fff6 100644
--- a/examples/whiteboard/tracker/CMakeLists.txt
+++ b/examples/whiteboard/tracker/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(tracker VERSION 1.0.0 SOURCES private/src/activator)
+add_celix_bundle(tracker VERSION 1.0.0 SOURCES private/src/activator)
include_directories("../publisherService/public/include")
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
target_link_libraries(tracker celix_framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/examples/whiteboard/tracker_depman/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/tracker_depman/CMakeLists.txt b/examples/whiteboard/tracker_depman/CMakeLists.txt
index 3bd5942..fb31458 100644
--- a/examples/whiteboard/tracker_depman/CMakeLists.txt
+++ b/examples/whiteboard/tracker_depman/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(tracker_depman VERSION 1.0.0 SOURCES
+add_celix_bundle(tracker_depman VERSION 1.0.0 SOURCES
private/src/dependency_activator
private/src/tracker
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/framework/private/integration-test/test_bundle1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/framework/private/integration-test/test_bundle1/CMakeLists.txt b/framework/private/integration-test/test_bundle1/CMakeLists.txt
index a8d9d53..c766b06 100644
--- a/framework/private/integration-test/test_bundle1/CMakeLists.txt
+++ b/framework/private/integration-test/test_bundle1/CMakeLists.txt
@@ -15,6 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(test_bundle1 SOURCES src/activator VERSION 0.0.1)
+add_celix_bundle(test_bundle1 SOURCES src/activator VERSION 0.0.1)
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
target_link_libraries(test_bundle1 celix_framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/log_service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_service/CMakeLists.txt b/log_service/CMakeLists.txt
index 131a986..856e21d 100644
--- a/log_service/CMakeLists.txt
+++ b/log_service/CMakeLists.txt
@@ -18,7 +18,7 @@
celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" ON DEPS framework)
if (LOG_SERVICE)
- add_bundle(log_service
+ add_celix_bundle(log_service
SYMBOLIC_NAME "apache_celix_log_service"
NAME "Apache Celix Log Service"
VERSION "1.1.0"
@@ -36,7 +36,7 @@ if (LOG_SERVICE)
private/include/log_service_impl.h
)
- install_bundle(log_service
+ install_celix_bundle(log_service
HEADERS
public/include/log_service.h
public/include/log_reader_service.h
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/log_writer/log_writer_stdout/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_writer/log_writer_stdout/CMakeLists.txt b/log_writer/log_writer_stdout/CMakeLists.txt
index 7874e96..6502792 100644
--- a/log_writer/log_writer_stdout/CMakeLists.txt
+++ b/log_writer/log_writer_stdout/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-add_bundle(log_writer
+add_celix_bundle(log_writer
SYMBOLIC_NAME "apache_celix_log_writer"
VERSION "1.1.0"
NAME "Apache Celix Log Writer"
@@ -27,7 +27,7 @@ add_bundle(log_writer
private/src/log_writer_stdout
)
-install_bundle(log_writer)
+install_celix_bundle(log_writer)
target_link_libraries(log_writer celix_framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/log_writer/log_writer_syslog/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_writer/log_writer_syslog/CMakeLists.txt b/log_writer/log_writer_syslog/CMakeLists.txt
index 12130cf..faa7905 100644
--- a/log_writer/log_writer_syslog/CMakeLists.txt
+++ b/log_writer/log_writer_syslog/CMakeLists.txt
@@ -18,7 +18,7 @@ celix_subproject(LOG_WRITER_SYSLOG "Option to enable building the Syslog Writer"
if (LOG_WRITER_SYSLOG)
find_package(Syslog REQUIRED)
- add_bundle(log_writer_syslog
+ add_celix_bundle(log_writer_syslog
VERSION 1.1.0
SYMBOLIC_NAME "apache_celix_log_writer_syslog"
NAME "Apache Celix Log Writer Syslog"
@@ -30,7 +30,7 @@ if (LOG_WRITER_SYSLOG)
private/src/log_writer_syslog
)
- install_bundle(log_writer_syslog)
+ install_celix_bundle(log_writer_syslog)
target_link_libraries(log_writer_syslog celix_framework)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/deploy/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/deploy/CMakeLists.txt b/pubsub/deploy/CMakeLists.txt
index ddce160..f73857b 100644
--- a/pubsub/deploy/CMakeLists.txt
+++ b/pubsub/deploy/CMakeLists.txt
@@ -19,7 +19,7 @@ find_program(ETCD_CMD NAMES etcd)
find_program(XTERM_CMD NAMES xterm)
# UDP Multicast
-add_deploy(pubsub_publisher_udp_mc
+add_celix_container(pubsub_publisher_udp_mc
GROUP pubsub
BUNDLES
shell
@@ -33,7 +33,7 @@ add_deploy(pubsub_publisher_udp_mc
)
target_link_libraries(pubsub_publisher_udp_mc PRIVATE celix_framework celix_utils celix_dfi)
-add_deploy("pubsub_subscriber_udp_mc"
+add_celix_container("pubsub_subscriber_udp_mc"
GROUP "pubsub"
BUNDLES
shell
@@ -46,7 +46,7 @@ add_deploy("pubsub_subscriber_udp_mc"
)
target_link_libraries(pubsub_subscriber_udp_mc PRIVATE celix_framework celix_utils celix_dfi)
-add_deploy("pubsub_subscriber2_udp_mc"
+add_celix_container("pubsub_subscriber2_udp_mc"
GROUP "pubsub"
BUNDLES
shell
@@ -77,7 +77,7 @@ endif ()
if (BUILD_PUBSUB_PSA_ZMQ)
# Dynamic ZMQ / UDP admin
- add_deploy("pubsub_publisher"
+ add_celix_container("pubsub_publisher"
GROUP "pubsub"
BUNDLES
shell
@@ -95,7 +95,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
)
target_link_libraries(pubsub_publisher PRIVATE celix_framework celix_utils celix_dfi)
- add_deploy("pubsub_subscriber"
+ add_celix_container("pubsub_subscriber"
GROUP "pubsub"
BUNDLES
shell
@@ -113,7 +113,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
target_link_libraries(pubsub_subscriber PRIVATE celix_framework celix_utils celix_dfi)
# ZMQ
- add_deploy("pubsub_zmq"
+ add_celix_container("pubsub_zmq"
GROUP "pubsub"
BUNDLES
shell
@@ -127,7 +127,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
)
target_link_libraries(pubsub_zmq PRIVATE celix_framework celix_utils celix_dfi)
- add_deploy("pubsub_publisher_zmq"
+ add_celix_container("pubsub_publisher_zmq"
GROUP "pubsub"
BUNDLES
shell
@@ -143,7 +143,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
)
target_link_libraries(pubsub_publisher_zmq PRIVATE celix_framework celix_utils celix_dfi)
- add_deploy("pubsub_subscriber_zmq"
+ add_celix_container("pubsub_subscriber_zmq"
GROUP "pubsub"
BUNDLES
shell
@@ -156,7 +156,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
)
target_link_libraries(pubsub_subscriber_zmq PRIVATE celix_framework celix_utils celix_dfi)
- add_deploy("pubsub_subscriber2_zmq"
+ add_celix_container("pubsub_subscriber2_zmq"
GROUP "pubsub"
BUNDLES
shell
@@ -170,7 +170,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
target_link_libraries(pubsub_subscriber2_zmq PRIVATE celix_framework celix_utils celix_dfi)
# ZMQ Multipart
- add_deploy("pubsub_mp_subscriber_zmq"
+ add_celix_container("pubsub_mp_subscriber_zmq"
GROUP "pubsub"
BUNDLES
shell
@@ -183,7 +183,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
)
target_link_libraries(pubsub_mp_subscriber_zmq PRIVATE celix_framework celix_utils celix_dfi)
- add_deploy("pubsub_mp_publisher_zmq"
+ add_celix_container("pubsub_mp_publisher_zmq"
GROUP "pubsub"
BUNDLES
shell
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt b/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
index 76a01f1..d2bd754 100644
--- a/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/publisher/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/common/include")
-add_bundle(org.apache.celix.pubsub_publisher.MpPublisher
+add_celix_bundle(org.apache.celix.pubsub_publisher.MpPublisher
SYMBOLIC_NAME "apache_celix_pubsub_mp_publisher"
VERSION "1.0.0"
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt b/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
index a480a73..32258a8 100644
--- a/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/common/include")
-add_bundle( org.apache.celix.pubsub_subscriber.MpSubscriber
+add_celix_bundle( org.apache.celix.pubsub_subscriber.MpSubscriber
SYMBOLIC_NAME "apache_celix_pubsub_mp_subscriber"
VERSION "1.0.0"
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/examples/pubsub/publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/pubsub/publisher/CMakeLists.txt b/pubsub/examples/pubsub/publisher/CMakeLists.txt
index e35c137..2f7d671 100644
--- a/pubsub/examples/pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-add_bundle(org.apache.celix.pubsub_publisher.PoiPublisher
+add_celix_bundle(org.apache.celix.pubsub_publisher.PoiPublisher
SYMBOLIC_NAME "apache_celix_pubsub_poi_publisher"
VERSION "1.0.0"
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/examples/pubsub/publisher2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/pubsub/publisher2/CMakeLists.txt b/pubsub/examples/pubsub/publisher2/CMakeLists.txt
index b83f7dd..c03ac64 100644
--- a/pubsub/examples/pubsub/publisher2/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher2/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-add_bundle(org.apache.celix.pubsub_publisher.PoiPublisher2
+add_celix_bundle(org.apache.celix.pubsub_publisher.PoiPublisher2
SYMBOLIC_NAME "apache_celix_pubsub_poi_publisher2"
VERSION "1.0.0"
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/examples/pubsub/subscriber/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/examples/pubsub/subscriber/CMakeLists.txt b/pubsub/examples/pubsub/subscriber/CMakeLists.txt
index 7fd9fae..7f28dfe 100644
--- a/pubsub/examples/pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/pubsub/subscriber/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/common/include")
-add_bundle(org.apache.celix.pubsub_subscriber.PoiSubscriber
+add_celix_bundle(org.apache.celix.pubsub_subscriber.PoiSubscriber
SYMBOLIC_NAME "apache_celix_pubsub_poi_subscriber"
VERSION "1.0.0"
SOURCES
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_admin_udp_mc/CMakeLists.txt b/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
index 3ab0c54..fdf43ac 100644
--- a/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
+++ b/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
@@ -26,7 +26,7 @@ include_directories("private/include")
include_directories("public/include")
include_directories("${JANSSON_INCLUDE_DIR}")
-add_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc
+add_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_admin_udp_multicast"
VERSION "1.0.0"
SOURCES
@@ -44,6 +44,6 @@ add_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc
set_target_properties(org.apache.celix.pubsub_admin.PubSubAdminUdpMc PROPERTIES INSTALL_RPATH "$ORIGIN")
target_link_libraries(org.apache.celix.pubsub_admin.PubSubAdminUdpMc celix_framework celix_utils celix_dfi)
-install_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc)
+install_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/pubsub_admin_zmq/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_admin_zmq/CMakeLists.txt b/pubsub/pubsub_admin_zmq/CMakeLists.txt
index ab250f9..962310e 100644
--- a/pubsub/pubsub_admin_zmq/CMakeLists.txt
+++ b/pubsub/pubsub_admin_zmq/CMakeLists.txt
@@ -41,7 +41,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
set (ZMQ_CRYPTO_C "private/src/zmq_crypto.c")
endif()
- add_bundle(org.apache.celix.pubsub_admin.PubSubAdminZmq
+ add_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminZmq
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_admin_zmq"
VERSION "1.0.0"
SOURCES
@@ -58,6 +58,6 @@ if (BUILD_PUBSUB_PSA_ZMQ)
set_target_properties(org.apache.celix.pubsub_admin.PubSubAdminZmq PROPERTIES INSTALL_RPATH "$ORIGIN")
target_link_libraries(org.apache.celix.pubsub_admin.PubSubAdminZmq celix_framework celix_utils celix_dfi ${ZMQ_LIBRARIES} ${CZMQ_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY})
- install_bundle(org.apache.celix.pubsub_admin.PubSubAdminZmq)
+ install_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminZmq)
endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/pubsub_discovery/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_discovery/CMakeLists.txt b/pubsub/pubsub_discovery/CMakeLists.txt
index 948da3e..42017e7 100644
--- a/pubsub/pubsub_discovery/CMakeLists.txt
+++ b/pubsub/pubsub_discovery/CMakeLists.txt
@@ -26,7 +26,7 @@ include_directories("${PROJECT_SOURCE_DIR}/etcdlib/public/include")
include_directories("private/include")
include_directories("public/include")
-add_bundle(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery
+add_celix_bundle(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_discovery_etcd"
VERSION "1.0.0"
SOURCES
@@ -40,4 +40,4 @@ add_bundle(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery
)
target_link_libraries(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery celix_framework celix_utils etcdlib_static ${CURL_LIBRARIES} ${JANSSON_LIBRARIES})
-install_bundle(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery)
+install_celix_bundle(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/pubsub_serializer_json/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_serializer_json/CMakeLists.txt b/pubsub/pubsub_serializer_json/CMakeLists.txt
index 147873a..2aaa98a 100644
--- a/pubsub/pubsub_serializer_json/CMakeLists.txt
+++ b/pubsub/pubsub_serializer_json/CMakeLists.txt
@@ -26,7 +26,7 @@ include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
include_directories("${JANSSON_INCLUDE_DIR}")
-add_bundle(org.apache.celix.pubsub_serializer.PubSubSerializerJson
+add_celix_bundle(org.apache.celix.pubsub_serializer.PubSubSerializerJson
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_serializer_json"
VERSION "1.0.0"
SOURCES
@@ -39,5 +39,5 @@ add_bundle(org.apache.celix.pubsub_serializer.PubSubSerializerJson
set_target_properties(org.apache.celix.pubsub_serializer.PubSubSerializerJson PROPERTIES INSTALL_RPATH "$ORIGIN")
target_link_libraries(org.apache.celix.pubsub_serializer.PubSubSerializerJson celix_framework celix_utils celix_dfi ${JANSSON_LIBRARIES})
-install_bundle(org.apache.celix.pubsub_serializer.PubSubSerializerJson)
+install_celix_bundle(org.apache.celix.pubsub_serializer.PubSubSerializerJson)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/pubsub_topology_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_topology_manager/CMakeLists.txt b/pubsub/pubsub_topology_manager/CMakeLists.txt
index b6eb796..680673b 100644
--- a/pubsub/pubsub_topology_manager/CMakeLists.txt
+++ b/pubsub/pubsub_topology_manager/CMakeLists.txt
@@ -23,7 +23,7 @@ include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
include_directories("private/include")
include_directories("public/include")
-add_bundle(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
+add_celix_bundle(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_topology_manager"
VERSION "1.0.0"
SOURCES
@@ -40,5 +40,5 @@ bundle_files(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
)
target_link_libraries(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager celix_framework celix_utils)
-install_bundle(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager)
+install_celix_bundle(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/pubsub/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/pubsub/test/CMakeLists.txt b/pubsub/test/CMakeLists.txt
index 8279c0c..4150b3e 100644
--- a/pubsub/test/CMakeLists.txt
+++ b/pubsub/test/CMakeLists.txt
@@ -25,7 +25,7 @@ include_directories(
test
)
-add_bundle(pubsub_sut
+add_celix_bundle(pubsub_sut
#"Vanilla" bundle which is under test
SOURCES
test/sut_activator.c
@@ -37,7 +37,7 @@ bundle_files(pubsub_sut
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
)
-add_deploy(pubsub_udpmc_sut
+add_celix_container(pubsub_udpmc_sut
NAME deploy_sut
BUNDLES
org.apache.celix.pubsub_serializer.PubSubSerializerJson
@@ -47,7 +47,7 @@ add_deploy(pubsub_udpmc_sut
pubsub_sut
DIR ${PROJECT_BINARY_DIR}/runtimes/test/pubsub/udpmc
)
-add_deploy(pubsub_zmq_sut
+add_celix_container(pubsub_zmq_sut
NAME deploy_sut
BUNDLES
org.apache.celix.pubsub_serializer.PubSubSerializerJson
@@ -58,7 +58,7 @@ add_deploy(pubsub_zmq_sut
DIR ${PROJECT_BINARY_DIR}/runtimes/test/pubsub/zmq
)
-add_bundle(pubsub_tst
+add_celix_bundle(pubsub_tst
#Test bundle containing cpputests and uses celix_test_runner launcher instead of the celix launcher
SOURCES
test/tst_activator.cpp
@@ -76,7 +76,7 @@ bundle_files(pubsub_tst
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
)
-add_deploy(pubsub_udpmc_tst
+add_celix_container(pubsub_udpmc_tst
NAME deploy_tst
BUNDLES
org.apache.celix.pubsub_serializer.PubSubSerializerJson
@@ -88,7 +88,7 @@ add_deploy(pubsub_udpmc_tst
DIR ${PROJECT_BINARY_DIR}/runtimes/test/pubsub/udpmc
LAUNCHER celix_test_runner
)
-add_deploy(pubsub_zmq_tst
+add_celix_container(pubsub_zmq_tst
NAME deploy_tst
BUNDLES
org.apache.celix.pubsub_serializer.PubSubSerializerJson
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/discovery_configured/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_configured/CMakeLists.txt b/remote_services/discovery_configured/CMakeLists.txt
index edbbc13..c3180ad 100644
--- a/remote_services/discovery_configured/CMakeLists.txt
+++ b/remote_services/discovery_configured/CMakeLists.txt
@@ -31,7 +31,7 @@ if (RSA_DISCOVERY_CONFIGURED)
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
include_directories(private/include)
- add_bundle(discovery_configured
+ add_celix_bundle(discovery_configured
VERSION 0.9.0
SYMBOLIC_NAME "apache_celix_rsa_discovery_configured"
NAME "Apache Celix RSA Configured Discovery"
@@ -50,7 +50,7 @@ if (RSA_DISCOVERY_CONFIGURED)
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(discovery_configured)
+ install_celix_bundle(discovery_configured)
target_link_libraries(discovery_configured celix_framework ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES})
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/discovery_etcd/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/CMakeLists.txt b/remote_services/discovery_etcd/CMakeLists.txt
index 442d486..ce25d22 100644
--- a/remote_services/discovery_etcd/CMakeLists.txt
+++ b/remote_services/discovery_etcd/CMakeLists.txt
@@ -35,7 +35,7 @@ if (RSA_DISCOVERY_ETCD)
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
include_directories("private/include")
- add_bundle(discovery_etcd
+ add_celix_bundle(discovery_etcd
VERSION 0.9.0
SYMBOLIC_NAME "apache_celix_rsa_discovery_etcd"
NAME "Apache Celix RSA Discovery ETCD"
@@ -54,7 +54,7 @@ if (RSA_DISCOVERY_ETCD)
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(discovery_etcd)
+ install_celix_bundle(discovery_etcd)
target_link_libraries(discovery_etcd celix_framework etcdlib ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} ${JANSSON_LIBRARIES})
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/discovery_shm/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_shm/CMakeLists.txt b/remote_services/discovery_shm/CMakeLists.txt
index 862096c..3eec195 100644
--- a/remote_services/discovery_shm/CMakeLists.txt
+++ b/remote_services/discovery_shm/CMakeLists.txt
@@ -32,7 +32,7 @@ find_package(CURL REQUIRED)
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
include_directories("private/include")
- add_bundle(discovery_shm
+ add_celix_bundle(discovery_shm
VERSION 0.0.1
SYMBOLIC_NAME "apache_celix_rsa_discovery_shm"
NAME "Apache Celix RSA Discovery SHM"
@@ -51,7 +51,7 @@ find_package(CURL REQUIRED)
${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
)
- install_bundle(discovery_shm)
+ install_celix_bundle(discovery_shm)
target_link_libraries(discovery_shm celix_framework ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES})
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/CMakeLists.txt b/remote_services/examples/CMakeLists.txt
index 44b7733..b919760 100644
--- a/remote_services/examples/CMakeLists.txt
+++ b/remote_services/examples/CMakeLists.txt
@@ -28,7 +28,7 @@ if (RSA_EXAMPLES)
add_subdirectory(calculator_shell)
if(BUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP AND BUILD_RSA_DISCOVERY_CONFIGURED)
- add_deploy(remote-services-cfg-server
+ add_celix_container(remote-services-cfg-server
NAME "server"
GROUP "remote-services/remote-services-cfg"
BUNDLES discovery_configured topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
@@ -42,7 +42,7 @@ if (RSA_EXAMPLES)
org.apache.celix.calc.api.Calculator2_endpoint
)
- add_deploy(remote-services-cfg-client
+ add_celix_container(remote-services-cfg-client
NAME "client"
GROUP "remote-services/remote-services-cfg"
BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_configured
@@ -57,7 +57,7 @@ if (RSA_EXAMPLES)
endif()
if (BUILD_RSA_REMOTE_SERVICE_ADMIN_SHM AND BUILD_RSA_DISCOVERY_SHM)
- add_deploy(remote-services-shm
+ add_celix_container(remote-services-shm
NAME "server"
GROUP "remote-services/remote-services-shm"
BUNDLES discovery_shm topology_manager remote_service_admin_shm calculator shell shell_tui log_service log_writer
@@ -66,7 +66,7 @@ if (RSA_EXAMPLES)
BUNDLES org.apache.celix.calc.api.Calculator_endpoint
)
- add_deploy(remote-services-shm-client
+ add_celix_container(remote-services-shm-client
NAME "client"
GROUP "remote-services/remote-services-shm"
BUNDLES topology_manager remote_service_admin_shm shell shell_tui log_service log_writer calculator_shell discovery_shm
@@ -77,7 +77,7 @@ if (RSA_EXAMPLES)
endif ()
if (BUILD_RSA_DISCOVERY_ETCD AND BUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP)
- add_deploy(remote-services-etcd
+ add_celix_container(remote-services-etcd
NAME "server"
GROUP "remote-services/remote-services-etcd"
BUNDLES discovery_etcd topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
@@ -88,7 +88,7 @@ if (RSA_EXAMPLES)
org.apache.celix.calc.api.Calculator2_endpoint
)
- add_deploy("remote-services-etcd-client"
+ add_celix_container("remote-services-etcd-client"
NAME "client"
GROUP "remote-services/remote-services-etcd"
BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_etcd
@@ -99,13 +99,13 @@ if (RSA_EXAMPLES)
endif ()
if (BUILD_RSA_DISCOVERY_ETCD AND BUILD_RSA_REMOTE_SERVICE_ADMIN_DFI)
- add_deploy(remote-services-dfi
+ add_celix_container(remote-services-dfi
NAME "server"
GROUP "remote-services/remote-services-dfi"
BUNDLES discovery_etcd topology_manager remote_service_admin_dfi calculator shell shell_tui log_service log_writer
)
- add_deploy("remote-services-dfi-client"
+ add_celix_container("remote-services-dfi-client"
NAME "client"
GROUP "remote-services/remote-services-dfi"
BUNDLES topology_manager remote_service_admin_dfi shell shell_tui log_service log_writer calculator_shell discovery_etcd
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/examples/calculator_endpoint/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_endpoint/CMakeLists.txt b/remote_services/examples/calculator_endpoint/CMakeLists.txt
index 6e9c928..beb4ddb 100644
--- a/remote_services/examples/calculator_endpoint/CMakeLists.txt
+++ b/remote_services/examples/calculator_endpoint/CMakeLists.txt
@@ -23,7 +23,7 @@ include_directories("../../remote_service_admin/public/include")
include_directories("../calculator_service/public/include")
include_directories("private/include")
-add_bundle(org.apache.celix.calc.api.Calculator_endpoint SOURCES
+add_celix_bundle(org.apache.celix.calc.api.Calculator_endpoint SOURCES
private/src/calculator_endpoint_activator
private/src/calculator_endpoint_impl.c
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/examples/calculator_endpoint2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_endpoint2/CMakeLists.txt b/remote_services/examples/calculator_endpoint2/CMakeLists.txt
index b75e6df..2bd829f 100644
--- a/remote_services/examples/calculator_endpoint2/CMakeLists.txt
+++ b/remote_services/examples/calculator_endpoint2/CMakeLists.txt
@@ -23,7 +23,7 @@ include_directories("../../remote_service_admin/public/include")
include_directories("../calculator_service/public/include")
include_directories("private/include")
-add_bundle(org.apache.celix.calc.api.Calculator2_endpoint SOURCES
+add_celix_bundle(org.apache.celix.calc.api.Calculator2_endpoint SOURCES
private/src/calculator_endpoint_activator
private/src/calculator_endpoint_impl.c
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/examples/calculator_proxy/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_proxy/CMakeLists.txt b/remote_services/examples/calculator_proxy/CMakeLists.txt
index 9bbf089..3696347 100644
--- a/remote_services/examples/calculator_proxy/CMakeLists.txt
+++ b/remote_services/examples/calculator_proxy/CMakeLists.txt
@@ -24,7 +24,7 @@ include_directories("private/include")
include_directories("../calculator_service/public/include")
include_directories("../../endpoint_listener/public/include")
-add_bundle(org.apache.celix.calc.api.Calculator_proxy SOURCES
+add_celix_bundle(org.apache.celix.calc.api.Calculator_proxy SOURCES
private/src/calculator_proxy_activator
private/src/calculator_proxy_impl.c
../../remote_service_admin/private/src/remote_proxy_factory_impl.c
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/examples/calculator_proxy2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_proxy2/CMakeLists.txt b/remote_services/examples/calculator_proxy2/CMakeLists.txt
index 01556e3..73ec103 100644
--- a/remote_services/examples/calculator_proxy2/CMakeLists.txt
+++ b/remote_services/examples/calculator_proxy2/CMakeLists.txt
@@ -24,7 +24,7 @@ include_directories("private/include")
include_directories("../calculator_service/public/include")
include_directories("../../endpoint_listener/public/include")
-add_bundle(org.apache.celix.calc.api.Calculator2_proxy SOURCES
+add_celix_bundle(org.apache.celix.calc.api.Calculator2_proxy SOURCES
private/src/calculator_proxy_activator
private/src/calculator_proxy_impl.c
../../remote_service_admin/private/src/remote_proxy_factory_impl.c
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/examples/calculator_service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_service/CMakeLists.txt b/remote_services/examples/calculator_service/CMakeLists.txt
index a18f22b..d1cf31d 100644
--- a/remote_services/examples/calculator_service/CMakeLists.txt
+++ b/remote_services/examples/calculator_service/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories("../../remote_service_admin/public/include")
include_directories("private/include")
include_directories("public/include")
-add_bundle(calculator SOURCES
+add_celix_bundle(calculator SOURCES
private/src/calculator_impl
private/src/calculator_activator
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/examples/calculator_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_shell/CMakeLists.txt b/remote_services/examples/calculator_shell/CMakeLists.txt
index 361b688..f6948a0 100644
--- a/remote_services/examples/calculator_shell/CMakeLists.txt
+++ b/remote_services/examples/calculator_shell/CMakeLists.txt
@@ -20,7 +20,7 @@ include_directories("../../../utils/public/include")
include_directories("../calculator_service/public/include")
include_directories("../../../shell/public/include")
-add_bundle(calculator_shell SOURCES
+add_celix_bundle(calculator_shell SOURCES
private/src/add_command
private/src/sub_command
private/src/sqrt_command
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
index 7e2675c..b0fb0aa 100644
--- a/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
@@ -27,7 +27,7 @@ include_directories(
${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include
)
-add_bundle(remote_service_admin_dfi
+add_celix_bundle(remote_service_admin_dfi
VERSION 0.9.0
SYMBOLIC_NAME "apache_celix_remote_service_admin_dfi"
NAME "Apache Celix Remote Service Admin Dynamic Function Interface (DFI)"
@@ -45,4 +45,4 @@ add_bundle(remote_service_admin_dfi
)
target_link_libraries(remote_service_admin_dfi celix_framework celix_utils celix_dfi ${CURL_LIBRARIES} ${JANSSON_LIBRARIES})
-install_bundle(remote_service_admin_dfi)
+install_celix_bundle(remote_service_admin_dfi)
http://git-wip-us.apache.org/repos/asf/celix/blob/68775a04/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
index d172087..d25517e 100644
--- a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
@@ -23,7 +23,7 @@ include_directories(
)
-add_bundle(rsa_dfi_tst_bundle
+add_celix_bundle(rsa_dfi_tst_bundle
VERSION 0.0.1
SOURCES
tst_activator.c
[04/11] celix git commit: CELIX-412: Add AL info for project markdown
files
Posted by pn...@apache.org.
CELIX-412: Add AL info for project markdown files
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/01620951
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/01620951
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/01620951
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: 01620951036854117eab7ef3d7dd6911a5001759
Parents: fd20690
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Jan 17 10:58:26 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Jan 17 10:58:26 2018 +0100
----------------------------------------------------------------------
CHANGES.md | 28 ++++++++++----------
README.md | 17 ++++++++++++
config_admin/readme.md | 17 ++++++++++++
dependency_manager/readme.md | 17 ++++++++++++
dependency_manager_cxx/readme.md | 17 ++++++++++++
deployment_admin/README.md | 17 ++++++++++++
device_access/README.md | 17 ++++++++++++
documents/building/readme.md | 17 ++++++++++++
documents/cmake_commands/readme.md | 19 ++++++++++++-
.../getting_started/creating_a_simple_bundle.md | 17 ++++++++++++
documents/getting_started/readme.md | 17 ++++++++++++
.../getting_started/using_services_with_c.md | 17 ++++++++++++
.../getting_started/using_services_with_cxx.md | 17 ++++++++++++
documents/intro/readme.md | 17 ++++++++++++
documents/roadmap/api_v3/readme.md | 19 ++++++++++++-
documents/roadmap/improvement_ideas.md | 19 ++++++++++++-
documents/roadmap/roadmap.md | 17 ++++++++++++
documents/subprojects/readme.md | 17 ++++++++++++
etcdlib/README.md | 17 ++++++++++++
launcher/README.md | 17 ++++++++++++
log_service/README.md | 17 ++++++++++++
log_writer/README.md | 17 ++++++++++++
pubsub/README.md | 17 ++++++++++++
pubsub/examples/keys/README.md | 17 ++++++++++++
pubsub/pubsub_admin_udp_mc/README.md | 17 ++++++++++++
rat-excludes.txt | 7 +++--
remote_services/README.md | 17 ++++++++++++
remote_services/discovery_etcd/README.md | 17 ++++++++++++
remote_services/remote_service_admin/README.md | 17 ++++++++++++
remote_services/topology_manager/README.md | 17 ++++++++++++
remote_shell/README.md | 17 ++++++++++++
shell/README.md | 17 ++++++++++++
shell_tui/README.md | 17 ++++++++++++
utils/README.md | 17 ++++++++++++
34 files changed, 566 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/CHANGES.md
----------------------------------------------------------------------
diff --git a/CHANGES.md b/CHANGES.md
index 3595f3c..9cf39f6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,18 +1,18 @@
<!--
-# 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.
+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.
-->
# Changes for 2.1.0
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3834801..c6905a5 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix [](https://travis-ci.org/apache/celix) [](https://coveralls.io/github/apache/celix?branch=develop) [](https://scan.coverity.com/projects/6685)
Apache Celix is an implementation of the OSGi specification adapted to C and C++ (C++11). It is a provides a framework to develop (dynamic) modular software applications using component and/or service-oriented programming.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/config_admin/readme.md
----------------------------------------------------------------------
diff --git a/config_admin/readme.md b/config_admin/readme.md
index db13504..607a810 100644
--- a/config_admin/readme.md
+++ b/config_admin/readme.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Configuration Admin
---
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/dependency_manager/readme.md
----------------------------------------------------------------------
diff --git a/dependency_manager/readme.md b/dependency_manager/readme.md
index 8b9ce71..5b21ecb 100644
--- a/dependency_manager/readme.md
+++ b/dependency_manager/readme.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix Dependency Manager
## Introduction
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/dependency_manager_cxx/readme.md
----------------------------------------------------------------------
diff --git a/dependency_manager_cxx/readme.md b/dependency_manager_cxx/readme.md
index 80de7af..416ff7e 100644
--- a/dependency_manager_cxx/readme.md
+++ b/dependency_manager_cxx/readme.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix C++ Dependency Manager
## Introduction
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/deployment_admin/README.md
----------------------------------------------------------------------
diff --git a/deployment_admin/README.md b/deployment_admin/README.md
index d28559c..40b112b 100644
--- a/deployment_admin/README.md
+++ b/deployment_admin/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Deployment Admin
The Celix Deployment Admin implements the OSGi Deployment Admin specification, which provides functionality to manage deployment packages. Deployment package are bundles and other artifacts that can be installed, updated and uninstalled as single unit.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/device_access/README.md
----------------------------------------------------------------------
diff --git a/device_access/README.md b/device_access/README.md
index d58601d..274e78d 100644
--- a/device_access/README.md
+++ b/device_access/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Device Access
The Device Access contains a for Celix adapted implementation of the OSGi Compendium Device Access Specification.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/building/readme.md
----------------------------------------------------------------------
diff --git a/documents/building/readme.md b/documents/building/readme.md
index d47a364..e624d26 100644
--- a/documents/building/readme.md
+++ b/documents/building/readme.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix - Building and Installing
Apache Celix aims to be support a broad range of UNIX platforms.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/cmake_commands/readme.md
----------------------------------------------------------------------
diff --git a/documents/cmake_commands/readme.md b/documents/cmake_commands/readme.md
index 661f5cc..df62ff3 100644
--- a/documents/cmake_commands/readme.md
+++ b/documents/cmake_commands/readme.md
@@ -1,4 +1,21 @@
-# Apache Celix - CMake Commands
+<!--
+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.
+-->
+
+# Apache Celix - CMake Commands
For Apache Celix several cmake command are added to be able to work with Apache Celix bundles and deployments.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/getting_started/creating_a_simple_bundle.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/creating_a_simple_bundle.md b/documents/getting_started/creating_a_simple_bundle.md
index 784e11c..e580477 100644
--- a/documents/getting_started/creating_a_simple_bundle.md
+++ b/documents/getting_started/creating_a_simple_bundle.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix - Getting Started Guide: Creating a Simple Bundle
## Intro
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/getting_started/readme.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/readme.md b/documents/getting_started/readme.md
index 871f6e8..6dd798c 100644
--- a/documents/getting_started/readme.md
+++ b/documents/getting_started/readme.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix - Getting Started Guide
## Guides
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/getting_started/using_services_with_c.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/using_services_with_c.md b/documents/getting_started/using_services_with_c.md
index de69d55..258b147 100644
--- a/documents/getting_started/using_services_with_c.md
+++ b/documents/getting_started/using_services_with_c.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix - Using Services with C
## Intro
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/getting_started/using_services_with_cxx.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/using_services_with_cxx.md b/documents/getting_started/using_services_with_cxx.md
index e215e37..d8ad2ca 100644
--- a/documents/getting_started/using_services_with_cxx.md
+++ b/documents/getting_started/using_services_with_cxx.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix - Using Services with C++
## Intro
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/intro/readme.md
----------------------------------------------------------------------
diff --git a/documents/intro/readme.md b/documents/intro/readme.md
index 4d4b73b..b91a0e0 100644
--- a/documents/intro/readme.md
+++ b/documents/intro/readme.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Apache Celix Introduction
## What is Apache Celix
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/roadmap/api_v3/readme.md
----------------------------------------------------------------------
diff --git a/documents/roadmap/api_v3/readme.md b/documents/roadmap/api_v3/readme.md
index 4fef085..f180aae 100644
--- a/documents/roadmap/api_v3/readme.md
+++ b/documents/roadmap/api_v3/readme.md
@@ -1,4 +1,21 @@
-# Celix Version 3
+<!--
+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.
+-->
+
+# Celix Version 3 (Proposal)
## Intro
The [celix.h](celix/celix.h) header contains a proposed API for Apache Celix version 3.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/roadmap/improvement_ideas.md
----------------------------------------------------------------------
diff --git a/documents/roadmap/improvement_ideas.md b/documents/roadmap/improvement_ideas.md
index 1218106..32db322 100644
--- a/documents/roadmap/improvement_ideas.md
+++ b/documents/roadmap/improvement_ideas.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Improvement Ideas
# Introduce dlmopen for library imports.
@@ -34,4 +51,4 @@ create a more clear root directory structure.
# Add pub sub admins.
The current implementation uses JSON over multicast UDP or over ZMQ.
One or more could be added. i.e. serialization based on Apache-Avro, communication over TCP / Kafka / Shared Memory
-Add interfaces for other languages (Python / Rust / Go / ...)
\ No newline at end of file
+Add interfaces for other languages (Python / Rust / Go / ...)
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/roadmap/roadmap.md
----------------------------------------------------------------------
diff --git a/documents/roadmap/roadmap.md b/documents/roadmap/roadmap.md
index 2594800..a3100be 100644
--- a/documents/roadmap/roadmap.md
+++ b/documents/roadmap/roadmap.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Roadmap
Note this roadmap is still a draft.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/documents/subprojects/readme.md
----------------------------------------------------------------------
diff --git a/documents/subprojects/readme.md b/documents/subprojects/readme.md
index 6c95600..49da63e 100644
--- a/documents/subprojects/readme.md
+++ b/documents/subprojects/readme.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
#Apache Celix - Subprojects
Apache Celix is organized into several subprojects. The following subproject are currently available:
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/etcdlib/README.md
----------------------------------------------------------------------
diff --git a/etcdlib/README.md b/etcdlib/README.md
index 49f18d6..28cc442 100644
--- a/etcdlib/README.md
+++ b/etcdlib/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Etcdlib
etcd is a distributed, consistent key-value store for shared configuration and service discovery, part of the CoreOS project.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/launcher/README.md
----------------------------------------------------------------------
diff --git a/launcher/README.md b/launcher/README.md
index a1e29fb..68ea743 100644
--- a/launcher/README.md
+++ b/launcher/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Launcher
The Celix Launcher is a generic executable for launching the Framework. It reads a java properties based configuration file.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/log_service/README.md
----------------------------------------------------------------------
diff --git a/log_service/README.md b/log_service/README.md
index 32ee520..b3504cb 100644
--- a/log_service/README.md
+++ b/log_service/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Log Service
The Celix Log Service realizes an adapted implementation of the OSGi Compendium Log Service. This is a very simple implementation which only stores the log in memory. It can be combined with one of the available Log Writers to forward the buffered entries to e.g. stdout or syslog.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/log_writer/README.md
----------------------------------------------------------------------
diff --git a/log_writer/README.md b/log_writer/README.md
index 6de181d..a7c4533 100644
--- a/log_writer/README.md
+++ b/log_writer/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Log Writer
The Celix Log Writers are components that read/listen to the Log Service and print the Log entries to the console or syslog, respectively.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/pubsub/README.md
----------------------------------------------------------------------
diff --git a/pubsub/README.md b/pubsub/README.md
index 7d741e5..1b533be 100644
--- a/pubsub/README.md
+++ b/pubsub/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Publisher / subscriber implementation
This subdirectory contains an implementation for a publish-subscribe remote services system, that use dfi library for message serialization.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/pubsub/examples/keys/README.md
----------------------------------------------------------------------
diff --git a/pubsub/examples/keys/README.md b/pubsub/examples/keys/README.md
index 8517415..200acc9 100644
--- a/pubsub/examples/keys/README.md
+++ b/pubsub/examples/keys/README.md
@@ -1,4 +1,21 @@
+<!--
+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.
+-->
+
Store the AES key for encrypting and decrypting the encoded secret keys safe in a file!
Default file is `/etc/pubsub.keys` with the following format:
```
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/pubsub/pubsub_admin_udp_mc/README.md
----------------------------------------------------------------------
diff --git a/pubsub/pubsub_admin_udp_mc/README.md b/pubsub/pubsub_admin_udp_mc/README.md
index 0f3f637..7520fef 100644
--- a/pubsub/pubsub_admin_udp_mc/README.md
+++ b/pubsub/pubsub_admin_udp_mc/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# PUBSUB-Admin UDP Multicast
---
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/rat-excludes.txt
----------------------------------------------------------------------
diff --git a/rat-excludes.txt b/rat-excludes.txt
index 45c1e75..c6914e9 100644
--- a/rat-excludes.txt
+++ b/rat-excludes.txt
@@ -63,8 +63,8 @@ fmemopen.h
open_memstream.c
open_memstream.h
- Documentation files
-(.)*.md
+# thpool and memstream documentation files
+./utils/public/include/memstream/README.md
.travis.yml
@@ -76,3 +76,6 @@ scope.*\.json
MIT - C Thread Pool
thpool.c
thpool.h
+Design.md
+FAQ.md
+README.md
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/remote_services/README.md
----------------------------------------------------------------------
diff --git a/remote_services/README.md b/remote_services/README.md
index 2afcb81..15365b2 100644
--- a/remote_services/README.md
+++ b/remote_services/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
Title: Apache Celix Remote Service Admin Service
## Introduction
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/remote_services/discovery_etcd/README.md
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/README.md b/remote_services/discovery_etcd/README.md
index ff879ce..e560264 100644
--- a/remote_services/discovery_etcd/README.md
+++ b/remote_services/discovery_etcd/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Discovery ETCD
The Celix Discovery ETCD bundles realizes OSGi services discovery based on [etcd](https://github.com/coreos/etcd).
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/remote_services/remote_service_admin/README.md
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin/README.md b/remote_services/remote_service_admin/README.md
index c4bdebd..2b146e1 100644
--- a/remote_services/remote_service_admin/README.md
+++ b/remote_services/remote_service_admin/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Remote Service Admin
The Remote Service Admin (RSA) provides the mechanisms to import and export services when instructed to do so by the Topology Manager.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/remote_services/topology_manager/README.md
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/README.md b/remote_services/topology_manager/README.md
index e97c9e3..6200cc4 100644
--- a/remote_services/topology_manager/README.md
+++ b/remote_services/topology_manager/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Topology Manager
The Topology Manager decides which services should be imported and exported according to a defined policy. Currently, only one policy is implemented in Celix, the *promiscuous* policy, which simply imports and exports all services. Note that the Topology Manager is essential to use remote services.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/remote_shell/README.md
----------------------------------------------------------------------
diff --git a/remote_shell/README.md b/remote_shell/README.md
index 09edcd8..af28421 100644
--- a/remote_shell/README.md
+++ b/remote_shell/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Remote Shell
The Celix Remote Shell implements a telnet interface for the Celix Shell.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/shell/README.md
----------------------------------------------------------------------
diff --git a/shell/README.md b/shell/README.md
index b830edc..b4cd530 100644
--- a/shell/README.md
+++ b/shell/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Shell
The Celix Shell provides a service interface which can be used to interact with the Celix framework. Note that it does not offer a user interface. This modular approach enables having multiple frontends, e.g. textual or graphical.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/shell_tui/README.md
----------------------------------------------------------------------
diff --git a/shell_tui/README.md b/shell_tui/README.md
index a637214..802259d 100644
--- a/shell_tui/README.md
+++ b/shell_tui/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
# Shell TUI
The Celix Shell TUI implements a textual user interface for the Celix Shell.
http://git-wip-us.apache.org/repos/asf/celix/blob/01620951/utils/README.md
----------------------------------------------------------------------
diff --git a/utils/README.md b/utils/README.md
index 9f02e8a..90aaccc 100644
--- a/utils/README.md
+++ b/utils/README.md
@@ -1,3 +1,20 @@
+<!--
+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.
+-->
+
## Utils
Celix Utils contains several useful containers/lists implementation used with the Celix project. The following types are available:
[10/11] celix git commit: Merge branch 'release/2.1.0' into
feature/CELIX-417-cmake-refactor
Posted by pn...@apache.org.
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
index 858efb5,f2d2aaa..1185ec5
--- a/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/mp_pubsub/subscriber/CMakeLists.txt
@@@ -15,17 -15,22 +15,17 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(org.apache.celix.pubsub_subscriber.MpSubscriber
-include_directories("private/include")
-include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/common/include")
-
-add_celix_bundle( org.apache.celix.pubsub_subscriber.MpSubscriber
++add_celix_bundle(org.apache.celix.pubsub_subscriber.MpSubscriber
SYMBOLIC_NAME "apache_celix_pubsub_mp_subscriber"
VERSION "1.0.0"
SOURCES
private/src/mp_sub_activator.c
private/src/mp_subscriber.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
+target_link_libraries(org.apache.celix.pubsub_subscriber.MpSubscriber PRIVATE Celix::framework Celix::pubsub_api)
+target_include_directories(org.apache.celix.pubsub_subscriber.MpSubscriber PRIVATE private/include)
- bundle_files( org.apache.celix.pubsub_subscriber.MpSubscriber
+ celix_bundle_files( org.apache.celix.pubsub_subscriber.MpSubscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ew.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_ide.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/mp_pubsub/msg_descriptors/msg_kinematics.descriptor
@@@ -37,7 -42,9 +37,7 @@@ celix_bundle_files(org.apache.celix.pub
DESTINATION "META-INF/keys"
)
- bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
+ celix_bundle_files(org.apache.celix.pubsub_subscriber.MpSubscriber
- ${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher/public
+ ${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher/public
DESTINATION "META-INF/keys/publisher"
- )
+ )
-
-target_link_libraries(org.apache.celix.pubsub_subscriber.MpSubscriber celix_framework celix_utils)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/examples/pubsub/publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/examples/pubsub/publisher/CMakeLists.txt
index 43eabd8,dec002d..176a57e
--- a/pubsub/examples/pubsub/publisher/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher/CMakeLists.txt
@@@ -15,35 -15,38 +15,35 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(celix_pubsub_poi_publisher
-include_directories("private/include")
-include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-
-add_celix_bundle(org.apache.celix.pubsub_publisher.PoiPublisher
++add_celix_bundle(celix_pubsub_poi_publisher
SYMBOLIC_NAME "apache_celix_pubsub_poi_publisher"
VERSION "1.0.0"
SOURCES
private/src/ps_pub_activator.c
private/src/pubsub_publisher.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
+target_link_libraries(celix_pubsub_poi_publisher PRIVATE Celix::framework Celix::pubsub_api)
+target_include_directories(celix_pubsub_poi_publisher PRIVATE private/include)
+
- bundle_files(celix_pubsub_poi_publisher
++celix_bundle_files(celix_pubsub_poi_publisher
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
- bundle_files(celix_pubsub_poi_publisher
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
++celix_bundle_files(celix_pubsub_poi_publisher
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/pub"
)
- bundle_files(celix_pubsub_poi_publisher
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
++celix_bundle_files(celix_pubsub_poi_publisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
- bundle_files(celix_pubsub_poi_publisher
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher
++celix_bundle_files(celix_pubsub_poi_publisher
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/examples/pubsub/publisher2/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/examples/pubsub/publisher2/CMakeLists.txt
index ba007c2,1defeb0..30d86ee
--- a/pubsub/examples/pubsub/publisher2/CMakeLists.txt
+++ b/pubsub/examples/pubsub/publisher2/CMakeLists.txt
@@@ -15,36 -15,39 +15,36 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(celix_pubsub_poi_publisher2
-include_directories("../publisher/private/include")
-include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-
-add_celix_bundle(org.apache.celix.pubsub_publisher.PoiPublisher2
++add_celix_bundle(celix_pubsub_poi_publisher2
SYMBOLIC_NAME "apache_celix_pubsub_poi_publisher2"
VERSION "1.0.0"
SOURCES
../publisher/private/src/ps_pub_activator.c
../publisher/private/src/pubsub_publisher.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
)
+target_link_libraries(celix_pubsub_poi_publisher2 PRIVATE Celix::framework Celix::pubsub_api)
+target_include_directories(celix_pubsub_poi_publisher2 PRIVATE ../publisher/private/include)
+
- bundle_files(celix_pubsub_poi_publisher2
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
++celix_bundle_files(celix_pubsub_poi_publisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
- bundle_files(celix_pubsub_poi_publisher2
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
++celix_bundle_files(celix_pubsub_poi_publisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/pub"
)
- bundle_files(celix_pubsub_poi_publisher2
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
++celix_bundle_files(celix_pubsub_poi_publisher2
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher
DESTINATION "META-INF/keys"
)
- bundle_files(celix_pubsub_poi_publisher2
-celix_bundle_files(org.apache.celix.pubsub_publisher.PoiPublisher2
- ${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
++celix_bundle_files(celix_pubsub_poi_publisher2
+ ${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber/public
DESTINATION "META-INF/keys/subscriber"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/examples/pubsub/subscriber/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/examples/pubsub/subscriber/CMakeLists.txt
index 1ffd39a,8bcec93..0eb13ff
--- a/pubsub/examples/pubsub/subscriber/CMakeLists.txt
+++ b/pubsub/examples/pubsub/subscriber/CMakeLists.txt
@@@ -15,36 -15,41 +15,36 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(celix_pubsub_poi_subscriber
-include_directories("private/include")
-include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/common/include")
-
-add_celix_bundle(org.apache.celix.pubsub_subscriber.PoiSubscriber
++add_celix_bundle(celix_pubsub_poi_subscriber
SYMBOLIC_NAME "apache_celix_pubsub_poi_subscriber"
VERSION "1.0.0"
SOURCES
private/src/ps_sub_activator.c
- private/src/pubsub_subscriber.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
+ private/src/pubsub_subscriber.c
)
-celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
+target_link_libraries(celix_pubsub_poi_subscriber PRIVATE Celix::framework Celix::pubsub_api)
+target_include_directories(celix_pubsub_poi_subscriber PRIVATE private/include)
+
+
- bundle_files(celix_pubsub_poi_subscriber
++celix_bundle_files(celix_pubsub_poi_subscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi1.descriptor
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/msg_poi2.descriptor
DESTINATION "META-INF/descriptors"
)
- bundle_files(celix_pubsub_poi_subscriber
-celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
++celix_bundle_files(celix_pubsub_poi_subscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi1.properties
${PROJECT_SOURCE_DIR}/pubsub/examples/pubsub/msg_descriptors/poi2.properties
DESTINATION "META-INF/topics/sub"
)
- bundle_files(celix_pubsub_poi_subscriber
-celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
++celix_bundle_files(celix_pubsub_poi_subscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/subscriber
DESTINATION "META-INF/keys"
)
- bundle_files(celix_pubsub_poi_subscriber
-celix_bundle_files(org.apache.celix.pubsub_subscriber.PoiSubscriber
++celix_bundle_files(celix_pubsub_poi_subscriber
${PROJECT_SOURCE_DIR}/pubsub/examples/keys/publisher/public
DESTINATION "META-INF/keys/publisher"
- )
+ )
-
-target_link_libraries(org.apache.celix.pubsub_subscriber.PoiSubscriber celix_framework celix_utils)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/mock/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/mock/CMakeLists.txt
index ccc3d20,6313987..e68b1cb
--- a/pubsub/mock/CMakeLists.txt
+++ b/pubsub/mock/CMakeLists.txt
@@@ -18,13 -18,11 +18,13 @@@
#only install if CppuTest is available
find_package(CppUTest QUIET)
if (CPPUTEST_FOUND)
- include_directories(
- ../api
- api
+
- add_library(celix_pubsub_mock STATIC
++ add_library(pubsub_mock STATIC
+ src/publisher_mock.cc
)
- target_include_directories(celix_pubsub_mock PUBLIC api)
- target_link_libraries(celix_pubsub_mock PRIVATE Celix::pubsub_spi ${CPPUTEST_LIBRARY})
- target_include_directories(celix_pubsub_mock PRIVATE SYSTEM
- include_directories(SYSTEM
++ target_include_directories(pubsub_mock PUBLIC api)
++ target_link_libraries(pubsub_mock PRIVATE Celix::pubsub_spi ${CPPUTEST_LIBRARY})
++ target_include_directories(pubsub_mock PRIVATE SYSTEM
${CPPUTEST_INCLUDE_DIR}
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/pubsub_admin_udp_mc/CMakeLists.txt
index 87858e3,fdf43ac..6981c87
--- a/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
+++ b/pubsub/pubsub_admin_udp_mc/CMakeLists.txt
@@@ -17,28 -17,33 +17,28 @@@
find_package(Jansson REQUIRED)
- add_bundle(celix_pubsub_admin_udp_multicast
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/dfi/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-include_directories("private/include")
-include_directories("public/include")
-include_directories("${JANSSON_INCLUDE_DIR}")
-
-add_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc
++add_celix_bundle(celix_pubsub_admin_udp_multicast
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_admin_udp_multicast"
VERSION "1.0.0"
SOURCES
- private/src/psa_activator.c
- private/src/pubsub_admin_impl.c
- private/src/topic_subscription.c
- private/src/topic_publication.c
- private/src/large_udp.c
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_endpoint.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_admin_match.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
+ src/psa_activator.c
+ src/pubsub_admin_impl.c
+ src/topic_subscription.c
+ src/topic_publication.c
+ src/large_udp.c
)
-set_target_properties(org.apache.celix.pubsub_admin.PubSubAdminUdpMc PROPERTIES INSTALL_RPATH "$ORIGIN")
-target_link_libraries(org.apache.celix.pubsub_admin.PubSubAdminUdpMc celix_framework celix_utils celix_dfi)
-install_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminUdpMc)
+target_include_directories(celix_pubsub_admin_udp_multicast PRIVATE
+ src
+ ${JANSSON_INCLUDE_DIR}
+)
+
+set_target_properties(celix_pubsub_admin_udp_multicast PROPERTIES INSTALL_RPATH "$ORIGIN")
+target_link_libraries(celix_pubsub_admin_udp_multicast PRIVATE Celix::pubsub_spi Celix::framework Celix::dfi Celix::log_helper)
+
- install_bundle(celix_pubsub_admin_udp_multicast)
++install_celix_bundle(celix_pubsub_admin_udp_multicast)
+
+add_library(Celix::pubsub_admin_udp_multicast ALIAS celix_pubsub_admin_udp_multicast)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_admin_zmq/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/pubsub_admin_zmq/CMakeLists.txt
index 9d57756,962310e..65d2107
--- a/pubsub/pubsub_admin_zmq/CMakeLists.txt
+++ b/pubsub/pubsub_admin_zmq/CMakeLists.txt
@@@ -30,31 -41,23 +30,31 @@@ if (BUILD_PUBSUB_PSA_ZMQ
set (ZMQ_CRYPTO_C "private/src/zmq_crypto.c")
endif()
- add_bundle(celix_pubsub_admin_zmq
- add_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminZmq
- BUNDLE_SYMBOLICNAME "apache_celix_pubsub_admin_zmq"
- VERSION "1.0.0"
- SOURCES
- private/src/psa_activator.c
- private/src/pubsub_admin_impl.c
- private/src/topic_subscription.c
- private/src/topic_publication.c
- ${ZMQ_CRYPTO_C}
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_endpoint.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_admin_match.c
++ add_celix_bundle(celix_pubsub_admin_zmq
+ BUNDLE_SYMBOLICNAME "apache_celix_pubsub_admin_zmq"
+ VERSION "1.0.0"
+ SOURCES
+ src/psa_activator.c
+ src/pubsub_admin_impl.c
+ src/topic_subscription.c
+ src/topic_publication.c
+ ${ZMQ_CRYPTO_C}
+ )
+
+ set_target_properties(celix_pubsub_admin_zmq PROPERTIES INSTALL_RPATH "$ORIGIN")
+ target_link_libraries(celix_pubsub_admin_zmq PRIVATE
+ Celix::pubsub_spi
+ Celix::framework Celix::dfi Celix::log_helper
+ ${ZMQ_LIBRARIES} ${CZMQ_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY}
+ )
+ target_include_directories(celix_pubsub_admin_zmq PRIVATE
+ ${ZMQ_INCLUDE_DIR}
+ ${CZMQ_INCLUDE_DIR}
+ ${JANSSON_INCLUDE_DIR}
+ src
)
- install_bundle(org.apache.celix.pubsub_admin.PubSubAdminZmq)
- set_target_properties(org.apache.celix.pubsub_admin.PubSubAdminZmq PROPERTIES INSTALL_RPATH "$ORIGIN")
- target_link_libraries(org.apache.celix.pubsub_admin.PubSubAdminZmq celix_framework celix_utils celix_dfi ${ZMQ_LIBRARIES} ${CZMQ_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY})
- install_celix_bundle(org.apache.celix.pubsub_admin.PubSubAdminZmq)
++ install_celix_bundle(celix_pubsub_admin_zmq)
+ add_library(Celix::pubsub_admin_zmq ALIAS celix_pubsub_admin_zmq)
endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_admin_zmq/src/pubsub_admin_impl.c
----------------------------------------------------------------------
diff --cc pubsub/pubsub_admin_zmq/src/pubsub_admin_impl.c
index 29ead0c,0000000..2dcec25
mode 100644,000000..100644
--- a/pubsub/pubsub_admin_zmq/src/pubsub_admin_impl.c
+++ b/pubsub/pubsub_admin_zmq/src/pubsub_admin_impl.c
@@@ -1,1040 -1,0 +1,1040 @@@
+/**
+ *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.
+ */
+/*
+ * pubsub_admin_impl.c
+ *
+ * \date Sep 30, 2011
+ * \author <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+
+#include "pubsub_admin_impl.h"
+#include <zmq.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <arpa/inet.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+#ifndef ANDROID
+#include <ifaddrs.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "constants.h"
+#include "utils.h"
+#include "hash_map.h"
+#include "array_list.h"
+#include "bundle_context.h"
+#include "bundle.h"
+#include "service_reference.h"
+#include "service_registration.h"
+#include "log_helper.h"
+#include "log_service.h"
+#include "celix_threads.h"
+#include "service_factory.h"
+
+#include "topic_subscription.h"
+#include "topic_publication.h"
+#include "pubsub_endpoint.h"
+#include "pubsub_utils.h"
- #include "subscriber.h"
++#include "pubsub/subscriber.h"
+
+#define MAX_KEY_FOLDER_PATH_LENGTH 512
+
+static const char *DEFAULT_IP = "127.0.0.1";
+
+static celix_status_t pubsubAdmin_getIpAdress(const char* interface, char** ip);
+static celix_status_t pubsubAdmin_addSubscriptionToPendingList(pubsub_admin_pt admin,pubsub_endpoint_pt subEP);
+static celix_status_t pubsubAdmin_addAnySubscription(pubsub_admin_pt admin,pubsub_endpoint_pt subEP);
+
+static celix_status_t pubsubAdmin_getBestSerializer(pubsub_admin_pt admin,pubsub_endpoint_pt ep, pubsub_serializer_service_t **serSvc);
+static void connectTopicPubSubToSerializer(pubsub_admin_pt admin,pubsub_serializer_service_t *serializer,void *topicPubSub,bool isPublication);
+static void disconnectTopicPubSubFromSerializer(pubsub_admin_pt admin,void *topicPubSub,bool isPublication);
+
+celix_status_t pubsubAdmin_create(bundle_context_pt context, pubsub_admin_pt *admin) {
+ celix_status_t status = CELIX_SUCCESS;
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ if (!zsys_has_curve()){
+ printf("PSA_ZMQ: zeromq curve unsupported\n");
+ return CELIX_SERVICE_EXCEPTION;
+ }
+#endif
+
+ *admin = calloc(1, sizeof(**admin));
+
+ if (!*admin) {
+ status = CELIX_ENOMEM;
+ }
+ else{
+
+ const char *ip = NULL;
+ char *detectedIp = NULL;
+ (*admin)->bundle_context= context;
+ (*admin)->localPublications = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
+ (*admin)->subscriptions = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
+ (*admin)->pendingSubscriptions = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
+ (*admin)->externalPublications = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
+ (*admin)->topicSubscriptionsPerSerializer = hashMap_create(NULL, NULL, NULL, NULL);
+ (*admin)->topicPublicationsPerSerializer = hashMap_create(NULL, NULL, NULL, NULL);
+ arrayList_create(&((*admin)->noSerializerSubscriptions));
+ arrayList_create(&((*admin)->noSerializerPublications));
+ arrayList_create(&((*admin)->serializerList));
+
+ celixThreadMutex_create(&(*admin)->localPublicationsLock, NULL);
+ celixThreadMutex_create(&(*admin)->subscriptionsLock, NULL);
+ celixThreadMutex_create(&(*admin)->externalPublicationsLock, NULL);
+ celixThreadMutex_create(&(*admin)->serializerListLock, NULL);
+ celixThreadMutex_create(&(*admin)->usedSerializersLock, NULL);
+
+ celixThreadMutexAttr_create(&(*admin)->noSerializerPendingsAttr);
+ celixThreadMutexAttr_settype(&(*admin)->noSerializerPendingsAttr, CELIX_THREAD_MUTEX_RECURSIVE);
+ celixThreadMutex_create(&(*admin)->noSerializerPendingsLock, &(*admin)->noSerializerPendingsAttr);
+
+ celixThreadMutexAttr_create(&(*admin)->pendingSubscriptionsAttr);
+ celixThreadMutexAttr_settype(&(*admin)->pendingSubscriptionsAttr, CELIX_THREAD_MUTEX_RECURSIVE);
+ celixThreadMutex_create(&(*admin)->pendingSubscriptionsLock, &(*admin)->pendingSubscriptionsAttr);
+
+ if (logHelper_create(context, &(*admin)->loghelper) == CELIX_SUCCESS) {
+ logHelper_start((*admin)->loghelper);
+ }
+
+ bundleContext_getProperty(context,PSA_IP , &ip);
+
+#ifndef ANDROID
+ if (ip == NULL) {
+ const char *interface = NULL;
+
+ bundleContext_getProperty(context, PSA_ITF, &interface);
+ if (pubsubAdmin_getIpAdress(interface, &detectedIp) != CELIX_SUCCESS) {
+ logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_WARNING, "PSA_ZMQ: Could not retrieve IP adress for interface %s", interface);
+ }
+
+ ip = detectedIp;
+ }
+#endif
+
+ if (ip != NULL) {
+ logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_INFO, "PSA_ZMQ: Using %s for service annunciation", ip);
+ (*admin)->ipAddress = strdup(ip);
+ }
+ else {
+ logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_WARNING, "PSA_ZMQ: No IP address for service annunciation set. Using %s", DEFAULT_IP);
+ (*admin)->ipAddress = strdup(DEFAULT_IP);
+ }
+
+ if (detectedIp != NULL) {
+ free(detectedIp);
+ }
+
+ const char* basePortStr = NULL;
+ const char* maxPortStr = NULL;
+ char* endptrBase = NULL;
+ char* endptrMax = NULL;
+ bundleContext_getPropertyWithDefault(context, PSA_ZMQ_BASE_PORT, "PSA_ZMQ_DEFAULT_BASE_PORT", &basePortStr);
+ bundleContext_getPropertyWithDefault(context, PSA_ZMQ_MAX_PORT, "PSA_ZMQ_DEFAULT_MAX_PORT", &maxPortStr);
+ (*admin)->basePort = strtol(basePortStr, &endptrBase, 10);
+ (*admin)->maxPort = strtol(maxPortStr, &endptrMax, 10);
+ if (*endptrBase != '\0') {
+ (*admin)->basePort = PSA_ZMQ_DEFAULT_BASE_PORT;
+ }
+ if (*endptrMax != '\0') {
+ (*admin)->maxPort = PSA_ZMQ_DEFAULT_MAX_PORT;
+ }
+
+ printf("PSA Using base port %u to max port %u\n", (*admin)->basePort, (*admin)->maxPort);
+
+ // Disable Signal Handling by CZMQ
+ setenv("ZSYS_SIGHANDLER", "false", true);
+
+ const char *nrZmqThreads = NULL;
+ bundleContext_getProperty(context, "PSA_NR_ZMQ_THREADS", &nrZmqThreads);
+
+ if(nrZmqThreads != NULL) {
+ char *endPtr = NULL;
+ unsigned int nrThreads = strtoul(nrZmqThreads, &endPtr, 10);
+ if(endPtr != nrZmqThreads && nrThreads > 0 && nrThreads < 50) {
+ zsys_set_io_threads(nrThreads);
+ logHelper_log((*admin)->loghelper, OSGI_LOGSERVICE_INFO, "PSA_ZMQ: Using %d threads for ZMQ", nrThreads);
+ printf("PSA_ZMQ: Using %d threads for ZMQ\n", nrThreads);
+ }
+ }
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ // Setup authenticator
+ zactor_t* auth = zactor_new (zauth, NULL);
+ zstr_sendx(auth, "VERBOSE", NULL);
+
+ // Load all public keys of subscribers into the application
+ // This step is done for authenticating subscribers
+ char curve_folder_path[MAX_KEY_FOLDER_PATH_LENGTH];
+ char* keys_bundle_dir = pubsub_getKeysBundleDir(context);
+ snprintf(curve_folder_path, MAX_KEY_FOLDER_PATH_LENGTH, "%s/META-INF/keys/subscriber/public", keys_bundle_dir);
+ zstr_sendx (auth, "CURVE", curve_folder_path, NULL);
+ free(keys_bundle_dir);
+
+ (*admin)->zmq_auth = auth;
+#endif
+
+ }
+
+ return status;
+}
+
+
+celix_status_t pubsubAdmin_destroy(pubsub_admin_pt admin)
+{
+ celix_status_t status = CELIX_SUCCESS;
+
+ free(admin->ipAddress);
+
+ celixThreadMutex_lock(&admin->pendingSubscriptionsLock);
+ hash_map_iterator_pt iter = hashMapIterator_create(admin->pendingSubscriptions);
+ while(hashMapIterator_hasNext(iter)){
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+ free((char*)hashMapEntry_getKey(entry));
+ arrayList_destroy((array_list_pt)hashMapEntry_getValue(entry));
+ }
+ hashMapIterator_destroy(iter);
+ hashMap_destroy(admin->pendingSubscriptions,false,false);
+ celixThreadMutex_unlock(&admin->pendingSubscriptionsLock);
+
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+ hashMap_destroy(admin->subscriptions,false,false);
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+
+ celixThreadMutex_lock(&admin->localPublicationsLock);
+ hashMap_destroy(admin->localPublications,true,false);
+ celixThreadMutex_unlock(&admin->localPublicationsLock);
+
+ celixThreadMutex_lock(&admin->externalPublicationsLock);
+ iter = hashMapIterator_create(admin->externalPublications);
+ while(hashMapIterator_hasNext(iter)){
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+ free((char*)hashMapEntry_getKey(entry));
+ arrayList_destroy((array_list_pt)hashMapEntry_getValue(entry));
+ }
+ hashMapIterator_destroy(iter);
+ hashMap_destroy(admin->externalPublications,false,false);
+ celixThreadMutex_unlock(&admin->externalPublicationsLock);
+
+ celixThreadMutex_lock(&admin->serializerListLock);
+ arrayList_destroy(admin->serializerList);
+ celixThreadMutex_unlock(&admin->serializerListLock);
+
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ arrayList_destroy(admin->noSerializerSubscriptions);
+ arrayList_destroy(admin->noSerializerPublications);
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+
+
+ celixThreadMutex_lock(&admin->usedSerializersLock);
+
+ iter = hashMapIterator_create(admin->topicSubscriptionsPerSerializer);
+ while(hashMapIterator_hasNext(iter)){
+ arrayList_destroy((array_list_pt)hashMapIterator_nextValue(iter));
+ }
+ hashMapIterator_destroy(iter);
+ hashMap_destroy(admin->topicSubscriptionsPerSerializer,false,false);
+
+ iter = hashMapIterator_create(admin->topicPublicationsPerSerializer);
+ while(hashMapIterator_hasNext(iter)){
+ arrayList_destroy((array_list_pt)hashMapIterator_nextValue(iter));
+ }
+ hashMapIterator_destroy(iter);
+ hashMap_destroy(admin->topicPublicationsPerSerializer,false,false);
+
+ celixThreadMutex_unlock(&admin->usedSerializersLock);
+
+ celixThreadMutex_destroy(&admin->usedSerializersLock);
+ celixThreadMutex_destroy(&admin->serializerListLock);
+ celixThreadMutex_destroy(&admin->pendingSubscriptionsLock);
+
+ celixThreadMutexAttr_destroy(&admin->noSerializerPendingsAttr);
+ celixThreadMutex_destroy(&admin->noSerializerPendingsLock);
+
+ celixThreadMutexAttr_destroy(&admin->pendingSubscriptionsAttr);
+ celixThreadMutex_destroy(&admin->subscriptionsLock);
+
+ celixThreadMutex_destroy(&admin->localPublicationsLock);
+ celixThreadMutex_destroy(&admin->externalPublicationsLock);
+
+ logHelper_stop(admin->loghelper);
+
+ logHelper_destroy(&admin->loghelper);
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ if (admin->zmq_auth != NULL){
+ zactor_destroy(&(admin->zmq_auth));
+ }
+#endif
+
+ free(admin);
+
+ return status;
+}
+
+static celix_status_t pubsubAdmin_addAnySubscription(pubsub_admin_pt admin,pubsub_endpoint_pt subEP){
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+
+ topic_subscription_pt any_sub = hashMap_get(admin->subscriptions,PUBSUB_ANY_SUB_TOPIC);
+
+ if(any_sub==NULL){
+
+ int i;
+ pubsub_serializer_service_t *best_serializer = NULL;
+ if( (status=pubsubAdmin_getBestSerializer(admin, subEP, &best_serializer)) == CELIX_SUCCESS){
+ status = pubsub_topicSubscriptionCreate(admin->bundle_context, PUBSUB_SUBSCRIBER_SCOPE_DEFAULT, PUBSUB_ANY_SUB_TOPIC, best_serializer, &any_sub);
+ }
+ else{
+ printf("PSA_ZMQ: Cannot find a serializer for subscribing topic %s. Adding it to pending list.\n",subEP->topic);
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ arrayList_add(admin->noSerializerSubscriptions,subEP);
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+ }
+
+ if (status == CELIX_SUCCESS){
+
+ /* Connect all internal publishers */
+ celixThreadMutex_lock(&admin->localPublicationsLock);
+ hash_map_iterator_pt lp_iter =hashMapIterator_create(admin->localPublications);
+ while(hashMapIterator_hasNext(lp_iter)){
+ service_factory_pt factory = (service_factory_pt)hashMapIterator_nextValue(lp_iter);
+ topic_publication_pt topic_pubs = (topic_publication_pt)factory->handle;
+ array_list_pt topic_publishers = pubsub_topicPublicationGetPublisherList(topic_pubs);
+
+ if(topic_publishers!=NULL){
+ for(i=0;i<arrayList_size(topic_publishers);i++){
+ pubsub_endpoint_pt pubEP = (pubsub_endpoint_pt)arrayList_get(topic_publishers,i);
+ if(pubEP->endpoint !=NULL){
+ status += pubsub_topicSubscriptionConnectPublisher(any_sub,pubEP->endpoint);
+ }
+ }
+ arrayList_destroy(topic_publishers);
+ }
+ }
+ hashMapIterator_destroy(lp_iter);
+ celixThreadMutex_unlock(&admin->localPublicationsLock);
+
+ /* Connect also all external publishers */
+ celixThreadMutex_lock(&admin->externalPublicationsLock);
+ hash_map_iterator_pt extp_iter =hashMapIterator_create(admin->externalPublications);
+ while(hashMapIterator_hasNext(extp_iter)){
+ array_list_pt ext_pub_list = (array_list_pt)hashMapIterator_nextValue(extp_iter);
+ if(ext_pub_list!=NULL){
+ for(i=0;i<arrayList_size(ext_pub_list);i++){
+ pubsub_endpoint_pt pubEP = (pubsub_endpoint_pt)arrayList_get(ext_pub_list,i);
+ if(pubEP->endpoint !=NULL){
+ status += pubsub_topicSubscriptionConnectPublisher(any_sub,pubEP->endpoint);
+ }
+ }
+ }
+ }
+ hashMapIterator_destroy(extp_iter);
+ celixThreadMutex_unlock(&admin->externalPublicationsLock);
+
+
+ pubsub_topicSubscriptionAddSubscriber(any_sub,subEP);
+
+ status += pubsub_topicSubscriptionStart(any_sub);
+
+ }
+
+ if (status == CELIX_SUCCESS){
+ hashMap_put(admin->subscriptions,strdup(PUBSUB_ANY_SUB_TOPIC),any_sub);
+ connectTopicPubSubToSerializer(admin, best_serializer, any_sub, false);
+ }
+
+ }
+
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+
+ return status;
+}
+
+celix_status_t pubsubAdmin_addSubscription(pubsub_admin_pt admin,pubsub_endpoint_pt subEP){
+ celix_status_t status = CELIX_SUCCESS;
+
+ printf("PSA_ZMQ: Received subscription [FWUUID=%s bundleID=%ld scope=%s, topic=%s]\n",subEP->frameworkUUID,subEP->serviceID,subEP->scope, subEP->topic);
+
+ if(strcmp(subEP->topic,PUBSUB_ANY_SUB_TOPIC)==0){
+ return pubsubAdmin_addAnySubscription(admin,subEP);
+ }
+
+ /* Check if we already know some publisher about this topic, otherwise let's put the subscription in the pending hashmap */
+ celixThreadMutex_lock(&admin->pendingSubscriptionsLock);
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+ celixThreadMutex_lock(&admin->localPublicationsLock);
+ celixThreadMutex_lock(&admin->externalPublicationsLock);
+
+ char* scope_topic = createScopeTopicKey(subEP->scope, subEP->topic);
+
+ service_factory_pt factory = (service_factory_pt)hashMap_get(admin->localPublications,scope_topic);
+ array_list_pt ext_pub_list = (array_list_pt)hashMap_get(admin->externalPublications,scope_topic);
+
+ if(factory==NULL && ext_pub_list==NULL){ //No (local or external) publishers yet for this topic
+ pubsubAdmin_addSubscriptionToPendingList(admin,subEP);
+ }
+ else{
+ int i;
+ topic_subscription_pt subscription = hashMap_get(admin->subscriptions, scope_topic);
+
+ if(subscription == NULL) {
+ pubsub_serializer_service_t *best_serializer = NULL;
+ if( (status=pubsubAdmin_getBestSerializer(admin, subEP, &best_serializer)) == CELIX_SUCCESS){
+ status += pubsub_topicSubscriptionCreate(admin->bundle_context,subEP->scope, subEP->topic, best_serializer, &subscription);
+ }
+ else{
+ printf("PSA_ZMQ: Cannot find a serializer for subscribing topic %s. Adding it to pending list.\n",subEP->topic);
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ arrayList_add(admin->noSerializerSubscriptions,subEP);
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+ }
+
+ if (status==CELIX_SUCCESS){
+
+ /* Try to connect internal publishers */
+ if(factory!=NULL){
+ topic_publication_pt topic_pubs = (topic_publication_pt)factory->handle;
+ array_list_pt topic_publishers = pubsub_topicPublicationGetPublisherList(topic_pubs);
+
+ if(topic_publishers!=NULL){
+ for(i=0;i<arrayList_size(topic_publishers);i++){
+ pubsub_endpoint_pt pubEP = (pubsub_endpoint_pt)arrayList_get(topic_publishers,i);
+ if(pubEP->endpoint !=NULL){
+ status += pubsub_topicSubscriptionConnectPublisher(subscription,pubEP->endpoint);
+ }
+ }
+ arrayList_destroy(topic_publishers);
+ }
+
+ }
+
+ /* Look also for external publishers */
+ if(ext_pub_list!=NULL){
+ for(i=0;i<arrayList_size(ext_pub_list);i++){
+ pubsub_endpoint_pt pubEP = (pubsub_endpoint_pt)arrayList_get(ext_pub_list,i);
+ if(pubEP->endpoint !=NULL){
+ status += pubsub_topicSubscriptionConnectPublisher(subscription,pubEP->endpoint);
+ }
+ }
+ }
+
+ pubsub_topicSubscriptionAddSubscriber(subscription,subEP);
+
+ status += pubsub_topicSubscriptionStart(subscription);
+
+ }
+
+ if(status==CELIX_SUCCESS){
+
+ hashMap_put(admin->subscriptions,strdup(scope_topic),subscription);
+
+ connectTopicPubSubToSerializer(admin, best_serializer, subscription, false);
+ }
+ }
+
+ if (status == CELIX_SUCCESS){
+ pubsub_topicIncreaseNrSubscribers(subscription);
+ }
+ }
+
+ free(scope_topic);
+ celixThreadMutex_unlock(&admin->externalPublicationsLock);
+ celixThreadMutex_unlock(&admin->localPublicationsLock);
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+ celixThreadMutex_unlock(&admin->pendingSubscriptionsLock);
+
+ return status;
+
+}
+
+celix_status_t pubsubAdmin_removeSubscription(pubsub_admin_pt admin,pubsub_endpoint_pt subEP){
+ celix_status_t status = CELIX_SUCCESS;
+
+ printf("PSA_ZMQ: Removing subscription [FWUUID=%s bundleID=%ld topic=%s]\n",subEP->frameworkUUID,subEP->serviceID,subEP->topic);
+
+ char* scope_topic = createScopeTopicKey(subEP->scope, subEP->topic);
+
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+ topic_subscription_pt sub = (topic_subscription_pt)hashMap_get(admin->subscriptions,scope_topic);
+ if(sub!=NULL){
+ pubsub_topicDecreaseNrSubscribers(sub);
+ if(pubsub_topicGetNrSubscribers(sub) == 0) {
+ status = pubsub_topicSubscriptionRemoveSubscriber(sub,subEP);
+ }
+ }
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+
+ if(sub==NULL){
+ /* Maybe the endpoint was pending */
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ if(!arrayList_removeElement(admin->noSerializerSubscriptions, subEP)){
+ status = CELIX_ILLEGAL_STATE;
+ }
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+ }
+
+ free(scope_topic);
+
+
+
+ return status;
+
+}
+
+celix_status_t pubsubAdmin_addPublication(pubsub_admin_pt admin, pubsub_endpoint_pt pubEP) {
+ celix_status_t status = CELIX_SUCCESS;
+
+ printf("PSA_ZMQ: Received publication [FWUUID=%s bundleID=%ld scope=%s, topic=%s]\n", pubEP->frameworkUUID, pubEP->serviceID, pubEP->scope, pubEP->topic);
+
+ const char* fwUUID = NULL;
+
+ bundleContext_getProperty(admin->bundle_context, OSGI_FRAMEWORK_FRAMEWORK_UUID, &fwUUID);
+ if (fwUUID == NULL) {
+ printf("PSA_ZMQ: Cannot retrieve fwUUID.\n");
+ return CELIX_INVALID_BUNDLE_CONTEXT;
+ }
+
+ char *scope_topic = createScopeTopicKey(pubEP->scope, pubEP->topic);
+
+ if ((strcmp(pubEP->frameworkUUID, fwUUID) == 0) && (pubEP->endpoint == NULL)) {
+
+ celixThreadMutex_lock(&admin->localPublicationsLock);
+
+ service_factory_pt factory = (service_factory_pt) hashMap_get(admin->localPublications, scope_topic);
+
+ if (factory == NULL) {
+ topic_publication_pt pub = NULL;
+ pubsub_serializer_service_t *best_serializer = NULL;
+ if( (status=pubsubAdmin_getBestSerializer(admin, pubEP, &best_serializer)) == CELIX_SUCCESS){
+ status = pubsub_topicPublicationCreate(admin->bundle_context, pubEP, best_serializer, admin->ipAddress, admin->basePort, admin->maxPort, &pub);
+ }
+ else{
+ printf("PSA_ZMQ: Cannot find a serializer for publishing topic %s. Adding it to pending list.\n", pubEP->topic);
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ arrayList_add(admin->noSerializerPublications,pubEP);
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+ }
+
+ if (status == CELIX_SUCCESS) {
+ status = pubsub_topicPublicationStart(admin->bundle_context, pub, &factory);
+ if (status == CELIX_SUCCESS && factory != NULL) {
+ hashMap_put(admin->localPublications, strdup(scope_topic), factory);
+ connectTopicPubSubToSerializer(admin, best_serializer, pub, true);
+ }
+ } else {
+ printf("PSA_ZMQ: Cannot create a topicPublication for scope=%s, topic=%s (bundle %ld).\n", pubEP->scope, pubEP->topic, pubEP->serviceID);
+ }
+ } else {
+ //just add the new EP to the list
+ topic_publication_pt pub = (topic_publication_pt) factory->handle;
+ pubsub_topicPublicationAddPublisherEP(pub, pubEP);
+ }
+
+ celixThreadMutex_unlock(&admin->localPublicationsLock);
+ }
+ else{
+
+ celixThreadMutex_lock(&admin->externalPublicationsLock);
+ array_list_pt ext_pub_list = (array_list_pt) hashMap_get(admin->externalPublications, scope_topic);
+ if (ext_pub_list == NULL) {
+ arrayList_create(&ext_pub_list);
+ hashMap_put(admin->externalPublications, strdup(scope_topic), ext_pub_list);
+ }
+
+ arrayList_add(ext_pub_list, pubEP);
+
+ celixThreadMutex_unlock(&admin->externalPublicationsLock);
+ }
+
+ /* Re-evaluate the pending subscriptions */
+ celixThreadMutex_lock(&admin->pendingSubscriptionsLock);
+
+ hash_map_entry_pt pendingSub = hashMap_getEntry(admin->pendingSubscriptions, scope_topic);
+ if (pendingSub != NULL) { //There were pending subscription for the just published topic. Let's connect them.
+ char* topic = (char*) hashMapEntry_getKey(pendingSub);
+ array_list_pt pendingSubList = (array_list_pt) hashMapEntry_getValue(pendingSub);
+ int i;
+ for (i = 0; i < arrayList_size(pendingSubList); i++) {
+ pubsub_endpoint_pt subEP = (pubsub_endpoint_pt) arrayList_get(pendingSubList, i);
+ pubsubAdmin_addSubscription(admin, subEP);
+ }
+ hashMap_remove(admin->pendingSubscriptions, scope_topic);
+ arrayList_clear(pendingSubList);
+ arrayList_destroy(pendingSubList);
+ free(topic);
+ }
+
+ celixThreadMutex_unlock(&admin->pendingSubscriptionsLock);
+
+ /* Connect the new publisher to the subscription for his topic, if there is any */
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+
+ topic_subscription_pt sub = (topic_subscription_pt) hashMap_get(admin->subscriptions, scope_topic);
+ if (sub != NULL && pubEP->endpoint != NULL) {
+ pubsub_topicSubscriptionAddConnectPublisherToPendingList(sub, pubEP->endpoint);
+ }
+
+ /* And check also for ANY subscription */
+ topic_subscription_pt any_sub = (topic_subscription_pt) hashMap_get(admin->subscriptions, PUBSUB_ANY_SUB_TOPIC);
+ if (any_sub != NULL && pubEP->endpoint != NULL) {
+ pubsub_topicSubscriptionAddConnectPublisherToPendingList(any_sub, pubEP->endpoint);
+ }
+
+ free(scope_topic);
+
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+
+ return status;
+
+}
+
+celix_status_t pubsubAdmin_removePublication(pubsub_admin_pt admin,pubsub_endpoint_pt pubEP){
+ celix_status_t status = CELIX_SUCCESS;
+ int count = 0;
+
+ printf("PSA_ZMQ: Removing publication [FWUUID=%s bundleID=%ld topic=%s]\n",pubEP->frameworkUUID,pubEP->serviceID,pubEP->topic);
+
+ const char* fwUUID = NULL;
+
+ bundleContext_getProperty(admin->bundle_context,OSGI_FRAMEWORK_FRAMEWORK_UUID,&fwUUID);
+ if(fwUUID==NULL){
+ printf("PSA_ZMQ: Cannot retrieve fwUUID.\n");
+ return CELIX_INVALID_BUNDLE_CONTEXT;
+ }
+ char *scope_topic = createScopeTopicKey(pubEP->scope, pubEP->topic);
+
+ if(strcmp(pubEP->frameworkUUID,fwUUID)==0){
+
+ celixThreadMutex_lock(&admin->localPublicationsLock);
+ service_factory_pt factory = (service_factory_pt)hashMap_get(admin->localPublications,scope_topic);
+ if(factory!=NULL){
+ topic_publication_pt pub = (topic_publication_pt)factory->handle;
+ pubsub_topicPublicationRemovePublisherEP(pub,pubEP);
+ }
+ celixThreadMutex_unlock(&admin->localPublicationsLock);
+
+ if(factory==NULL){
+ /* Maybe the endpoint was pending */
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ if(!arrayList_removeElement(admin->noSerializerPublications, pubEP)){
+ status = CELIX_ILLEGAL_STATE;
+ }
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+ }
+ }
+ else{
+
+ celixThreadMutex_lock(&admin->externalPublicationsLock);
+ array_list_pt ext_pub_list = (array_list_pt)hashMap_get(admin->externalPublications,scope_topic);
+ if(ext_pub_list!=NULL){
+ int i;
+ bool found = false;
+ for(i=0;!found && i<arrayList_size(ext_pub_list);i++){
+ pubsub_endpoint_pt p = (pubsub_endpoint_pt)arrayList_get(ext_pub_list,i);
+ found = pubsubEndpoint_equals(pubEP,p);
+ if (found){
+ arrayList_remove(ext_pub_list,i);
+ }
+ }
+ // Check if there are more publishers on the same endpoint (happens when 1 celix-instance with multiple bundles publish in same topic)
+ for(i=0; i<arrayList_size(ext_pub_list);i++) {
+ pubsub_endpoint_pt p = (pubsub_endpoint_pt)arrayList_get(ext_pub_list,i);
+ if (strcmp(pubEP->endpoint,p->endpoint) == 0) {
+ count++;
+ }
+ }
+
+ if(arrayList_size(ext_pub_list)==0){
+ hash_map_entry_pt entry = hashMap_getEntry(admin->externalPublications,scope_topic);
+ char* topic = (char*)hashMapEntry_getKey(entry);
+ array_list_pt list = (array_list_pt)hashMapEntry_getValue(entry);
+ hashMap_remove(admin->externalPublications,topic);
+ arrayList_destroy(list);
+ free(topic);
+ }
+ }
+
+ celixThreadMutex_unlock(&admin->externalPublicationsLock);
+ }
+
+ /* Check if this publisher was connected to one of our subscribers*/
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+
+ topic_subscription_pt sub = (topic_subscription_pt)hashMap_get(admin->subscriptions,scope_topic);
+ if(sub!=NULL && pubEP->endpoint!=NULL && count == 0){
+ pubsub_topicSubscriptionAddDisconnectPublisherToPendingList(sub,pubEP->endpoint);
+ }
+
+ /* And check also for ANY subscription */
+ topic_subscription_pt any_sub = (topic_subscription_pt)hashMap_get(admin->subscriptions,PUBSUB_ANY_SUB_TOPIC);
+ if(any_sub!=NULL && pubEP->endpoint!=NULL && count == 0){
+ pubsub_topicSubscriptionAddDisconnectPublisherToPendingList(any_sub,pubEP->endpoint);
+ }
+
+ free(scope_topic);
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+
+ return status;
+
+}
+
+celix_status_t pubsubAdmin_closeAllPublications(pubsub_admin_pt admin, char *scope, char* topic){
+ celix_status_t status = CELIX_SUCCESS;
+
+ printf("PSA_ZMQ: Closing all publications\n");
+
+ celixThreadMutex_lock(&admin->localPublicationsLock);
+ char *scope_topic = createScopeTopicKey(scope, topic);
+ hash_map_entry_pt pubsvc_entry = (hash_map_entry_pt)hashMap_getEntry(admin->localPublications,scope_topic);
+ if(pubsvc_entry!=NULL){
+ char* key = (char*)hashMapEntry_getKey(pubsvc_entry);
+ service_factory_pt factory= (service_factory_pt)hashMapEntry_getValue(pubsvc_entry);
+ topic_publication_pt pub = (topic_publication_pt)factory->handle;
+ status += pubsub_topicPublicationStop(pub);
+ disconnectTopicPubSubFromSerializer(admin, pub, true);
+ status += pubsub_topicPublicationDestroy(pub);
+ hashMap_remove(admin->localPublications,scope_topic);
+ free(key);
+ free(factory);
+ }
+ free(scope_topic);
+ celixThreadMutex_unlock(&admin->localPublicationsLock);
+
+ return status;
+
+}
+
+celix_status_t pubsubAdmin_closeAllSubscriptions(pubsub_admin_pt admin,char* scope,char* topic){
+ celix_status_t status = CELIX_SUCCESS;
+
+ printf("PSA_ZMQ: Closing all subscriptions\n");
+
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+ char *scope_topic = createScopeTopicKey(scope, topic);
+ hash_map_entry_pt sub_entry = (hash_map_entry_pt)hashMap_getEntry(admin->subscriptions,scope_topic);
+ if(sub_entry!=NULL){
+ char* topic = (char*)hashMapEntry_getKey(sub_entry);
+
+ topic_subscription_pt ts = (topic_subscription_pt)hashMapEntry_getValue(sub_entry);
+ status += pubsub_topicSubscriptionStop(ts);
+ disconnectTopicPubSubFromSerializer(admin, ts, false);
+ status += pubsub_topicSubscriptionDestroy(ts);
+ hashMap_remove(admin->subscriptions,scope_topic);
+ free(topic);
+
+ }
+ free(scope_topic);
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+
+ return status;
+
+}
+
+
+#ifndef ANDROID
+static celix_status_t pubsubAdmin_getIpAdress(const char* interface, char** ip) {
+ celix_status_t status = CELIX_BUNDLE_EXCEPTION;
+
+ struct ifaddrs *ifaddr, *ifa;
+ char host[NI_MAXHOST];
+
+ if (getifaddrs(&ifaddr) != -1)
+ {
+ for (ifa = ifaddr; ifa != NULL && status != CELIX_SUCCESS; ifa = ifa->ifa_next)
+ {
+ if (ifa->ifa_addr == NULL)
+ continue;
+
+ if ((getnameinfo(ifa->ifa_addr,sizeof(struct sockaddr_in), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST) == 0) && (ifa->ifa_addr->sa_family == AF_INET)) {
+ if (interface == NULL) {
+ *ip = strdup(host);
+ status = CELIX_SUCCESS;
+ }
+ else if (strcmp(ifa->ifa_name, interface) == 0) {
+ *ip = strdup(host);
+ status = CELIX_SUCCESS;
+ }
+ }
+ }
+
+ freeifaddrs(ifaddr);
+ }
+
+ return status;
+}
+#endif
+
+static celix_status_t pubsubAdmin_addSubscriptionToPendingList(pubsub_admin_pt admin,pubsub_endpoint_pt subEP){
+ celix_status_t status = CELIX_SUCCESS;
+ char* scope_topic = createScopeTopicKey(subEP->scope, subEP->topic);
+ array_list_pt pendingListPerTopic = hashMap_get(admin->pendingSubscriptions,scope_topic);
+ if(pendingListPerTopic==NULL){
+ arrayList_create(&pendingListPerTopic);
+ hashMap_put(admin->pendingSubscriptions,strdup(scope_topic),pendingListPerTopic);
+ }
+ arrayList_add(pendingListPerTopic,subEP);
+ free(scope_topic);
+ return status;
+}
+
+celix_status_t pubsubAdmin_serializerAdded(void * handle, service_reference_pt reference, void * service){
+ /* Assumption: serializers are all available at startup.
+ * If a new (possibly better) serializer is installed and started, already created topic_publications/subscriptions will not be destroyed and recreated */
+
+ celix_status_t status = CELIX_SUCCESS;
+ int i=0;
+
+ const char *serType = NULL;
+ serviceReference_getProperty(reference, PUBSUB_SERIALIZER_TYPE_KEY,&serType);
+ if(serType == NULL){
+ printf("Serializer serviceReference %p has no pubsub_serializer.type property specified\n",reference);
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+ pubsub_admin_pt admin = (pubsub_admin_pt)handle;
+ celixThreadMutex_lock(&admin->serializerListLock);
+ arrayList_add(admin->serializerList, reference);
+ celixThreadMutex_unlock(&admin->serializerListLock);
+
+ /* Now let's re-evaluate the pending */
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+
+ for(i=0;i<arrayList_size(admin->noSerializerSubscriptions);i++){
+ pubsub_endpoint_pt ep = (pubsub_endpoint_pt)arrayList_get(admin->noSerializerSubscriptions,i);
+ pubsub_serializer_service_t *best_serializer = NULL;
+ pubsubAdmin_getBestSerializer(admin, ep, &best_serializer);
+ if(best_serializer != NULL){ /* Finally we have a valid serializer! */
+ pubsubAdmin_addSubscription(admin, ep);
+ }
+ }
+
+ for(i=0;i<arrayList_size(admin->noSerializerPublications);i++){
+ pubsub_endpoint_pt ep = (pubsub_endpoint_pt)arrayList_get(admin->noSerializerPublications,i);
+ pubsub_serializer_service_t *best_serializer = NULL;
+ pubsubAdmin_getBestSerializer(admin, ep, &best_serializer);
+ if(best_serializer != NULL){ /* Finally we have a valid serializer! */
+ pubsubAdmin_addPublication(admin, ep);
+ }
+ }
+
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+
+ printf("PSA_ZMQ: %s serializer added\n",serType);
+
+ return status;
+}
+
+celix_status_t pubsubAdmin_serializerRemoved(void * handle, service_reference_pt reference, void * service){
+
+ pubsub_admin_pt admin = (pubsub_admin_pt)handle;
+ int i=0, j=0;
+ const char *serType = NULL;
+
+ serviceReference_getProperty(reference, PUBSUB_SERIALIZER_TYPE_KEY,&serType);
+ if(serType == NULL){
+ printf("Serializer serviceReference %p has no pubsub_serializer.type property specified\n",reference);
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+ celixThreadMutex_lock(&admin->serializerListLock);
+ /* Remove the serializer from the list */
+ arrayList_removeElement(admin->serializerList, reference);
+ celixThreadMutex_unlock(&admin->serializerListLock);
+
+
+ celixThreadMutex_lock(&admin->usedSerializersLock);
+ array_list_pt topicPubList = (array_list_pt)hashMap_remove(admin->topicPublicationsPerSerializer, service);
+ array_list_pt topicSubList = (array_list_pt)hashMap_remove(admin->topicSubscriptionsPerSerializer, service);
+ celixThreadMutex_unlock(&admin->usedSerializersLock);
+
+ /* Now destroy the topicPublications, but first put back the pubsub_endpoints back to the noSerializer pending list */
+ if(topicPubList!=NULL){
+ for(i=0;i<arrayList_size(topicPubList);i++){
+ topic_publication_pt topicPub = (topic_publication_pt)arrayList_get(topicPubList,i);
+ /* Stop the topic publication */
+ pubsub_topicPublicationStop(topicPub);
+ /* Get the endpoints that are going to be orphan */
+ array_list_pt pubList = pubsub_topicPublicationGetPublisherList(topicPub);
+ for(j=0;j<arrayList_size(pubList);j++){
+ pubsub_endpoint_pt pubEP = (pubsub_endpoint_pt)arrayList_get(pubList,j);
+ /* Remove the publication */
+ pubsubAdmin_removePublication(admin, pubEP);
+ /* Reset the endpoint field, so that will be recreated from scratch when a new serializer will be found */
+ if(pubEP->endpoint!=NULL){
+ free(pubEP->endpoint);
+ pubEP->endpoint = NULL;
+ }
+ /* Add the orphan endpoint to the noSerializer pending list */
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ arrayList_add(admin->noSerializerPublications,pubEP);
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+ }
+ arrayList_destroy(pubList);
+
+ /* Cleanup also the localPublications hashmap*/
+ celixThreadMutex_lock(&admin->localPublicationsLock);
+ hash_map_iterator_pt iter = hashMapIterator_create(admin->localPublications);
+ char *key = NULL;
+ service_factory_pt factory = NULL;
+ while(hashMapIterator_hasNext(iter)){
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+ factory = (service_factory_pt)hashMapEntry_getValue(entry);
+ topic_publication_pt pub = (topic_publication_pt)factory->handle;
+ if(pub==topicPub){
+ key = (char*)hashMapEntry_getKey(entry);
+ break;
+ }
+ }
+ hashMapIterator_destroy(iter);
+ if(key!=NULL){
+ hashMap_remove(admin->localPublications, key);
+ free(factory);
+ free(key);
+ }
+ celixThreadMutex_unlock(&admin->localPublicationsLock);
+
+ /* Finally destroy the topicPublication */
+ pubsub_topicPublicationDestroy(topicPub);
+ }
+ arrayList_destroy(topicPubList);
+ }
+
+ /* Now destroy the topicSubscriptions, but first put back the pubsub_endpoints back to the noSerializer pending list */
+ if(topicSubList!=NULL){
+ for(i=0;i<arrayList_size(topicSubList);i++){
+ topic_subscription_pt topicSub = (topic_subscription_pt)arrayList_get(topicSubList,i);
+ /* Stop the topic subscription */
+ pubsub_topicSubscriptionStop(topicSub);
+ /* Get the endpoints that are going to be orphan */
+ array_list_pt subList = pubsub_topicSubscriptionGetSubscribersList(topicSub);
+ for(j=0;j<arrayList_size(subList);j++){
+ pubsub_endpoint_pt subEP = (pubsub_endpoint_pt)arrayList_get(subList,j);
+ /* Remove the subscription */
+ pubsubAdmin_removeSubscription(admin, subEP);
+ /* Reset the endpoint field, so that will be recreated from scratch when a new serializer will be found */
+ if(subEP->endpoint!=NULL){
+ free(subEP->endpoint);
+ subEP->endpoint = NULL;
+ }
+ /* Add the orphan endpoint to the noSerializer pending list */
+ celixThreadMutex_lock(&admin->noSerializerPendingsLock);
+ arrayList_add(admin->noSerializerSubscriptions,subEP);
+ celixThreadMutex_unlock(&admin->noSerializerPendingsLock);
+ }
+
+ /* Cleanup also the subscriptions hashmap*/
+ celixThreadMutex_lock(&admin->subscriptionsLock);
+ hash_map_iterator_pt iter = hashMapIterator_create(admin->subscriptions);
+ char *key = NULL;
+ while(hashMapIterator_hasNext(iter)){
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+ topic_subscription_pt sub = (topic_subscription_pt)hashMapEntry_getValue(entry);
+ if(sub==topicSub){
+ key = (char*)hashMapEntry_getKey(entry);
+ break;
+ }
+ }
+ hashMapIterator_destroy(iter);
+ if(key!=NULL){
+ hashMap_remove(admin->subscriptions, key);
+ free(key);
+ }
+ celixThreadMutex_unlock(&admin->subscriptionsLock);
+
+ /* Finally destroy the topicSubscription */
+ pubsub_topicSubscriptionDestroy(topicSub);
+ }
+ arrayList_destroy(topicSubList);
+ }
+
+
+
+ printf("PSA_ZMQ: %s serializer removed\n",serType);
+
+
+ return CELIX_SUCCESS;
+}
+
+celix_status_t pubsubAdmin_matchEndpoint(pubsub_admin_pt admin, pubsub_endpoint_pt endpoint, double* score){
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&admin->serializerListLock);
+ status = pubsub_admin_match(endpoint->topic_props,PUBSUB_ADMIN_TYPE,admin->serializerList,score);
+ celixThreadMutex_unlock(&admin->serializerListLock);
+
+ return status;
+}
+
+/* This one recall the same logic as in the match function */
+static celix_status_t pubsubAdmin_getBestSerializer(pubsub_admin_pt admin,pubsub_endpoint_pt ep, pubsub_serializer_service_t **serSvc){
+
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&admin->serializerListLock);
+ status = pubsub_admin_get_best_serializer(ep->topic_props, admin->serializerList, serSvc);
+ celixThreadMutex_unlock(&admin->serializerListLock);
+
+ return status;
+
+}
+
+static void connectTopicPubSubToSerializer(pubsub_admin_pt admin,pubsub_serializer_service_t *serializer,void *topicPubSub,bool isPublication){
+
+ celixThreadMutex_lock(&admin->usedSerializersLock);
+
+ hash_map_pt map = isPublication?admin->topicPublicationsPerSerializer:admin->topicSubscriptionsPerSerializer;
+ array_list_pt list = (array_list_pt)hashMap_get(map,serializer);
+ if(list==NULL){
+ arrayList_create(&list);
+ hashMap_put(map,serializer,list);
+ }
+ arrayList_add(list,topicPubSub);
+
+ celixThreadMutex_unlock(&admin->usedSerializersLock);
+
+}
+
+static void disconnectTopicPubSubFromSerializer(pubsub_admin_pt admin,void *topicPubSub,bool isPublication){
+
+ celixThreadMutex_lock(&admin->usedSerializersLock);
+
+ hash_map_pt map = isPublication?admin->topicPublicationsPerSerializer:admin->topicSubscriptionsPerSerializer;
+ hash_map_iterator_pt iter = hashMapIterator_create(map);
+ while(hashMapIterator_hasNext(iter)){
+ array_list_pt list = (array_list_pt)hashMapIterator_nextValue(iter);
+ if(arrayList_removeElement(list, topicPubSub)){ //Found it!
+ break;
+ }
+ }
+ hashMapIterator_destroy(iter);
+
+ celixThreadMutex_unlock(&admin->usedSerializersLock);
+
+}
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_admin_zmq/src/topic_publication.c
----------------------------------------------------------------------
diff --cc pubsub/pubsub_admin_zmq/src/topic_publication.c
index e405866,0000000..b612605
mode 100644,000000..100644
--- a/pubsub/pubsub_admin_zmq/src/topic_publication.c
+++ b/pubsub/pubsub_admin_zmq/src/topic_publication.c
@@@ -1,630 -1,0 +1,630 @@@
+/**
+ *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 <czmq.h>
+/* The following undefs prevent the collision between:
+ * - sys/syslog.h (which is included within czmq)
+ * - celix/dfi/dfi_log_util.h
+ */
+#undef LOG_DEBUG
+#undef LOG_WARNING
+#undef LOG_INFO
+#undef LOG_WARNING
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "array_list.h"
+#include "celixbool.h"
+#include "service_registration.h"
+#include "utils.h"
+#include "service_factory.h"
+#include "version.h"
+
+#include "pubsub_common.h"
+#include "pubsub_utils.h"
- #include "publisher.h"
++#include "pubsub/publisher.h"
+
+#include "topic_publication.h"
+
+#include "pubsub_serializer.h"
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ #include "zmq_crypto.h"
+
+ #define MAX_CERT_PATH_LENGTH 512
+#endif
+
+#define EP_ADDRESS_LEN 32
+#define ZMQ_BIND_MAX_RETRY 5
+
+#define FIRST_SEND_DELAY 2
+
+struct topic_publication {
+ zsock_t* zmq_socket;
+ celix_thread_mutex_t socket_lock; //Protects zmq_socket access
+ zcert_t * zmq_cert;
+ char* endpoint;
+ service_registration_pt svcFactoryReg;
+ array_list_pt pub_ep_list; //List<pubsub_endpoint>
+ hash_map_pt boundServices; //<bundle_pt,bound_service>
+ pubsub_serializer_service_t *serializer;
+ celix_thread_mutex_t tp_lock;
+};
+
+typedef struct publish_bundle_bound_service {
+ topic_publication_pt parent;
+ pubsub_publisher_t service;
+ bundle_pt bundle;
+ char *topic;
+ hash_map_pt msgTypes;
+ unsigned short getCount;
+ celix_thread_mutex_t mp_lock; //Protects publish_bundle_bound_service data structure
+ bool mp_send_in_progress;
+ array_list_pt mp_parts;
+}* publish_bundle_bound_service_pt;
+
+/* Note: correct locking order is
+ * 1. tp_lock
+ * 2. mp_lock
+ * 3. socket_lock
+ *
+ * tp_lock and socket_lock are independent.
+ */
+
+typedef struct pubsub_msg{
+ pubsub_msg_header_pt header;
+ char* payload;
+ int payloadSize;
+}* pubsub_msg_pt;
+
+static unsigned int rand_range(unsigned int min, unsigned int max);
+
+static celix_status_t pubsub_topicPublicationGetService(void* handle, bundle_pt bundle, service_registration_pt registration, void **service);
+static celix_status_t pubsub_topicPublicationUngetService(void* handle, bundle_pt bundle, service_registration_pt registration, void **service);
+
+static publish_bundle_bound_service_pt pubsub_createPublishBundleBoundService(topic_publication_pt tp,bundle_pt bundle);
+static void pubsub_destroyPublishBundleBoundService(publish_bundle_bound_service_pt boundSvc);
+
+static int pubsub_topicPublicationSend(void* handle,unsigned int msgTypeId, const void *msg);
+static int pubsub_topicPublicationSendMultipart(void *handle, unsigned int msgTypeId, const void *inMsg, int flags);
+static int pubsub_localMsgTypeIdForUUID(void* handle, const char* msgType, unsigned int* msgTypeId);
+
+static void delay_first_send_for_late_joiners(void);
+
+celix_status_t pubsub_topicPublicationCreate(bundle_context_pt bundle_context, pubsub_endpoint_pt pubEP, pubsub_serializer_service_t *best_serializer, char* bindIP, unsigned int basePort, unsigned int maxPort, topic_publication_pt *out){
+ celix_status_t status = CELIX_SUCCESS;
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ char* secure_topics = NULL;
+ bundleContext_getProperty(bundle_context, "SECURE_TOPICS", (const char **) &secure_topics);
+
+ if (secure_topics){
+ array_list_pt secure_topics_list = pubsub_getTopicsFromString(secure_topics);
+
+ int i;
+ int secure_topics_size = arrayList_size(secure_topics_list);
+ for (i = 0; i < secure_topics_size; i++){
+ char* top = arrayList_get(secure_topics_list, i);
+ if (strcmp(pubEP->topic, top) == 0){
+ printf("PSA_ZMQ_TP: Secure topic: '%s'\n", top);
+ pubEP->is_secure = true;
+ }
+ free(top);
+ top = NULL;
+ }
+
+ arrayList_destroy(secure_topics_list);
+ }
+
+ zcert_t* pub_cert = NULL;
+ if (pubEP->is_secure){
+ char* keys_bundle_dir = pubsub_getKeysBundleDir(bundle_context);
+ if (keys_bundle_dir == NULL){
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+ const char* keys_file_path = NULL;
+ const char* keys_file_name = NULL;
+ bundleContext_getProperty(bundle_context, PROPERTY_KEYS_FILE_PATH, &keys_file_path);
+ bundleContext_getProperty(bundle_context, PROPERTY_KEYS_FILE_NAME, &keys_file_name);
+
+ char cert_path[MAX_CERT_PATH_LENGTH];
+
+ //certificate path ".cache/bundle{id}/version0.0/./META-INF/keys/publisher/private/pub_{topic}.key"
+ snprintf(cert_path, MAX_CERT_PATH_LENGTH, "%s/META-INF/keys/publisher/private/pub_%s.key.enc", keys_bundle_dir, pubEP->topic);
+ free(keys_bundle_dir);
+ printf("PSA_ZMQ_TP: Loading key '%s'\n", cert_path);
+
+ pub_cert = get_zcert_from_encoded_file((char *) keys_file_path, (char *) keys_file_name, cert_path);
+ if (pub_cert == NULL){
+ printf("PSA_ZMQ_TP: Cannot load key '%s'\n", cert_path);
+ printf("PSA_ZMQ_TP: Topic '%s' NOT SECURED !\n", pubEP->topic);
+ pubEP->is_secure = false;
+ }
+ }
+#endif
+
+ zsock_t* socket = zsock_new (ZMQ_PUB);
+ if(socket==NULL){
+ #ifdef BUILD_WITH_ZMQ_SECURITY
+ if (pubEP->is_secure){
+ zcert_destroy(&pub_cert);
+ }
+ #endif
+
+ perror("Error for zmq_socket");
+ return CELIX_SERVICE_EXCEPTION;
+ }
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ if (pubEP->is_secure){
+ zcert_apply (pub_cert, socket); // apply certificate to socket
+ zsock_set_curve_server (socket, true); // setup the publisher's socket to use the curve functions
+ }
+#endif
+
+ int rv = -1, retry=0;
+ char* ep = malloc(EP_ADDRESS_LEN);
+ char bindAddress[EP_ADDRESS_LEN];
+
+ while(rv==-1 && retry<ZMQ_BIND_MAX_RETRY){
+ /* Randomized part due to same bundle publishing on different topics */
+ unsigned int port = rand_range(basePort,maxPort);
+ memset(ep,0,EP_ADDRESS_LEN);
+ memset(bindAddress, 0, EP_ADDRESS_LEN);
+
+ snprintf(ep,EP_ADDRESS_LEN,"tcp://%s:%u",bindIP,port);
+ snprintf(bindAddress, EP_ADDRESS_LEN, "tcp://0.0.0.0:%u", port); //NOTE using a different bind addres than endpoint address
+ rv = zsock_bind (socket, "%s", bindAddress);
+ if (rv == -1) {
+ perror("Error for zmq_bind");
+ }
+ retry++;
+ }
+
+ if(rv == -1){
+ free(ep);
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+ /* ZMQ stuffs are all fine at this point. Let's create and initialize the structure */
+
+ topic_publication_pt pub = calloc(1,sizeof(*pub));
+
+ arrayList_create(&(pub->pub_ep_list));
+ pub->boundServices = hashMap_create(NULL,NULL,NULL,NULL);
+ celixThreadMutex_create(&(pub->tp_lock),NULL);
+
+ pub->endpoint = ep;
+ pub->zmq_socket = socket;
+ pub->serializer = best_serializer;
+
+ celixThreadMutex_create(&(pub->socket_lock),NULL);
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ if (pubEP->is_secure){
+ pub->zmq_cert = pub_cert;
+ }
+#endif
+
+ pubsub_topicPublicationAddPublisherEP(pub,pubEP);
+
+ *out = pub;
+
+ return status;
+}
+
+celix_status_t pubsub_topicPublicationDestroy(topic_publication_pt pub){
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&(pub->tp_lock));
+
+ free(pub->endpoint);
+ arrayList_destroy(pub->pub_ep_list);
+
+ hash_map_iterator_pt iter = hashMapIterator_create(pub->boundServices);
+ while(hashMapIterator_hasNext(iter)){
+ publish_bundle_bound_service_pt bound = hashMapIterator_nextValue(iter);
+ pubsub_destroyPublishBundleBoundService(bound);
+ }
+ hashMapIterator_destroy(iter);
+ hashMap_destroy(pub->boundServices,false,false);
+
+ pub->svcFactoryReg = NULL;
+ pub->serializer = NULL;
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ zcert_destroy(&(pub->zmq_cert));
+#endif
+
+ celixThreadMutex_unlock(&(pub->tp_lock));
+
+ celixThreadMutex_destroy(&(pub->tp_lock));
+
+ celixThreadMutex_lock(&(pub->socket_lock));
+ zsock_destroy(&(pub->zmq_socket));
+ celixThreadMutex_unlock(&(pub->socket_lock));
+
+ celixThreadMutex_destroy(&(pub->socket_lock));
+
+ free(pub);
+
+ return status;
+}
+
+celix_status_t pubsub_topicPublicationStart(bundle_context_pt bundle_context,topic_publication_pt pub,service_factory_pt* svcFactory){
+ celix_status_t status = CELIX_SUCCESS;
+
+ /* Let's register the new service */
+
+ pubsub_endpoint_pt pubEP = (pubsub_endpoint_pt)arrayList_get(pub->pub_ep_list,0);
+
+ if(pubEP!=NULL){
+ service_factory_pt factory = calloc(1, sizeof(*factory));
+ factory->handle = pub;
+ factory->getService = pubsub_topicPublicationGetService;
+ factory->ungetService = pubsub_topicPublicationUngetService;
+
+ properties_pt props = properties_create();
+ properties_set(props,PUBSUB_PUBLISHER_TOPIC,pubEP->topic);
+ properties_set(props,PUBSUB_PUBLISHER_SCOPE,pubEP->scope);
+ properties_set(props,"service.version", PUBSUB_PUBLISHER_SERVICE_VERSION);
+
+ status = bundleContext_registerServiceFactory(bundle_context,PUBSUB_PUBLISHER_SERVICE_NAME,factory,props,&(pub->svcFactoryReg));
+
+ if(status != CELIX_SUCCESS){
+ properties_destroy(props);
+ printf("PSA_ZMQ_PSA_ZMQ_TP: Cannot register ServiceFactory for topic %s (bundle %ld).\n",pubEP->topic,pubEP->serviceID);
+ }
+ else{
+ *svcFactory = factory;
+ }
+ }
+ else{
+ printf("PSA_ZMQ_PSA_ZMQ_TP: Cannot find pubsub_endpoint after adding it...Should never happen!\n");
+ status = CELIX_SERVICE_EXCEPTION;
+ }
+
+ return status;
+}
+
+celix_status_t pubsub_topicPublicationStop(topic_publication_pt pub){
+ return serviceRegistration_unregister(pub->svcFactoryReg);
+}
+
+celix_status_t pubsub_topicPublicationAddPublisherEP(topic_publication_pt pub,pubsub_endpoint_pt ep){
+
+ celixThreadMutex_lock(&(pub->tp_lock));
+ ep->endpoint = strdup(pub->endpoint);
+ arrayList_add(pub->pub_ep_list,ep);
+ celixThreadMutex_unlock(&(pub->tp_lock));
+
+ return CELIX_SUCCESS;
+}
+
+celix_status_t pubsub_topicPublicationRemovePublisherEP(topic_publication_pt pub,pubsub_endpoint_pt ep){
+
+ celixThreadMutex_lock(&(pub->tp_lock));
+ for (int i = 0; i < arrayList_size(pub->pub_ep_list); i++) {
+ pubsub_endpoint_pt e = arrayList_get(pub->pub_ep_list, i);
+ if(pubsubEndpoint_equals(ep, e)) {
+ arrayList_removeElement(pub->pub_ep_list,ep);
+ break;
+ }
+ }
+ celixThreadMutex_unlock(&(pub->tp_lock));
+
+ return CELIX_SUCCESS;
+}
+
+array_list_pt pubsub_topicPublicationGetPublisherList(topic_publication_pt pub){
+ array_list_pt list = NULL;
+ celixThreadMutex_lock(&(pub->tp_lock));
+ list = arrayList_clone(pub->pub_ep_list);
+ celixThreadMutex_unlock(&(pub->tp_lock));
+ return list;
+}
+
+
+static celix_status_t pubsub_topicPublicationGetService(void* handle, bundle_pt bundle, service_registration_pt registration, void **service) {
+ celix_status_t status = CELIX_SUCCESS;
+
+ topic_publication_pt publish = (topic_publication_pt)handle;
+
+ celixThreadMutex_lock(&(publish->tp_lock));
+
+ publish_bundle_bound_service_pt bound = (publish_bundle_bound_service_pt)hashMap_get(publish->boundServices,bundle);
+ if(bound==NULL){
+ bound = pubsub_createPublishBundleBoundService(publish,bundle);
+ if(bound!=NULL){
+ hashMap_put(publish->boundServices,bundle,bound);
+ }
+ }
+ else{
+ bound->getCount++;
+ }
+
+ *service = &bound->service;
+
+ celixThreadMutex_unlock(&(publish->tp_lock));
+
+ return status;
+}
+
+static celix_status_t pubsub_topicPublicationUngetService(void* handle, bundle_pt bundle, service_registration_pt registration, void **service) {
+
+ topic_publication_pt publish = (topic_publication_pt)handle;
+
+ celixThreadMutex_lock(&(publish->tp_lock));
+
+ publish_bundle_bound_service_pt bound = (publish_bundle_bound_service_pt)hashMap_get(publish->boundServices,bundle);
+ if(bound!=NULL){
+
+ bound->getCount--;
+ if(bound->getCount==0){
+ pubsub_destroyPublishBundleBoundService(bound);
+ hashMap_remove(publish->boundServices,bundle);
+ }
+
+ }
+ else{
+ long bundleId = -1;
+ bundle_getBundleId(bundle,&bundleId);
+ printf("PSA_ZMQ_TP: Unexpected ungetService call for bundle %ld.\n", bundleId);
+ }
+
+ /* service should be never used for unget, so let's set the pointer to NULL */
+ *service = NULL;
+
+ celixThreadMutex_unlock(&(publish->tp_lock));
+
+ return CELIX_SUCCESS;
+}
+
+static bool send_pubsub_msg(zsock_t* zmq_socket, pubsub_msg_pt msg, bool last){
+
+ bool ret = true;
+
+ zframe_t* headerMsg = zframe_new(msg->header, sizeof(struct pubsub_msg_header));
+ if (headerMsg == NULL) ret=false;
+ zframe_t* payloadMsg = zframe_new(msg->payload, msg->payloadSize);
+ if (payloadMsg == NULL) ret=false;
+
+ delay_first_send_for_late_joiners();
+
+ if( zframe_send(&headerMsg,zmq_socket, ZFRAME_MORE) == -1) ret=false;
+
+ if(!last){
+ if( zframe_send(&payloadMsg,zmq_socket, ZFRAME_MORE) == -1) ret=false;
+ }
+ else{
+ if( zframe_send(&payloadMsg,zmq_socket, 0) == -1) ret=false;
+ }
+
+ if (!ret){
+ zframe_destroy(&headerMsg);
+ zframe_destroy(&payloadMsg);
+ }
+
+ free(msg->header);
+ free(msg->payload);
+ free(msg);
+
+ return ret;
+
+}
+
+static bool send_pubsub_mp_msg(zsock_t* zmq_socket, array_list_pt mp_msg_parts){
+
+ bool ret = true;
+
+ unsigned int i = 0;
+ unsigned int mp_num = arrayList_size(mp_msg_parts);
+ for(;i<mp_num;i++){
+ ret = ret && send_pubsub_msg(zmq_socket, (pubsub_msg_pt)arrayList_get(mp_msg_parts,i), (i==mp_num-1));
+ }
+ arrayList_clear(mp_msg_parts);
+
+ return ret;
+
+}
+
+static int pubsub_topicPublicationSend(void* handle, unsigned int msgTypeId, const void *msg) {
+
+ return pubsub_topicPublicationSendMultipart(handle,msgTypeId,msg, PUBSUB_PUBLISHER_FIRST_MSG | PUBSUB_PUBLISHER_LAST_MSG);
+
+}
+
+static int pubsub_topicPublicationSendMultipart(void *handle, unsigned int msgTypeId, const void *inMsg, int flags){
+
+ int status = 0;
+
+ publish_bundle_bound_service_pt bound = (publish_bundle_bound_service_pt) handle;
+
+ celixThreadMutex_lock(&(bound->parent->tp_lock));
+ celixThreadMutex_lock(&(bound->mp_lock));
+ if( (flags & PUBSUB_PUBLISHER_FIRST_MSG) && !(flags & PUBSUB_PUBLISHER_LAST_MSG) && bound->mp_send_in_progress){ //means a real mp_msg
+ printf("PSA_ZMQ_TP: Multipart send already in progress. Cannot process a new one.\n");
+ celixThreadMutex_unlock(&(bound->mp_lock));
+ celixThreadMutex_unlock(&(bound->parent->tp_lock));
+ return -3;
+ }
+
+ pubsub_msg_serializer_t* msgSer = (pubsub_msg_serializer_t*)hashMap_get(bound->msgTypes, (void*)(uintptr_t)msgTypeId);
+
+ if (msgSer!= NULL) {
+ int major=0, minor=0;
+
+ pubsub_msg_header_pt msg_hdr = calloc(1,sizeof(struct pubsub_msg_header));
+ strncpy(msg_hdr->topic,bound->topic,MAX_TOPIC_LEN-1);
+ msg_hdr->type = msgTypeId;
+
+ if (msgSer->msgVersion != NULL){
+ version_getMajor(msgSer->msgVersion, &major);
+ version_getMinor(msgSer->msgVersion, &minor);
+ msg_hdr->major = major;
+ msg_hdr->minor = minor;
+ }
+
+ void *serializedOutput = NULL;
+ size_t serializedOutputLen = 0;
+ msgSer->serialize(msgSer,inMsg,&serializedOutput, &serializedOutputLen);
+
+ pubsub_msg_pt msg = calloc(1,sizeof(struct pubsub_msg));
+ msg->header = msg_hdr;
+ msg->payload = (char*)serializedOutput;
+ msg->payloadSize = serializedOutputLen;
+ bool snd = true;
+
+ switch(flags){
+ case PUBSUB_PUBLISHER_FIRST_MSG:
+ bound->mp_send_in_progress = true;
+ arrayList_add(bound->mp_parts,msg);
+ break;
+ case PUBSUB_PUBLISHER_PART_MSG:
+ if(!bound->mp_send_in_progress){
+ printf("PSA_ZMQ_TP: ERROR: received msg part without the first part.\n");
+ status = -4;
+ }
+ else{
+ arrayList_add(bound->mp_parts,msg);
+ }
+ break;
+ case PUBSUB_PUBLISHER_LAST_MSG:
+ if(!bound->mp_send_in_progress){
+ printf("PSA_ZMQ_TP: ERROR: received end msg without the first part.\n");
+ status = -4;
+ }
+ else{
+ arrayList_add(bound->mp_parts,msg);
+ snd = send_pubsub_mp_msg(bound->parent->zmq_socket,bound->mp_parts);
+ bound->mp_send_in_progress = false;
+ }
+ break;
+ case PUBSUB_PUBLISHER_FIRST_MSG | PUBSUB_PUBLISHER_LAST_MSG: //Normal send case
+ snd = send_pubsub_msg(bound->parent->zmq_socket,msg,true);
+ break;
+ default:
+ printf("PSA_ZMQ_TP: ERROR: Invalid MP flags combination\n");
+ status = -4;
+ break;
+ }
+
+ if(status==-4){
+ free(msg);
+ }
+
+ if(!snd){
+ printf("PSA_ZMQ_TP: Failed to send %s message %u.\n",flags == (PUBSUB_PUBLISHER_FIRST_MSG | PUBSUB_PUBLISHER_LAST_MSG) ? "single" : "multipart", msgTypeId);
+ }
+
+ } else {
+ printf("PSA_ZMQ_TP: No msg serializer available for msg type id %d\n", msgTypeId);
+ status=-1;
+ }
+
+ celixThreadMutex_unlock(&(bound->mp_lock));
+ celixThreadMutex_unlock(&(bound->parent->tp_lock));
+
+ return status;
+
+}
+
+static int pubsub_localMsgTypeIdForUUID(void* handle, const char* msgType, unsigned int* msgTypeId){
+ *msgTypeId = utils_stringHash(msgType);
+ return 0;
+}
+
+
+static unsigned int rand_range(unsigned int min, unsigned int max){
+
+ double scaled = (double)(((double)random())/((double)RAND_MAX));
+ return (max-min+1)*scaled + min;
+
+}
+
+static publish_bundle_bound_service_pt pubsub_createPublishBundleBoundService(topic_publication_pt tp,bundle_pt bundle){
+
+ //PRECOND lock on tp->lock
+
+ publish_bundle_bound_service_pt bound = calloc(1, sizeof(*bound));
+
+ if (bound != NULL) {
+
+ bound->parent = tp;
+ bound->bundle = bundle;
+ bound->getCount = 1;
+ bound->mp_send_in_progress = false;
+ celixThreadMutex_create(&bound->mp_lock,NULL);
+
+ if(tp->serializer != NULL){
+ tp->serializer->createSerializerMap(tp->serializer->handle,bundle,&bound->msgTypes);
+ }
+
+ arrayList_create(&bound->mp_parts);
+
+ pubsub_endpoint_pt pubEP = (pubsub_endpoint_pt)arrayList_get(bound->parent->pub_ep_list,0);
+ bound->topic=strdup(pubEP->topic);
+
+ bound->service.handle = bound;
+ bound->service.localMsgTypeIdForMsgType = pubsub_localMsgTypeIdForUUID;
+ bound->service.send = pubsub_topicPublicationSend;
+ bound->service.sendMultipart = pubsub_topicPublicationSendMultipart;
+
+ }
+
+ return bound;
+}
+
+static void pubsub_destroyPublishBundleBoundService(publish_bundle_bound_service_pt boundSvc){
+
+ //PRECOND lock on tp->lock
+
+ celixThreadMutex_lock(&boundSvc->mp_lock);
+
+
+ if(boundSvc->parent->serializer != NULL && boundSvc->msgTypes != NULL){
+ boundSvc->parent->serializer->destroySerializerMap(boundSvc->parent->serializer->handle, boundSvc->msgTypes);
+ }
+
+ if(boundSvc->mp_parts!=NULL){
+ arrayList_destroy(boundSvc->mp_parts);
+ }
+
+ if(boundSvc->topic!=NULL){
+ free(boundSvc->topic);
+ }
+
+ celixThreadMutex_unlock(&boundSvc->mp_lock);
+ celixThreadMutex_destroy(&boundSvc->mp_lock);
+
+ free(boundSvc);
+
+}
+
+static void delay_first_send_for_late_joiners(){
+
+ static bool firstSend = true;
+
+ if(firstSend){
+ printf("PSA_ZMQ_TP: Delaying first send for late joiners...\n");
+ sleep(FIRST_SEND_DELAY);
+ firstSend = false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_admin_zmq/src/topic_publication.h
----------------------------------------------------------------------
diff --cc pubsub/pubsub_admin_zmq/src/topic_publication.h
index 3457263,0000000..65df0e3
mode 100644,000000..100644
--- a/pubsub/pubsub_admin_zmq/src/topic_publication.h
+++ b/pubsub/pubsub_admin_zmq/src/topic_publication.h
@@@ -1,49 -1,0 +1,49 @@@
+/**
+ *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.
+ */
+/*
+ * topic_publication.h
+ *
+ * \date Sep 24, 2015
+ * \author <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+
+#ifndef TOPIC_PUBLICATION_H_
+#define TOPIC_PUBLICATION_H_
+
- #include "publisher.h"
++#include "pubsub/publisher.h"
+#include "pubsub_endpoint.h"
+#include "pubsub_common.h"
+
+#include "pubsub_serializer.h"
+
+typedef struct topic_publication *topic_publication_pt;
+
+celix_status_t pubsub_topicPublicationCreate(bundle_context_pt bundle_context,pubsub_endpoint_pt pubEP, pubsub_serializer_service_t *best_serializer, char* bindIP, unsigned int basePort, unsigned int maxPort, topic_publication_pt *out);
+celix_status_t pubsub_topicPublicationDestroy(topic_publication_pt pub);
+
+celix_status_t pubsub_topicPublicationAddPublisherEP(topic_publication_pt pub,pubsub_endpoint_pt ep);
+celix_status_t pubsub_topicPublicationRemovePublisherEP(topic_publication_pt pub,pubsub_endpoint_pt ep);
+
+celix_status_t pubsub_topicPublicationStart(bundle_context_pt bundle_context,topic_publication_pt pub,service_factory_pt* svcFactory);
+celix_status_t pubsub_topicPublicationStop(topic_publication_pt pub);
+
+array_list_pt pubsub_topicPublicationGetPublisherList(topic_publication_pt pub);
+
+#endif /* TOPIC_PUBLICATION_H_ */
[03/11] celix git commit: CELIX-412: Updates release notes
Posted by pn...@apache.org.
CELIX-412: Updates release notes
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/fd206906
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/fd206906
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/fd206906
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: fd2069069d8d34bc15b667fddc9b6c37fd866273
Parents: 68775a0
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 16 21:25:49 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 16 21:25:49 2018 +0100
----------------------------------------------------------------------
CHANGES | 215 ---------------------------------------------
CHANGES.md | 252 +++++++++++++++++++++++++++++++++++++++++++++++++++++
RELEASE_NOTES | 24 ++++-
3 files changed, 272 insertions(+), 219 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/fd206906/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
deleted file mode 100644
index 2d8ff39..0000000
--- a/CHANGES
+++ /dev/null
@@ -1,215 +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.
-
-Changes for 2.0.0
-** New Features
- [CELIX-77] Configuration Admin Implementation
- [CELIX-116] Event admin
- [CELIX-119] Remove apr usage from framework
- [CELIX-172] Bonjour Shell
- [CELIX-237] RSA with libffi
- [CELIX-269] New Dependency Manager
- [CELIX-370] Add C++ support
-** Improvements
- [CELIX-63] make cmake directory useable for custom bundle projects
- [CELIX-66] Refactor shell service struct
- [CELIX-90] add additional build options for RSA components
- [CELIX-111] Support multiple libraries
- [CELIX-115] logservice bundle entries list grows indefinitely
- [CELIX-118] Deployment Admin - Support auditlog of Apache ACE
- [CELIX-123] enable code coverage for utils_test
- [CELIX-125] CMakeCelix module
- [CELIX-134] Update source from incubator structure to TLP
- [CELIX-138] Parameterise launcher
- [CELIX-144] Document Developing Celix with Eclipse
- [CELIX-146] Replace printfs wit fw_log calls
- [CELIX-149] Add log_writer_syslog
- [CELIX-152] Added Discovery/ETCD support
- [CELIX-153] add cmake configuration options for rsa_bundles
- [CELIX-156] Enable all warnings
- [CELIX-158] RSA is unable to re-use already started proxy factory
- [CELIX-165] Add port collision auto-correction to RSA
- [CELIX-169] Add port collision auto-correction to discovery
- [CELIX-182] loghelper eases log_service tracking
- [CELIX-187] discovery_etcd: add watchindex, handle expire action
- [CELIX-193] support portable celix_thread_t initalization
- [CELIX-199] Code Coverage should be optional rather than required by cmake
- [CELIX-200] SEGFAULT occurs when remote services are closed
- [CELIX-216] Replace strtok with strtok_r
- [CELIX-230] Refactoring of the shell command service
- [CELIX-242] Fix Warnings
- [CELIX-245] Update civetweb to latest version
- [CELIX-246] enable Travis CI for Apache Celix
- [CELIX-247] Enable ANDROID support
- [CELIX-249] Refactor most char * usage to const char *
- [CELIX-251] missing includes in device access example
- [CELIX-255] Update default BUILD option
- [CELIX-258] framework uses dlopen/dlsym to set the bundleActivator
- [CELIX-259] dispatcherThread does not perform a graceful shutdown
- [CELIX-275] Can't do mkstemp on root system (deploymentAdmin_download)
- [CELIX-278] Adding tags to ACE target through deployment admin
- [CELIX-284] Restrict export and imports based on properties
- [CELIX-285] Discovery SHM: remove obsolete jansson dependency
- [CELIX-295] Many compiling warnings in unit tests
- [CELIX-296] Framework unit tests improvement
- [CELIX-309] Make DFI available for common use
- [CELIX-317] Dependency Manager suspend state
- [CELIX-320] outdated utils tests (threads, hashmap)
- [CELIX-323] Version and version_range moved from framework to utils
- [CELIX-326] Add service version support to dependency manager
- [CELIX-327] Filter does not support greater than and lesser than operators
- [CELIX-328] Service version support for RSA DFI
- [CELIX-330] document using markdown
- [CELIX-333] integrate coverity scans
- [CELIX-335] Refactor deploying bundles with cmake
- [CELIX-339] celix_log_mock doesnt show logs to the user
- [CELIX-341] Fix coverity issues in Shell / Shell TUI
- [CELIX-348] The utils_stringHash does not generate unique hashes.
- [CELIX-352] RSA_DFI and embedded celix
- [CELIX-353] Make bundle context retrievable form dm component
- [CELIX-365] Refactor some usage of void* to const void*
-** Bug
- [CELIX-104] deployment_admin bundle won't start when missing properties
- [CELIX-105] Fixed array_list_test
- [CELIX-114] Potential deadlock in log_service bundle during stop
- [CELIX-122] missing dependency uuid
- [CELIX-124] Celix memory leaks fixing
- [CELIX-127] Makefiles not generated using CMake 3.0
- [CELIX-128] remote_shell port cannot be changed
- [CELIX-129] Update RSA to be compatible with the Amdatu RSA implementation
- [CELIX-130] Implement Configured Endpoint discovery compatible with Amdatu RSA
- [CELIX-136] [contrib] Configured endpoint discovery
- [CELIX-137] Possible concurrency issues in topology manager
- [CELIX-139] Update tests and mocks to latest CppUTest
- [CELIX-147] RSA_SHM: concurrency issue when client segfaults
- [CELIX-150] Topology Manager segfaults when RSA/bundle w/ exp. service stops in wrong order
- [CELIX-154] echo exampe not working
- [CELIX-155] Fix CMake warnings during configuration
- [CELIX-157] service_reference misses functions to get property keys and values
- [CELIX-159] PThread usage not correct for Linux
- [CELIX-161] newly added RSA cannot manage already exported/imported services
- [CELIX-162] Update encoding/decoding of replies.
- [CELIX-167] Update command to be able to pass a pointer (handle)
- [CELIX-168] discovery_etcd:Make root-path configurable
- [CELIX-170] Remote services can fail to restart when felix restarts
- [CELIX-173] stopping rsa_http bundle does not stop rsa webserver
- [CELIX-174] invalid bundle_context during fw shutdown
- [CELIX-175] segfault during shutdown when calculator is already stopped
- [CELIX-177] not all endpoints are unistalled when rsa_http bundle is stopped
- [CELIX-178] Shell_Tui bundle hangs on stop
- [CELIX-179] memory leak in rsa_http callback
- [CELIX-180] framework_tests do not compile
- [CELIX-181] Incorrect reply status when no data is returned on a remote call.
- [CELIX-185] Memory leaks in Discovery Endpoint Descriptor Reader
- [CELIX-186] deployment_admin segfaults while downloading bundle
- [CELIX-188] Add missing log_service headers to installations
- [CELIX-189] LogService segfaults when log message pointer is overwritten
- [CELIX-190] remote services memory leaks
- [CELIX-192] rsa_http: add locking
- [CELIX-194] Refactor RemoteService proxy factory
- [CELIX-195] SEGFAULT occurs when running a log command.
- [CELIX-197] insufficient memory allocated
- [CELIX-198] Logging can segfault for strings 512 characters or longer
- [CELIX-201] SEGFAULT occurs when restarting apache_celix_rs_topology_manager
- [CELIX-202] Not all components are disabled with a clean build
- [CELIX-205] RSA Discovery (Configured) bundle gets stuck
- [CELIX-213] SEGFAULT occurs due to memory access after memory is free'd
- [CELIX-215] curl_global_init() not called directly
- [CELIX-218] Memory leaks in service_registry.c
- [CELIX-219] Memory Leaks
- [CELIX-221] Deployment admin segfaults when deploying a bundle
- [CELIX-223] Celix crashes because of wrong bundle versions
- [CELIX-224] Wrong use of errno in launcher.c
- [CELIX-226] __unused atttibute does not work with Linux
- [CELIX-227] compile error under linux due to missing header include
- [CELIX-229] Make APR optional
- [CELIX-231] Missing log_helper creation in discovery_etcd
- [CELIX-238] Contributing page links incorrect
- [CELIX-239] TopologyManager does not maintain exportedServices
- [CELIX-240] RSA: deadlock when stopping
- [CELIX-241] remote_interface incorrect
- [CELIX-248] too many arguments for format
- [CELIX-250] config.h is not exported
- [CELIX-252] discovery_etcd cannot handle celix restarts
- [CELIX-253] Deployment admin does not always download the latest version from ACE
- [CELIX-254] Memory leakage in deployment_admin
- [CELIX-260] missing include in deployment admin
- [CELIX-262] Fix minor issues in hashMap/linkedList
- [CELIX-263] replace utils cunit tests w/ cpputest tests
- [CELIX-264] Missing strdup leads to invalid free
- [CELIX-270] Fix Code Coverage
- [CELIX-271] setup coveralls.io
- [CELIX-272] framework: improve locking / synchronization
- [CELIX-274] waitForShutdown issue when starting two embedded celix frameworks.
- [CELIX-279] Celix fails to compile w/ CMake 3.3
- [CELIX-280] deployment_admin misses proper shutdown functionality
- [CELIX-287] racecondition for framework event listener
- [CELIX-288] Archive directory not properly read
- [CELIX-289] Fix celix mocks
- [CELIX-290] Mock fixes, CMakelist fix, build warning fix
- [CELIX-292] Memory leak in refactored shell
- [CELIX-294] changed dfi library from static to shared
- [CELIX-298] Memory leaks in rsa_dfi
- [CELIX-300] Invalid read in serviceRegistry during framework_shutdown
- [CELIX-301] Memory leaks in rsa_shm
- [CELIX-302] Service Tracker Test error breaks the build
- [CELIX-304] Memory leaks in manifest parser, requirement, capability; out-of-date tests
- [CELIX-305] Memory leaks in RSA_SHM, RSA_DFI, RSA_HTTP
- [CELIX-306] Memory leaks in remote_proxy_factory, unit tests issues
- [CELIX-307] "service registration set properties" deadlocks
- [CELIX-308] Dependency Manager memory leaks
- [CELIX-310] "serviceRegistry_getRegisteredServices" deadlocks
- [CELIX-311] Framework Tests Build broken
- [CELIX-312] ServiceReference usage counter inconsistent state
- [CELIX-313] out of date/defunct tests
- [CELIX-316] Wrong conversion for 'N' type in json_serializer
- [CELIX-322] Memory leaks in resolver and framework tests
- [CELIX-324] Version support in dfi library
- [CELIX-325] Bundle test sporadicly fails
- [CELIX-329] framework "service_" tests are outdates, some small bugs in the sources
- [CELIX-331] test configuraiton needs update for newer CMake
- [CELIX-332] filter tests absent, small bugs in the source
- [CELIX-334] Race Condition in Topology Manager causes spurious segfaults
- [CELIX-336] resolver_test doesn't compile
- [CELIX-343] configuration_unbind never called
- [CELIX-344] service tracker removes wrong service
- [CELIX-345] Typo in Dependency Manager interface
- [CELIX-346] celix-bootstrap problems
- [CELIX-347] Memory leaks in dm_service_dependency
- [CELIX-349] ServiceTracker update references list after invoking added callback
- [CELIX-350] shell_tui wrong handling service reference
- [CELIX-354] Coverity High Impact issues
- [CELIX-356] Import libraries not supported in revamped cmake commands
- [CELIX-357] Coverity Medium Impact issues
- [CELIX-358] Coverity Low+New High Impact issues
- [CELIX-359] Android build stopped working
- [CELIX-360] Coverity leftover issues
- [CELIX-361] etcd_watcher notifications loss when ETCD transaction rate is high
- [CELIX-363] Memory leak in DFI exportRegistration_create
- [CELIX-364] Incorrect destroy of dependency manager info struct
- [CELIX-366] eclipse launch file not correctly generated
- [CELIX-367] Memory leak in properties
- [CELIX-369] Tests fail with sanitizer
- [CELIX-371] Due to a fixed maximum length of lines in property file not all bundles are started
- [CELIX-372] serviceRegistry_clearReferencesFor warning info unclear
- [CELIX-373] Endpoint Server number is fixed and too low
- [CELIX-374] RTLD_NODELETE flag
- [CELIX-375] Topology manager deadlocks when interacts with dependency manager
- [CELIX-377] wrong rpath setup in CMake files
- [CELIX-378] Travis build errors on Max OSX
- [CELIX-379] Extend cmake fucntion add_deploy with an option to specify the launcher
- [CELIX-376] serviceRegistration sometimes paired to invalidated serviceReference
- [CELIX-380] PROPERTIES_FOR_EACH macro does not iterate over all keys
- [CELIX-381] Invoke set for dependency manager called before suspending the component
http://git-wip-us.apache.org/repos/asf/celix/blob/fd206906/CHANGES.md
----------------------------------------------------------------------
diff --git a/CHANGES.md b/CHANGES.md
new file mode 100644
index 0000000..3595f3c
--- /dev/null
+++ b/CHANGES.md
@@ -0,0 +1,252 @@
+<!--
+# 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.
+-->
+
+# Changes for 2.1.0
+
+## New Features:
+ CELIX-408: Adds support for generating runtime shell scripts so that multiple Celix containers and other executable can be run with a single command.
+ CELIX-418: Adds support for generating properties in the Celix container launcher.
+ CELIX-407: Adds support for serializers as a service for PubSub. This way PubSubAdmin are purely focused on transport techniques.
+ CELIX-401: Adds support for creating Celix docker images using a CMake function.
+ CELIX-397: Adds support for PubSub selection based on a match function. This way multiple PubSubAdmin can be active.
+ CELIX-389: Adds the PubSub implementation. A set of bundles which together operates as a service based publish subscribe technology agnostic abstraction.
+ CELIX-385: Adds etcdlib as library. This libray can be used to communicate with etcd using a C abstraction.
+ CELIX-370: Adds C++11 support by adding a C++ Dependency Manager library. This is moslty a header based library.
+
+## Improvements:
+ CELIX-415: Improves handling of ANSI control sequences to better support running in IDE's.
+ CELIX-414: Improves support for running Celix container inside IDE's by basicly handling Celix containers as add_executable CMake target.
+ CELIX-406: Improves handling of descriptor files, by allowing different directories for Remote Services and PubSub.
+ CELIX-399: Improves PubSub to use etcdlib instead of local copy of etcd.c file.
+ CELIX-396: Improves the ZMQ PubSub security so that enabling/disable of security can be done per topic.
+ CELIX-395: Improves Remote Service to use the etcdlib instead of a local etcd.c file.
+ CELIX-392: Removes the use of the deprecated readdir_r function.
+
+## Bugs:
+ CELIX-416: Fixes an issue for the Android build.
+ CELIX-410: Fixes an issue where spaces and tabs are duplicated when loading properties.
+ CELIX-405: Fixes an issue with crashes because of invalid DFI descriptors.
+ CELIX-404: Fixes an issue with crashes using the inspect shell command.
+ CELIX-403: Fixes an memory leak in the service tracker.
+ CELIX-400: Fixes an issue with private libraries being loaded twice.
+ CELIX-398: Fixes an issue with PubSub and multiple UDP connections.
+ CELIX-393: Fixes an issue with the add_bundle CMake function and using existing libaries.
+ CELIX-391: Fixes an issue with the utils_stringHash not genering unique (enough) hashes.
+ CELIX-390: Fixes an issue with cycle dependency between the Celix framework and Celix utils libraries.
+ CELIX-387: Fixes an issue with the travis build and OSX
+ CELIX-386: Fixes an issue with the C++ dependency manager and register multiple C++ services.
+
+# Changes for 2.0.0
+## New Features
+ [CELIX-77] Configuration Admin Implementation
+ [CELIX-116] Event admin
+ [CELIX-119] Remove apr usage from framework
+ [CELIX-172] Bonjour Shell
+ [CELIX-237] RSA with libffi
+ [CELIX-269] New Dependency Manager
+ [CELIX-370] Add C++ support
+## Improvements
+ [CELIX-63] make cmake directory useable for custom bundle projects
+ [CELIX-66] Refactor shell service struct
+ [CELIX-90] add additional build options for RSA components
+ [CELIX-111] Support multiple libraries
+ [CELIX-115] logservice bundle entries list grows indefinitely
+ [CELIX-118] Deployment Admin - Support auditlog of Apache ACE
+ [CELIX-123] enable code coverage for utils_test
+ [CELIX-125] CMakeCelix module
+ [CELIX-134] Update source from incubator structure to TLP
+ [CELIX-138] Parameterise launcher
+ [CELIX-144] Document Developing Celix with Eclipse
+ [CELIX-146] Replace printfs wit fw_log calls
+ [CELIX-149] Add log_writer_syslog
+ [CELIX-152] Added Discovery/ETCD support
+ [CELIX-153] add cmake configuration options for rsa_bundles
+ [CELIX-156] Enable all warnings
+ [CELIX-158] RSA is unable to re-use already started proxy factory
+ [CELIX-165] Add port collision auto-correction to RSA
+ [CELIX-169] Add port collision auto-correction to discovery
+ [CELIX-182] loghelper eases log_service tracking
+ [CELIX-187] discovery_etcd: add watchindex, handle expire action
+ [CELIX-193] support portable celix_thread_t initalization
+ [CELIX-199] Code Coverage should be optional rather than required by cmake
+ [CELIX-200] SEGFAULT occurs when remote services are closed
+ [CELIX-216] Replace strtok with strtok_r
+ [CELIX-230] Refactoring of the shell command service
+ [CELIX-242] Fix Warnings
+ [CELIX-245] Update civetweb to latest version
+ [CELIX-246] enable Travis CI for Apache Celix
+ [CELIX-247] Enable ANDROID support
+ [CELIX-249] Refactor most char * usage to const char *
+ [CELIX-251] missing includes in device access example
+ [CELIX-255] Update default BUILD option
+ [CELIX-258] framework uses dlopen/dlsym to set the bundleActivator
+ [CELIX-259] dispatcherThread does not perform a graceful shutdown
+ [CELIX-275] Can't do mkstemp on root system (deploymentAdmin_download)
+ [CELIX-278] Adding tags to ACE target through deployment admin
+ [CELIX-284] Restrict export and imports based on properties
+ [CELIX-285] Discovery SHM: remove obsolete jansson dependency
+ [CELIX-295] Many compiling warnings in unit tests
+ [CELIX-296] Framework unit tests improvement
+ [CELIX-309] Make DFI available for common use
+ [CELIX-317] Dependency Manager suspend state
+ [CELIX-320] outdated utils tests (threads, hashmap)
+ [CELIX-323] Version and version_range moved from framework to utils
+ [CELIX-326] Add service version support to dependency manager
+ [CELIX-327] Filter does not support greater than and lesser than operators
+ [CELIX-328] Service version support for RSA DFI
+ [CELIX-330] document using markdown
+ [CELIX-333] integrate coverity scans
+ [CELIX-335] Refactor deploying bundles with cmake
+ [CELIX-339] celix_log_mock doesnt show logs to the user
+ [CELIX-341] Fix coverity issues in Shell / Shell TUI
+ [CELIX-348] The utils_stringHash does not generate unique hashes.
+ [CELIX-352] RSA_DFI and embedded celix
+ [CELIX-353] Make bundle context retrievable form dm component
+ [CELIX-365] Refactor some usage of void* to const void*
+## Bugs
+ [CELIX-104] deployment_admin bundle won't start when missing properties
+ [CELIX-105] Fixed array_list_test
+ [CELIX-114] Potential deadlock in log_service bundle during stop
+ [CELIX-122] missing dependency uuid
+ [CELIX-124] Celix memory leaks fixing
+ [CELIX-127] Makefiles not generated using CMake 3.0
+ [CELIX-128] remote_shell port cannot be changed
+ [CELIX-129] Update RSA to be compatible with the Amdatu RSA implementation
+ [CELIX-130] Implement Configured Endpoint discovery compatible with Amdatu RSA
+ [CELIX-136] [contrib] Configured endpoint discovery
+ [CELIX-137] Possible concurrency issues in topology manager
+ [CELIX-139] Update tests and mocks to latest CppUTest
+ [CELIX-147] RSA_SHM: concurrency issue when client segfaults
+ [CELIX-150] Topology Manager segfaults when RSA/bundle w/ exp. service stops in wrong order
+ [CELIX-154] echo exampe not working
+ [CELIX-155] Fix CMake warnings during configuration
+ [CELIX-157] service_reference misses functions to get property keys and values
+ [CELIX-159] PThread usage not correct for Linux
+ [CELIX-161] newly added RSA cannot manage already exported/imported services
+ [CELIX-162] Update encoding/decoding of replies.
+ [CELIX-167] Update command to be able to pass a pointer (handle)
+ [CELIX-168] discovery_etcd:Make root-path configurable
+ [CELIX-170] Remote services can fail to restart when felix restarts
+ [CELIX-173] stopping rsa_http bundle does not stop rsa webserver
+ [CELIX-174] invalid bundle_context during fw shutdown
+ [CELIX-175] segfault during shutdown when calculator is already stopped
+ [CELIX-177] not all endpoints are unistalled when rsa_http bundle is stopped
+ [CELIX-178] Shell_Tui bundle hangs on stop
+ [CELIX-179] memory leak in rsa_http callback
+ [CELIX-180] framework_tests do not compile
+ [CELIX-181] Incorrect reply status when no data is returned on a remote call.
+ [CELIX-185] Memory leaks in Discovery Endpoint Descriptor Reader
+ [CELIX-186] deployment_admin segfaults while downloading bundle
+ [CELIX-188] Add missing log_service headers to installations
+ [CELIX-189] LogService segfaults when log message pointer is overwritten
+ [CELIX-190] remote services memory leaks
+ [CELIX-192] rsa_http: add locking
+ [CELIX-194] Refactor RemoteService proxy factory
+ [CELIX-195] SEGFAULT occurs when running a log command.
+ [CELIX-197] insufficient memory allocated
+ [CELIX-198] Logging can segfault for strings 512 characters or longer
+ [CELIX-201] SEGFAULT occurs when restarting apache_celix_rs_topology_manager
+ [CELIX-202] Not all components are disabled with a clean build
+ [CELIX-205] RSA Discovery (Configured) bundle gets stuck
+ [CELIX-213] SEGFAULT occurs due to memory access after memory is free'd
+ [CELIX-215] curl_global_init() not called directly
+ [CELIX-218] Memory leaks in service_registry.c
+ [CELIX-219] Memory Leaks
+ [CELIX-221] Deployment admin segfaults when deploying a bundle
+ [CELIX-223] Celix crashes because of wrong bundle versions
+ [CELIX-224] Wrong use of errno in launcher.c
+ [CELIX-226] __unused atttibute does not work with Linux
+ [CELIX-227] compile error under linux due to missing header include
+ [CELIX-229] Make APR optional
+ [CELIX-231] Missing log_helper creation in discovery_etcd
+ [CELIX-238] Contributing page links incorrect
+ [CELIX-239] TopologyManager does not maintain exportedServices
+ [CELIX-240] RSA: deadlock when stopping
+ [CELIX-241] remote_interface incorrect
+ [CELIX-248] too many arguments for format
+ [CELIX-250] config.h is not exported
+ [CELIX-252] discovery_etcd cannot handle celix restarts
+ [CELIX-253] Deployment admin does not always download the latest version from ACE
+ [CELIX-254] Memory leakage in deployment_admin
+ [CELIX-260] missing include in deployment admin
+ [CELIX-262] Fix minor issues in hashMap/linkedList
+ [CELIX-263] replace utils cunit tests w/ cpputest tests
+ [CELIX-264] Missing strdup leads to invalid free
+ [CELIX-270] Fix Code Coverage
+ [CELIX-271] setup coveralls.io
+ [CELIX-272] framework: improve locking / synchronization
+ [CELIX-274] waitForShutdown issue when starting two embedded celix frameworks.
+ [CELIX-279] Celix fails to compile w/ CMake 3.3
+ [CELIX-280] deployment_admin misses proper shutdown functionality
+ [CELIX-287] racecondition for framework event listener
+ [CELIX-288] Archive directory not properly read
+ [CELIX-289] Fix celix mocks
+ [CELIX-290] Mock fixes, CMakelist fix, build warning fix
+ [CELIX-292] Memory leak in refactored shell
+ [CELIX-294] changed dfi library from static to shared
+ [CELIX-298] Memory leaks in rsa_dfi
+ [CELIX-300] Invalid read in serviceRegistry during framework_shutdown
+ [CELIX-301] Memory leaks in rsa_shm
+ [CELIX-302] Service Tracker Test error breaks the build
+ [CELIX-304] Memory leaks in manifest parser, requirement, capability; out-of-date tests
+ [CELIX-305] Memory leaks in RSA_SHM, RSA_DFI, RSA_HTTP
+ [CELIX-306] Memory leaks in remote_proxy_factory, unit tests issues
+ [CELIX-307] "service registration set properties" deadlocks
+ [CELIX-308] Dependency Manager memory leaks
+ [CELIX-310] "serviceRegistry_getRegisteredServices" deadlocks
+ [CELIX-311] Framework Tests Build broken
+ [CELIX-312] ServiceReference usage counter inconsistent state
+ [CELIX-313] out of date/defunct tests
+ [CELIX-316] Wrong conversion for 'N' type in json_serializer
+ [CELIX-322] Memory leaks in resolver and framework tests
+ [CELIX-324] Version support in dfi library
+ [CELIX-325] Bundle test sporadicly fails
+ [CELIX-329] framework "service_" tests are outdates, some small bugs in the sources
+ [CELIX-331] test configuraiton needs update for newer CMake
+ [CELIX-332] filter tests absent, small bugs in the source
+ [CELIX-334] Race Condition in Topology Manager causes spurious segfaults
+ [CELIX-336] resolver_test doesn't compile
+ [CELIX-343] configuration_unbind never called
+ [CELIX-344] service tracker removes wrong service
+ [CELIX-345] Typo in Dependency Manager interface
+ [CELIX-346] celix-bootstrap problems
+ [CELIX-347] Memory leaks in dm_service_dependency
+ [CELIX-349] ServiceTracker update references list after invoking added callback
+ [CELIX-350] shell_tui wrong handling service reference
+ [CELIX-354] Coverity High Impact issues
+ [CELIX-356] Import libraries not supported in revamped cmake commands
+ [CELIX-357] Coverity Medium Impact issues
+ [CELIX-358] Coverity Low+New High Impact issues
+ [CELIX-359] Android build stopped working
+ [CELIX-360] Coverity leftover issues
+ [CELIX-361] etcd_watcher notifications loss when ETCD transaction rate is high
+ [CELIX-363] Memory leak in DFI exportRegistration_create
+ [CELIX-364] Incorrect destroy of dependency manager info struct
+ [CELIX-366] eclipse launch file not correctly generated
+ [CELIX-367] Memory leak in properties
+ [CELIX-369] Tests fail with sanitizer
+ [CELIX-371] Due to a fixed maximum length of lines in property file not all bundles are started
+ [CELIX-372] serviceRegistry_clearReferencesFor warning info unclear
+ [CELIX-373] Endpoint Server number is fixed and too low
+ [CELIX-374] RTLD_NODELETE flag
+ [CELIX-375] Topology manager deadlocks when interacts with dependency manager
+ [CELIX-377] wrong rpath setup in CMake files
+ [CELIX-378] Travis build errors on Max OSX
+ [CELIX-379] Extend cmake fucntion add_deploy with an option to specify the launcher
+ [CELIX-376] serviceRegistration sometimes paired to invalidated serviceReference
+ [CELIX-380] PROPERTIES_FOR_EACH macro does not iterate over all keys
+ [CELIX-381] Invoke set for dependency manager called before suspending the component
http://git-wip-us.apache.org/repos/asf/celix/blob/fd206906/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 0987fc7..b82d2bb 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,7 +1,23 @@
-Release Notes for 2.1.0
-Remarks:
+# 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.
-* Library versions:
+# Release Notes for Apache Celix 2.1.0
+
+# # Versions
+
+### Libraries:
- Celix Framework library: 2.1.0
- Celix Utils library: 2.1.0
- Dependency Manager:
@@ -10,7 +26,7 @@ Remarks:
- Celix DFI library: 1.1.0
- Celix etcdlib: 1.0.0
-* Bundle versions:
+### Bundles
- Shell Tui: 1.1.0
- Shell Bonjour: 0.1.0
- Shell: 2.1.0
[09/11] celix git commit: Merge branch 'release/2.1.0' into
feature/CELIX-417-cmake-refactor
Posted by pn...@apache.org.
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_admin_zmq/src/topic_subscription.c
----------------------------------------------------------------------
diff --cc pubsub/pubsub_admin_zmq/src/topic_subscription.c
index 0e7a794,0000000..9728865
mode 100644,000000..100644
--- a/pubsub/pubsub_admin_zmq/src/topic_subscription.c
+++ b/pubsub/pubsub_admin_zmq/src/topic_subscription.c
@@@ -1,732 -1,0 +1,732 @@@
+/**
+ *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.
+ */
+/*
+ * topic_subscription.c
+ *
+ * \date Oct 2, 2015
+ * \author <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+
+#include "topic_subscription.h"
+#include <czmq.h>
+/* The following undefs prevent the collision between:
+ * - sys/syslog.h (which is included within czmq)
+ * - celix/dfi/dfi_log_util.h
+ */
+#undef LOG_DEBUG
+#undef LOG_WARNING
+#undef LOG_INFO
+#undef LOG_WARNING
+
+#include <string.h>
+#include <stdlib.h>
+#include <signal.h>
+
+#include "utils.h"
+#include "celix_errno.h"
+#include "constants.h"
+#include "version.h"
+
- #include "subscriber.h"
- #include "publisher.h"
++#include "pubsub/subscriber.h"
++#include "pubsub/publisher.h"
+#include "pubsub_utils.h"
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+#include "zmq_crypto.h"
+
+#define MAX_CERT_PATH_LENGTH 512
+#endif
+
+#define POLL_TIMEOUT 250
+#define ZMQ_POLL_TIMEOUT_MS_ENV "ZMQ_POLL_TIMEOUT_MS"
+
+struct topic_subscription{
+
+ zsock_t* zmq_socket;
+ zcert_t * zmq_cert;
+ zcert_t * zmq_pub_cert;
+ pthread_mutex_t socket_lock;
+ service_tracker_pt tracker;
+ array_list_pt sub_ep_list;
+ celix_thread_t recv_thread;
+ bool running;
+ celix_thread_mutex_t ts_lock;
+ bundle_context_pt context;
+
+ pubsub_serializer_service_t *serializer;
+
+ hash_map_pt servicesMap; // key = service, value = msg types map
+
+ celix_thread_mutex_t pendingConnections_lock;
+ array_list_pt pendingConnections;
+
+ array_list_pt pendingDisconnections;
+ celix_thread_mutex_t pendingDisconnections_lock;
+
+ unsigned int nrSubscribers;
+};
+
+typedef struct complete_zmq_msg{
+ zframe_t* header;
+ zframe_t* payload;
+}* complete_zmq_msg_pt;
+
+typedef struct mp_handle{
+ hash_map_pt svc_msg_db;
+ hash_map_pt rcv_msg_map;
+}* mp_handle_pt;
+
+typedef struct msg_map_entry{
+ bool retain;
+ void* msgInst;
+}* msg_map_entry_pt;
+
+static celix_status_t topicsub_subscriberTracked(void * handle, service_reference_pt reference, void * service);
+static celix_status_t topicsub_subscriberUntracked(void * handle, service_reference_pt reference, void * service);
+static void* zmq_recv_thread_func(void* arg);
+static bool checkVersion(version_pt msgVersion,pubsub_msg_header_pt hdr);
+static void sigusr1_sighandler(int signo);
+static int pubsub_localMsgTypeIdForMsgType(void* handle, const char* msgType, unsigned int* msgTypeId);
+static int pubsub_getMultipart(void *handle, unsigned int msgTypeId, bool retain, void **part);
+static mp_handle_pt create_mp_handle(hash_map_pt svc_msg_db,array_list_pt rcv_msg_list);
+static void destroy_mp_handle(mp_handle_pt mp_handle);
+static void connectPendingPublishers(topic_subscription_pt sub);
+static void disconnectPendingPublishers(topic_subscription_pt sub);
+
+celix_status_t pubsub_topicSubscriptionCreate(bundle_context_pt bundle_context, char* scope, char* topic, pubsub_serializer_service_t *best_serializer, topic_subscription_pt* out){
+ celix_status_t status = CELIX_SUCCESS;
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ char* keys_bundle_dir = pubsub_getKeysBundleDir(bundle_context);
+ if (keys_bundle_dir == NULL){
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+ const char* keys_file_path = NULL;
+ const char* keys_file_name = NULL;
+ bundleContext_getProperty(bundle_context, PROPERTY_KEYS_FILE_PATH, &keys_file_path);
+ bundleContext_getProperty(bundle_context, PROPERTY_KEYS_FILE_NAME, &keys_file_name);
+
+ char sub_cert_path[MAX_CERT_PATH_LENGTH];
+ char pub_cert_path[MAX_CERT_PATH_LENGTH];
+
+ //certificate path ".cache/bundle{id}/version0.0/./META-INF/keys/subscriber/private/sub_{topic}.key.enc"
+ snprintf(sub_cert_path, MAX_CERT_PATH_LENGTH, "%s/META-INF/keys/subscriber/private/sub_%s.key.enc", keys_bundle_dir, topic);
+ snprintf(pub_cert_path, MAX_CERT_PATH_LENGTH, "%s/META-INF/keys/publisher/public/pub_%s.pub", keys_bundle_dir, topic);
+ free(keys_bundle_dir);
+
+ printf("PSA_ZMQ_PSA_ZMQ_TS: Loading subscriber key '%s'\n", sub_cert_path);
+ printf("PSA_ZMQ_PSA_ZMQ_TS: Loading publisher key '%s'\n", pub_cert_path);
+
+ zcert_t* sub_cert = get_zcert_from_encoded_file((char *) keys_file_path, (char *) keys_file_name, sub_cert_path);
+ if (sub_cert == NULL){
+ printf("PSA_ZMQ_PSA_ZMQ_TS: Cannot load key '%s'\n", sub_cert_path);
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+ zcert_t* pub_cert = zcert_load(pub_cert_path);
+ if (pub_cert == NULL){
+ zcert_destroy(&sub_cert);
+ printf("PSA_ZMQ_PSA_ZMQ_TS: Cannot load key '%s'\n", pub_cert_path);
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+ const char* pub_key = zcert_public_txt(pub_cert);
+#endif
+
+ zsock_t* zmq_s = zsock_new (ZMQ_SUB);
+ if(zmq_s==NULL){
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ zcert_destroy(&sub_cert);
+ zcert_destroy(&pub_cert);
+#endif
+
+ return CELIX_SERVICE_EXCEPTION;
+ }
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ zcert_apply (sub_cert, zmq_s);
+ zsock_set_curve_serverkey (zmq_s, pub_key); //apply key of publisher to socket of subscriber
+#endif
+
+ if(strcmp(topic,PUBSUB_ANY_SUB_TOPIC)==0){
+ zsock_set_subscribe (zmq_s, "");
+ }
+ else{
+ zsock_set_subscribe (zmq_s, topic);
+ }
+
+ topic_subscription_pt ts = (topic_subscription_pt) calloc(1,sizeof(*ts));
+ ts->context = bundle_context;
+ ts->zmq_socket = zmq_s;
+ ts->running = false;
+ ts->nrSubscribers = 0;
+ ts->serializer = best_serializer;
+
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ ts->zmq_cert = sub_cert;
+ ts->zmq_pub_cert = pub_cert;
+#endif
+
+ celixThreadMutex_create(&ts->socket_lock, NULL);
+ celixThreadMutex_create(&ts->ts_lock,NULL);
+ arrayList_create(&ts->sub_ep_list);
+ ts->servicesMap = hashMap_create(NULL, NULL, NULL, NULL);
+
+ arrayList_create(&ts->pendingConnections);
+ arrayList_create(&ts->pendingDisconnections);
+ celixThreadMutex_create(&ts->pendingConnections_lock, NULL);
+ celixThreadMutex_create(&ts->pendingDisconnections_lock, NULL);
+
+ char filter[128];
+ memset(filter,0,128);
+ if(strncmp(PUBSUB_SUBSCRIBER_SCOPE_DEFAULT,scope,strlen(PUBSUB_SUBSCRIBER_SCOPE_DEFAULT)) == 0) {
+ // default scope, means that subscriber has not defined a scope property
+ snprintf(filter, 128, "(&(%s=%s)(%s=%s))",
+ (char*) OSGI_FRAMEWORK_OBJECTCLASS, PUBSUB_SUBSCRIBER_SERVICE_NAME,
+ PUBSUB_SUBSCRIBER_TOPIC,topic);
+
+ } else {
+ snprintf(filter, 128, "(&(%s=%s)(%s=%s)(%s=%s))",
+ (char*) OSGI_FRAMEWORK_OBJECTCLASS, PUBSUB_SUBSCRIBER_SERVICE_NAME,
+ PUBSUB_SUBSCRIBER_TOPIC,topic,
+ PUBSUB_SUBSCRIBER_SCOPE,scope);
+ }
+ service_tracker_customizer_pt customizer = NULL;
+ status += serviceTrackerCustomizer_create(ts,NULL,topicsub_subscriberTracked,NULL,topicsub_subscriberUntracked,&customizer);
+ status += serviceTracker_createWithFilter(bundle_context, filter, customizer, &ts->tracker);
+
+ struct sigaction actions;
+ memset(&actions, 0, sizeof(actions));
+ sigemptyset(&actions.sa_mask);
+ actions.sa_flags = 0;
+ actions.sa_handler = sigusr1_sighandler;
+
+ sigaction(SIGUSR1,&actions,NULL);
+
+ *out=ts;
+
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionDestroy(topic_subscription_pt ts){
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&ts->ts_lock);
+
+ ts->running = false;
+ serviceTracker_destroy(ts->tracker);
+ arrayList_clear(ts->sub_ep_list);
+ arrayList_destroy(ts->sub_ep_list);
+ /* TODO: Destroy all the serializer maps? */
+ hashMap_destroy(ts->servicesMap,false,false);
+
+ celixThreadMutex_lock(&ts->pendingConnections_lock);
+ arrayList_destroy(ts->pendingConnections);
+ celixThreadMutex_unlock(&ts->pendingConnections_lock);
+ celixThreadMutex_destroy(&ts->pendingConnections_lock);
+
+ celixThreadMutex_lock(&ts->pendingDisconnections_lock);
+ arrayList_destroy(ts->pendingDisconnections);
+ celixThreadMutex_unlock(&ts->pendingDisconnections_lock);
+ celixThreadMutex_destroy(&ts->pendingDisconnections_lock);
+
+ celixThreadMutex_unlock(&ts->ts_lock);
+
+ celixThreadMutex_lock(&ts->socket_lock);
+ zsock_destroy(&(ts->zmq_socket));
+#ifdef BUILD_WITH_ZMQ_SECURITY
+ zcert_destroy(&(ts->zmq_cert));
+ zcert_destroy(&(ts->zmq_pub_cert));
+#endif
+ celixThreadMutex_unlock(&ts->socket_lock);
+ celixThreadMutex_destroy(&ts->socket_lock);
+
+ celixThreadMutex_destroy(&ts->ts_lock);
+
+ free(ts);
+
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionStart(topic_subscription_pt ts){
+ celix_status_t status = CELIX_SUCCESS;
+
+ status = serviceTracker_open(ts->tracker);
+
+ ts->running = true;
+
+ if(status==CELIX_SUCCESS){
+ status=celixThread_create(&ts->recv_thread,NULL,zmq_recv_thread_func,ts);
+ }
+
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionStop(topic_subscription_pt ts){
+ celix_status_t status = CELIX_SUCCESS;
+
+ ts->running = false;
+
+ pthread_kill(ts->recv_thread.thread,SIGUSR1);
+
+ celixThread_join(ts->recv_thread,NULL);
+
+ status = serviceTracker_close(ts->tracker);
+
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionConnectPublisher(topic_subscription_pt ts, char* pubURL){
+ celix_status_t status = CELIX_SUCCESS;
+ celixThreadMutex_lock(&ts->socket_lock);
+ if(!zsock_is(ts->zmq_socket) || zsock_connect(ts->zmq_socket,"%s",pubURL) != 0){
+ status = CELIX_SERVICE_EXCEPTION;
+ }
+ celixThreadMutex_unlock(&ts->socket_lock);
+
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionAddConnectPublisherToPendingList(topic_subscription_pt ts, char* pubURL) {
+ celix_status_t status = CELIX_SUCCESS;
+ char *url = strdup(pubURL);
+ celixThreadMutex_lock(&ts->pendingConnections_lock);
+ arrayList_add(ts->pendingConnections, url);
+ celixThreadMutex_unlock(&ts->pendingConnections_lock);
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionAddDisconnectPublisherToPendingList(topic_subscription_pt ts, char* pubURL) {
+ celix_status_t status = CELIX_SUCCESS;
+ char *url = strdup(pubURL);
+ celixThreadMutex_lock(&ts->pendingDisconnections_lock);
+ arrayList_add(ts->pendingDisconnections, url);
+ celixThreadMutex_unlock(&ts->pendingDisconnections_lock);
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionDisconnectPublisher(topic_subscription_pt ts, char* pubURL){
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&ts->socket_lock);
+ if(!zsock_is(ts->zmq_socket) || zsock_disconnect(ts->zmq_socket,"%s",pubURL) != 0){
+ status = CELIX_SERVICE_EXCEPTION;
+ }
+ celixThreadMutex_unlock(&ts->socket_lock);
+
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionAddSubscriber(topic_subscription_pt ts, pubsub_endpoint_pt subEP){
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&ts->ts_lock);
+ arrayList_add(ts->sub_ep_list,subEP);
+ celixThreadMutex_unlock(&ts->ts_lock);
+
+ return status;
+
+}
+
+celix_status_t pubsub_topicIncreaseNrSubscribers(topic_subscription_pt ts) {
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&ts->ts_lock);
+ ts->nrSubscribers++;
+ celixThreadMutex_unlock(&ts->ts_lock);
+
+ return status;
+}
+
+celix_status_t pubsub_topicSubscriptionRemoveSubscriber(topic_subscription_pt ts, pubsub_endpoint_pt subEP){
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&ts->ts_lock);
+ arrayList_removeElement(ts->sub_ep_list,subEP);
+ celixThreadMutex_unlock(&ts->ts_lock);
+
+ return status;
+}
+
+celix_status_t pubsub_topicDecreaseNrSubscribers(topic_subscription_pt ts) {
+ celix_status_t status = CELIX_SUCCESS;
+
+ celixThreadMutex_lock(&ts->ts_lock);
+ ts->nrSubscribers--;
+ celixThreadMutex_unlock(&ts->ts_lock);
+
+ return status;
+}
+
+unsigned int pubsub_topicGetNrSubscribers(topic_subscription_pt ts) {
+ return ts->nrSubscribers;
+}
+
+array_list_pt pubsub_topicSubscriptionGetSubscribersList(topic_subscription_pt sub){
+ return sub->sub_ep_list;
+}
+
+static celix_status_t topicsub_subscriberTracked(void * handle, service_reference_pt reference, void * service){
+ celix_status_t status = CELIX_SUCCESS;
+ topic_subscription_pt ts = handle;
+
+ celixThreadMutex_lock(&ts->ts_lock);
+ if (!hashMap_containsKey(ts->servicesMap, service)) {
+ bundle_pt bundle = NULL;
+ hash_map_pt msgTypes = NULL;
+
+ serviceReference_getBundle(reference, &bundle);
+
+ if(ts->serializer != NULL && bundle!=NULL){
+ ts->serializer->createSerializerMap(ts->serializer->handle,bundle,&msgTypes);
+ if(msgTypes != NULL){
+ hashMap_put(ts->servicesMap, service, msgTypes);
+ printf("PSA_ZMQ_TS: New subscriber registered.\n");
+ }
+ }
+ else{
+ printf("PSA_ZMQ_TS: Cannot register new subscriber.\n");
+ status = CELIX_SERVICE_EXCEPTION;
+ }
+ }
+ celixThreadMutex_unlock(&ts->ts_lock);
+
+ return status;
+}
+
+static celix_status_t topicsub_subscriberUntracked(void * handle, service_reference_pt reference, void * service){
+ celix_status_t status = CELIX_SUCCESS;
+ topic_subscription_pt ts = handle;
+
+ celixThreadMutex_lock(&ts->ts_lock);
+ if (hashMap_containsKey(ts->servicesMap, service)) {
+ hash_map_pt msgTypes = hashMap_remove(ts->servicesMap, service);
+ if(msgTypes!=NULL && ts->serializer!=NULL){
+ ts->serializer->destroySerializerMap(ts->serializer->handle,msgTypes);
+ printf("PSA_ZMQ_TS: Subscriber unregistered.\n");
+ }
+ else{
+ printf("PSA_ZMQ_TS: Cannot unregister subscriber.\n");
+ status = CELIX_SERVICE_EXCEPTION;
+ }
+ }
+ celixThreadMutex_unlock(&ts->ts_lock);
+
+ return status;
+}
+
+
+static void process_msg(topic_subscription_pt sub,array_list_pt msg_list){
+
+ pubsub_msg_header_pt first_msg_hdr = (pubsub_msg_header_pt)zframe_data(((complete_zmq_msg_pt)arrayList_get(msg_list,0))->header);
+
+ hash_map_iterator_pt iter = hashMapIterator_create(sub->servicesMap);
+ while (hashMapIterator_hasNext(iter)) {
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+ pubsub_subscriber_pt subsvc = hashMapEntry_getKey(entry);
+ hash_map_pt msgTypes = hashMapEntry_getValue(entry);
+
+ pubsub_msg_serializer_t *msgSer = hashMap_get(msgTypes,(void*)(uintptr_t )first_msg_hdr->type);
+ if (msgSer == NULL) {
+ printf("PSA_ZMQ_TS: Primary message %d not supported. NOT sending any part of the whole message.\n",first_msg_hdr->type);
+ }
+ else{
+ void *msgInst = NULL;
+ bool validVersion = checkVersion(msgSer->msgVersion,first_msg_hdr);
+
+ if(validVersion){
+
+ celix_status_t status = msgSer->deserialize(msgSer, (const void *) zframe_data(((complete_zmq_msg_pt)arrayList_get(msg_list,0))->payload), 0, &msgInst);
+
+ if (status == CELIX_SUCCESS) {
+ bool release = true;
+ mp_handle_pt mp_handle = create_mp_handle(msgTypes,msg_list);
+ pubsub_multipart_callbacks_t mp_callbacks;
+ mp_callbacks.handle = mp_handle;
+ mp_callbacks.localMsgTypeIdForMsgType = pubsub_localMsgTypeIdForMsgType;
+ mp_callbacks.getMultipart = pubsub_getMultipart;
+ subsvc->receive(subsvc->handle, msgSer->msgName, first_msg_hdr->type, msgInst, &mp_callbacks, &release);
+
+ if(release){
+ msgSer->freeMsg(msgSer,msgInst); // pubsubSerializer_freeMsg(msgType, msgInst);
+ }
+ if(mp_handle!=NULL){
+ destroy_mp_handle(mp_handle);
+ }
+ }
+ else{
+ printf("PSA_ZMQ_TS: Cannot deserialize msgType %s.\n",msgSer->msgName);
+ }
+
+ }
+ else{
+ int major=0,minor=0;
+ version_getMajor(msgSer->msgVersion,&major);
+ version_getMinor(msgSer->msgVersion,&minor);
+ printf("PSA_ZMQ_TS: Version mismatch for primary message '%s' (have %d.%d, received %u.%u). NOT sending any part of the whole message.\n",
+ msgSer->msgName,major,minor,first_msg_hdr->major,first_msg_hdr->minor);
+ }
+
+ }
+ }
+ hashMapIterator_destroy(iter);
+
+ int i = 0;
+ for(;i<arrayList_size(msg_list);i++){
+ complete_zmq_msg_pt c_msg = arrayList_get(msg_list,i);
+ zframe_destroy(&(c_msg->header));
+ zframe_destroy(&(c_msg->payload));
+ free(c_msg);
+ }
+
+ arrayList_destroy(msg_list);
+
+}
+
+static void* zmq_recv_thread_func(void * arg) {
+ topic_subscription_pt sub = (topic_subscription_pt) arg;
+
+ while (sub->running) {
+
+ celixThreadMutex_lock(&sub->socket_lock);
+
+ zframe_t* headerMsg = zframe_recv(sub->zmq_socket);
+ if (headerMsg == NULL) {
+ if (errno == EINTR) {
+ //It means we got a signal and we have to exit...
+ printf("PSA_ZMQ_TS: header_recv thread for topic got a signal and will exit.\n");
+ } else {
+ perror("PSA_ZMQ_TS: header_recv thread");
+ }
+ }
+ else {
+
+ pubsub_msg_header_pt hdr = (pubsub_msg_header_pt) zframe_data(headerMsg);
+
+ if (zframe_more(headerMsg)) {
+
+ zframe_t* payloadMsg = zframe_recv(sub->zmq_socket);
+ if (payloadMsg == NULL) {
+ if (errno == EINTR) {
+ //It means we got a signal and we have to exit...
+ printf("PSA_ZMQ_TS: payload_recv thread for topic got a signal and will exit.\n");
+ } else {
+ perror("PSA_ZMQ_TS: payload_recv");
+ }
+ zframe_destroy(&headerMsg);
+ } else {
+
+ //Let's fetch all the messages from the socket
+ array_list_pt msg_list = NULL;
+ arrayList_create(&msg_list);
+ complete_zmq_msg_pt firstMsg = calloc(1, sizeof(struct complete_zmq_msg));
+ firstMsg->header = headerMsg;
+ firstMsg->payload = payloadMsg;
+ arrayList_add(msg_list, firstMsg);
+
+ bool more = zframe_more(payloadMsg);
+ while (more) {
+
+ zframe_t* h_msg = zframe_recv(sub->zmq_socket);
+ if (h_msg == NULL) {
+ if (errno == EINTR) {
+ //It means we got a signal and we have to exit...
+ printf("PSA_ZMQ_TS: h_recv thread for topic got a signal and will exit.\n");
+ } else {
+ perror("PSA_ZMQ_TS: h_recv");
+ }
+ break;
+ }
+
+ zframe_t* p_msg = zframe_recv(sub->zmq_socket);
+ if (p_msg == NULL) {
+ if (errno == EINTR) {
+ //It means we got a signal and we have to exit...
+ printf("PSA_ZMQ_TS: p_recv thread for topic got a signal and will exit.\n");
+ } else {
+ perror("PSA_ZMQ_TS: p_recv");
+ }
+ zframe_destroy(&h_msg);
+ break;
+ }
+
+ complete_zmq_msg_pt c_msg = calloc(1, sizeof(struct complete_zmq_msg));
+ c_msg->header = h_msg;
+ c_msg->payload = p_msg;
+ arrayList_add(msg_list, c_msg);
+
+ if (!zframe_more(p_msg)) {
+ more = false;
+ }
+ }
+
+ celixThreadMutex_lock(&sub->ts_lock);
+ process_msg(sub, msg_list);
+ celixThreadMutex_unlock(&sub->ts_lock);
+
+ }
+
+ } //zframe_more(headerMsg)
+ else {
+ free(headerMsg);
+ printf("PSA_ZMQ_TS: received message %u for topic %s without payload!\n", hdr->type, hdr->topic);
+ }
+
+ } // headerMsg != NULL
+ celixThreadMutex_unlock(&sub->socket_lock);
+ connectPendingPublishers(sub);
+ disconnectPendingPublishers(sub);
+ } // while
+
+ return NULL;
+}
+
+static void connectPendingPublishers(topic_subscription_pt sub) {
+ celixThreadMutex_lock(&sub->pendingConnections_lock);
+ while(!arrayList_isEmpty(sub->pendingConnections)) {
+ char * pubEP = arrayList_remove(sub->pendingConnections, 0);
+ pubsub_topicSubscriptionConnectPublisher(sub, pubEP);
+ free(pubEP);
+ }
+ celixThreadMutex_unlock(&sub->pendingConnections_lock);
+}
+
+static void disconnectPendingPublishers(topic_subscription_pt sub) {
+ celixThreadMutex_lock(&sub->pendingDisconnections_lock);
+ while(!arrayList_isEmpty(sub->pendingDisconnections)) {
+ char * pubEP = arrayList_remove(sub->pendingDisconnections, 0);
+ pubsub_topicSubscriptionDisconnectPublisher(sub, pubEP);
+ free(pubEP);
+ }
+ celixThreadMutex_unlock(&sub->pendingDisconnections_lock);
+}
+
+static void sigusr1_sighandler(int signo){
+ printf("PSA_ZMQ_TS: Topic subscription being shut down...\n");
+ return;
+}
+
+static bool checkVersion(version_pt msgVersion,pubsub_msg_header_pt hdr){
+ bool check=false;
+ int major=0,minor=0;
+
+ if(msgVersion!=NULL){
+ version_getMajor(msgVersion,&major);
+ version_getMinor(msgVersion,&minor);
+ if(hdr->major==((unsigned char)major)){ /* Different major means incompatible */
+ check = (hdr->minor>=((unsigned char)minor)); /* Compatible only if the provider has a minor equals or greater (means compatible update) */
+ }
+ }
+
+ return check;
+}
+
+static int pubsub_localMsgTypeIdForMsgType(void* handle, const char* msgType, unsigned int* msgTypeId){
+ *msgTypeId = utils_stringHash(msgType);
+ return 0;
+}
+
+static int pubsub_getMultipart(void *handle, unsigned int msgTypeId, bool retain, void **part){
+
+ if(handle==NULL){
+ *part = NULL;
+ return -1;
+ }
+
+ mp_handle_pt mp_handle = (mp_handle_pt)handle;
+ msg_map_entry_pt entry = hashMap_get(mp_handle->rcv_msg_map, (void*)(uintptr_t) msgTypeId);
+ if(entry!=NULL){
+ entry->retain = retain;
+ *part = entry->msgInst;
+ }
+ else{
+ printf("TP: getMultipart cannot find msg '%u'\n",msgTypeId);
+ *part=NULL;
+ return -2;
+ }
+
+ return 0;
+
+}
+
+static mp_handle_pt create_mp_handle(hash_map_pt svc_msg_db,array_list_pt rcv_msg_list){
+
+ if(arrayList_size(rcv_msg_list)==1){ //Means it's not a multipart message
+ return NULL;
+ }
+
+ mp_handle_pt mp_handle = calloc(1,sizeof(struct mp_handle));
+ mp_handle->svc_msg_db = svc_msg_db;
+ mp_handle->rcv_msg_map = hashMap_create(NULL, NULL, NULL, NULL);
+
+ int i=1; //We skip the first message, it will be handle differently
+ for(;i<arrayList_size(rcv_msg_list);i++){
+ complete_zmq_msg_pt c_msg = (complete_zmq_msg_pt)arrayList_get(rcv_msg_list,i);
+ pubsub_msg_header_pt header = (pubsub_msg_header_pt)zframe_data(c_msg->header);
+
+ pubsub_msg_serializer_t* msgSer = hashMap_get(svc_msg_db, (void*)(uintptr_t)(header->type));
+
+ if (msgSer!= NULL) {
+ void *msgInst = NULL;
+
+ bool validVersion = checkVersion(msgSer->msgVersion,header);
+
+ if(validVersion){
+ celix_status_t status = msgSer->deserialize(msgSer, (const void*)zframe_data(c_msg->payload), 0, &msgInst);
+
+ if(status == CELIX_SUCCESS){
+ msg_map_entry_pt entry = calloc(1,sizeof(struct msg_map_entry));
+ entry->msgInst = msgInst;
+ hashMap_put(mp_handle->rcv_msg_map, (void*)(uintptr_t)header->type,entry);
+ }
+ }
+ }
+ }
+
+ return mp_handle;
+
+}
+
+static void destroy_mp_handle(mp_handle_pt mp_handle){
+
+ hash_map_iterator_pt iter = hashMapIterator_create(mp_handle->rcv_msg_map);
+ while(hashMapIterator_hasNext(iter)){
+ hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+ unsigned int msgId = (unsigned int)(uintptr_t)hashMapEntry_getKey(entry);
+ msg_map_entry_pt msgEntry = hashMapEntry_getValue(entry);
+ pubsub_msg_serializer_t* msgSer = hashMap_get(mp_handle->svc_msg_db, (void*)(uintptr_t)msgId);
+
+ if(msgSer!=NULL){
+ if(!msgEntry->retain){
+ msgSer->freeMsg(msgSer->handle,msgEntry->msgInst);
+ }
+ }
+ else{
+ printf("PSA_ZMQ_TS: ERROR: Cannot find messageSerializer for msg %u, so cannot destroy it!\n",msgId);
+ }
+
+ free(msgEntry);
+ }
+ hashMapIterator_destroy(iter);
+
+ hashMap_destroy(mp_handle->rcv_msg_map,false,false);
+ free(mp_handle);
+}
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_discovery/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/pubsub_discovery/CMakeLists.txt
index f92f81c,42017e7..d034a70
--- a/pubsub/pubsub_discovery/CMakeLists.txt
+++ b/pubsub/pubsub_discovery/CMakeLists.txt
@@@ -18,24 -18,26 +18,24 @@@
find_package(CURL REQUIRED)
find_package(Jansson REQUIRED)
- add_bundle(celix_pubsub_discovery_etcd
-include_directories("${CURL_INCLUDE_DIR}")
-include_directories("${JANSSON_INCLUDE_DIR}")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-include_directories("${PROJECT_SOURCE_DIR}/etcdlib/public/include")
-include_directories("private/include")
-include_directories("public/include")
-
-add_celix_bundle(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery
++add_celix_bundle(celix_pubsub_discovery_etcd
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_discovery_etcd"
VERSION "1.0.0"
SOURCES
- private/src/psd_activator.c
- private/src/pubsub_discovery_impl.c
- private/src/etcd_common.c
- private/src/etcd_watcher.c
- private/src/etcd_writer.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_endpoint.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
+ src/psd_activator.c
+ src/pubsub_discovery_impl.c
+ src/etcd_common.c
+ src/etcd_watcher.c
+ src/etcd_writer.c
+)
+
+target_include_directories(celix_pubsub_discovery_etcd PRIVATE
+ src
+ ${CURL_INCLUDE_DIR}
+ ${JANSSON_INCLUDE_DIR}
)
-target_link_libraries(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery celix_framework celix_utils etcdlib_static ${CURL_LIBRARIES} ${JANSSON_LIBRARIES})
-install_celix_bundle(org.apache.celix.pubsub_discovery.etcd.PubsubDiscovery)
+target_link_libraries(celix_pubsub_discovery_etcd PRIVATE Celix::pubsub_spi Celix::framework Celix::etcdlib_static ${CURL_LIBRARIES} ${JANSSON_LIBRARIES})
- install_bundle(celix_pubsub_discovery_etcd)
++install_celix_bundle(celix_pubsub_discovery_etcd)
+
+add_library(Celix::pubsub_discovery_etcd ALIAS celix_pubsub_discovery_etcd)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_serializer_json/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/pubsub_serializer_json/CMakeLists.txt
index 1269cad,2aaa98a..9a486f2
--- a/pubsub/pubsub_serializer_json/CMakeLists.txt
+++ b/pubsub/pubsub_serializer_json/CMakeLists.txt
@@@ -17,24 -17,27 +17,24 @@@
find_package(Jansson REQUIRED)
-include_directories("private/include")
-include_directories("public/include")
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/dfi/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-include_directories("${JANSSON_INCLUDE_DIR}")
-
-add_celix_bundle(org.apache.celix.pubsub_serializer.PubSubSerializerJson
+
- add_bundle(celix_pubsub_serializer_json
++add_celix_bundle(celix_pubsub_serializer_json
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_serializer_json"
VERSION "1.0.0"
SOURCES
- private/src/ps_activator.c
- private/src/pubsub_serializer_impl.c
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
+ src/ps_activator.c
+ src/pubsub_serializer_impl.c
+)
+
+target_include_directories(celix_pubsub_serializer_json PRIVATE
+ src
+ ${JANSSON_INCLUDE_DIR}
)
-set_target_properties(org.apache.celix.pubsub_serializer.PubSubSerializerJson PROPERTIES INSTALL_RPATH "$ORIGIN")
-target_link_libraries(org.apache.celix.pubsub_serializer.PubSubSerializerJson celix_framework celix_utils celix_dfi ${JANSSON_LIBRARIES})
+set_target_properties(celix_pubsub_serializer_json PROPERTIES INSTALL_RPATH "$ORIGIN")
+target_link_libraries(celix_pubsub_serializer_json PRIVATE Celix::pubsub_spi Celix::framework Celix::dfi ${JANSSON_LIBRARIES} Celix::log_helper)
+
- install_bundle(celix_pubsub_serializer_json)
++install_celix_bundle(celix_pubsub_serializer_json)
-install_celix_bundle(org.apache.celix.pubsub_serializer.PubSubSerializerJson)
+add_library(Celix::pubsub_serializer_json ALIAS celix_pubsub_serializer_json)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_spi/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/pubsub_spi/CMakeLists.txt
index 118dd3a,0000000..ee9d4b6
mode 100644,000000..100644
--- a/pubsub/pubsub_spi/CMakeLists.txt
+++ b/pubsub/pubsub_spi/CMakeLists.txt
@@@ -1,35 -1,0 +1,36 @@@
+# 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_library(celix_pubsub_spi STATIC
++add_library(pubsub_spi STATIC
+ src/pubsub_admin_match.c
+ src/pubsub_endpoint.c
+ src/pubsub_utils.c
+)
- target_include_directories(celix_pubsub_spi PUBLIC
++set_target_properties(pubsub_spi PROPERTIES OUTPUT_NAME "celix_pubsub_spi")
++target_include_directories(pubsub_spi PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<INSTALL_INTERFACE:include/celix/pubsub_spi>
+)
- target_link_libraries(celix_pubsub_spi PUBLIC Celix::framework Celix::pubsub_api)
++target_link_libraries(pubsub_spi PUBLIC Celix::framework Celix::pubsub_api)
+
- set_target_properties(celix_pubsub_spi PROPERTIES TOPIC_INFO_DESCRIPTOR ${CMAKE_CURRENT_LIST_DIR}/include/pubsub_topic_info.descriptor)
++set_target_properties(pubsub_spi PROPERTIES TOPIC_INFO_DESCRIPTOR ${CMAKE_CURRENT_LIST_DIR}/include/pubsub_topic_info.descriptor)
+#TODO how to make this descriptor available for imported targets? $<INSTALL_INTERFACE:include/celix/pubsub_spi/pubsub_topic_info.descriptor>
+
- add_library(Celix::pubsub_spi ALIAS celix_pubsub_spi)
++add_library(Celix::pubsub_spi ALIAS pubsub_spi)
+
- install(TARGETS celix_pubsub_spi EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT pubsub)
++install(TARGETS pubsub_spi EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT pubsub)
+install(DIRECTORY include/ DESTINATION include/celix/pubsub_spi COMPONENT pubsub)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/pubsub_topology_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/pubsub_topology_manager/CMakeLists.txt
index 73b9ecb,a064143..181b30d
--- a/pubsub/pubsub_topology_manager/CMakeLists.txt
+++ b/pubsub/pubsub_topology_manager/CMakeLists.txt
@@@ -15,23 -15,30 +15,23 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(celix_pubsub_topology_manager
-include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/pubsub_admin/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/pubsub/api/pubsub")
-include_directories("private/include")
-include_directories("public/include")
-
-add_celix_bundle(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
++add_celix_bundle(celix_pubsub_topology_manager
BUNDLE_SYMBOLICNAME "apache_celix_pubsub_topology_manager"
VERSION "1.0.0"
SOURCES
- private/src/pstm_activator.c
- private/src/pubsub_topology_manager.c
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_endpoint.c
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/src/pubsub_utils.c
+ src/pstm_activator.c
+ src/pubsub_topology_manager.c
+ src/pubsub_topology_manager.h
)
+target_link_libraries(celix_pubsub_topology_manager PRIVATE Celix::framework Celix::log_helper Celix::pubsub_spi)
-celix_bundle_files(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager
- ${PROJECT_SOURCE_DIR}/pubsub/pubsub_common/public/include/pubsub_topic_info.descriptor
+get_target_property(DESC Celix::pubsub_spi TOPIC_INFO_DESCRIPTOR)
- bundle_files(celix_pubsub_topology_manager
++celix_bundle_files(celix_pubsub_topology_manager
+ ${DESC}
DESTINATION "META-INF/descriptors/services"
)
- install_bundle(celix_pubsub_topology_manager)
-target_link_libraries(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager celix_framework celix_utils)
-install_celix_bundle(org.apache.celix.pubsub_topology_manager.PubSubTopologyManager)
++install_celix_bundle(celix_pubsub_topology_manager)
+
+add_library(Celix::pubsub_topology_manager ALIAS celix_pubsub_topology_manager)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/pubsub/test/CMakeLists.txt
----------------------------------------------------------------------
diff --cc pubsub/test/CMakeLists.txt
index 9fd324e,41fffe0..13e7d82
--- a/pubsub/test/CMakeLists.txt
+++ b/pubsub/test/CMakeLists.txt
@@@ -20,22 -20,24 +20,22 @@@ find_program(ETCD_CMD NAMES etcd
find_package(CppUTest REQUIRED)
include_directories(${CPPUTEST_INCLUDE_DIR})
- add_bundle(pubsub_sut
-include_directories(
- ${CMAKE_SOURCE_DIR}/pubsub/api
- test
-)
-
+ add_celix_bundle(pubsub_sut
#"Vanilla" bundle which is under test
SOURCES
test/sut_activator.c
VERSION 1.0.0
)
-target_link_libraries(pubsub_sut celix_framework celix_utils)
+target_include_directories(pubsub_sut PRIVATE test)
+target_link_libraries(pubsub_sut PRIVATE Celix::pubsub_spi)
+
- bundle_files(pubsub_sut
+ celix_bundle_files(pubsub_sut
msg_descriptors/msg.descriptor
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
)
+
- add_deploy(pubsub_udpmc_sut
+ add_celix_container(pubsub_udpmc_sut
NAME deploy_sut
BUNDLES
org.apache.celix.pubsub_serializer.PubSubSerializerJson
@@@ -64,12 -66,12 +64,12 @@@ add_celix_bundle(pubsub_ts
)
if (APPLE)
#Note that the launcher celix_test_runner is linked with CppuTest, not the bundle libs. Default libCppUTest.a is not compiled for relocation
- target_link_libraries(pubsub_tst celix_framework celix_utils -Wl,-undefined -Wl,dynamic_lookup)
+ target_link_libraries(pubsub_tst PRIVATE Celix::framework -Wl,-undefined -Wl,dynamic_lookup)
else ()
- target_link_libraries(pubsub_tst celix_framework celix_utils)
+ target_link_libraries(pubsub_tst PRIVATE Celix::framework)
endif ()
- bundle_files(pubsub_tst
+ celix_bundle_files(pubsub_tst
msg_descriptors/msg.descriptor
msg_descriptors/sync.descriptor
DESTINATION "META-INF/descriptors/messages"
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/civetweb/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/civetweb/CMakeLists.txt
index a6f7d10,0000000..46b9637
mode 100644,000000..100644
--- a/remote_services/civetweb/CMakeLists.txt
+++ b/remote_services/civetweb/CMakeLists.txt
@@@ -1,26 -1,0 +1,26 @@@
+# 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_library(civetweb OBJECT
+ src/civetweb.c
+ src/md5.inl
+)
+target_include_directories(civetweb PUBLIC include)
+
+#Setup target aliases to match external usage
- add_library(Celix::civetweb ALIAS civetweb)
++add_library(Celix::civetweb ALIAS civetweb)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/discovery_common/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/discovery_common/CMakeLists.txt
index 114f485,0000000..97e9676
mode 100644,000000..100644
--- a/remote_services/discovery_common/CMakeLists.txt
+++ b/remote_services/discovery_common/CMakeLists.txt
@@@ -1,39 -1,0 +1,39 @@@
+# 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.
+
+
+find_package(LibXml2 REQUIRED)
+
+add_library(rsa_discovery_common OBJECT
+ src/discovery.c
+ src/discovery_activator.c
+ src/endpoint_descriptor_reader.c
+ src/endpoint_descriptor_writer.c
+ src/endpoint_discovery_poller.c
+ src/endpoint_discovery_server.c
+)
+target_include_directories(rsa_discovery_common PUBLIC
+ include src
+ $<TARGET_PROPERTY:Celix::framework,INTERFACE_INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:Celix::utils,INTERFACE_INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:Celix::log_helper,INTERFACE_INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:Celix::rsa_spi,INTERFACE_INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:civetweb,INCLUDE_DIRECTORIES>
+ ${LIBXML2_INCLUDE_DIR})
+
+#Setup target aliases to match external usage
- add_library(Celix::rsa_discovery_common ALIAS rsa_discovery_common)
++add_library(Celix::rsa_discovery_common ALIAS rsa_discovery_common)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/discovery_configured/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/discovery_configured/CMakeLists.txt
index 83b18c7,c3180ad..fe658ca
--- a/remote_services/discovery_configured/CMakeLists.txt
+++ b/remote_services/discovery_configured/CMakeLists.txt
@@@ -19,24 -19,54 +19,24 @@@ if (RSA_DISCOVERY_CONFIGURED
find_package(CURL REQUIRED)
find_package(LibXml2 REQUIRED)
- add_bundle(rsa_discovery_configured
- include_directories("${CURL_INCLUDE_DIR}")
- include_directories("${LIBXML2_INCLUDE_DIR}")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/private/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery/private/include")
- 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)
-
- add_celix_bundle(discovery_configured
- VERSION 0.9.0
- SYMBOLIC_NAME "apache_celix_rsa_discovery_configured"
- NAME "Apache Celix RSA Configured Discovery"
- SOURCES
-
- private/src/discovery_impl.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery_activator.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_reader.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_writer.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_discovery_poller.c
- ${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
++ add_celix_bundle(rsa_discovery_configured
+ VERSION 0.9.0
+ SYMBOLIC_NAME "apache_celix_rsa_discovery_configured"
+ NAME "Apache Celix RSA Configured Discovery"
+ SOURCES
+ src/discovery_impl.c
+ $<TARGET_OBJECTS:Celix::rsa_discovery_common>
+ $<TARGET_OBJECTS:Celix::civetweb>
)
+ target_include_directories(rsa_discovery_configured PRIVATE
+ src
+ $<TARGET_PROPERTY:Celix::rsa_discovery_common,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:Celix::civetweb,INCLUDE_DIRECTORIES>
+ )
+ target_link_libraries(rsa_discovery_configured PRIVATE ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} Celix::log_helper Celix::rsa_common)
- install_bundle(rsa_discovery_configured)
- install_celix_bundle(discovery_configured)
-
- target_link_libraries(discovery_configured celix_framework ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES})
-
- if (RSA_ENDPOINT_TEST_READER)
- add_executable(descparser
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_reader.c
- ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/endpoint_description.c)
-
- target_link_libraries(descparser ${LIBXML2_LIBRARIES} celix_framework celix_utils)
- endif (RSA_ENDPOINT_TEST_READER)
-
- if (RSA_ENDPOINT_TEST_WRITER)
- add_executable(descwriter
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_writer.c
- ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/endpoint_description.c)
++ install_celix_bundle(rsa_discovery_configured)
- target_link_libraries(descwriter ${LIBXML2_LIBRARIES} celix_framework celix_utils)
- endif(RSA_ENDPOINT_TEST_WRITER)
+ #Setup target aliases to match external usage
+ add_library(Celix::rsa_discovery_configured ALIAS rsa_discovery_configured)
endif (RSA_DISCOVERY_CONFIGURED)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/discovery_etcd/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/discovery_etcd/CMakeLists.txt
index fe88532,ce25d22..776ad93
--- a/remote_services/discovery_etcd/CMakeLists.txt
+++ b/remote_services/discovery_etcd/CMakeLists.txt
@@@ -20,30 -20,42 +20,30 @@@ if (RSA_DISCOVERY_ETCD
find_package(CURL REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(Jansson REQUIRED)
-
- include_directories("${CURL_INCLUDE_DIR}")
- include_directories("${JANSSON_INCLUDE_DIR}")
- include_directories("${LIBXML2_INCLUDE_DIR}")
- include_directories("${PROJECT_SOURCE_DIR}/etcdlib/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/private/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery/private/include")
- 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")
- add_bundle(rsa_discovery_etcd
- add_celix_bundle(discovery_etcd
++ add_celix_bundle(rsa_discovery_etcd
VERSION 0.9.0
SYMBOLIC_NAME "apache_celix_rsa_discovery_etcd"
NAME "Apache Celix RSA Discovery ETCD"
SOURCES
- private/src/discovery_impl.c
- private/src/etcd_watcher.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery_activator.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_reader.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_writer.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_discovery_poller.c
- ${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
+ src/discovery_impl.c
+ src/etcd_watcher.c
+ $<TARGET_OBJECTS:Celix::rsa_discovery_common>
+ $<TARGET_OBJECTS:Celix::civetweb>
)
+ target_link_libraries(rsa_discovery_etcd PRIVATE Celix::log_helper Celix::etcdlib_static Celix::rsa_common)
+ target_include_directories(rsa_discovery_etcd PRIVATE src)
+ target_include_directories(rsa_discovery_etcd PRIVATE
+ $<TARGET_PROPERTY:Celix::rsa_discovery_common,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:Celix::civetweb,INCLUDE_DIRECTORIES>
+ ${CURL_INCLUDE_DIR}
+ ${JANSSON_INCLUDE_DIR}
+ ${LIBXML2_INCLUDE_DIR}
+ )
+ target_link_libraries(rsa_discovery_etcd PRIVATE ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} ${JANSSON_LIBRARIES})
- install_bundle(rsa_discovery_etcd)
- install_celix_bundle(discovery_etcd)
-
- target_link_libraries(discovery_etcd celix_framework etcdlib ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} ${JANSSON_LIBRARIES})
++ install_celix_bundle(rsa_discovery_etcd)
+ #Setup target aliases to match external usage
+ add_library(Celix::rsa_discovery_etcd ALIAS rsa_discovery_etcd)
endif (RSA_DISCOVERY_ETCD)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/discovery_shm/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/discovery_shm/CMakeLists.txt
index fd822e6,3eec195..5557ae9
--- a/remote_services/discovery_shm/CMakeLists.txt
+++ b/remote_services/discovery_shm/CMakeLists.txt
@@@ -19,30 -19,40 +19,30 @@@ celix_subproject(RSA_DISCOVERY_SHM "Opt
if (RSA_DISCOVERY_SHM)
find_package(CURL REQUIRED)
find_package(LibXml2 REQUIRED)
-
- include_directories("${CURL_INCLUDE_DIR}")
- include_directories("${LIBXML2_INCLUDE_DIR}")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/private/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery/private/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/discovery_shm/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")
- add_bundle(rsa_discovery_shm
- add_celix_bundle(discovery_shm
++ add_celix_bundle(rsa_discovery_shm
VERSION 0.0.1
SYMBOLIC_NAME "apache_celix_rsa_discovery_shm"
NAME "Apache Celix RSA Discovery SHM"
SOURCES
- private/src/discovery_shm
- private/src/discovery_shmWatcher
- private/src/discovery_impl
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery_activator.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_reader.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_descriptor_writer.c
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/endpoint_discovery_poller.c
- ${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
+ src/discovery_shm.c
+ src/discovery_shmWatcher.c
+ src/discovery_impl.c
+ $<TARGET_OBJECTS:Celix::rsa_discovery_common>
+ $<TARGET_OBJECTS:Celix::civetweb>
)
+ target_include_directories(rsa_discovery_shm PRIVATE
+ src
+ ${LIBXML2_INCLUDE_DIR}
+ ${CURL_INCLUDE_DIR}
+ $<TARGET_PROPERTY:Celix::rsa_discovery_common,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:Celix::civetweb,INCLUDE_DIRECTORIES>
+ )
+ target_link_libraries(rsa_discovery_shm PRIVATE Celix::framework ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES})
+
- install_bundle(rsa_discovery_shm)
++ install_celix_bundle(rsa_discovery_shm)
- install_celix_bundle(discovery_shm)
-
- target_link_libraries(discovery_shm celix_framework ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES})
+ #Setup target aliases to match external usage
+ add_library(Celix::rsa_discovery_shm ALIAS rsa_discovery_shm)
endif (RSA_DISCOVERY_SHM)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/examples/CMakeLists.txt
index 78bfbac,8916a18..0f8e7a9
--- a/remote_services/examples/CMakeLists.txt
+++ b/remote_services/examples/CMakeLists.txt
@@@ -17,44 -17,98 +17,44 @@@
celix_subproject(RSA_EXAMPLES "Option to enable building the RSA examples" ON DEPS LAUNCHER shell_tui log_writer RSA_TOPOLOGY_MANAGER)
if (RSA_EXAMPLES)
+ add_subdirectory(calculator_api)
add_subdirectory(calculator_service)
-
- add_subdirectory(calculator_endpoint)
- add_subdirectory(calculator_endpoint2)
-
- add_subdirectory(calculator_proxy)
- add_subdirectory(calculator_proxy2)
-
add_subdirectory(calculator_shell)
- if(BUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP AND BUILD_RSA_DISCOVERY_CONFIGURED)
- add_celix_container(remote-services-cfg-server
- NAME "server"
- GROUP "remote-services/remote-services-cfg"
- BUNDLES discovery_configured topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
- PROPERTIES
- RSA_PORT=8001
- DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8082/org.apache.celix.discovery.configured
- DISCOVERY_CFG_SERVER_PORT=8081
- )
- celix_container_bundles_dir(remote-services-cfg-server DIR_NAME "endpoints" BUNDLES
- org.apache.celix.calc.api.Calculator_endpoint
- org.apache.celix.calc.api.Calculator2_endpoint
- )
-
- add_celix_container(remote-services-cfg-client
- NAME "client"
- GROUP "remote-services/remote-services-cfg"
- BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_configured
- PROPERTIES
- RSA_PORT=8002
- DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8081/org.apache.celix.discovery.configured
- DISCOVERY_CFG_SERVER_PORT=8082
- )
- celix_container_bundles_dir(remote-services-cfg-client DIR_NAME "endpoints"
- BUNDLES org.apache.celix.calc.api.Calculator_proxy org.apache.celix.calc.api.Calculator2_proxy
- )
- endif()
-
- if (BUILD_RSA_REMOTE_SERVICE_ADMIN_SHM AND BUILD_RSA_DISCOVERY_SHM)
- add_celix_container(remote-services-shm
- NAME "server"
- GROUP "remote-services/remote-services-shm"
- BUNDLES discovery_shm topology_manager remote_service_admin_shm calculator shell shell_tui log_service log_writer
- )
- celix_container_bundles_dir(remote-services-shm DIR_NAME "endpoints"
- BUNDLES org.apache.celix.calc.api.Calculator_endpoint
- )
-
- add_celix_container(remote-services-shm-client
- NAME "client"
- GROUP "remote-services/remote-services-shm"
- BUNDLES topology_manager remote_service_admin_shm shell shell_tui log_service log_writer calculator_shell discovery_shm
- )
- celix_container_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
- BUNDLES org.apache.celix.calc.api.Calculator_proxy
- )
- endif ()
- if (BUILD_RSA_DISCOVERY_ETCD AND BUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP)
- add_celix_container(remote-services-etcd
- NAME "server"
- GROUP "remote-services/remote-services-etcd"
- BUNDLES discovery_etcd topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
- )
- celix_container_bundles_dir(remote-services-etcd DIR_NAME "endpoints"
- BUNDLES
- org.apache.celix.calc.api.Calculator_endpoint
- org.apache.celix.calc.api.Calculator2_endpoint
- )
+# TODO refactor shm remote service admin to use dfi
+# if (BUILD_RSA_REMOTE_SERVICE_ADMIN_SHM AND BUILD_RSA_DISCOVERY_SHM)
- # add_deploy(remote-services-shm
++# add_celix_container(remote-services-shm
+# NAME "server"
+# GROUP "remote-services/remote-services-shm"
+# BUNDLES discovery_shm topology_manager remote_service_admin_shm calculator shell shell_tui log_service log_writer
+# )
- # deploy_bundles_dir(remote-services-shm DIR_NAME "endpoints"
++# celix_container_bundles_dir(remote-services-shm DIR_NAME "endpoints"
+# BUNDLES org.apache.celix.calc.api.Calculator_endpoint
+# )
+#
- # add_deploy(remote-services-shm-client
++# add_celix_container(remote-services-shm-client
+# NAME "client"
+# GROUP "remote-services/remote-services-shm"
+# BUNDLES topology_manager remote_service_admin_shm shell shell_tui log_service log_writer calculator_shell discovery_shm
+# )
- # deploy_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
++# celix_container_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
+# BUNDLES org.apache.celix.calc.api.Calculator_proxy
+# )
+# endif ()
- add_celix_container("remote-services-etcd-client"
- NAME "client"
- GROUP "remote-services/remote-services-etcd"
- BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_etcd
- )
- celix_container_bundles_dir(remote-services-etcd-client DIR_NAME "endpoints"
- BUNDLES org.apache.celix.calc.api.Calculator_proxy
- )
- endif ()
if (BUILD_RSA_DISCOVERY_ETCD AND BUILD_RSA_REMOTE_SERVICE_ADMIN_DFI)
- add_deploy(remote-services-dfi
+ add_celix_container(remote-services-dfi
NAME "server"
GROUP "remote-services/remote-services-dfi"
- BUNDLES discovery_etcd topology_manager remote_service_admin_dfi calculator shell shell_tui log_service log_writer
+ BUNDLES Celix::rsa_discovery_etcd Celix::rsa_topology_manager Celix::rsa_dfi calculator Celix::shell Celix::shell_tui Celix::log_service Celix::log_writer_stdout
)
- add_deploy("remote-services-dfi-client"
+ add_celix_container("remote-services-dfi-client"
NAME "client"
GROUP "remote-services/remote-services-dfi"
- BUNDLES topology_manager remote_service_admin_dfi shell shell_tui log_service log_writer calculator_shell discovery_etcd
+ BUNDLES Celix::rsa_topology_manager Celix::rsa_dfi Celix::shell Celix::shell_tui Celix::log_service Celix::log_writer_stdout calculator_shell Celix::rsa_discovery_etcd
)
endif ()
endif (RSA_EXAMPLES)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/examples/calculator_service/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/examples/calculator_service/CMakeLists.txt
index 167e705,32cbea2..e3e739a
--- a/remote_services/examples/calculator_service/CMakeLists.txt
+++ b/remote_services/examples/calculator_service/CMakeLists.txt
@@@ -15,15 -15,23 +15,15 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(calculator
-include_directories("../../../utils/public/include")
-include_directories("../../utils/public/include")
-include_directories("../../remote_service_admin/public/include")
-include_directories("private/include")
-include_directories("public/include")
-
-add_celix_bundle(calculator SOURCES
- private/src/calculator_impl
- private/src/calculator_activator
-
- private/include/calculator_impl.h
-
++add_celix_bundle(calculator
+ SOURCES
+ src/calculator_impl
+ src/calculator_activator
SYMBOLIC_NAME "apache_celix_remoting_calculator_impl"
VERSION 0.0.1
)
+target_include_directories(calculator PRIVATE src)
+target_link_libraries(calculator PRIVATE Celix::rsa_spi calculator_api)
-celix_bundle_files(calculator public/include/org.apache.celix.calc.api.Calculator2.descriptor
- DESTINATION .)
-
-target_link_libraries(calculator celix_framework)
+get_target_property(DESCR calculator_api INTERFACE_CALCULATOR_DESCRIPTOR)
- bundle_files(calculator ${DESCR} DESTINATION .)
++celix_bundle_files(calculator ${DESCR} DESTINATION .)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/examples/calculator_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/examples/calculator_shell/CMakeLists.txt
index 78c0737,2a49b3b..1eef035
--- a/remote_services/examples/calculator_shell/CMakeLists.txt
+++ b/remote_services/examples/calculator_shell/CMakeLists.txt
@@@ -15,21 -15,28 +15,21 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(calculator_shell
-include_directories("private/include")
-include_directories("../../../utils/public/include")
-include_directories("../calculator_service/public/include")
-include_directories("../../../shell/public/include")
-
-add_celix_bundle(calculator_shell SOURCES
- private/src/add_command
- private/src/sub_command
- private/src/sqrt_command
- private/src/calculator_shell_activator
-
- private/include/add_command.h
- private/include/sqrt_command.h
- private/include/sub_command.h
-
++add_celix_bundle(calculator_shell
+ SOURCES
+ src/add_command
+ src/sub_command
+ src/sqrt_command
+ src/calculator_shell_activator
VERSION 0.0.1
SYMBOLIC_NAME "apache_celix_remoting_calculator_shell"
)
+target_include_directories(calculator_shell PRIVATE src)
+target_link_libraries(calculator_shell PRIVATE Celix::shell_api calculator_api)
- bundle_files(calculator_shell
+ celix_bundle_files(calculator_shell
- ../calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
- #private/include/org.apache.celix.calc.api.Calculator2.descriptor ##Use this descriptor in case you want to try out versioning!
+ ../calculator_api/include/org.apache.celix.calc.api.Calculator2.descriptor
+ #src/org.apache.celix.calc.api.Calculator2.descriptor ##Use this descriptor in case you want to try out versioning!
DESTINATION .
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/remote_service_admin_dfi/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/remote_service_admin_dfi/CMakeLists.txt
index ea79c31,4b28231..349c3ef
--- a/remote_services/remote_service_admin_dfi/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/CMakeLists.txt
@@@ -23,31 -23,21 +23,31 @@@ if (RSA_REMOTE_SERVICE_ADMIN_DFI
find_package(CURL REQUIRED)
find_package(Jansson REQUIRED)
- add_bundle(rsa_dfi
- include_directories(
- ${CURL_INCLUDE_DIRS}
- ${JANSSON_INCLUDE_DIRS}
++ add_celix_bundle(rsa_dfi
+ VERSION 0.9.0
+ SYMBOLIC_NAME "apache_celix_remote_service_admin_dfi"
+ NAME "Apache Celix Remote Service Admin Dynamic Function Interface (DFI)"
+ SOURCES
+ src/remote_service_admin_dfi.c
+ src/remote_service_admin_activator.c
+ src/export_registration_dfi.c
+ src/import_registration_dfi.c
+ src/dfi_utils.c
+ $<TARGET_OBJECTS:Celix::civetweb>
)
+ target_include_directories(rsa_dfi PRIVATE src $<TARGET_PROPERTY:Celix::civetweb,INCLUDE_DIRECTORIES>)
+ target_link_libraries(rsa_dfi PRIVATE
+ Celix::dfi_static
+ Celix::log_helper
+ Celix::rsa_common
+ ${CURL_LIBRARIES} ${JANSSON_LIBRARIES})
- install_bundle(rsa_dfi)
- if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
- include_directories(dynamic_function_interface/memstream)
- endif()
-
- add_subdirectory(rsa)
++ install_celix_bundle(rsa_dfi)
if (ENABLE_TESTING)
- find_package(CppUTest REQUIRED)
- include_directories(${CPPUTEST_INCLUDE_DIR})
- add_subdirectory(rsa_tst)
+ add_subdirectory(test)
endif()
+ #Setup target aliases to match external usage
+ add_library(Celix::rsa_dfi ALIAS rsa_dfi)
endif()
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/remote_service_admin_dfi/test/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/remote_service_admin_dfi/test/CMakeLists.txt
index 153b3d1,0000000..aa10ec3
mode 100644,000000..100644
--- a/remote_services/remote_service_admin_dfi/test/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/test/CMakeLists.txt
@@@ -1,60 -1,0 +1,60 @@@
+# 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.
+
+find_package(CppUTest REQUIRED)
+include_directories(${CPPUTEST_INCLUDE_DIR})
+
- add_bundle(rsa_dfi_tst_bundle
++add_celix_bundle(rsa_dfi_tst_bundle
+ VERSION 0.0.1
+ SOURCES
+ src/tst_activator.c
+)
+get_target_property(DESCR calculator_api INTERFACE_CALCULATOR_DESCRIPTOR)
- bundle_files(rsa_dfi_tst_bundle ${DESCR} DESTINATION .)
++celix_bundle_files(rsa_dfi_tst_bundle ${DESCR} DESTINATION .)
+target_link_libraries(rsa_dfi_tst_bundle PRIVATE ${CPPUTEST_LIBRARY} calculator_api)
+target_include_directories(rsa_dfi_tst_bundle PRIVATE src)
+
+add_executable(test_rsa_dfi
+ src/run_tests.cpp
+ src/rsa_tests.cpp
+ src/rsa_client_server_tests.cpp
+)
+target_include_directories(test_rsa_dfi PRIVATE src)
+target_link_libraries(test_rsa_dfi PRIVATE ${CURL_LIBRARIES} ${CPPUTEST_LIBRARY}
+ Celix::framework
+ Celix::rsa_common
+ calculator_api)
+
+get_property(rsa_bundle_file TARGET rsa_dfi PROPERTY BUNDLE_FILE)
+get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE_FILE)
+get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE_FILE)
+get_property(discovery_configured_bundle_file TARGET rsa_discovery_configured PROPERTY BUNDLE_FILE)
+get_property(topology_manager_bundle_file TARGET Celix::rsa_topology_manager PROPERTY BUNDLE_FILE)
+get_property(tst_bundle_file TARGET rsa_dfi_tst_bundle PROPERTY BUNDLE_FILE)
+
+configure_file(config.properties.in config.properties)
+configure_file(client.properties.in client.properties)
+configure_file(server.properties.in server.properties)
+
+add_dependencies(test_rsa_dfi
+ rsa_dfi_bundle #note depend on the target creating the bundle zip not the lib target
+ calculator_bundle
+)
+
+add_test(NAME run_test_rsa_dfi COMMAND test_rsa_dfi)
+SETUP_TARGET_FOR_COVERAGE(test_rsa_dfi_cov test_rsa_dfi ${CMAKE_BINARY_DIR}/coverage/test_rsa_dfi/test_rsa_dfi)
+
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/remote_services_api/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/remote_services_api/CMakeLists.txt
index 67656d3,0000000..71f3306
mode 100644,000000..100644
--- a/remote_services/remote_services_api/CMakeLists.txt
+++ b/remote_services/remote_services_api/CMakeLists.txt
@@@ -1,28 -1,0 +1,28 @@@
+# 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_library(celix_remote_services_api INTERFACE)
- target_include_directories(celix_remote_services_api INTERFACE
++add_library(remote_services_api INTERFACE)
++target_include_directories(remote_services_api INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<INSTALL_INTERFACE:include/celix/remote_services>
+)
+
- install(TARGETS celix_remote_services_api EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rsa)
++install(TARGETS remote_services_api EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rsa)
+install(DIRECTORY include/ DESTINATION include/celix/remote_services COMPONENT rsa)
+
+#Setup target aliases to match external usage
- add_library(Celix::remote_services_api ALIAS celix_remote_services_api)
++add_library(Celix::remote_services_api ALIAS remote_services_api)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/rsa_common/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/rsa_common/CMakeLists.txt
index 27c2dba,0000000..397fa8c
mode 100644,000000..100644
--- a/remote_services/rsa_common/CMakeLists.txt
+++ b/remote_services/rsa_common/CMakeLists.txt
@@@ -1,29 -1,0 +1,30 @@@
+# 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_library(celix_rsa_common STATIC
++add_library(rsa_common STATIC
+ src/endpoint_description.c
+ src/export_registration_impl.c
+ src/import_registration_impl.c
+)
- target_include_directories(celix_rsa_common PRIVATE src)
- target_link_libraries(celix_rsa_common PUBLIC Celix::framework Celix::rsa_spi Celix::log_helper)
++set_target_properties(rsa_common PROPERTIES OUTPUT_NAME "celix_rsa_common")
++target_include_directories(rsa_common PRIVATE src)
++target_link_libraries(rsa_common PUBLIC Celix::framework Celix::rsa_spi Celix::log_helper)
+
- install(TARGETS celix_rsa_common EXPORT celix COMPONENT rsa DESTINATION ${CMAKE_INSTALL_LIBDIR})
++#install(TARGETS rsa_common EXPORT celix COMPONENT rsa DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+#Setup target aliases to match external usage
- add_library(Celix::rsa_common ALIAS celix_rsa_common)
++add_library(Celix::rsa_common ALIAS rsa_common)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/topology_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/topology_manager/CMakeLists.txt
index 6050229,69d14ed..763067d
--- a/remote_services/topology_manager/CMakeLists.txt
+++ b/remote_services/topology_manager/CMakeLists.txt
@@@ -16,21 -16,30 +16,21 @@@
# under the License.
celix_subproject(RSA_TOPOLOGY_MANAGER "Option to enable building the Remote Service Admin Service SHM bundle" ON DEPS REMOTE_SERVICE_ADMIN_DFI)
if (RSA_TOPOLOGY_MANAGER)
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/remote_services/topology_manager/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("${PROJECT_SOURCE_DIR}/remote_services/topology_manager/public/include")
- add_bundle(rsa_topology_manager
- add_celix_bundle(topology_manager SOURCES
- private/src/topology_manager
- private/src/scope
- private/src/activator
-
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
-
- private/include/topology_manager.h
- public/include/tm_scope.h
++ add_celix_bundle(rsa_topology_manager
+ SOURCES
+ src/topology_manager
+ src/scope
+ src/activator
VERSION 0.9.0
SYMBOLIC_NAME "apache_celix_rs_topology_manager"
- NAME
- "Apache Celix RS Topology Manager"
+ NAME "Apache Celix RS Topology Manager"
)
+ target_include_directories(rsa_topology_manager PRIVATE src)
+ target_include_directories(rsa_topology_manager PUBLIC include)
+ target_link_libraries(rsa_topology_manager PRIVATE Celix::log_helper Celix::rsa_spi)
- install_bundle(rsa_topology_manager)
- install_celix_bundle(topology_manager)
++ install_celix_bundle(rsa_topology_manager)
if (ENABLE_TESTING)
find_package(CppUTest REQUIRED)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
index dc5dea5,6cf53fb..c9a9d62
--- a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
@@@ -27,7 -27,7 +27,7 @@@ add_celix_bundle(topology_manager_test_
SOURCES
tst_activator.c
)
- bundle_files(topology_manager_test_bundle
-celix_bundle_files(topology_manager_test_bundle
++celix_celix_bundle_files(topology_manager_test_bundle
org.apache.celix.test.MyBundle.descriptor
DESTINATION .
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
index 3e93174,cb88a21..6b8ae43
--- a/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
@@@ -15,7 -15,15 +15,7 @@@
# specific language governing permissions and limitations
# under the License.
- add_bundle(topology_manager_disc_mock_bundle
-include_directories(
- ${CPPUTEST_INCLUDE_DIR}
- ${PROJECT_SOURCE_DIR}/framework/public/include
- ${PROJECT_SOURCE_DIR}/utils/public/include
- ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/include
-)
-
-
+ add_celix_bundle(topology_manager_disc_mock_bundle
VERSION 0.0.1
SOURCES
disc_mock_activator.c
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/remote_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_shell/CMakeLists.txt
index a7f5d36,aac0366..cd9ed98
--- a/remote_shell/CMakeLists.txt
+++ b/remote_shell/CMakeLists.txt
@@@ -22,23 -22,25 +22,23 @@@ if (REMOTE_SHELL
VERSION "0.0.2"
NAME: "Apache Celix Remote Shell"
SOURCES
- private/src/activator
- private/src/connection_listener
- private/src/shell_mediator
- private/src/remote_shell
-
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
-
- private/include/remote_shell.h
- private/include/connection_listener.h
+ src/activator
+ src/connection_listener
+ src/shell_mediator
+ src/remote_shell
)
-
+
+ target_include_directories(remote_shell PRIVATE src)
+ target_link_libraries(remote_shell PRIVATE log_helper)
- install_bundle(remote_shell)
+ install_celix_bundle(remote_shell)
-
- include_directories("private/include")
+
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/shell/public/include")
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
- target_link_libraries(remote_shell celix_framework)
+ target_link_libraries(remote_shell PRIVATE Celix::shell_api)
+
+ #Alias setup to match external usage
+ add_library(Celix::remote_shell ALIAS remote_shell)
- add_deploy("remote_shell_deploy" NAME "remote_shell" BUNDLES Celix::shell Celix::remote_shell Celix::shell_tui log_service)
- add_celix_container("remote_shell_deploy" NAME "remote_shell" BUNDLES shell remote_shell shell_tui log_service)
++ add_celix_container("remote_shell_deploy" NAME "remote_shell" BUNDLES Celix::shell Celix::remote_shell Celix::shell_tui log_service)
endif (REMOTE_SHELL)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/shell/CMakeLists.txt
----------------------------------------------------------------------
diff --cc shell/CMakeLists.txt
index b8aaac3,a2bf88e..93c066f
--- a/shell/CMakeLists.txt
+++ b/shell/CMakeLists.txt
@@@ -18,35 -18,38 +18,35 @@@ celix_subproject(SHELL "Option to enabl
if (SHELL)
find_package(CURL REQUIRED)
+ add_library(shell_api INTERFACE)
+ target_include_directories(shell_api INTERFACE include)
+
- add_bundle(shell
+ add_celix_bundle(shell
SYMBOLIC_NAME "apache_celix_shell"
VERSION "2.1.0"
NAME "Apache Celix Shell"
-
SOURCES
+ src/activator
+ src/shell
+ src/lb_command
+ src/start_command
+ src/stop_command
+ src/install_command
+ src/update_command
+ src/uninstall_command
+ src/log_command
+ src/inspect_command
+ src/help_command
+ )
+ target_include_directories(shell PRIVATE src ${CURL_INCLUDE_DIRS})
+ target_link_libraries(shell PRIVATE Celix::shell_api ${CURL_LIBRARIES} Celix::log_service_api Celix::log_helper)
- install_bundle(shell
- private/src/activator
- private/src/shell
- private/src/lb_command
- private/src/start_command
- private/src/stop_command
- private/src/install_command
- private/src/update_command
- private/src/uninstall_command
- private/src/log_command
- private/src/inspect_command
- private/src/help_command
-
- ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
-
- )
-
- install_celix_bundle(shell
++ install_celix_bundle(shell
HEADERS
- public/include/shell.h public/include/command.h public/include/shell_constants.h
- )
+ include/shell.h include/command.h include/shell_constants.h
+ )
- include_directories("public/include")
- include_directories("private/include")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
- include_directories(${CURL_INCLUDE_DIRS})
- target_link_libraries(shell celix_framework ${CURL_LIBRARIES})
+ #Setup target aliases to match external usage
+ add_library(Celix::shell_api ALIAS shell_api)
+ add_library(Celix::shell ALIAS shell)
endif (SHELL)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/shell/README.md
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/shell_bonjour/CMakeLists.txt
----------------------------------------------------------------------
diff --cc shell_bonjour/CMakeLists.txt
index 2276f09,e12d250..034a4f3
--- a/shell_bonjour/CMakeLists.txt
+++ b/shell_bonjour/CMakeLists.txt
@@@ -26,24 -26,28 +26,24 @@@ if (SHELL_BONJOUR
set(BUNDLE_VERSION "0.1.0")
set(BUNDLE_NAME "bonjour_shell")
- add_bundle(bonjour_shell
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/shell/public/include")
- include_directories("${LIBXML2_INCLUDE_DIR}")
- include_directories("private/include")
-
- set(MEMSTREAM_SOURCES )
- if (APPLE OR ANDROID)
- set(MEMSTREAM_SOURCES ${PROJECT_SOURCE_DIR}/utils/private/src/memstream/open_memstream.c ${PROJECT_SOURCE_DIR}/utils/private/src/memstream/fmemopen.c)
- include_directories(${PROJECT_SOURCE_DIR}/utils/public/include/memstream)
- endif()
+ add_celix_bundle(bonjour_shell
- VERSION "1.0.0"
+ VERSION "1.0.0"
SOURCES
private/src/activator.c
private/src/bonjour_shell.c
- ${MEMSTREAM_SOURCES}
)
-
- target_link_libraries(bonjour_shell celix_framework celix_utils ${LIBXML2_LIBRARIES} ${DNS_SD_LIB})
+ add_library(Celix::bonjour_shell ALIAS bonjour_shell)
+
+
+ target_include_directories(bonjour_shell PRIVATE
+ "${PROJECT_SOURCE_DIR}/utils/public/include"
+ "${LIBXML2_INCLUDE_DIR}"
+ private/include
+ )
+ target_link_libraries(bonjour_shell PRIVATE ${LIBXML2_LIBRARIES} ${DNS_SD_LIB} Celix::shell_api)
- add_deploy("bonjour_shell_deploy" BUNDLES
+ add_celix_container("bonjour_shell_deploy" BUNDLES
- shell
+ Celix::shell
bonjour_shell
PROPERTIES "bonjour.shell.id=Apache Celix"
)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/shell_tui/CMakeLists.txt
----------------------------------------------------------------------
diff --cc shell_tui/CMakeLists.txt
index bd6b316,35153fe..acfe439
--- a/shell_tui/CMakeLists.txt
+++ b/shell_tui/CMakeLists.txt
@@@ -27,14 -27,10 +27,14 @@@ if (SHELL_TUI
private/src/history
)
+ target_include_directories(shell_tui PRIVATE
+ "${PROJECT_SOURCE_DIR}/utils/public/include"
+ private/include
+ )
+ target_link_libraries(shell_tui PRIVATE Celix::shell_api)
+
- install_bundle(shell_tui)
+ install_celix_bundle(shell_tui)
-
- include_directories("private/include")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/shell/public/include")
- target_link_libraries(shell_tui celix_framework)
+
+ #Alias setup to match external usage
+ add_library(Celix::shell_tui ALIAS shell_tui)
endif (SHELL_TUI)
http://git-wip-us.apache.org/repos/asf/celix/blob/0ea8de64/shell_tui/README.md
----------------------------------------------------------------------
[07/11] celix git commit: CELIX-412: Updates building and getting
started documentation
Posted by pn...@apache.org.
CELIX-412: Updates building and getting started documentation
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/34ed6ba3
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/34ed6ba3
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/34ed6ba3
Branch: refs/heads/feature/CELIX-417-cmake-refactor
Commit: 34ed6ba364539f9ba320e16ea22408935617c232
Parents: 5f0bc1c
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Jan 24 12:58:17 2018 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Jan 24 12:58:17 2018 +0100
----------------------------------------------------------------------
documents/building/readme.md | 14 +--
.../getting_started/creating_a_simple_bundle.md | 100 +++++++++--------
.../getting_started/getting_started_img3.png | Bin 127686 -> 0 bytes
documents/getting_started/readme.md | 5 +-
.../getting_started/using_services_with_c.md | 108 +++++++++----------
5 files changed, 114 insertions(+), 113 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/34ed6ba3/documents/building/readme.md
----------------------------------------------------------------------
diff --git a/documents/building/readme.md b/documents/building/readme.md
index e624d26..79f1a64 100644
--- a/documents/building/readme.md
+++ b/documents/building/readme.md
@@ -48,7 +48,6 @@ For debian based systems (apt), the following command should work:
```bash
sudo apt-get install -yq --no-install-recommends \
build-essential \
- ninja \
curl \
git \
libjansson-dev \
@@ -64,7 +63,6 @@ For Fedora based systems (dnf), the following command should work:
sudo dnf group install -y "C Development Tools and Libraries"
sudo dnf install \
cmake \
- ninja-build \
make \
git \
java \
@@ -96,8 +94,7 @@ git clone --single-branch --branch master https://github.com/apache/celix.git
```
## Building Apache Celix
-Apache Celix uses [CMake](https://cmake.org) as build system. CMake can generate (among others) makefiles or ninja build files.
-using ninja build files will result in a faster build.
+Apache Celix uses [CMake](https://cmake.org) as build system. CMake can generate (among others) makefiles.
### Building using CMake and makefiles:
```bash
@@ -108,15 +105,6 @@ cmake ..
make
```
-### Building using CMake and Ninja
-```bash
-cd ${WS}/celix
-mkdir build
-cd build
-cmake -G Ninja ..
-ninja
-```
-
## Editing Build options
With use of CMake, Apache Celix makes it possible to edit build options. This enabled users, among other options, to configure a install location and select additional bundles.
To edit the options use ccmake or cmake-gui. For cmake-gui an additional package install can be necessary (Fedora: `dnf install cmake-gui`).
http://git-wip-us.apache.org/repos/asf/celix/blob/34ed6ba3/documents/getting_started/creating_a_simple_bundle.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/creating_a_simple_bundle.md b/documents/getting_started/creating_a_simple_bundle.md
index e580477..8f10869 100644
--- a/documents/getting_started/creating_a_simple_bundle.md
+++ b/documents/getting_started/creating_a_simple_bundle.md
@@ -68,8 +68,8 @@ find_package(CELIX REQUIRED)
include_directories(${CELIX_INCLUDE_DIRS})
#Part 4. Choose C, C++ or both
-add_subdirectory(bundles/hello_world) #C
-add_subdirectory(bundles/HelloWorld) #C++
+add_subdirectory(bundles/HelloWorld_c) #C
+add_subdirectory(bundles/HelloWorld_cxx) #C++
```
This CMakeLists.txt file, sets up the following:
@@ -94,49 +94,46 @@ Create the sub directory:
```CMake
#Create directory structure for the hello_world bundles
cd ${WS}/myproject
-mkdir -p bundles/hello_world/private/src
-mkdir -p bundles/HelloWorld/private/src
-mkdir -p bundles/HelloWorld/private/include
+mkdir -p bundles/HelloWorld_c/src
+mkdir -p bundles/HelloWorld_cxx/src
+mkdir -p bundles/HelloWorld_cxx/include
```
And add the following CMakeLists.txt file for the C Bundle:
```CMake
-#${WS}/myproject/bundles/hello_world/CMakeLists.txt
+#${WS}/myproject/bundles/HelloWorld_c/CMakeLists.txt
-add_celix_bundle(hello_world
+add_celix_bundle(HelloWorld_c
VERSION 1.0.0
SOURCES
- private/src/hello_world_activator.c
+ src/HelloWorld_activator.c
)
if(APPLE)
- target_link_libraries(hello_world ${CELIX_LIBRARIES} -Wl,-all_load ${CELIX_DM_STATIC_LIB})
+ target_link_libraries(HelloWorld_c ${CELIX_LIBRARIES} -Wl,-all_load ${CELIX_DM_STATIC_LIB})
else()
- target_link_libraries(hello_world -Wl,--no-undefined -Wl,--whole-archive ${CELIX_DM_STATIC_LIB} -Wl,--no-whole-archive ${CELIX_LIBRARIES})
+ target_link_libraries(HelloWorld_c -Wl,--no-undefined -Wl,--whole-archive ${CELIX_DM_STATIC_LIB} -Wl,--no-whole-archive ${CELIX_LIBRARIES})
endif()
```
And/or the following CMakeLists.txt for the C++ bundle:
```CMake
-#${WS}/myproject/bundles/HelloWorld/CMakeLists.txt
+#${WS}/myproject/bundles/HelloWorld_cxx/CMakeLists.txt
-include_directories(
- private/include
-)
-
-add_celix_bundle(HelloWorld
+add_celix_bundle(HelloWorld_cxx
VERSION 1.0.0
SOURCES
- private/src/HelloWorldActivator.cc
+ src/HelloWorldActivator.cc
)
+target_include_directories(HelloWorld_cxx PRIVATE include)
IF(APPLE)
- target_link_libraries(HelloWorld ${CELIX_LIBRARIES} -Wl,-all_load ${CELIX_DM_STATIC_CXX_LIB})
+ target_link_libraries(HelloWorld_cxx ${CELIX_LIBRARIES} -Wl,-all_load ${CELIX_DM_STATIC_CXX_LIB})
else()
- target_link_libraries(HelloWorld -Wl,--no-undefined -Wl,--whole-archive ${CELIX_DM_STATIC_CXX_LIB} -Wl,--no-whole-archive ${CELIX_LIBRARIES})
+ target_link_libraries(HelloWorld_cxx -Wl,--no-undefined -Wl,--whole-archive ${CELIX_DM_STATIC_CXX_LIB} -Wl,--no-whole-archive ${CELIX_LIBRARIES})
endif()
```
@@ -151,7 +148,7 @@ The dependency manager uses a higher abstraction and is more simple to understan
The C Bundle Activator:
```C
-//${WS}/myproject/bundles/hello_world/private/src/hello_world_activator.c
+//${WS}/myproject/bundles/hello_world/src/HelloWorld_activator.c
#include <stdlib.h>
#include <stdio.h>
@@ -188,32 +185,30 @@ celix_status_t dm_destroy(void* userData, bundle_context_pt context, dm_dependen
The C++ Bundle Activator (header + source):
```C++
-//${WS}/myproject/bundles/HelloWorld/private/include/HelloWorldActivator.h
+//${WS}/myproject/bundles/HelloWorld/include/HelloWorldActivator.h
#ifndef HELLOWORLDACTIVATOR_H_
#define HELLOWORLDACTIVATOR_H_
#include "celix/dm/DmActivator.h"
-using namespace celix::dm;
-
-class HelloWorldActivator : public DmActivator {
+class HelloWorldActivator : public celix::dm::DmActivator {
private:
- const std::string word {"C++ World"};
+ const std::string word {"C++ World"};
public:
- HelloWorldActivator(DependencyManager& mng) : DmActivator {mng} {}
+ HelloWorldActivator(celix::dm::DependencyManager& mng) : DmActivator {mng} {}
virtual void init();
virtual void deinit();
};
#endif //HELLOWORLDACTIVATOR_H_
+```
+```C++
//${WS}/myproject/bundles/HelloWorld/private/src/HelloWorldActivator.cc
#include "HelloWorldActivator.h"
#include <iostream>
-using namespace celix::dm;
-
-DmActivator* DmActivator::create(DependencyManager& mng) {
+DmActivator* DmActivator::create(celix::dm::DependencyManager& mng) {
return new HelloWorldActivator(mng);
}
@@ -241,14 +236,16 @@ cmake ../myproject
make all
```
-Hopefully you will some some build results scrolling over the screen and actual build results in the build directory. There should be a hello_world.zip in the bundles/hello_world directory, this the actual bundle.
-A bundle on its own has no real value, so lets setup a deployment and run the Apache Celix framwork with these bundles.
+Hopefully you will some some build results scrolling over the screen and actual build results in the build directory.
+There should be a HelloWorld_c.zip in the bundles/HelloWorld_c directory and a HelloWorld_cxx.zip in the bundles/HelloWorld_cxx directory,
+these are the actual bundles.
+A bundle on its own has no real value, so lets setup a Celix container and run Celix with these bundles.
### Running
To create a deployment for the hello world bundles two things are needed:
-1. Add a `add_celix_container` statement in the `CMakeLists.txt` file declaring what to deploy and under which name.
+1. Add a `add_celix_container` statement in the (top level) `CMakeLists.txt` file declaring what to deploy and under which name.
```CMake
#${WS}/myproject/CMakeLists.txt
@@ -258,11 +255,14 @@ add_celix_container(myproject
${CELIX_BUNDLES_DIR}/shell.zip
${CELIX_BUNDLES_DIR}/shell_tui.zip
${CELIX_BUNDLES_DIR}/dm_shell.zip
- hello_world #C bundle
- HelloWorld #C++ bundle
+ HelloWorld_c #C bundle
+ HelloWorld_cxx #C++ bundle
)
```
-
+
+With the `add_celix_container` CMake function a Celix container will be configured, which bundles to use can be specified with absolute paths to
+bundle files (e.g. the shell.zip bundle) or Celix bundle CMake target (e.g. the HelloWorld_c bundle).
+
Rerun make again form the build project. the make files generated by CMake will ensure cmake is run it again to update the actual make files.
```bash
@@ -274,20 +274,19 @@ Now a deploy directory myproject should be available in the deploy directory. Th
```bash
cd ${WS}/myproject-build/deploy/myproject
-. ./release.sh
-./hello
+./myproject
```
-The hello_world bundle should be started with the famous "Hello World" text printed twice from the C and C++ bundle. The shell and shell_tui bundle are also deployed and these can be used to query and control the running framework. Below some commands are shown for querying the installed bundles, listing all known shell command, showing the help of a specific command and stopping a specific bundle (note that bundle 0 is the framework "bundle"):
+The HelloWorld_c and HelloWorld_cxx bundles should be started with their own famous "Hello World" text variant printed. One for the C and one for the C++ bundle.
+The shell and shell_tui bundle are also deployed and these can be used to query and control the running framework. Below some commands are shown for querying the installed bundles, listing all known shell command, showing the help of a specific command and stopping a specific bundle (note that bundle 0 is the framework "bundle"):
```
lb
help
-help inspect
stop 0
```
-## Apache Celix Bundle Project in Eclipse
+## Apache Celix Projects in Eclipse
A nice feature of CMake is the ability to generate Eclipse project files, with this feature bundles can also be developed with use of Eclipse. This should help speed up the development process.
To get started change directory to the build directory and generate a eclipse project file.
@@ -303,17 +302,30 @@ Import the project with existing project.

-To build the project, use Project->Build All. To run or debug from Eclipse navigate to the myproject deploy directory and right click on the 'myproject-deploy.launch' file. And select Run As or Debug As to run or debug the bundle.
+To build the project, use Project->Build All.
+To run or debug from Eclipse navigate to the myproject deploy directory and right click on
+the 'myproject' executable and as "Local C/C++ Application"
+
+
+## Apache Celix Projects in CLion
+
+Using Apache Celix projects in CLion quite easy.
+Just use `File -> Open ...` and select a Apache Celix project.
+Because CLion is a IDE for CMake projects and Apache Celix projects are CMake projects this works out of the box.
+
+To run a Celix container just select the target from CLion and press Run.
-
## Next
+The get a complete overview of the available Celix CMake commands see:
+ - [Apache Celix - Celix CMake Commands](../cmake_commands/readme.md)
+
The idea behind service oriented programming is that functionality is provided and used by abstract service, which hide implementation details.
For a guide how to provide and use services see
-* [Apache Celix - Getting Started Guide: Using Services with C](using_services_with_c.md)
-* [Apache Celix - Getting Started Guide: Using Services with C++](using_services_with_cxx.md)
+- [Apache Celix - Getting Started Guide: Using Services with C](using_services_with_c.md)
+- [Apache Celix - Getting Started Guide: Using Services with C++](using_services_with_cxx.md)
http://git-wip-us.apache.org/repos/asf/celix/blob/34ed6ba3/documents/getting_started/getting_started_img3.png
----------------------------------------------------------------------
diff --git a/documents/getting_started/getting_started_img3.png b/documents/getting_started/getting_started_img3.png
deleted file mode 100644
index 3d4cf42..0000000
Binary files a/documents/getting_started/getting_started_img3.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/celix/blob/34ed6ba3/documents/getting_started/readme.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/readme.md b/documents/getting_started/readme.md
index 6dd798c..9692bc0 100644
--- a/documents/getting_started/readme.md
+++ b/documents/getting_started/readme.md
@@ -21,5 +21,6 @@ limitations under the License.
There are several guide to help you get started. The first guide is [Getting Started: Creating a simple bundle](creating_a_simple_bundle.md)
and this should get you started for your first C and/or C++ bundle.
-After that you can extend the example by providing and use services using the
-guide [Getting Started: Using Services with C](using_services_with_c.md) or [Getting Started: Using Services with C++](using_services_with_cxx.md).
+After that you can extend the example by using services with the following guides:
+ - [Getting Started: Using Services with C](using_services_with_c.md)
+ - [Getting Started: Using Services with C++](using_services_with_cxx.md).
http://git-wip-us.apache.org/repos/asf/celix/blob/34ed6ba3/documents/getting_started/using_services_with_c.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/using_services_with_c.md b/documents/getting_started/using_services_with_c.md
index 258b147..6622cba 100644
--- a/documents/getting_started/using_services_with_c.md
+++ b/documents/getting_started/using_services_with_c.md
@@ -32,9 +32,9 @@ By convention use the following service layout:
#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)"
+#define EXAMPLE_NAME "org.example"
+#define EXAMPLE_VERSION "1.0.0"
+#define EXAMPLE_CONSUMER_RANGE "[1.0.0,2.0.0)"
struct example_struct {
@@ -98,7 +98,7 @@ For C services generally platform specific calling convention are used therefore
## Components
Component should use the ADT principle (see [ADT in C](http://inst.eecs.berkeley.edu/~selfpace/studyguide/9C.sg/Output/ADTs.in.C.html)).
-Note that is a a convention.
+Note that is a convention.
Components should have a `<cmpName>_create` and `<cmpName>_destroy` function.
Components can have a `<cmpName>_start` and `<cmpName>_stop` function to start/stop threads or invoke functionality needed a fully created component.
@@ -180,44 +180,44 @@ struct activator {
};
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) {
+ 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;
+ act->bar = bar_create();
+ act->exampleService.handle = act->bar;
+ act->exampleService.method = (void*) bar_method;
- if (act->bar != NULL) {
+ if (act->bar != NULL) {
*userData = act;
} else {
free(act);
}
- } else {
- status = CELIX_ENOMEM;
+ } 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;
+ 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);
+ 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);
+ 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;
+ celix_status_t status = CELIX_SUCCESS;
+ struct activator *activator = userData;
+ bar_destroy(activator->bar);
+ free(activator);
+ return status;
};
```
@@ -342,53 +342,53 @@ struct activator {
};
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();
+ 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;
+ } 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;
+ struct activator *activator = userData;
- dm_component_pt cmp = NULL;
- component_create(context, "FOO1", &cmp);
- component_setImplementation(cmp, activator->foo);
+ 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*
- */
+ /*
+ 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);
+ 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*.
+ /*
+ 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
- */
+ 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);
+ component_addServiceDependency(cmp, dep);
- dependencyManager_add(manager, cmp);
+ dependencyManager_add(manager, cmp);
return status;
}