Skip to content

Commit

Permalink
Merge branch 'master' into feature/type_support_for_properties
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGES.md
  • Loading branch information
PengZheng committed Nov 1, 2023
2 parents 27e9e78 + df4fbc7 commit bf880fc
Show file tree
Hide file tree
Showing 63 changed files with 62 additions and 2,086 deletions.
1 change: 1 addition & 0 deletions .github/workflows/conan_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
run: |
# build profile
conan profile detect -f
sed -i 's/compiler.cppstd=gnu14/compiler.cppstd=gnu17/g' `conan profile path default`
- name: Conan Cache
id: cache-conan
uses: actions/cache@v3
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ limitations under the License.
- pubsub_serializer.h is removed and no longer supported. Use pubsub_message_serialization_service.h instead.
- C++11 support for dm is removed. C++14 is now the minimum required version.
- C++17 string_view support is removed from the utils and framework lib.
- Apache Celix CMake bundle functions without a celix_ prefix or infix are removed.
- Apache Celix CMake support for creating docker images and creating runtimes dirs is removed.
- Support and usage of "service.lang" service property is removed.
- pubsub_serializer.h is removed and no longer supported. Use pubsub_message_serialization_service.h instead.
- C Properties are no longer a direct typedef o `hashmap`.
- celix_string/long_hashmap put functions now return a celix_status_t instead of bool (value replaced).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ static int pub_start(struct publisherActivator *act, celix_bundle_context_t *ctx
opts.removeWithProperties = publisher_publishSvcRemoved;
opts.filter.serviceName = PUBSUB_PUBLISHER_SERVICE_NAME;
opts.filter.filter = filter;
opts.filter.ignoreServiceLanguage = true;
long trackerId = celix_bundleContext_trackServicesWithOptions(ctx, &opts);

celix_arrayList_addLong(act->trackerList,trackerId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ static int pubsub_start(struct ps_websocketActivator *act, celix_bundle_context_
opts.removeWithProperties = publisher_publishSvcRemoved;
opts.filter.serviceName = PUBSUB_PUBLISHER_SERVICE_NAME;
opts.filter.filter = filter;
opts.filter.ignoreServiceLanguage = true;
long trackerId = celix_bundleContext_trackServicesWithOptions(ctx, &opts);

celix_arrayList_addLong(act->trackerList,trackerId);
Expand Down
1 change: 0 additions & 1 deletion bundles/pubsub/pubsub_admin_tcp/src/psa_activator.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ int psa_tcp_start(psa_tcp_activator_t *act, celix_bundle_context_t *ctx) {
if (status == CELIX_SUCCESS) {
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.serviceName = PUBSUB_PROTOCOL_SERVICE_NAME;
opts.filter.ignoreServiceLanguage = true;
opts.callbackHandle = act->admin;
opts.addWithProperties = pubsub_tcpAdmin_addProtocolSvc;
opts.removeWithProperties = pubsub_tcpAdmin_removeProtocolSvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ pubsub_tcp_topic_receiver_t *pubsub_tcpTopicReceiver_create(celix_bundle_context
char buf[size + 1];
snprintf(buf, (size_t) size + 1, "(%s=%s)", PUBSUB_SUBSCRIBER_TOPIC, topic);
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.ignoreServiceLanguage = true;
opts.filter.serviceName = PUBSUB_SUBSCRIBER_SERVICE_NAME;
opts.filter.filter = buf;
opts.callbackHandle = receiver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ pubsub_websocket_topic_receiver_t* pubsub_websocketTopicReceiver_create(celix_bu
char buf[size+1];
snprintf(buf, (size_t)size+1, "(%s=%s)", PUBSUB_SUBSCRIBER_TOPIC, topic);
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.ignoreServiceLanguage = true;
opts.filter.serviceName = PUBSUB_SUBSCRIBER_SERVICE_NAME;
opts.filter.filter = buf;
opts.callbackHandle = receiver;
Expand Down
1 change: 0 additions & 1 deletion bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ int psa_zmq_start(psa_zmq_activator_t *act, celix_bundle_context_t *ctx) {
if (status == CELIX_SUCCESS) {
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.serviceName = PUBSUB_PROTOCOL_SERVICE_NAME;
opts.filter.ignoreServiceLanguage = true;
opts.callbackHandle = act->admin;
opts.addWithProperties = pubsub_zmqAdmin_addProtocolSvc;
opts.removeWithProperties = pubsub_zmqAdmin_removeProtocolSvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ pubsub_zmq_topic_receiver_t* pubsub_zmqTopicReceiver_create(celix_bundle_context
char buf[size+1];
snprintf(buf, (size_t)size+1, "(%s=%s)", PUBSUB_SUBSCRIBER_TOPIC, topic);
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.ignoreServiceLanguage = true;
opts.filter.serviceName = PUBSUB_SUBSCRIBER_SERVICE_NAME;
opts.filter.filter = buf;
opts.callbackHandle = receiver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pubsub_interceptors_handler_t* pubsubInterceptorsHandler_create(celix_bundle_con
// Create service tracker here, and not in the activator
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.serviceName = PUBSUB_INTERCEPTOR_SERVICE_NAME;
opts.filter.ignoreServiceLanguage = true;
opts.callbackHandle = handler;
opts.addWithProperties = pubsubInterceptorsHandler_addInterceptor;
opts.removeWithProperties = pubsubInterceptorsHandler_removeInterceptor;
Expand Down
2 changes: 0 additions & 2 deletions bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ static int pstm_start(pstm_activator_t *act, celix_bundle_context_t *ctx) {
opts.removeWithProperties = pubsub_topologyManager_psaRemoved;
opts.callbackHandle = act->manager;
opts.filter.serviceName = PUBSUB_ADMIN_SERVICE_NAME;
opts.filter.ignoreServiceLanguage = true;
act->pubsubAdminTrackerId = celix_bundleContext_trackServicesWithOptions(ctx, &opts);
}

Expand All @@ -90,7 +89,6 @@ static int pstm_start(pstm_activator_t *act, celix_bundle_context_t *ctx) {
opts.removeWithOwner = pubsub_topologyManager_subscriberRemoved;
opts.callbackHandle = act->manager;
opts.filter.serviceName = PUBSUB_SUBSCRIBER_SERVICE_NAME;
opts.filter.ignoreServiceLanguage = true;
act->pubsubSubscribersTrackerId = celix_bundleContext_trackServicesWithOptions(ctx, &opts);
}

Expand Down
1 change: 0 additions & 1 deletion bundles/pubsub/pubsub_utils/src/pubsub_matching.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ static long getPSProtocol(celix_bundle_context_t *ctx, const char *requested_pro
} else {
celix_service_filter_options_t opts = CELIX_EMPTY_SERVICE_FILTER_OPTIONS;
opts.serviceName = PUBSUB_PROTOCOL_SERVICE_NAME;
opts.ignoreServiceLanguage = true;

//note findService will automatically return the highest ranking service id
svcId = celix_bundleContext_findServiceWithOptions(ctx, &opts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ typedef struct rsa_dfi_exception_test_service {
celix_service_use_options_t opts{};
opts.filter.serviceName = RSA_DIF_EXCEPTION_TEST_SERVICE;
opts.use = testExceptionServiceCallback;
opts.filter.ignoreServiceLanguage = true;
opts.waitTimeoutInSeconds = 2;
bool called = celix_bundleContext_useServiceWithOptions(clientContext, &opts);
ASSERT_TRUE(called);
Expand All @@ -297,7 +296,6 @@ static void test(F&& f) {
celix_service_use_options_t opts{};
opts.filter.serviceName = TST_SERVICE_NAME;
opts.use = f;
opts.filter.ignoreServiceLanguage = true;
opts.waitTimeoutInSeconds = 2;
bool called = celix_bundleContext_useServiceWithOptions(clientContext, &opts);
ASSERT_TRUE(called);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ extern "C" {
celix_service_use_options_t opts{};
opts.filter.serviceName = OSGI_RSA_REMOTE_SERVICE_ADMIN;
opts.use = testServicesCallback;
opts.filter.ignoreServiceLanguage = true;
opts.waitTimeoutInSeconds = 0.25;
bool called = celix_bundleContext_useServiceWithOptions(context, &opts);
ASSERT_TRUE(called);
Expand Down Expand Up @@ -104,7 +103,6 @@ extern "C" {
celix_service_use_options_t opts{};
opts.filter.serviceName = OSGI_RSA_REMOTE_SERVICE_ADMIN;
opts.use = testExportServiceCallback;
opts.filter.ignoreServiceLanguage = true;
opts.waitTimeoutInSeconds = 0.25;
bool called = celix_bundleContext_useServiceWithOptions(context, &opts);
ASSERT_TRUE(called);
Expand Down Expand Up @@ -141,7 +139,6 @@ extern "C" {
celix_service_use_options_t opts{};
opts.filter.serviceName = OSGI_RSA_REMOTE_SERVICE_ADMIN;
opts.use = testImportServiceCallback;
opts.filter.ignoreServiceLanguage = true;
opts.waitTimeoutInSeconds = 0.25;

//first call -> init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,13 @@ static celix_status_t bndStart(struct activator *act, celix_bundle_context_t* ct
opts.set = bndSetCalc;
opts.callbackHandle = act;
opts.filter.serviceName = CALCULATOR_SERVICE;
opts.filter.ignoreServiceLanguage = true;
act->trackerId1 = celix_bundleContext_trackServicesWithOptions(ctx, &opts);
}
{
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.set = bndSetRemoteExample;
opts.callbackHandle = act;
opts.filter.serviceName = REMOTE_EXAMPLE_NAME;
opts.filter.ignoreServiceLanguage = true;
act->trackerId2 = celix_bundleContext_trackServicesWithOptions(ctx, &opts);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ celix_status_t exportRegistration_start(export_registration_t *reg) {
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.filter = reg->filter;
opts.filter.serviceName = "*";
opts.filter.ignoreServiceLanguage = true;
opts.callbackHandle = reg;
opts.add = exportRegistration_addServ;
opts.remove = exportRegistration_removeServ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ celix_status_t exportRegistration_create(celix_bundle_context_t *context,
opts.filter.filter = filter;
opts.filter.serviceName = RSA_RPC_FACTORY_NAME;
opts.filter.versionRange = RSA_RPC_FACTORY_USE_RANGE;
opts.filter.ignoreServiceLanguage = true;
opts.callbackHandle = export;
opts.add = exportRegistration_addRpcFac;
opts.remove = exportRegistration_removeRpcFac;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ celix_status_t remoteInterceptorsHandler_create(celix_bundle_context_t *ctx, rem
// Create service tracker here, and not in the activator
celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.serviceName = REMOTE_INTERCEPTOR_SERVICE_NAME;
opts.filter.ignoreServiceLanguage = true;
opts.callbackHandle = *handler;
opts.addWithProperties = remoteInterceptorsHandler_addInterceptor;
opts.removeWithProperties = remoteInterceptorsHandler_removeInterceptor;
Expand Down
1 change: 0 additions & 1 deletion bundles/shell/shell/src/c_shell_activator.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ celix_status_t celix_bundleActivator_start(void *activatorData, celix_bundle_con
opts.callbackHandle = activator->shell;
opts.addWithProperties = (void*) shell_addCommand;
opts.removeWithProperties = (void*) shell_removeCommand;
opts.filter.ignoreServiceLanguage = true;
opts.filter.serviceName = CELIX_SHELL_COMMAND_SERVICE_NAME;
activator->trackerId = celix_bundleContext_trackServicesWithOptions(ctx, &opts);
}
Expand Down
2 changes: 1 addition & 1 deletion cmake/celix_project/ApacheRat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ if (ENABLE_APACHE_RAT)
else(Java_Runtime_FOUND)
MESSAGE(STATUS "Java not found, cannot execute Apache RAT checks")
endif(Java_Runtime_FOUND)
endif ()
endif ()
60 changes: 0 additions & 60 deletions cmake/cmake_celix/BundlePackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ function(check_bundle BUNDLE)
endif ()
endfunction()


function(add_bundle)
message(DEPRECATION "add_bundle is deprecated, use add_celix_bundle instead.")
add_celix_bundle(${ARGN})
endfunction()

#[[
Add a Celix bundle to the project.
Expand Down Expand Up @@ -391,11 +385,6 @@ function(add_celix_bundle)
celix_bundle_headers(${BUNDLE_TARGET_NAME} ${BUNDLE_HEADERS})
endfunction()

function(bundle_export_libs)
message(DEPRECATION "bundle_export_libs is deprecated, use celix_bundle_export_libs instead.")
celix_bundle_export_libs(${ARGN})
endfunction()

#[[
Adds a export lib to the Celix bundle.
Expand All @@ -407,11 +396,6 @@ function(celix_bundle_export_libs)
celix_bundle_libs(${BUNDLE} "EXPORT" TRUE ${ARGN})
endfunction()

function(bundle_private_libs)
message(DEPRECATION "bundle_private_libs is deprecated, use celix_bundle_private_libs instead.")
celix_bundle_private_libs(${ARGN})
endfunction()

#[[
Add libraries to a bundle.
Expand Down Expand Up @@ -452,10 +436,6 @@ function(celix_bundle_private_libs)
celix_bundle_libs(${BUNDLE} "PRIVATE" FALSE ${ARGN})
endfunction()

function(bundle_libs)
message(DEPRECATION "bundle_libs is deprecated, use celix_bundle_libs instead.")
celix_bundle_libs(${ARGN})
endfunction()
function(celix_bundle_libs)
#0 is bundle TARGET
#1 is TYPE, e.g PRIVATE,EXPORT or IMPORT
Expand Down Expand Up @@ -544,11 +524,6 @@ function(celix_bundle_libs)
set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_LIB_TARGETS" "${LIB_TARGETS}")
endfunction()

function(bundle_import_libs)
message(DEPRECATION "bundle_import_libs is deprecated, use celix_bundle_import_libs instead.")
celix_bundle_import_libs(${ARGN})
endfunction()

#[[
Adds a import lib to the Celix bundle.
Expand Down Expand Up @@ -580,11 +555,6 @@ function(celix_bundle_import_libs)
set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_IMPORT_LIBS" "${LIBS}")
endfunction()

function(bundle_files)
message(DEPRECATION "bundle_files is deprecated, use celix_bundle_files instead.")
celix_bundle_files(${ARGN})
endfunction()

#[[
Add files to the target bundle.
Expand Down Expand Up @@ -767,11 +737,6 @@ function(celix_bundle_add_files)
set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_DEPEND_TARGETS" "${DEPS}")
endfunction()

function(bundle_headers)
message(DEPRECATION "bundle_headers is deprecated, use celix_bundle_headers instead.")
celix_bundle_headers(${ARGN})
endfunction()

#[[
Append the provided headers to the target bundle manifest.
Expand All @@ -798,11 +763,6 @@ function(celix_bundle_headers)
set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_HEADERS" "${HEADERS}")
endfunction()

function(bundle_symbolic_name)
message(DEPRECATION "bundle_symbolic_name is deprecated, use celix_bundle_symbolic_name instead.")
celix_bundle_symbolic_name(${ARGN})
endfunction()

#[[
Set bundle symbolic name
Expand Down Expand Up @@ -845,11 +805,6 @@ function(celix_get_bundle_symbolic_name)
endif ()
endfunction()

function(bundle_name)
message(DEPRECATION "bundle_name is deprecated, use celix_bundle_name instead.")
celix_bundle_name(${ARGN})
endfunction()

#[[
Set bundle name
Expand All @@ -861,11 +816,6 @@ function(celix_bundle_name BUNDLE NAME)
set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_NAME" ${NAME})
endfunction()

function(bundle_version)
message(DEPRECATION "bundle_version is deprecated, use celix_bundle_version instead.")
celix_bundle_version(${ARGN})
endfunction()

#[[
Set bundle version
Expand All @@ -877,11 +827,6 @@ function(celix_bundle_version BUNDLE VERSION)
set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_VERSION" ${VERSION})
endfunction()

function(bundle_description)
message(DEPRECATION "bundle_description is deprecated, use celix_bundle_description instead.")
celix_bundle_description(${ARGN})
endfunction()

#[[
Set bundle description
Expand Down Expand Up @@ -967,11 +912,6 @@ function(celix_get_bundle_file)
endif ()
endfunction()

function(install_bundle)
message(DEPRECATION "install_bundle is deprecated, use install_celix_bundle instead.")
install_celix_bundle(${ARGN})
endfunction()

#[[
Install bundle when 'make install' is executed.
Expand Down
Loading

0 comments on commit bf880fc

Please sign in to comment.