This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/509-remove-osgi-defines
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to
refs/heads/feature/509-remove-osgi-defines by this push:
new 208032e1 #509: Replace some left over OSGI_ constants usage
208032e1 is described below
commit 208032e1c722db8c177cdf551da32cd9b32ca6a2
Author: Pepijn Noltes <[email protected]>
AuthorDate: Sat Oct 28 17:08:45 2023 +0200
#509: Replace some left over OSGI_ constants usage
---
bundles/logging/log_admin/src/celix_log_admin.c | 6 ++--
.../interceptors/src/ps_interceptor_activator.c | 4 +--
.../integration/gtest/serializer_activator.cc | 2 +-
.../pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c | 4 +--
.../src/pubsub_tcp_topic_receiver.c | 4 +--
.../src/pubsub_websocket_topic_receiver.c | 4 +--
.../pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c | 4 +--
.../src/pubsub_zmq_topic_receiver.c | 4 +--
.../pubsub_discovery/src/pubsub_discovery_impl.c | 4 +--
.../src/ps_wire_protocol_activator.c | 2 +-
.../src/ps_wire_v2_protocol_activator.c | 2 +-
.../pubsub_spi/src/pubsub_interceptors_handler.c | 8 +++---
.../src/pubsub_topology_manager.c | 8 +++---
.../pubsub_utils/src/pubsub_serializer_handler.c | 14 +++++-----
bundles/pubsub/pubsub_utils/src/pubsub_utils.c | 2 +-
.../discovery_common/src/discovery_activator.c | 2 +-
.../src/endpoint_descriptor_writer.c | 2 +-
.../src/DiscoveryZeroconfAnnouncerTestSuite.cc | 26 +++++++++---------
.../gtest/src/DiscoveryZeroconfWatcherTestSuite.cc | 10 +++----
.../src/discovery_zeroconf_announcer.c | 6 ++--
.../src/discovery_zeroconf_watcher.c | 8 +++---
.../interceptors/src/rs_interceptor_activator.c | 4 +--
.../gtest/src/rsa_client_server_tests.cc | 4 +--
.../gtest/src/rsa_tests.cc | 2 +-
.../src/remote_service_admin_dfi.c | 12 ++++----
.../src/RsaShmExportRegistrationUnitTestSuite.cc | 6 ++--
.../rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc | 4 +--
.../src/RsaShmImportRegistrationUnitTestSuite.cc | 4 +--
.../rsa_shm/src/rsa_shm_export_registration.c | 2 +-
.../rsa_shm/src/rsa_shm_impl.c | 22 +++++++--------
.../gtest/src/EndpointDescriptionUnitTestSuite.cc | 4 +--
.../rsa_common/src/endpoint_description.c | 2 +-
.../rsa_common/src/export_registration_impl.c | 2 +-
.../rsa_common/src/import_registration_impl.c | 2 +-
.../rsa_common/src/remote_interceptors_handler.c | 8 +++---
.../gtest/src/RsaJsonRpcUnitTestSuite.cc | 2 +-
.../topology_manager/src/activator.c | 4 +--
.../remote_services/topology_manager/src/scope.c | 2 +-
.../topology_manager/src/topology_manager.c | 6 ++--
.../tms_tst/disc_mock/disc_mock_activator.c | 2 +-
.../topology_manager/tms_tst/tms_tests.cpp | 8 +++---
bundles/shell/shell/src/bundle_command.c | 6 ++--
bundles/shell/shell/src/c_shell.c | 24 ++--------------
bundles/shell/shell/src/help_command.c | 4 +--
bundles/shell/shell/src/lb_command.c | 6 ++--
bundles/shell/shell/src/query_command.c | 6 ++--
bundles/shell/shell/src/shell_private.h | 32 ----------------------
bundles/shell/shell/src/std_commands.h | 2 +-
.../src/dynamic_consumer_example.c | 8 +++---
.../src/dynamic_provider_example.c | 2 +-
.../src/CelixBundleContextServicesTestSuite.cc | 8 +++---
.../gtest/src/CxxBundleContextTestSuite.cc | 4 +--
libs/framework/include/celix/Trackers.h | 6 ++--
libs/framework/include/celix_constants.h | 11 +-------
libs/framework/src/bundle_context.c | 6 ++--
libs/framework/src/celix_libloader.c | 12 --------
libs/framework/src/framework.c | 2 +-
libs/framework/src/service_reference.c | 8 +++---
libs/framework/src/service_registration.c | 6 ++--
libs/framework/src/service_registry.c | 18 ++++++------
libs/framework/src/service_tracker.c | 6 ++--
.../config_admin_tst/config_admin_test.cpp | 8 +++---
.../example_test/private/src/activator.c | 2 +-
.../example_test2/private/src/activator.c | 6 ++--
.../service/private/src/configuration_impl.c | 8 +++---
.../service/private/src/managed_service_tracker.c | 4 +--
.../src/pubsub_nanomsg_admin.cc | 6 ++--
67 files changed, 183 insertions(+), 256 deletions(-)
diff --git a/bundles/logging/log_admin/src/celix_log_admin.c
b/bundles/logging/log_admin/src/celix_log_admin.c
index 2a11a58b..5b53d2fe 100644
--- a/bundles/logging/log_admin/src/celix_log_admin.c
+++ b/bundles/logging/log_admin/src/celix_log_admin.c
@@ -217,7 +217,7 @@ static void
celix_logAdmin_addLogSvcForName(celix_log_admin_t* admin, const char
celix_properties_set(props, CELIX_LOG_SERVICE_PROPERTY_NAME,
newEntry->name);
if (celix_utils_stringEquals(newEntry->name,
CELIX_LOG_ADMIN_DEFAULT_LOG_NAME) == 0) {
//ensure that the default log service is found when no name
filter is used.
- celix_properties_setLong(props,
OSGI_FRAMEWORK_SERVICE_RANKING, 100);
+ celix_properties_setLong(props,
CELIX_FRAMEWORK_SERVICE_RANKING, 100);
}
celix_service_registration_options_t opts =
CELIX_EMPTY_SERVICE_REGISTRATION_OPTIONS;
@@ -286,7 +286,7 @@ static void celix_logAdmin_addSink(void *handle, void *svc,
const celix_properti
celix_log_admin_t* admin = handle;
celix_log_sink_t* sink = svc;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
const char* sinkName = celix_properties_get(props,
CELIX_LOG_SINK_PROPERTY_NAME, NULL);
char nameBuf[16];
if (sinkName == NULL) {
@@ -313,7 +313,7 @@ static void celix_logAdmin_addSink(void *handle, void *svc,
const celix_properti
static void celix_logAdmin_remSink(void *handle, void *svc CELIX_UNUSED, const
celix_properties_t* props) {
celix_log_admin_t* admin = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
const char* sinkName = celix_properties_get(props,
CELIX_LOG_SINK_PROPERTY_NAME, NULL);
char nameBuf[16];
if (sinkName == NULL) {
diff --git
a/bundles/pubsub/examples/pubsub/interceptors/src/ps_interceptor_activator.c
b/bundles/pubsub/examples/pubsub/interceptors/src/ps_interceptor_activator.c
index 9b02e35e..9bafd755 100644
--- a/bundles/pubsub/examples/pubsub/interceptors/src/ps_interceptor_activator.c
+++ b/bundles/pubsub/examples/pubsub/interceptors/src/ps_interceptor_activator.c
@@ -47,7 +47,7 @@ static int interceptor_start(struct interceptorActivator
*act, celix_bundle_cont
act->interceptor = interceptor;
celix_properties_t *props = celix_properties_create();
- celix_properties_setLong(props, OSGI_FRAMEWORK_SERVICE_RANKING, 10);
+ celix_properties_setLong(props, CELIX_FRAMEWORK_SERVICE_RANKING, 10);
celix_service_registration_options_t opts =
CELIX_EMPTY_SERVICE_REGISTRATION_OPTIONS;
opts.svc = &act->interceptorSvc;
@@ -69,7 +69,7 @@ static int interceptor_start(struct interceptorActivator
*act, celix_bundle_cont
act->secondInterceptor = secondInterceptor;
celix_properties_t *secondProps = celix_properties_create();
- celix_properties_setLong(secondProps, OSGI_FRAMEWORK_SERVICE_RANKING, 20);
+ celix_properties_setLong(secondProps, CELIX_FRAMEWORK_SERVICE_RANKING, 20);
celix_service_registration_options_t secondOpts =
CELIX_EMPTY_SERVICE_REGISTRATION_OPTIONS;
secondOpts.svc = &act->secondInterceptorSvc;
diff --git a/bundles/pubsub/integration/gtest/serializer_activator.cc
b/bundles/pubsub/integration/gtest/serializer_activator.cc
index f3477b2a..cecf90fb 100644
--- a/bundles/pubsub/integration/gtest/serializer_activator.cc
+++ b/bundles/pubsub/integration/gtest/serializer_activator.cc
@@ -68,7 +68,7 @@ celix_status_t bnd_start(struct activator *act,
celix_bundle_context_t *ctx) {
celix_properties_set(p,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_ID_PROPERTY, "20");
celix_properties_set(p,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_FQN_PROPERTY, MSG_NAME);
celix_properties_set(p,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_VERSION_PROPERTY, "1.0.0");
- celix_properties_setLong(p, OSGI_FRAMEWORK_SERVICE_RANKING, 20);
+ celix_properties_setLong(p, CELIX_FRAMEWORK_SERVICE_RANKING, 20);
celix_service_registration_options_t opts;
opts.svc = &act->svc;
opts.properties = p;
diff --git a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c
b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c
index 877e8b06..28ca7bc3 100644
--- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c
+++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c
@@ -217,7 +217,7 @@ void pubsub_tcpAdmin_addProtocolSvc(void *handle, void
*svc, const celix_propert
pubsub_tcp_admin_t *psa = handle;
const char *protType = celix_properties_get(props,
PUBSUB_PROTOCOL_TYPE_KEY, NULL);
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
if (protType == NULL) {
L_INFO("[PSA_tcp] Ignoring protocol service without %s property",
PUBSUB_PROTOCOL_TYPE_KEY);
@@ -238,7 +238,7 @@ void pubsub_tcpAdmin_addProtocolSvc(void *handle, void
*svc, const celix_propert
void pubsub_tcpAdmin_removeProtocolSvc(void *handle, void *svc, const
celix_properties_t *props) {
pubsub_tcp_admin_t *psa = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
//remove protocol
// 1) First find entry and
diff --git a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
index 8f862e8e..a71d3dc0 100644
--- a/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
+++ b/bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
@@ -409,7 +409,7 @@ void
pubsub_tcpTopicReceiver_disconnectFrom(pubsub_tcp_topic_receiver_t *receive
static void pubsub_tcpTopicReceiver_addSubscriber(void *handle, void *svc,
const celix_properties_t *props) {
pubsub_tcp_topic_receiver_t *receiver = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
const char *subScope = celix_properties_get(props,
PUBSUB_SUBSCRIBER_SCOPE, NULL);
if (receiver->scope == NULL) {
if (subScope != NULL) {
@@ -438,7 +438,7 @@ static void pubsub_tcpTopicReceiver_addSubscriber(void
*handle, void *svc, const
static void pubsub_tcpTopicReceiver_removeSubscriber(void *handle, void *svc
CELIX_UNUSED, const celix_properties_t *props) {
pubsub_tcp_topic_receiver_t *receiver = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
celixThreadMutex_lock(&receiver->subscribers.mutex);
psa_tcp_subscriber_entry_t *entry =
celix_longHashMap_get(receiver->subscribers.map, svcId);
diff --git
a/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c
b/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c
index 74d249e3..92ed911b 100644
---
a/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c
+++
b/bundles/pubsub/pubsub_admin_websocket/src/pubsub_websocket_topic_receiver.c
@@ -391,7 +391,7 @@ void
pubsub_websocketTopicReceiver_disconnectFrom(pubsub_websocket_topic_receive
static void pubsub_websocketTopicReceiver_addSubscriber(void *handle, void
*svc, const celix_properties_t *props) {
pubsub_websocket_topic_receiver_t *receiver = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
const char *subScope = celix_properties_get(props,
PUBSUB_SUBSCRIBER_SCOPE, NULL);
if (receiver->scope == NULL){
if (subScope != NULL){
@@ -420,7 +420,7 @@ static void
pubsub_websocketTopicReceiver_addSubscriber(void *handle, void *svc,
static void pubsub_websocketTopicReceiver_removeSubscriber(void *handle, void
*svc CELIX_UNUSED, const celix_properties_t *props) {
pubsub_websocket_topic_receiver_t *receiver = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
celixThreadMutex_lock(&receiver->subscribers.mutex);
psa_websocket_subscriber_entry_t *entry =
hashMap_remove(receiver->subscribers.map, (void*)svcId);
diff --git a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c
b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c
index c9e086a1..154e66c7 100644
--- a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c
+++ b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c
@@ -277,7 +277,7 @@ void pubsub_zmqAdmin_addProtocolSvc(void *handle, void
*svc, const celix_propert
pubsub_zmq_admin_t *psa = handle;
const char *protType = celix_properties_get(props,
PUBSUB_PROTOCOL_TYPE_KEY, NULL);
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
if (protType == NULL) {
L_INFO("[PSA_ZMQ] Ignoring protocol service without %s property",
PUBSUB_PROTOCOL_TYPE_KEY);
@@ -298,7 +298,7 @@ void pubsub_zmqAdmin_addProtocolSvc(void *handle, void
*svc, const celix_propert
void pubsub_zmqAdmin_removeProtocolSvc(void *handle, void *svc, const
celix_properties_t *props) {
pubsub_zmq_admin_t *psa = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
//remove protocol
// 1) First find entry and
diff --git a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c
b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c
index 1d01f229..44ea40ab 100644
--- a/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c
+++ b/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c
@@ -380,7 +380,7 @@ void
pubsub_zmqTopicReceiver_disconnectFrom(pubsub_zmq_topic_receiver_t *receive
static void pubsub_zmqTopicReceiver_addSubscriber(void *handle, void *svc,
const celix_properties_t *props) {
pubsub_zmq_topic_receiver_t *receiver = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
const char *subScope = celix_properties_get(props,
PUBSUB_SUBSCRIBER_SCOPE, NULL);
if (receiver->scope == NULL) {
if (subScope != NULL) {
@@ -409,7 +409,7 @@ static void pubsub_zmqTopicReceiver_addSubscriber(void
*handle, void *svc, const
static void pubsub_zmqTopicReceiver_removeSubscriber(void *handle, void *svc,
const celix_properties_t *props) {
pubsub_zmq_topic_receiver_t *receiver = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
celixThreadMutex_lock(&receiver->subscribers.mutex);
psa_zmq_subscriber_entry_t *entry =
hashMap_remove(receiver->subscribers.map, (void*)svcId);
diff --git a/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
b/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
index b4cb3002..a86d0458 100644
--- a/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
+++ b/bundles/pubsub/pubsub_discovery/src/pubsub_discovery_impl.c
@@ -359,7 +359,7 @@ void pubsub_discovery_discoveredEndpointsListenerAdded(void
*handle, void *svc,
pubsub_discovery_t *disc = handle;
pubsub_discovered_endpoint_listener_t *listener = svc;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
celixThreadMutex_lock(&disc->discoveredEndpointsListenersMutex);
hashMap_put(disc->discoveredEndpointsListeners, (void*)svcId, listener);
celixThreadMutex_unlock(&disc->discoveredEndpointsListenersMutex);
@@ -376,7 +376,7 @@ void pubsub_discovery_discoveredEndpointsListenerAdded(void
*handle, void *svc,
void pubsub_discovery_discoveredEndpointsListenerRemoved(void *handle, void
*svc, const celix_properties_t *props, const celix_bundle_t *bnd) {
pubsub_discovery_t *disc = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
celixThreadMutex_lock(&disc->discoveredEndpointsListenersMutex);
hashMap_remove(disc->discoveredEndpointsListeners, (void*)svcId);
celixThreadMutex_unlock(&disc->discoveredEndpointsListenersMutex);
diff --git
a/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v1/src/ps_wire_protocol_activator.c
b/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v1/src/ps_wire_protocol_activator.c
index 64abebec..32af5add 100644
---
a/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v1/src/ps_wire_protocol_activator.c
+++
b/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v1/src/ps_wire_protocol_activator.c
@@ -38,7 +38,7 @@ static int ps_wp_start(ps_wp_activator_t *act,
celix_bundle_context_t *ctx) {
/* Set serializertype */
celix_properties_t *props = celix_properties_create();
celix_properties_set(props, PUBSUB_PROTOCOL_TYPE_KEY,
PUBSUB_WIRE_PROTOCOL_TYPE);
- celix_properties_setLong(props, OSGI_FRAMEWORK_SERVICE_RANKING, 5);
+ celix_properties_setLong(props, CELIX_FRAMEWORK_SERVICE_RANKING, 5);
act->protocolSvc.getHeaderSize = pubsubProtocol_getHeaderSize;
act->protocolSvc.getHeaderBufferSize =
pubsubProtocol_getHeaderBufferSize;
diff --git
a/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v2/src/ps_wire_v2_protocol_activator.c
b/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v2/src/ps_wire_v2_protocol_activator.c
index 86708eba..000119af 100644
---
a/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v2/src/ps_wire_v2_protocol_activator.c
+++
b/bundles/pubsub/pubsub_protocol/pubsub_protocol_wire_v2/src/ps_wire_v2_protocol_activator.c
@@ -39,7 +39,7 @@ static int ps_wp_start(ps_wp_activator_t *act,
celix_bundle_context_t *ctx) {
/* Set serializertype */
celix_properties_t *props = celix_properties_create();
celix_properties_set(props, PUBSUB_PROTOCOL_TYPE_KEY,
PUBSUB_WIRE_V2_PROTOCOL_TYPE);
- celix_properties_setLong(props, OSGI_FRAMEWORK_SERVICE_RANKING, 10);
+ celix_properties_setLong(props, CELIX_FRAMEWORK_SERVICE_RANKING, 10);
act->protocolSvc.getHeaderSize = pubsubProtocol_wire_v2_getHeaderSize;
act->protocolSvc.getHeaderBufferSize =
pubsubProtocol_wire_v2_getHeaderBufferSize;
diff --git a/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c
b/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c
index 03bd7ca0..010c6905 100644
--- a/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c
+++ b/bundles/pubsub/pubsub_spi/src/pubsub_interceptors_handler.c
@@ -199,11 +199,11 @@ int referenceCompare(const void *a, const void *b) {
const entry_t *aEntry = a;
const entry_t *bEntry = b;
- long servIdA = celix_properties_getAsLong(aEntry->properties,
OSGI_FRAMEWORK_SERVICE_ID, 0);
- long servIdB = celix_properties_getAsLong(bEntry->properties,
OSGI_FRAMEWORK_SERVICE_ID, 0);
+ long servIdA = celix_properties_getAsLong(aEntry->properties,
CELIX_FRAMEWORK_SERVICE_PID, 0);
+ long servIdB = celix_properties_getAsLong(bEntry->properties,
CELIX_FRAMEWORK_SERVICE_PID, 0);
- long servRankingA = celix_properties_getAsLong(aEntry->properties,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
- long servRankingB = celix_properties_getAsLong(bEntry->properties,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingA = celix_properties_getAsLong(aEntry->properties,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingB = celix_properties_getAsLong(bEntry->properties,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
return celix_utils_compareServiceIdsAndRanking(servIdA, servRankingA,
servIdB, servRankingB);
}
diff --git
a/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c
b/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c
index 3b42f7df..fbb2f9be 100644
--- a/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c
+++ b/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c
@@ -181,7 +181,7 @@ void pubsub_topologyManager_psaAdded(void *handle, void
*svc, const celix_proper
pubsub_admin_service_t *psa = (pubsub_admin_service_t *) svc;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
const char* psaType = celix_properties_get(props,
PUBSUB_ADMIN_SERVICE_TYPE, "!Error!");
celix_logHelper_debug(manager->loghelper, "Added %s PSA", psaType);
@@ -229,7 +229,7 @@ void pubsub_topologyManager_psaAdded(void *handle, void
*svc, const celix_proper
void pubsub_topologyManager_psaRemoved(void *handle, void *svc CELIX_UNUSED,
const celix_properties_t *props) {
pubsub_topology_manager_t *manager = handle;
//pubsub_admin_service_t *psa = (pubsub_admin_service_t*) svc;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
const char* psaType = celix_properties_get(props,
PUBSUB_ADMIN_SERVICE_TYPE, "!Error!");
celix_logHelper_debug(manager->loghelper, "Removing %s PSA", psaType);
@@ -1156,7 +1156,7 @@ static void *pstm_psaHandlingThread(void *data) {
void pubsub_topologyManager_addMetricsService(void * handle, void *svc, const
celix_properties_t *props) {
pubsub_topology_manager_t *manager = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
celixThreadMutex_lock(&manager->psaMetrics.mutex);
hashMap_put(manager->psaMetrics.map, (void*)svcId, svc);
celixThreadMutex_unlock(&manager->psaMetrics.mutex);
@@ -1164,7 +1164,7 @@ void pubsub_topologyManager_addMetricsService(void *
handle, void *svc, const ce
void pubsub_topologyManager_removeMetricsService(void * handle, void *svc,
const celix_properties_t *props) {
pubsub_topology_manager_t *manager = handle;
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
celixThreadMutex_lock(&manager->psaMetrics.mutex);
hashMap_remove(manager->psaMetrics.map, (void*)svcId);
celixThreadMutex_unlock(&manager->psaMetrics.mutex);
diff --git a/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c
b/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c
index 20bba39c..34a4c7a3 100644
--- a/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c
+++ b/bundles/pubsub/pubsub_utils/src/pubsub_serializer_handler.c
@@ -82,11 +82,11 @@ static int compareEntries(const void *a, const void *b) {
const pubsub_serialization_service_entry_t* aEntry = a;
const pubsub_serialization_service_entry_t* bEntry = b;
- long servIdA = celix_properties_getAsLong(aEntry->properties,
OSGI_FRAMEWORK_SERVICE_ID, 0);
- long servIdB = celix_properties_getAsLong(bEntry->properties,
OSGI_FRAMEWORK_SERVICE_ID, 0);
+ long servIdA = celix_properties_getAsLong(aEntry->properties,
CELIX_FRAMEWORK_SERVICE_PID, 0);
+ long servIdB = celix_properties_getAsLong(bEntry->properties,
CELIX_FRAMEWORK_SERVICE_PID, 0);
- long servRankingA = celix_properties_getAsLong(aEntry->properties,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
- long servRankingB = celix_properties_getAsLong(bEntry->properties,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingA = celix_properties_getAsLong(aEntry->properties,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingB = celix_properties_getAsLong(bEntry->properties,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
return celix_utils_compareServiceIdsAndRanking(servIdA, servRankingA,
servIdB, servRankingB);
}
@@ -164,7 +164,7 @@ pubsub_serializer_handler_t*
pubsub_serializerHandler_createForMarkerService(cel
data.logHelper = logHelper;
char filter[32];
- snprintf(filter, 32, "(%s=%li)", OSGI_FRAMEWORK_SERVICE_ID,
pubsubSerializerMarkerSvcId);
+ snprintf(filter, 32, "(%s=%li)", CELIX_FRAMEWORK_SERVICE_PID,
pubsubSerializerMarkerSvcId);
celix_service_use_options_t opts = CELIX_EMPTY_SERVICE_USE_OPTIONS;
opts.filter.serviceName = PUBSUB_MESSAGE_SERIALIZATION_MARKER_NAME;
opts.filter.filter = filter;
@@ -209,7 +209,7 @@ void
pubsub_serializerHandler_destroy(pubsub_serializer_handler_t* handler) {
}
void
pubsub_serializerHandler_addSerializationService(pubsub_serializer_handler_t*
handler, pubsub_message_serialization_service_t* svc, const celix_properties_t*
svcProperties) {
- long svcId = celix_properties_getAsLong(svcProperties,
OSGI_FRAMEWORK_SERVICE_ID, -1L);
+ long svcId = celix_properties_getAsLong(svcProperties,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
const char *msgFqn = celix_properties_get(svcProperties,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_FQN_PROPERTY, NULL);
const char *version = celix_properties_get(svcProperties,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_VERSION_PROPERTY, "0.0.0");
uint32_t msgId = (uint32_t)celix_properties_getAsLong(svcProperties,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_ID_PROPERTY, 0L);
@@ -271,7 +271,7 @@ void
pubsub_serializerHandler_addSerializationService(pubsub_serializer_handler_
}
void
pubsub_serializerHandler_removeSerializationService(pubsub_serializer_handler_t*
handler, pubsub_message_serialization_service_t* svc, const
celix_properties_t* svcProperties) {
- long svcId = celix_properties_getAsLong(svcProperties,
OSGI_FRAMEWORK_SERVICE_ID, -1L);
+ long svcId = celix_properties_getAsLong(svcProperties,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
const char *msgFqn = celix_properties_get(svcProperties,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_FQN_PROPERTY, NULL);
uint32_t msgId = (uint32_t)celix_properties_getAsLong(svcProperties,
PUBSUB_MESSAGE_SERIALIZATION_SERVICE_MSG_ID_PROPERTY, 0L);
if (msgId == 0) {
diff --git a/bundles/pubsub/pubsub_utils/src/pubsub_utils.c
b/bundles/pubsub/pubsub_utils/src/pubsub_utils.c
index e003a218..a2cc2a26 100644
--- a/bundles/pubsub/pubsub_utils/src/pubsub_utils.c
+++ b/bundles/pubsub/pubsub_utils/src/pubsub_utils.c
@@ -55,7 +55,7 @@ celix_status_t pubsub_getPubSubInfoFromFilter(const char*
filterstr, char **scop
celix_autoptr(celix_filter_t) filter = celix_filter_create(filterstr);
scope = celix_filter_findAttribute(filter, PUBSUB_PUBLISHER_SCOPE);
topic = celix_filter_findAttribute(filter, PUBSUB_PUBLISHER_TOPIC);
- objectClass = celix_filter_findAttribute(filter,
OSGI_FRAMEWORK_OBJECTCLASS);
+ objectClass = celix_filter_findAttribute(filter,
CELIX_FRAMEWORK_SERVICE_NAME);
if (topic != NULL && objectClass != NULL && strncmp(objectClass,
PUBSUB_PUBLISHER_SERVICE_NAME, 128) == 0) {
//NOTE topic must be present, scope can be present in the filter
diff --git a/bundles/remote_services/discovery_common/src/discovery_activator.c
b/bundles/remote_services/discovery_common/src/discovery_activator.c
index ce8b6b8d..751d95ec 100644
--- a/bundles/remote_services/discovery_common/src/discovery_activator.c
+++ b/bundles/remote_services/discovery_common/src/discovery_activator.c
@@ -103,7 +103,7 @@ celix_status_t bundleActivator_start(void * userData,
celix_bundle_context_t *co
}
char* scope = NULL;
- int rc = asprintf(&scope, "(&(%s=*)(%s=%s))", OSGI_FRAMEWORK_OBJECTCLASS,
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
+ int rc = asprintf(&scope, "(&(%s=*)(%s=%s))",
CELIX_FRAMEWORK_SERVICE_NAME, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
status = rc < 0 ? CELIX_ENOMEM : CELIX_SUCCESS;
celix_properties_t *props = NULL;
diff --git
a/bundles/remote_services/discovery_common/src/endpoint_descriptor_writer.c
b/bundles/remote_services/discovery_common/src/endpoint_descriptor_writer.c
index d2e2421f..c2c97d7f 100644
--- a/bundles/remote_services/discovery_common/src/endpoint_descriptor_writer.c
+++ b/bundles/remote_services/discovery_common/src/endpoint_descriptor_writer.c
@@ -149,7 +149,7 @@ static celix_status_t
endpointDescriptorWriter_writeEndpoint(endpoint_descriptor
xmlTextWriterStartElement(writer->writer, PROPERTY);
xmlTextWriterWriteAttribute(writer->writer, NAME, propertyName);
- if (strcmp(OSGI_FRAMEWORK_OBJECTCLASS, (char*) propertyName) == 0)
{
+ if (strcmp(CELIX_FRAMEWORK_SERVICE_NAME, (char*) propertyName) ==
0) {
// objectClass *must* be represented as array of string
values...
endpointDescriptorWriter_writeArrayValue(writer->writer,
propertyValue);
} else if (strcmp(OSGI_RSA_ENDPOINT_SERVICE_ID, (char*)
propertyName) == 0) {
diff --git
a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc
b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc
index 58607b5e..8c5158ab 100644
---
a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc
+++
b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfAnnouncerTestSuite.cc
@@ -188,7 +188,7 @@ static void OnServiceBrowseCallback(DNSServiceRef sdRef,
DNSServiceFlags flags,
static void OnUseServiceCallback(void *handle, void *svc) {
DiscoveryZeroconfAnnouncerTestSuite *t =
(DiscoveryZeroconfAnnouncerTestSuite *)handle;
endpoint_listener_t *epl = (endpoint_listener_t *)svc;
- const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
celix_properties_t *properties = celix_properties_create();
if (t->ifIndex == kDNSServiceInterfaceIndexAny) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES, "all");
@@ -197,7 +197,7 @@ static void OnUseServiceCallback(void *handle, void *svc) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES,
if_indextoname(t->ifIndex, ifName));
}
celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
"dzc_test_service");
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
"dzc_test_service");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"60f49d89-d105-430c-b12b-93fbb54b1d19");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_SERVICE_ID, "100");
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
@@ -249,10 +249,10 @@ TEST_F(DiscoveryZeroconfAnnouncerTestSuite,
AddAndRemoveLocalOnlyEndpoint) {
static void OnUseServiceCallbackForRegisterServiceFailure(void *handle, void
*svc) {
DiscoveryZeroconfAnnouncerTestSuite *t =
(DiscoveryZeroconfAnnouncerTestSuite *)handle;
endpoint_listener_t *epl = (endpoint_listener_t *)svc;
- const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
celix_properties_t *properties = celix_properties_create();
celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
"dzc_test_service");
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
"dzc_test_service");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"60f49d89-d105-430c-b12b-93fbb54b1d19");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_SERVICE_ID, "100");
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
@@ -291,7 +291,7 @@ TEST_F(DiscoveryZeroconfAnnouncerTestSuite,
FailedToRegisterService) {
static void OnUseServiceCallbackForNameConflict(void *handle, void *svc) {
DiscoveryZeroconfAnnouncerTestSuite *t =
(DiscoveryZeroconfAnnouncerTestSuite *)handle;
endpoint_listener_t *epl = (endpoint_listener_t *)svc;
- const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
celix_properties_t *properties = celix_properties_create();
if (t->ifIndex == kDNSServiceInterfaceIndexAny) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES, "all");
@@ -300,7 +300,7 @@ static void OnUseServiceCallbackForNameConflict(void
*handle, void *svc) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES,
if_indextoname(t->ifIndex, ifName));
}
celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
"dzc_test_service");
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
"dzc_test_service");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"60f49d89-d105-430c-b12b-93fbb54b1d19");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_SERVICE_ID, "100");
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
@@ -396,7 +396,7 @@ TEST_F(DiscoveryZeroconfAnnouncerTestSuite,
AddAndRemoveLoopBackEndpoint) {
static void OnUseServiceWithJumboEndpointCallback(void *handle, void *svc) {
DiscoveryZeroconfAnnouncerTestSuite *t =
(DiscoveryZeroconfAnnouncerTestSuite *)handle;
endpoint_listener_t *epl = (endpoint_listener_t *)svc;
- const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
celix_properties_t *properties = celix_properties_create();
if (t->ifIndex == kDNSServiceInterfaceIndexAny) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES, "all");
@@ -405,7 +405,7 @@ static void OnUseServiceWithJumboEndpointCallback(void
*handle, void *svc) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES,
if_indextoname(t->ifIndex, ifName));
}
celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
"dzc_test_service");
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
"dzc_test_service");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"60f49d89-d105-430c-b12b-93fbb54b1d19");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_SERVICE_ID, "100");
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
@@ -462,10 +462,10 @@ static void OnUseServiceWithInvalidEndpointCallback(void
*handle, void *svc) {
status = epl->endpointRemoved(epl->handle, nullptr, nullptr);
EXPECT_EQ(status, CELIX_ILLEGAL_ARGUMENT);
- const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
celix_properties_t *properties = celix_properties_create();
celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
"dzc_test_service");
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
"dzc_test_service");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"60f49d89-d105-430c-b12b-93fbb54b1d19");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_SERVICE_ID, "100");
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
@@ -481,7 +481,7 @@ static void OnUseServiceWithInvalidEndpointCallback(void
*handle, void *svc) {
//lost service name
celix_properties_unset(properties, DZC_SERVICE_TYPE_KEY);
- celix_properties_unset(properties, OSGI_FRAMEWORK_OBJECTCLASS);
+ celix_properties_unset(properties, CELIX_FRAMEWORK_SERVICE_NAME);
status = epl->endpointAdded(epl->handle, endpoint, nullptr);
EXPECT_EQ(status, CELIX_ILLEGAL_ARGUMENT);
@@ -500,7 +500,7 @@ TEST_F(DiscoveryZeroconfAnnouncerTestSuite,
AddInvalidEndpoint) {
static void OnUseServiceForAddEndpointENOMEM(void *handle, void *svc) {
DiscoveryZeroconfAnnouncerTestSuite *t =
(DiscoveryZeroconfAnnouncerTestSuite *)handle;
endpoint_listener_t *epl = (endpoint_listener_t *)svc;
- const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ const char *fwUuid = celix_bundleContext_getProperty(t->ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
celix_properties_t *properties = celix_properties_create();
if (t->ifIndex == kDNSServiceInterfaceIndexAny) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES, "all");
@@ -509,7 +509,7 @@ static void OnUseServiceForAddEndpointENOMEM(void *handle,
void *svc) {
celix_properties_set(properties, CELIX_RSA_NETWORK_INTERFACES,
if_indextoname(t->ifIndex, ifName));
}
celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
"dzc_test_service");
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
"dzc_test_service");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"60f49d89-d105-430c-b12b-93fbb54b1d19");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_SERVICE_ID, "100");
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
diff --git
a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc
b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc
index 7a592123..d70e1290 100644
---
a/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc
+++
b/bundles/remote_services/discovery_zeroconf/gtest/src/DiscoveryZeroconfWatcherTestSuite.cc
@@ -186,7 +186,7 @@ static DNSServiceRef RegisterTestService(void) {
TXTRecordRef txtRecord;
TXTRecordCreate(&txtRecord, sizeof(txtBuf), txtBuf);
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
strlen(DZC_TEST_ENDPOINT_FW_UUID), DZC_TEST_ENDPOINT_FW_UUID);
- TXTRecordSetValue(&txtRecord, OSGI_FRAMEWORK_OBJECTCLASS,
strlen("dzc_test_service"), "dzc_test_service");
+ TXTRecordSetValue(&txtRecord, CELIX_FRAMEWORK_SERVICE_NAME,
strlen("dzc_test_service"), "dzc_test_service");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_ID,
strlen("60f49d89-d105-430c-b12b-93fbb54b1d19"),
"60f49d89-d105-430c-b12b-93fbb54b1d19");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_SERVICE_ID, strlen("100"),
"100");
TXTRecordSetValue(&txtRecord, OSGI_RSA_SERVICE_IMPORTED, strlen("true"),
"true");
@@ -293,9 +293,9 @@ TEST_F(DiscoveryZeroconfWatcherTestSuite,
AddAndRemoveSelfFrameworkEndpoint) {
char txtBuf[1300] = {0};
TXTRecordRef txtRecord;
TXTRecordCreate(&txtRecord, sizeof(txtBuf), txtBuf);
- const char *fwUuid = celix_bundleContext_getProperty(ctx.get(),
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ const char *fwUuid = celix_bundleContext_getProperty(ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid ==
nullptr ? 0 : strlen(fwUuid), fwUuid);
- TXTRecordSetValue(&txtRecord, OSGI_FRAMEWORK_OBJECTCLASS,
strlen("dzc_test_self_fw_service"), "dzc_test_self_fw_service");
+ TXTRecordSetValue(&txtRecord, CELIX_FRAMEWORK_SERVICE_NAME,
strlen("dzc_test_self_fw_service"), "dzc_test_self_fw_service");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_ID,
strlen("60f49d89-d105-430c-b12b-93fbb54b1d19"),
"60f49d89-d105-430c-b12b-93fbb54b1d19");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_SERVICE_ID, strlen("100"),
"100");
TXTRecordSetValue(&txtRecord, OSGI_RSA_SERVICE_IMPORTED, strlen("true"),
"true");
@@ -323,7 +323,7 @@ TEST_F(DiscoveryZeroconfWatcherTestSuite, AddTxtRecord) {
TXTRecordRef txtRecord;
TXTRecordCreate(&txtRecord, sizeof(txtBuf), txtBuf);
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
strlen(DZC_TEST_ENDPOINT_FW_UUID), DZC_TEST_ENDPOINT_FW_UUID);
- TXTRecordSetValue(&txtRecord, OSGI_FRAMEWORK_OBJECTCLASS,
strlen("dzc_test_service"), "dzc_test_service");
+ TXTRecordSetValue(&txtRecord, CELIX_FRAMEWORK_SERVICE_NAME,
strlen("dzc_test_service"), "dzc_test_service");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_ID,
strlen("60f49d89-d105-430c-b12b-93fbb54b1d19"),
"60f49d89-d105-430c-b12b-93fbb54b1d19");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_SERVICE_ID, strlen("100"),
"100");
TXTRecordSetValue(&txtRecord, OSGI_RSA_SERVICE_IMPORTED, strlen("true"),
"true");
@@ -369,7 +369,7 @@ TEST_F(DiscoveryZeroconfWatcherTestSuite,
AddAndRemoveEndpointListener) {
TXTRecordRef txtRecord;
TXTRecordCreate(&txtRecord, sizeof(txtBuf), txtBuf);
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
strlen(DZC_TEST_ENDPOINT_FW_UUID), DZC_TEST_ENDPOINT_FW_UUID);
- TXTRecordSetValue(&txtRecord, OSGI_FRAMEWORK_OBJECTCLASS,
strlen("dzc_test_service"), "dzc_test_service");
+ TXTRecordSetValue(&txtRecord, CELIX_FRAMEWORK_SERVICE_NAME,
strlen("dzc_test_service"), "dzc_test_service");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_ID,
strlen("60f49d89-d105-430c-b12b-93fbb54b1d19"),
"60f49d89-d105-430c-b12b-93fbb54b1d19");
TXTRecordSetValue(&txtRecord, OSGI_RSA_ENDPOINT_SERVICE_ID, strlen("100"),
"100");
TXTRecordSetValue(&txtRecord, OSGI_RSA_SERVICE_IMPORTED, strlen("true"),
"true");
diff --git
a/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_announcer.c
b/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_announcer.c
index c79d1d1e..4f2510ce 100644
---
a/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_announcer.c
+++
b/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_announcer.c
@@ -119,7 +119,7 @@ celix_status_t
discoveryZeroconfAnnouncer_create(celix_bundle_context_t *ctx, ce
celix_autoptr(celix_array_list_t) revokedEndpoints =
announcer->revokedEndpoints = celix_arrayList_create();
assert(announcer->revokedEndpoints != NULL);
- const char *fwUuid = celix_bundleContext_getProperty(ctx,
OSGI_FRAMEWORK_FRAMEWORK_UUID, NULL);
+ const char *fwUuid = celix_bundleContext_getProperty(ctx,
CELIX_FRAMEWORK_FRAMEWORK_UUID, NULL);
if (fwUuid == NULL || strlen(fwUuid) >= sizeof(announcer->fwUuid)) {
celix_logHelper_fatal(logHelper, "Announcer: Failed to get framework
uuid.");
return CELIX_BUNDLE_EXCEPTION;
@@ -130,7 +130,7 @@ celix_status_t
discoveryZeroconfAnnouncer_create(celix_bundle_context_t *ctx, ce
announcer->epListener.endpointAdded =
discoveryZeroconfAnnouncer_endpointAdded;
announcer->epListener.endpointRemoved =
discoveryZeroconfAnnouncer_endpointRemoved;
char scope[256] = {0};
- (void)snprintf(scope, sizeof(scope), "(&(%s=*)(%s=%s))",
OSGI_FRAMEWORK_OBJECTCLASS, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
+ (void)snprintf(scope, sizeof(scope), "(&(%s=*)(%s=%s))",
CELIX_FRAMEWORK_SERVICE_NAME, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, fwUuid);
celix_properties_t *props = celix_properties_create();
assert(props != NULL);
@@ -276,7 +276,7 @@ static celix_status_t
discoveryZeroconfAnnouncer_endpointAdded(void *handle, en
//Remove properties that remote service does not need
celix_properties_unset(entry->properties, CELIX_RSA_NETWORK_INTERFACES);
celix_properties_unset(entry->properties, DZC_SERVICE_TYPE_KEY);
- entry->serviceName = celix_properties_get(entry->properties,
OSGI_FRAMEWORK_OBJECTCLASS, NULL);
+ entry->serviceName = celix_properties_get(entry->properties,
CELIX_FRAMEWORK_SERVICE_NAME, NULL);
if (entry->serviceName == NULL) {
celix_logHelper_error(announcer->logHelper,"Announcer: Invalid
service.");
return CELIX_ILLEGAL_ARGUMENT;
diff --git
a/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c
b/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c
index 768af20a..ace71f1c 100644
---
a/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c
+++
b/bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_watcher.c
@@ -107,7 +107,7 @@ celix_status_t
discoveryZeroconfWatcher_create(celix_bundle_context_t *ctx, celi
}
celix_auto(celix_fd_t) eventFd = watcher->eventFd;
- const char *fwUuid = celix_bundleContext_getProperty(ctx,
OSGI_FRAMEWORK_FRAMEWORK_UUID, NULL);
+ const char *fwUuid = celix_bundleContext_getProperty(ctx,
CELIX_FRAMEWORK_FRAMEWORK_UUID, NULL);
if (fwUuid == NULL || strlen(fwUuid) >= sizeof(watcher->fwUuid)) {
celix_logHelper_fatal(logHelper, "Watcher: Failed to get framework
uuid.");
return CELIX_BUNDLE_EXCEPTION;
@@ -189,7 +189,7 @@ static void discoveryZeroconfWatcher_addEPL(void *handle,
void *svc, const celix
assert(props != NULL);
discovery_zeroconf_watcher_t *watcher = (discovery_zeroconf_watcher_t
*)handle;
endpoint_listener_t *epl = (endpoint_listener_t *)svc;
- long serviceId = celix_properties_getAsLong(props,
OSGI_FRAMEWORK_SERVICE_ID, -1);
+ long serviceId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
if (serviceId == -1) {
return;
}
@@ -225,7 +225,7 @@ static void discoveryZeroconfWatcher_removeEPL(void
*handle, void *svc, const ce
assert(props != NULL);
discovery_zeroconf_watcher_t *watcher = (discovery_zeroconf_watcher_t
*)handle;
endpoint_listener_t *epl = (endpoint_listener_t *)svc;
- long serviceId = celix_properties_getAsLong(props,
OSGI_FRAMEWORK_SERVICE_ID, -1);
+ long serviceId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1);
if (serviceId == -1) {
return;
}
@@ -402,7 +402,7 @@ static void
discoveryZeroconfWatcher_refreshEndpoints(discovery_zeroconf_watcher
if (svcEntry->resolved) {
const char *epFwUuid = celix_properties_get(svcEntry->txtRecord,
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, NULL);
if (epFwUuid != NULL && strcmp(epFwUuid, watcher->fwUuid) == 0) {
- celix_logHelper_debug(watcher->logHelper, "Watcher: Ignore
self endpoint for %s.", celix_properties_get(svcEntry->txtRecord,
OSGI_FRAMEWORK_OBJECTCLASS, "unknown"));
+ celix_logHelper_debug(watcher->logHelper, "Watcher: Ignore
self endpoint for %s.", celix_properties_get(svcEntry->txtRecord,
CELIX_FRAMEWORK_SERVICE_NAME, "unknown"));
celix_stringHashMapIterator_remove(&svcIter);
if (svcEntry->resolveRef) {
DNSServiceRefDeallocate(svcEntry->resolveRef);
diff --git
a/bundles/remote_services/examples/interceptors/src/rs_interceptor_activator.c
b/bundles/remote_services/examples/interceptors/src/rs_interceptor_activator.c
index a20a516b..d580ca41 100644
---
a/bundles/remote_services/examples/interceptors/src/rs_interceptor_activator.c
+++
b/bundles/remote_services/examples/interceptors/src/rs_interceptor_activator.c
@@ -51,7 +51,7 @@ static int interceptor_start(struct interceptorActivator
*act, celix_bundle_cont
act->interceptor = interceptor;
celix_properties_t *props = celix_properties_create();
- celix_properties_setLong(props, OSGI_FRAMEWORK_SERVICE_RANKING, 10);
+ celix_properties_setLong(props, CELIX_FRAMEWORK_SERVICE_RANKING, 10);
celix_service_registration_options_t opts =
CELIX_EMPTY_SERVICE_REGISTRATION_OPTIONS;
opts.svc = interceptorSvc;
@@ -75,7 +75,7 @@ static int interceptor_start(struct interceptorActivator
*act, celix_bundle_cont
act->secondInterceptor = secondInterceptor;
celix_properties_t *secondProps = celix_properties_create();
- celix_properties_setLong(secondProps, OSGI_FRAMEWORK_SERVICE_RANKING, 20);
+ celix_properties_setLong(secondProps, CELIX_FRAMEWORK_SERVICE_RANKING, 20);
celix_service_registration_options_t secondOpts =
CELIX_EMPTY_SERVICE_REGISTRATION_OPTIONS;
secondOpts.svc = secondInterceptorSvc;
diff --git
a/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_client_server_tests.cc
b/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_client_server_tests.cc
index 047fe808..a0be55ef 100644
---
a/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_client_server_tests.cc
+++
b/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_client_server_tests.cc
@@ -142,7 +142,7 @@ typedef struct rsa_dfi_exception_test_service {
serverSvcInterceptor->preExportCall =
serverServiceInterceptor_preExportCall;
serverSvcInterceptor->postExportCall =
serverServiceInterceptor_postExportCall;
celix_properties_t *svcInterceptorProps = celix_properties_create();
- celix_properties_setLong(svcInterceptorProps,
OSGI_FRAMEWORK_SERVICE_RANKING, 10);
+ celix_properties_setLong(svcInterceptorProps,
CELIX_FRAMEWORK_SERVICE_RANKING, 10);
celix_service_registration_options_t svcInterceptorOpts{};
svcInterceptorOpts.svc = serverSvcInterceptor;
svcInterceptorOpts.serviceName = REMOTE_INTERCEPTOR_SERVICE_NAME;
@@ -158,7 +158,7 @@ typedef struct rsa_dfi_exception_test_service {
clientSvcInterceptor->preExportCall =
clientServiceInterceptor_preExportCall;
clientSvcInterceptor->postExportCall =
clientServiceInterceptor_postExportCall;
celix_properties_t *clientInterceptorProps = celix_properties_create();
- celix_properties_setLong(clientInterceptorProps,
OSGI_FRAMEWORK_SERVICE_RANKING, 10);
+ celix_properties_setLong(clientInterceptorProps,
CELIX_FRAMEWORK_SERVICE_RANKING, 10);
celix_service_registration_options_t clientInterceptorOpts{};
clientInterceptorOpts.svc = clientSvcInterceptor;
clientInterceptorOpts.serviceName = REMOTE_INTERCEPTOR_SERVICE_NAME;
diff --git
a/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_tests.cc
b/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_tests.cc
index 42028b3e..7c83192d 100644
--- a/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_tests.cc
+++ b/bundles/remote_services/remote_service_admin_dfi/gtest/src/rsa_tests.cc
@@ -120,7 +120,7 @@ extern "C" {
celix_properties_set(props, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
"eec5404d-51d0-47ef-8d86-c825a8beda42");
celix_properties_set(props, OSGI_RSA_ENDPOINT_ID,
"eec5404d-51d0-47ef-8d86-c825a8beda42-42");
celix_properties_set(props, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
TST_CONFIGURATION_TYPE);
- celix_properties_set(props, OSGI_FRAMEWORK_OBJECTCLASS,
"org.apache.celix.Example");
+ celix_properties_set(props, CELIX_FRAMEWORK_SERVICE_NAME,
"org.apache.celix.Example");
int rc = endpointDescription_create(props, &endpoint);
ASSERT_EQ(CELIX_SUCCESS, rc);
diff --git
a/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c
b/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c
index 4628268e..d08033e6 100644
---
a/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c
+++
b/bundles/remote_services/remote_service_admin_dfi/src/remote_service_admin_dfi.c
@@ -611,7 +611,7 @@ celix_status_t
remoteServiceAdmin_exportService(remote_service_admin_t *admin, c
service_reference_pt reference = NULL;
char filter[256];
- snprintf(filter, 256, "(%s=%s)", (char *) OSGI_FRAMEWORK_SERVICE_ID,
serviceId);
+ snprintf(filter, 256, "(%s=%s)", (char *) CELIX_FRAMEWORK_SERVICE_PID,
serviceId);
status = bundleContext_getServiceReferences(admin->context, NULL,
filter, &references);
@@ -638,7 +638,7 @@ celix_status_t
remoteServiceAdmin_exportService(remote_service_admin_t *admin, c
const char *provided = NULL;
if (status == CELIX_SUCCESS) {
serviceReference_getProperty(reference, (char *)
OSGI_RSA_SERVICE_EXPORTED_INTERFACES, &exports);
- serviceReference_getProperty(reference, (char *)
OSGI_FRAMEWORK_OBJECTCLASS, &provided);
+ serviceReference_getProperty(reference, (char *)
CELIX_FRAMEWORK_SERVICE_NAME, &provided);
if (exports == NULL || provided == NULL || strcmp(exports,
provided) != 0) {
celix_logHelper_log(admin->loghelper, CELIX_LOG_LEVEL_WARNING,
"RSA: No Services to export.");
@@ -740,15 +740,15 @@ static celix_status_t
remoteServiceAdmin_createEndpointDescription(remote_servic
if (serviceReference_getProperty(reference, key, &value) ==
CELIX_SUCCESS
&& strcmp(key, (char*) OSGI_RSA_SERVICE_EXPORTED_INTERFACES) != 0
&& strcmp(key, (char*) OSGI_RSA_SERVICE_EXPORTED_CONFIGS) != 0
- && strcmp(key, (char*) OSGI_FRAMEWORK_OBJECTCLASS) != 0) {
+ && strcmp(key, (char*) CELIX_FRAMEWORK_SERVICE_NAME) != 0) {
celix_properties_set(endpointProperties, key, value);
}
}
- hash_map_entry_pt entry = hashMap_getEntry(endpointProperties, (void *)
OSGI_FRAMEWORK_SERVICE_ID);
+ hash_map_entry_pt entry = hashMap_getEntry(endpointProperties, (void *)
CELIX_FRAMEWORK_SERVICE_PID);
char* key = hashMapEntry_getKey(entry);
- char *serviceId = (char *) hashMap_remove(endpointProperties, (void *)
OSGI_FRAMEWORK_SERVICE_ID);
+ char *serviceId = (char *) hashMap_remove(endpointProperties, (void *)
CELIX_FRAMEWORK_SERVICE_PID);
const char *uuid = NULL;
char buf[512];
@@ -764,7 +764,7 @@ static celix_status_t
remoteServiceAdmin_createEndpointDescription(remote_servic
bundleContext_getProperty(admin->context, CELIX_FRAMEWORK_FRAMEWORK_UUID,
&uuid);
celix_properties_set(endpointProperties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
uuid);
- celix_properties_set(endpointProperties, OSGI_FRAMEWORK_OBJECTCLASS,
interface);
+ celix_properties_set(endpointProperties, CELIX_FRAMEWORK_SERVICE_NAME,
interface);
celix_properties_set(endpointProperties, OSGI_RSA_ENDPOINT_SERVICE_ID,
serviceId);
celix_properties_set(endpointProperties, OSGI_RSA_ENDPOINT_ID,
endpoint_uuid);
celix_properties_set(endpointProperties, OSGI_RSA_SERVICE_IMPORTED,
"true");
diff --git
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc
index 8c8452a3..fa413af0 100644
---
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc
+++
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmExportRegistrationUnitTestSuite.cc
@@ -126,13 +126,13 @@ public:
endpoint_description_t *CreateEndpointDescription() {
celix_properties_t *properties = celix_properties_create();
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
RSA_SHM_CALCULATOR_SERVICE);
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
RSA_SHM_CALCULATOR_SERVICE);
celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_VERSION,
RSA_SHM_CALCULATOR_SERVICE_VERSION);
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
RSA_SHM_CALCULATOR_CONFIGURATION_TYPE"," RSA_RPC_TYPE_PREFIX"mock");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"7f7efba5-500f-4ee9-b733-68de012091da");
celix_properties_setLong(properties, OSGI_RSA_ENDPOINT_SERVICE_ID,
calcSvcId);
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
- celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
celix_bundleContext_getProperty(ctx.get(), OSGI_FRAMEWORK_FRAMEWORK_UUID, ""));
+ celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
celix_bundleContext_getProperty(ctx.get(), CELIX_FRAMEWORK_FRAMEWORK_UUID, ""));
celix_properties_set(properties, RSA_SHM_SERVER_NAME_KEY,
"ShmServ-dummy");
endpoint_description_t *endpoint = nullptr;
auto status = endpointDescription_create(properties, &endpoint);
@@ -144,7 +144,7 @@ public:
service_reference_pt GetServiceReference() {
celix_array_list_t *references = nullptr;
char filter[32] = {0};
- snprintf(filter, sizeof(filter), "(%s=%ld)", (char *)
OSGI_FRAMEWORK_SERVICE_ID, calcSvcId);
+ snprintf(filter, sizeof(filter), "(%s=%ld)", (char *)
CELIX_FRAMEWORK_SERVICE_PID, calcSvcId);
auto status = bundleContext_getServiceReferences(ctx.get(), nullptr,
filter, &references);
EXPECT_EQ(CELIX_SUCCESS, status);
service_reference_pt reference = (service_reference_pt)
celix_arrayList_get(references, 0);
diff --git
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc
index 42d0e080..759439a1 100644
---
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc
+++
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImplUnitTestSuite.cc
@@ -94,7 +94,7 @@ public:
endpoint_description_t *CreateEndpointDescription() {
celix_properties_t *properties = celix_properties_create();
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
RSA_SHM_CALCULATOR_SERVICE);
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
RSA_SHM_CALCULATOR_SERVICE);
celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_VERSION,
RSA_SHM_CALCULATOR_SERVICE_VERSION);
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
RSA_SHM_CALCULATOR_CONFIGURATION_TYPE "," RSA_SHM_RPC_TYPE_DEFAULT);
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"7f7efba5-500f-4ee9-b733-68de012091da");
@@ -218,7 +218,7 @@ TEST_F(RsaShmUnitTestSuite, ExportService) {
EXPECT_EQ(CELIX_SUCCESS, status);
EXPECT_STREQ("AdditionValue",
celix_properties_get(endpoint->properties, "AdditionKey", nullptr));
EXPECT_EQ(nullptr, celix_properties_get(endpoint->properties,
OSGI_RSA_SERVICE_EXPORTED_INTERFACES, nullptr));
- EXPECT_STREQ(RSA_SHM_CALCULATOR_SERVICE,
celix_properties_get(endpoint->properties, OSGI_FRAMEWORK_OBJECTCLASS,
nullptr));
+ EXPECT_STREQ(RSA_SHM_CALCULATOR_SERVICE,
celix_properties_get(endpoint->properties, CELIX_FRAMEWORK_SERVICE_NAME,
nullptr));
EXPECT_STREQ("true", celix_properties_get(endpoint->properties,
OSGI_RSA_SERVICE_IMPORTED, nullptr));
EXPECT_EQ(calcSvcId, celix_properties_getAsLong(endpoint->properties,
OSGI_RSA_ENDPOINT_SERVICE_ID, -1));
free(ref);
diff --git
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc
index 9535ad90..54ec1016 100644
---
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc
+++
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/gtest/src/RsaShmImportRegistrationUnitTestSuite.cc
@@ -105,13 +105,13 @@ public:
endpoint_description_t *CreateEndpointDescription() {
celix_properties_t *properties = celix_properties_create();
- celix_properties_set(properties, OSGI_FRAMEWORK_OBJECTCLASS,
RSA_SHM_CALCULATOR_SERVICE);
+ celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_NAME,
RSA_SHM_CALCULATOR_SERVICE);
celix_properties_set(properties, CELIX_FRAMEWORK_SERVICE_VERSION,
RSA_SHM_CALCULATOR_SERVICE_VERSION);
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
RSA_SHM_CALCULATOR_CONFIGURATION_TYPE"," RSA_RPC_TYPE_PREFIX"mock");
celix_properties_set(properties, OSGI_RSA_ENDPOINT_ID,
"7f7efba5-500f-4ee9-b733-68de012091da");
celix_properties_setLong(properties, OSGI_RSA_ENDPOINT_SERVICE_ID,
100);//Set a dummy service id
celix_properties_set(properties, OSGI_RSA_SERVICE_IMPORTED, "true");
- celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
celix_bundleContext_getProperty(ctx.get(), OSGI_FRAMEWORK_FRAMEWORK_UUID, ""));
+ celix_properties_set(properties, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
celix_bundleContext_getProperty(ctx.get(), CELIX_FRAMEWORK_FRAMEWORK_UUID, ""));
celix_properties_set(properties, RSA_SHM_SERVER_NAME_KEY,
"ShmServ-dummy");
endpoint_description_t *endpoint = nullptr;
auto status = endpointDescription_create(properties, &endpoint);
diff --git
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c
index e86bcf7e..7d83422c 100644
---
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c
+++
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_export_registration.c
@@ -241,7 +241,7 @@ static void exportRegistration_addRpcFac(void *handle, void
*svc) {
}
char filter[32] = {0};// It is longer than the size of "service.id" +
reqHandlerSvcId
- (void)snprintf(filter, sizeof(filter), "(%s=%ld)",
OSGI_FRAMEWORK_SERVICE_ID,
+ (void)snprintf(filter, sizeof(filter), "(%s=%ld)",
CELIX_FRAMEWORK_SERVICE_PID,
reqHandlerSvcId);
celix_service_tracking_options_t opts =
CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
opts.filter.filter = filter;
diff --git
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c
index fcab1ecb..03e14435 100755
---
a/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c
+++
b/bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_impl.c
@@ -114,7 +114,7 @@ celix_status_t rsaShm_create(celix_bundle_context_t
*context, celix_log_helper_t
celix_auto(celix_service_registration_guard_t) reg =
celix_serviceRegistrationGuard_init(context, ad->reqSenderSvcId);
- const char *fwUuid = celix_bundleContext_getProperty(context,
OSGI_FRAMEWORK_FRAMEWORK_UUID, NULL);
+ const char *fwUuid = celix_bundleContext_getProperty(context,
CELIX_FRAMEWORK_FRAMEWORK_UUID, NULL);
if (fwUuid == NULL) {
celix_logHelper_error(logHelper,"Error Getting cfw uuid for shm rsa
admin.");
return CELIX_BUNDLE_EXCEPTION;
@@ -234,8 +234,8 @@ static void rsaShm_overlayProperties(celix_properties_t
*additionalProperties, c
const char *additionalPropKey = NULL;
const char *servicePropKey = NULL;
CELIX_PROPERTIES_FOR_EACH(additionalProperties, additionalPropKey) {
- if (strcmp(additionalPropKey,(char*) OSGI_FRAMEWORK_OBJECTCLASS) != 0
- && strcmp(additionalPropKey,(char*) OSGI_FRAMEWORK_SERVICE_ID)
!= 0) {
+ if (strcmp(additionalPropKey,(char*) CELIX_FRAMEWORK_SERVICE_NAME) != 0
+ && strcmp(additionalPropKey,(char*)
CELIX_FRAMEWORK_SERVICE_PID) != 0) {
bool propKeyCaseEqual = false;
CELIX_PROPERTIES_FOR_EACH(serviceProperties, servicePropKey) {
@@ -294,7 +294,7 @@ celix_status_t rsaShm_exportService(rsa_shm_t *admin, char
*serviceId,
celix_array_list_t *references = NULL;
service_reference_pt reference = NULL;
char filter[32] = {0};// It is longer than the size of "service.id" +
serviceId
- snprintf(filter, sizeof(filter), "(%s=%s)", (char *)
OSGI_FRAMEWORK_SERVICE_ID, serviceId);
+ snprintf(filter, sizeof(filter), "(%s=%s)", (char *)
CELIX_FRAMEWORK_SERVICE_PID, serviceId);
status = bundleContext_getServiceReferences(admin->context, NULL, filter,
&references);
if (status != CELIX_SUCCESS) {
celix_logHelper_error(admin->logHelper,"Error getting reference for
service id %s.", serviceId);
@@ -334,9 +334,9 @@ celix_status_t rsaShm_exportService(rsa_shm_t *admin, char
*serviceId,
celix_autoptr(celix_array_list_t) registrations = NULL;
if (rsaShm_isConfigTypeMatched(exportedProperties)) {
const char *exportsProp = celix_properties_get(exportedProperties,
(char *) OSGI_RSA_SERVICE_EXPORTED_INTERFACES, NULL);
- const char *providedProp = celix_properties_get(exportedProperties,
(char *) OSGI_FRAMEWORK_OBJECTCLASS, NULL);
+ const char *providedProp = celix_properties_get(exportedProperties,
(char *) CELIX_FRAMEWORK_SERVICE_NAME, NULL);
if (exportsProp == NULL || providedProp == NULL) {
- celix_logHelper_error(admin->logHelper, "Error exporting service
%s. Missing property %s or %s.", serviceId,
OSGI_RSA_SERVICE_EXPORTED_INTERFACES, OSGI_FRAMEWORK_OBJECTCLASS);
+ celix_logHelper_error(admin->logHelper, "Error exporting service
%s. Missing property %s or %s.", serviceId,
OSGI_RSA_SERVICE_EXPORTED_INTERFACES, CELIX_FRAMEWORK_SERVICE_NAME);
return CELIX_ILLEGAL_STATE;
}
celix_autofree char *exports = celix_utils_trim(exportsProp);
@@ -493,25 +493,25 @@ static celix_status_t
rsaShm_createEndpointDescription(rsa_shm_t *admin,
assert(description != NULL);
celix_autoptr(celix_properties_t) endpointProperties =
celix_properties_copy(exportedProperties);
- celix_properties_unset(endpointProperties,OSGI_FRAMEWORK_OBJECTCLASS);
+ celix_properties_unset(endpointProperties,CELIX_FRAMEWORK_SERVICE_NAME);
celix_properties_unset(endpointProperties,OSGI_RSA_SERVICE_EXPORTED_INTERFACES);
celix_properties_unset(endpointProperties,OSGI_RSA_SERVICE_EXPORTED_CONFIGS);
- celix_properties_unset(endpointProperties, OSGI_FRAMEWORK_SERVICE_ID);
+ celix_properties_unset(endpointProperties, CELIX_FRAMEWORK_SERVICE_PID);
- long serviceId = celix_properties_getAsLong(exportedProperties,
OSGI_FRAMEWORK_SERVICE_ID, -1);
+ long serviceId = celix_properties_getAsLong(exportedProperties,
CELIX_FRAMEWORK_SERVICE_PID, -1);
uuid_t endpoint_uid;
uuid_generate(endpoint_uid);
char endpoint_uuid[37];
uuid_unparse_lower(endpoint_uid, endpoint_uuid);
- const char *uuid = celix_bundleContext_getProperty(admin->context,
OSGI_FRAMEWORK_FRAMEWORK_UUID, NULL);
+ const char *uuid = celix_bundleContext_getProperty(admin->context,
CELIX_FRAMEWORK_FRAMEWORK_UUID, NULL);
if (uuid == NULL) {
celix_logHelper_error(admin->logHelper, "Cannot get framework uuid");
return CELIX_FRAMEWORK_EXCEPTION;
}
celix_properties_set(endpointProperties, (char*)
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
- celix_properties_set(endpointProperties, (char*)
OSGI_FRAMEWORK_OBJECTCLASS, interface);
+ celix_properties_set(endpointProperties, (char*)
CELIX_FRAMEWORK_SERVICE_NAME, interface);
celix_properties_setLong(endpointProperties, (char*)
OSGI_RSA_ENDPOINT_SERVICE_ID, serviceId);
celix_properties_set(endpointProperties, (char*) OSGI_RSA_ENDPOINT_ID,
endpoint_uuid);
celix_properties_set(endpointProperties, (char*)
OSGI_RSA_SERVICE_IMPORTED, "true");
diff --git
a/bundles/remote_services/rsa_common/gtest/src/EndpointDescriptionUnitTestSuite.cc
b/bundles/remote_services/rsa_common/gtest/src/EndpointDescriptionUnitTestSuite.cc
index 2eaef81e..7ef2ba49 100644
---
a/bundles/remote_services/rsa_common/gtest/src/EndpointDescriptionUnitTestSuite.cc
+++
b/bundles/remote_services/rsa_common/gtest/src/EndpointDescriptionUnitTestSuite.cc
@@ -39,7 +39,7 @@ public:
properties =
std::shared_ptr<celix_properties_t>(celix_properties_create(),
[](celix_properties_t* p) {celix_properties_destroy(p);});
celix_properties_set(properties.get(),
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, "e7c2a8ab-79a8-40c5-a926-85ae64c9382a");
- celix_properties_set(properties.get(), OSGI_FRAMEWORK_OBJECTCLASS,
"org.example.api.Foo");
+ celix_properties_set(properties.get(), CELIX_FRAMEWORK_SERVICE_NAME,
"org.example.api.Foo");
celix_properties_set(properties.get(), OSGI_RSA_ENDPOINT_ID,
"983e0ad8-5de9-44a8-b336-b3dc79d364b5");
celix_properties_set(properties.get(), OSGI_RSA_ENDPOINT_SERVICE_ID,
"100");
}
@@ -97,7 +97,7 @@ TEST_F(EndpointDescriptionUnitTestSuite,
CreateEndpointDescriptionWithInvalidPro
TEST_F(EndpointDescriptionUnitTestSuite,
CreateEndpointDescriptionWithInvalidProperties2) {
endpoint_description_t* endpointDescription = nullptr;
celix_properties_t *props = celix_properties_copy(properties.get());
- celix_properties_unset(props, OSGI_FRAMEWORK_OBJECTCLASS);
+ celix_properties_unset(props, CELIX_FRAMEWORK_SERVICE_NAME);
auto status = endpointDescription_create(props, &endpointDescription);
EXPECT_EQ(status, CELIX_BUNDLE_EXCEPTION);
celix_properties_destroy(props);
diff --git a/bundles/remote_services/rsa_common/src/endpoint_description.c
b/bundles/remote_services/rsa_common/src/endpoint_description.c
index 397d800f..e9e9affa 100644
--- a/bundles/remote_services/rsa_common/src/endpoint_description.c
+++ b/bundles/remote_services/rsa_common/src/endpoint_description.c
@@ -51,7 +51,7 @@ celix_status_t endpointDescription_create(celix_properties_t
*properties, endpoi
ep->properties = properties;
ep->frameworkUUID = (char*)celix_properties_get(properties,
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, NULL);
ep->id = (char*)celix_properties_get(properties, OSGI_RSA_ENDPOINT_ID,
NULL);
- ep->serviceName = celix_utils_strdup(celix_properties_get(properties,
OSGI_FRAMEWORK_OBJECTCLASS, NULL));
+ ep->serviceName = celix_utils_strdup(celix_properties_get(properties,
CELIX_FRAMEWORK_SERVICE_NAME, NULL));
ep->serviceId = celix_properties_getAsLong(properties,
OSGI_RSA_ENDPOINT_SERVICE_ID, -1);
if (!(ep->frameworkUUID) || !(ep->id) || !(ep->serviceName) ||
ep->serviceId < 0) {
diff --git a/bundles/remote_services/rsa_common/src/export_registration_impl.c
b/bundles/remote_services/rsa_common/src/export_registration_impl.c
index f48ede16..32f28f72 100644
--- a/bundles/remote_services/rsa_common/src/export_registration_impl.c
+++ b/bundles/remote_services/rsa_common/src/export_registration_impl.c
@@ -127,7 +127,7 @@ celix_status_t
exportRegistration_createEndpointTracker(export_registration_t *r
if (status == CELIX_SUCCESS) {
char filter[512];
- snprintf(filter, 512, "(&(%s=%s)(remote.interface=%s))",
(char*) OSGI_FRAMEWORK_OBJECTCLASS, (char*) OSGI_RSA_REMOTE_ENDPOINT,
registration->endpointDescription->serviceName);
+ snprintf(filter, 512, "(&(%s=%s)(remote.interface=%s))",
(char*) CELIX_FRAMEWORK_SERVICE_NAME, (char*) OSGI_RSA_REMOTE_ENDPOINT,
registration->endpointDescription->serviceName);
status = serviceTracker_createWithFilter(registration->context,
filter, customizer, tracker);
}
diff --git a/bundles/remote_services/rsa_common/src/import_registration_impl.c
b/bundles/remote_services/rsa_common/src/import_registration_impl.c
index 57cedf68..95c67db8 100644
--- a/bundles/remote_services/rsa_common/src/import_registration_impl.c
+++ b/bundles/remote_services/rsa_common/src/import_registration_impl.c
@@ -167,7 +167,7 @@ celix_status_t
importRegistration_createProxyFactoryTracker(import_registration_
if (status == CELIX_SUCCESS) {
char filter[512];
- snprintf(filter, 512, "(&(%s=%s)(proxy.interface=%s))", (char*)
OSGI_FRAMEWORK_OBJECTCLASS, (char*) OSGI_RSA_REMOTE_PROXY_FACTORY,
registration_factory->serviceName);
+ snprintf(filter, 512, "(&(%s=%s)(proxy.interface=%s))", (char*)
CELIX_FRAMEWORK_SERVICE_NAME, (char*) OSGI_RSA_REMOTE_PROXY_FACTORY,
registration_factory->serviceName);
status =
serviceTracker_createWithFilter(registration_factory->context, filter,
customizer, tracker);
if (status == CELIX_SUCCESS)
diff --git
a/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c
b/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c
index b1c9b969..332d15c3 100644
--- a/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c
+++ b/bundles/remote_services/rsa_common/src/remote_interceptors_handler.c
@@ -203,11 +203,11 @@ int referenceCompare(const void *a, const void *b) {
const entry_t *aEntry = a;
const entry_t *bEntry = b;
- long servIdA = celix_properties_getAsLong(aEntry->properties,
OSGI_FRAMEWORK_SERVICE_ID, 0);
- long servIdB = celix_properties_getAsLong(bEntry->properties,
OSGI_FRAMEWORK_SERVICE_ID, 0);
+ long servIdA = celix_properties_getAsLong(aEntry->properties,
CELIX_FRAMEWORK_SERVICE_PID, 0);
+ long servIdB = celix_properties_getAsLong(bEntry->properties,
CELIX_FRAMEWORK_SERVICE_PID, 0);
- long servRankingA = celix_properties_getAsLong(aEntry->properties,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
- long servRankingB = celix_properties_getAsLong(bEntry->properties,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingA = celix_properties_getAsLong(aEntry->properties,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingB = celix_properties_getAsLong(bEntry->properties,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
return celix_utils_compareServiceIdsAndRanking(servIdA, servRankingA,
servIdB, servRankingB);
}
diff --git
a/bundles/remote_services/rsa_rpc_json/gtest/src/RsaJsonRpcUnitTestSuite.cc
b/bundles/remote_services/rsa_rpc_json/gtest/src/RsaJsonRpcUnitTestSuite.cc
index d25901b7..87a8f281 100644
--- a/bundles/remote_services/rsa_rpc_json/gtest/src/RsaJsonRpcUnitTestSuite.cc
+++ b/bundles/remote_services/rsa_rpc_json/gtest/src/RsaJsonRpcUnitTestSuite.cc
@@ -88,7 +88,7 @@ public:
EXPECT_TRUE(endpointDesc->properties != nullptr);
const char *uuid = celix_bundleContext_getProperty(ctx.get(),
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
celix_properties_set(endpointDesc->properties,
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
- celix_properties_set(endpointDesc->properties,
OSGI_FRAMEWORK_OBJECTCLASS, RSA_RPC_JSON_TEST_SERVICE);
+ celix_properties_set(endpointDesc->properties,
CELIX_FRAMEWORK_SERVICE_NAME, RSA_RPC_JSON_TEST_SERVICE);
celix_properties_set(endpointDesc->properties,
CELIX_FRAMEWORK_SERVICE_VERSION, "1.0.0");
celix_properties_set(endpointDesc->properties, OSGI_RSA_ENDPOINT_ID,
"8cf05b2d-421e-4c46-b55e-c3f1900b7cba");
celix_properties_set(endpointDesc->properties,
OSGI_RSA_SERVICE_IMPORTED, "true");
diff --git a/bundles/remote_services/topology_manager/src/activator.c
b/bundles/remote_services/topology_manager/src/activator.c
index c36b2f92..1e8e36dd 100644
--- a/bundles/remote_services/topology_manager/src/activator.c
+++ b/bundles/remote_services/topology_manager/src/activator.c
@@ -172,13 +172,13 @@ celix_status_t celix_bundleActivator_start(void *
userData, celix_bundle_context
return CELIX_ILLEGAL_STATE;
}
- size_t len = 14 + strlen(OSGI_FRAMEWORK_OBJECTCLASS) +
strlen(OSGI_RSA_ENDPOINT_FRAMEWORK_UUID) + strlen(uuid);
+ size_t len = 14 + strlen(CELIX_FRAMEWORK_SERVICE_NAME) +
strlen(OSGI_RSA_ENDPOINT_FRAMEWORK_UUID) + strlen(uuid);
char *scope = malloc(len);
if (!scope) {
return CELIX_ENOMEM;
}
- snprintf(scope, len, "(&(%s=*)(!(%s=%s)))", OSGI_FRAMEWORK_OBJECTCLASS,
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
+ snprintf(scope, len, "(&(%s=*)(!(%s=%s)))",
CELIX_FRAMEWORK_SERVICE_NAME, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
celix_logHelper_log(activator->celix_logHelper, CELIX_LOG_LEVEL_INFO,
"TOPOLOGY_MANAGER: endpoint listener scope is %s", scope);
diff --git a/bundles/remote_services/topology_manager/src/scope.c
b/bundles/remote_services/topology_manager/src/scope.c
index c4ac6b7a..cd5cf6b9 100644
--- a/bundles/remote_services/topology_manager/src/scope.c
+++ b/bundles/remote_services/topology_manager/src/scope.c
@@ -282,7 +282,7 @@ celix_status_t scope_getExportProperties(scope_pt scope,
service_reference_pt re
if (serviceReference_getProperty(reference, key, &value) ==
CELIX_SUCCESS) {
// && strcmp(key, (char*)
OSGI_RSA_SERVICE_EXPORTED_INTERFACES) != 0
-// && strcmp(key, (char*) OSGI_FRAMEWORK_OBJECTCLASS) !=
0) {
+// && strcmp(key, (char*) CELIX_FRAMEWORK_SERVICE_NAME) !=
0) {
celix_properties_set(serviceProperties, key, value);
}
diff --git a/bundles/remote_services/topology_manager/src/topology_manager.c
b/bundles/remote_services/topology_manager/src/topology_manager.c
index 6076af4f..0625ab8d 100644
--- a/bundles/remote_services/topology_manager/src/topology_manager.c
+++ b/bundles/remote_services/topology_manager/src/topology_manager.c
@@ -227,7 +227,7 @@ celix_status_t topologyManager_rsaAdded(void * handle,
service_reference_pt unus
service_reference_pt reference = hashMapEntry_getKey(entry);
const char* serviceId = NULL;
- serviceReference_getProperty(reference, OSGI_FRAMEWORK_SERVICE_ID,
&serviceId);
+ serviceReference_getProperty(reference, CELIX_FRAMEWORK_SERVICE_PID,
&serviceId);
scope_getExportProperties(manager->scope, reference,
&serviceProperties);
@@ -346,7 +346,7 @@ celix_status_t topologyManager_exportScopeChanged(void
*handle, char *filterStr)
status = filter_match(filter, props, &found);
if (found) {
srvRefs[nrFound] = reference;
- serviceReference_getProperty(reference,
OSGI_FRAMEWORK_SERVICE_ID, &serviceId);
+ serviceReference_getProperty(reference,
CELIX_FRAMEWORK_SERVICE_PID, &serviceId);
srvIds[nrFound++] = (char*)serviceId;
}
}
@@ -399,7 +399,7 @@ celix_status_t topologyManager_importScopeChanged(void
*handle, char *service_na
hash_map_entry_pt entry =
hashMapIterator_nextEntry(importedServicesIterator);
endpoint = hashMapEntry_getKey(entry);
- entry = hashMap_getEntry(endpoint->properties, (void *)
OSGI_FRAMEWORK_OBJECTCLASS);
+ entry = hashMap_getEntry(endpoint->properties, (void *)
CELIX_FRAMEWORK_SERVICE_NAME);
char* name = (char *) hashMapEntry_getValue(entry);
// Test if a service with the same name is imported
if (strcmp(name, service_name) == 0) {
diff --git
a/bundles/remote_services/topology_manager/tms_tst/disc_mock/disc_mock_activator.c
b/bundles/remote_services/topology_manager/tms_tst/disc_mock/disc_mock_activator.c
index 548b64ca..4fc90539 100644
---
a/bundles/remote_services/topology_manager/tms_tst/disc_mock/disc_mock_activator.c
+++
b/bundles/remote_services/topology_manager/tms_tst/disc_mock/disc_mock_activator.c
@@ -73,7 +73,7 @@ celix_status_t bundleActivator_start(void * userData,
celix_bundle_context_t *co
}
char* scope = NULL;
- int rc = asprintf(&scope, "(&(%s=*)(%s=%s))", OSGI_FRAMEWORK_OBJECTCLASS,
OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
+ int rc = asprintf(&scope, "(&(%s=*)(%s=%s))",
CELIX_FRAMEWORK_SERVICE_NAME, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID, uuid);
status = rc < 0 ? CELIX_ENOMEM : CELIX_SUCCESS;
celix_properties_t *props = NULL;
diff --git a/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
b/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
index 500a9bae..f479a128 100644
--- a/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
+++ b/bundles/remote_services/topology_manager/tms_tst/tms_tests.cpp
@@ -485,7 +485,7 @@ extern "C" {
celix_properties_set(props, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
"eec5404d-51d0-47ef-8d86-c825a8beda42");
celix_properties_set(props, OSGI_RSA_ENDPOINT_ID,
"eec5404d-51d0-47ef-8d86-c825a8beda42-42");
celix_properties_set(props, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
TST_CONFIGURATION_TYPE);
- celix_properties_set(props, OSGI_FRAMEWORK_OBJECTCLASS,
"org.apache.celix.test.MyBundle");
+ celix_properties_set(props, CELIX_FRAMEWORK_SERVICE_NAME,
"org.apache.celix.test.MyBundle");
celix_properties_set(props, "service.version", "1.0.0");
celix_properties_set(props, "zone", "a_zone");
@@ -537,7 +537,7 @@ extern "C" {
celix_properties_set(props, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
"eec5404d-51d0-47ef-8d86-c825a8beda42");
celix_properties_set(props, OSGI_RSA_ENDPOINT_ID,
"eec5404d-51d0-47ef-8d86-c825a8beda42-42");
celix_properties_set(props, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
TST_CONFIGURATION_TYPE);
- celix_properties_set(props, OSGI_FRAMEWORK_OBJECTCLASS,
"org.apache.celix.test.MyBundle");
+ celix_properties_set(props, CELIX_FRAMEWORK_SERVICE_NAME,
"org.apache.celix.test.MyBundle");
celix_properties_set(props, "service.version", "1.0.0");
celix_properties_set(props, "zone", "a_zone");
@@ -588,7 +588,7 @@ extern "C" {
celix_properties_set(props, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
"eec5404d-51d0-47ef-8d86-c825a8beda42");
celix_properties_set(props, OSGI_RSA_ENDPOINT_ID,
"eec5404d-51d0-47ef-8d86-c825a8beda42-42");
celix_properties_set(props, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
TST_CONFIGURATION_TYPE);
- celix_properties_set(props, OSGI_FRAMEWORK_OBJECTCLASS,
"org.apache.celix.test.MyBundle");
+ celix_properties_set(props, CELIX_FRAMEWORK_SERVICE_NAME,
"org.apache.celix.test.MyBundle");
celix_properties_set(props, "service.version", "1.0.0"); //TODO find
out standard in osgi spec
celix_properties_set(props, "zone", "a_zone");
@@ -634,7 +634,7 @@ extern "C" {
celix_properties_set(props, OSGI_RSA_ENDPOINT_FRAMEWORK_UUID,
"eec5404d-51d0-47ef-8d86-c825a8beda42");
celix_properties_set(props, OSGI_RSA_ENDPOINT_ID,
"eec5404d-51d0-47ef-8d86-c825a8beda42-42");
celix_properties_set(props, OSGI_RSA_SERVICE_IMPORTED_CONFIGS,
TST_CONFIGURATION_TYPE);
- celix_properties_set(props, OSGI_FRAMEWORK_OBJECTCLASS,
"org.apache.celix.test.MyBundle");
+ celix_properties_set(props, CELIX_FRAMEWORK_SERVICE_NAME,
"org.apache.celix.test.MyBundle");
celix_properties_set(props, "service.version", "1.0.0");
celix_properties_set(props, "zone", "a_zone");
diff --git a/bundles/shell/shell/src/bundle_command.c
b/bundles/shell/shell/src/bundle_command.c
index 186a6e74..c44e659c 100644
--- a/bundles/shell/shell/src/bundle_command.c
+++ b/bundles/shell/shell/src/bundle_command.c
@@ -31,8 +31,8 @@ bool bundleCommand_execute(void *handle, const char
*constCommandLine, FILE *out
char* sub = NULL;
char* savePtr = NULL;
celix_autofree char* command = celix_utils_strdup(constCommandLine);
- strtok_r(command, OSGI_SHELL_COMMAND_SEPARATOR, &savePtr); //ignore
command name
- sub = strtok_r(NULL, OSGI_SHELL_COMMAND_SEPARATOR, &savePtr);
+ strtok_r(command, CELIX_SHELL_COMMAND_SEPARATOR, &savePtr); //ignore
command name
+ sub = strtok_r(NULL, CELIX_SHELL_COMMAND_SEPARATOR, &savePtr);
celix_autoptr(celix_array_list_t) bundleIds = celix_arrayList_create();
if (sub == NULL) {
@@ -40,7 +40,7 @@ bool bundleCommand_execute(void *handle, const char
*constCommandLine, FILE *out
return false;
}
- for (; sub != NULL; sub = strtok_r(NULL, OSGI_SHELL_COMMAND_SEPARATOR,
&savePtr)) {
+ for (; sub != NULL; sub = strtok_r(NULL, CELIX_SHELL_COMMAND_SEPARATOR,
&savePtr)) {
bool converted;
long bndId = celix_utils_convertStringToLong(sub, 0, &converted);
if (!converted) {
diff --git a/bundles/shell/shell/src/c_shell.c
b/bundles/shell/shell/src/c_shell.c
index ad386b6a..6113a3f2 100644
--- a/bundles/shell/shell/src/c_shell.c
+++ b/bundles/shell/shell/src/c_shell.c
@@ -36,7 +36,6 @@ shell_t* shell_create(celix_bundle_context_t *ctx) {
celixThreadRwlock_create(&shell->lock, NULL);
shell->commandServices = hashMap_create(utils_stringHash, NULL,
utils_stringEquals, NULL);
- shell->legacyCommandServices = hashMap_create(utils_stringHash, NULL,
utils_stringEquals, NULL);
return shell;
}
@@ -45,7 +44,6 @@ void shell_destroy(shell_t *shell) {
if (shell != NULL) {
celixThreadRwlock_writeLock(&shell->lock);
hashMap_destroy(shell->commandServices, false, false);
- hashMap_destroy(shell->legacyCommandServices, false, false);
celixThreadRwlock_unlock(&shell->lock);
celixThreadRwlock_destroy(&shell->lock);
celix_logHelper_destroy(shell->logHelper);
@@ -62,7 +60,7 @@ celix_status_t shell_addCommand(shell_t *shell,
celix_shell_command_t *svc, cons
celix_logHelper_log(shell->logHelper, CELIX_LOG_LEVEL_WARNING,
"Command service must contain a '%s' property!", CELIX_SHELL_COMMAND_NAME);
status = CELIX_BUNDLE_EXCEPTION;
} else {
- long svcId = celix_properties_getAsLong(props,
OSGI_FRAMEWORK_SERVICE_ID, -1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
celixThreadRwlock_writeLock(&shell->lock);
if (hashMap_containsKey(shell->commandServices, name)) {
celix_logHelper_log(shell->logHelper, CELIX_LOG_LEVEL_WARNING,
"Command with name %s already registered!", name);
@@ -92,7 +90,7 @@ celix_status_t shell_removeCommand(shell_t *shell,
celix_shell_command_t *svc, c
celix_logHelper_log(shell->logHelper, CELIX_LOG_LEVEL_WARNING,
"Command service must contain a '%s' property!", CELIX_SHELL_COMMAND_NAME);
status = CELIX_BUNDLE_EXCEPTION;
} else {
- long svcId = celix_properties_getAsLong(props,
OSGI_FRAMEWORK_SERVICE_ID, -1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
celixThreadRwlock_writeLock(&shell->lock);
if (hashMap_containsKey(shell->commandServices, name)) {
celix_shell_command_entry_t *entry =
hashMap_get(shell->commandServices, name);
@@ -123,12 +121,6 @@ celix_status_t shell_getCommands(shell_t *shell,
celix_array_list_t **outCommand
const char *name = hashMapIterator_nextKey(&iter);
celix_arrayList_add(result, strndup(name, 1024*1024*10));
}
-
- iter = hashMapIterator_construct(shell->legacyCommandServices);
- while (hashMapIterator_hasNext(&iter)) {
- const char *name = hashMapIterator_nextKey(&iter);
- celix_arrayList_add(result, strndup(name, 1024*1024*10));
- }
celixThreadRwlock_unlock(&shell->lock);
*outCommands = result;
@@ -142,13 +134,9 @@ celix_status_t shell_getCommandUsage(shell_t *shell, const
char *commandName, ch
celixThreadRwlock_readLock(&shell->lock);
celix_shell_command_entry_t *entry = hashMap_get(shell->commandServices,
commandName);
- celix_legacy_command_entry_t *legacyEntry =
hashMap_get(shell->legacyCommandServices, commandName);
if (entry != NULL) {
const char *usage = celix_properties_get(entry->props,
CELIX_SHELL_COMMAND_USAGE, "N/A");
*outUsage = celix_utils_strdup(usage);
- } else if (legacyEntry != NULL ){
- const char *usage = celix_properties_get(legacyEntry->props,
OSGI_SHELL_COMMAND_USAGE, "N/A");
- *outUsage = celix_utils_strdup(usage);
} else {
*outUsage = NULL;
}
@@ -162,13 +150,9 @@ celix_status_t shell_getCommandDescription(shell_t *shell,
const char *commandNa
celixThreadRwlock_readLock(&shell->lock);
celix_shell_command_entry_t *entry = hashMap_get(shell->commandServices,
commandName);
- celix_legacy_command_entry_t *legacyEntry =
hashMap_get(shell->legacyCommandServices, commandName);
if (entry != NULL) {
const char *desc = celix_properties_get(entry->props,
CELIX_SHELL_COMMAND_DESCRIPTION, "N/A");
*outDescription = celix_utils_strdup(desc);
- } else if (legacyEntry != NULL) {
- const char *desc = celix_properties_get(legacyEntry->props,
OSGI_SHELL_COMMAND_DESCRIPTION, "N/A");
- *outDescription = celix_utils_strdup(desc);
} else {
*outDescription = NULL;
}
@@ -215,13 +199,9 @@ celix_status_t shell_executeCommand(shell_t *shell, const
char *commandLine, FIL
celixThreadRwlock_readLock(&shell->lock);
celix_shell_command_entry_t *entry = shell_findEntry(shell, commandName,
err);
- celix_legacy_command_entry_t *legacyEntry =
hashMap_get(shell->legacyCommandServices, commandName);
if (entry != NULL) {
bool succeeded = entry->svc->executeCommand(entry->svc->handle,
commandLine, out, err);
status = succeeded ? CELIX_SUCCESS : CELIX_BUNDLE_EXCEPTION;
- } else if (legacyEntry != NULL) {
- char *cl = (void*)commandLine; //NOTE this is needed for the legacy
command services (also the reason why it is legacy/deprecated)
- status = legacyEntry->svc->executeCommand(legacyEntry->svc->handle,
cl, out, err);
} else {
fprintf(err, "No command '%s'. Provided command line: %s\n",
commandName, commandLine);
status = CELIX_BUNDLE_EXCEPTION;
diff --git a/bundles/shell/shell/src/help_command.c
b/bundles/shell/shell/src/help_command.c
index 1339969a..092a32f4 100644
--- a/bundles/shell/shell/src/help_command.c
+++ b/bundles/shell/shell/src/help_command.c
@@ -47,8 +47,8 @@ static void printHelp(void *handle, void *svc) {
memset(out_str, 0, sizeof(out_str));
- strtok_r(cmdLine, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
- sub = strtok_r(NULL, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ strtok_r(cmdLine, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ sub = strtok_r(NULL, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
if (sub == NULL) {
unsigned int i;
diff --git a/bundles/shell/shell/src/lb_command.c
b/bundles/shell/shell/src/lb_command.c
index 2b81a5b5..fd02fb70 100644
--- a/bundles/shell/shell/src/lb_command.c
+++ b/bundles/shell/shell/src/lb_command.c
@@ -177,8 +177,8 @@ bool lbCommand_execute(void *handle, const char
*const_command_line_str, FILE *o
char *sub_str = NULL;
char *save_ptr = NULL;
- strtok_r(command_line_str, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
- sub_str = strtok_r(NULL, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ strtok_r(command_line_str, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ sub_str = strtok_r(NULL, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
while (sub_str != NULL) {
if (strcmp(sub_str, "-l") == 0) {
opts.show_location = true;
@@ -189,7 +189,7 @@ bool lbCommand_execute(void *handle, const char
*const_command_line_str, FILE *o
} else {
opts.listGroup = strdup(sub_str);
}
- sub_str = strtok_r(NULL, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ sub_str = strtok_r(NULL, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
}
lbCommand_listBundles(ctx, &opts, out_ptr);
diff --git a/bundles/shell/shell/src/query_command.c
b/bundles/shell/shell/src/query_command.c
index 6e7fc37d..b7f20fee 100644
--- a/bundles/shell/shell/src/query_command.c
+++ b/bundles/shell/shell/src/query_command.c
@@ -188,8 +188,8 @@ bool queryCommand_execute(void *_ptr, const char
*command_line_str, FILE *sout,
char *sub_str = NULL;
char *save_ptr = NULL;
- strtok_r(commandLine, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
- sub_str = strtok_r(NULL, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ strtok_r(commandLine, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ sub_str = strtok_r(NULL, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
while (sub_str != NULL) {
if (strcmp(sub_str, "-v") == 0) {
opts.verbose = true;
@@ -223,7 +223,7 @@ bool queryCommand_execute(void *_ptr, const char
*command_line_str, FILE *sout,
}
}
- sub_str = strtok_r(NULL, OSGI_SHELL_COMMAND_SEPARATOR, &save_ptr);
+ sub_str = strtok_r(NULL, CELIX_SHELL_COMMAND_SEPARATOR, &save_ptr);
}
free(commandLine);
diff --git a/bundles/shell/shell/src/shell_private.h
b/bundles/shell/shell/src/shell_private.h
index 500faa26..d3ab4fcb 100644
--- a/bundles/shell/shell/src/shell_private.h
+++ b/bundles/shell/shell/src/shell_private.h
@@ -27,10 +27,6 @@
#include "celix_log_helper.h"
#include "celix_threads.h"
-#ifdef CELIX_INSTALL_DEPRECATED_API
-#include "command.h"
-#endif
-
typedef struct celix_shell_command_entry {
long svcId;
celix_shell_command_t *svc;
@@ -39,34 +35,11 @@ typedef struct celix_shell_command_entry {
char *namespace;
} celix_shell_command_entry_t;
-
-#ifdef CELIX_INSTALL_DEPRECATED_API
-typedef struct celix_legacy_command_entry {
- long svcId;
- command_service_t *svc;
- const celix_properties_t *props;
-} celix_legacy_command_entry_t;
-#else
-//NOTE dummy entry and defines to prevent compile issues when deprecated
command service are not used
-#define OSGI_SHELL_COMMAND_USAGE "command.usage"
-#define OSGI_SHELL_COMMAND_DESCRIPTION "command.description"
-struct celix_dummy_shell {
- void *handle;
- celix_status_t (*executeCommand)(void *, char*, FILE*, FILE*);
-};
-typedef struct celix_legacy_command_entry {
- long svcId;
- struct celix_dummy_shell *svc;
- const celix_properties_t *props;
-} celix_legacy_command_entry_t;
-#endif
-
struct shell {
celix_bundle_context_t *ctx;
celix_log_helper_t *logHelper;
celix_thread_rwlock_t lock; //protects below
hash_map_t *commandServices; //key = char* (fully qualified command name),
value = celix_shell_command_entry_t*
- hash_map_t *legacyCommandServices; //key = char* (command name), value =
celix_legacy_command_entry_t*
};
typedef struct shell shell_t;
@@ -81,9 +54,4 @@ celix_status_t shell_getCommands(shell_t *shell,
celix_array_list_t **commands);
celix_status_t shell_getCommandUsage(shell_t *shell, const char *commandName,
char **outUsage);
celix_status_t shell_getCommandDescription(shell_t *shell, const char
*commandName, char **outDescription);
-#ifdef CELIX_INSTALL_DEPRECATED_API
-celix_status_t shell_addLegacyCommand(shell_t *shell, command_service_t *svc,
const celix_properties_t *props);
-celix_status_t shell_removeLegacyCommand(shell_t *shell, command_service_t
*svc, const celix_properties_t *props);
-#endif
-
#endif /* SHELL_PRIVATE_H_ */
diff --git a/bundles/shell/shell/src/std_commands.h
b/bundles/shell/shell/src/std_commands.h
index a2be1070..ad2e3be9 100644
--- a/bundles/shell/shell/src/std_commands.h
+++ b/bundles/shell/shell/src/std_commands.h
@@ -24,7 +24,7 @@
#include "celix_bundle_context.h"
#include "celix_errno.h"
-#define OSGI_SHELL_COMMAND_SEPARATOR " "
+#define CELIX_SHELL_COMMAND_SEPARATOR " "
#ifdef __cplusplus
extern "C" {
diff --git
a/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
b/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
index bfbacc26..5a7464ae 100644
--- a/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
+++ b/examples/celix-examples/services_example_c/src/dynamic_consumer_example.c
@@ -71,8 +71,8 @@ static void gccExample(activator_data_t *data) {
void use(void *handle, void *svc, const celix_properties_t *props) {
example_calc_t *calc = svc;
- rank = celix_properties_getAsLong(props,
OSGI_FRAMEWORK_SERVICE_RANKING, -1L);
- svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ rank = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_RANKING, -1L);
+ svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID,
-1L);
result = calc->calc(calc->handle, 1);
}
@@ -102,8 +102,8 @@ static void removeSvc(activator_data_t *data, void *svc
CELIX_UNUSED) {
static void useHighest(activator_data_t *data CELIX_UNUSED, example_calc_t
*svc, const celix_properties_t *props) {
int result = svc->calc(svc->handle, 2);
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
- long rank = celix_properties_getAsLong(props,
OSGI_FRAMEWORK_SERVICE_RANKING, -1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
+ long rank = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_RANKING, -1L);
printf("Called highest ranking service. Result is %i, svc id is %li, svc
ranking is %li\n", result, svcId, rank);
}
diff --git
a/examples/celix-examples/services_example_c/src/dynamic_provider_example.c
b/examples/celix-examples/services_example_c/src/dynamic_provider_example.c
index f03897ac..748847ae 100644
--- a/examples/celix-examples/services_example_c/src/dynamic_provider_example.c
+++ b/examples/celix-examples/services_example_c/src/dynamic_provider_example.c
@@ -65,7 +65,7 @@ void * run(void *handle) {
while (isRunning(data)) {
if (up) {
celix_properties_t *props = celix_properties_create();
- celix_properties_setLong(props, OSGI_FRAMEWORK_SERVICE_RANKING,
rand());
+ celix_properties_setLong(props, CELIX_FRAMEWORK_SERVICE_RANKING,
rand());
data->svcIds[i++] = celix_bundleContext_registerService(data->ctx,
&data->svc, EXAMPLE_CALC_NAME, props);
} else { //down
celix_bundleContext_unregisterService(data->ctx, data->svcIds[i]);
diff --git a/libs/framework/gtest/src/CelixBundleContextServicesTestSuite.cc
b/libs/framework/gtest/src/CelixBundleContextServicesTestSuite.cc
index 7008c7be..aeb9ebfb 100644
--- a/libs/framework/gtest/src/CelixBundleContextServicesTestSuite.cc
+++ b/libs/framework/gtest/src/CelixBundleContextServicesTestSuite.cc
@@ -1030,12 +1030,12 @@ TEST_F(CelixBundleContextServicesTestSuite,
ServicesTrackerSetTest) {
//register svc3 should lead to second set call
properties_t *props3 = celix_properties_create();
- celix_properties_set(props3, OSGI_FRAMEWORK_SERVICE_RANKING, "10");
+ celix_properties_set(props3, CELIX_FRAMEWORK_SERVICE_RANKING, "10");
long svcId3 = celix_bundleContext_registerService(ctx, svc3, "NA",
props3); //call 2
//register svc4 should lead to no set (lower ranking)
properties_t *props4 = celix_properties_create();
- celix_properties_set(props4, OSGI_FRAMEWORK_SERVICE_RANKING, "10");
+ celix_properties_set(props4, CELIX_FRAMEWORK_SERVICE_RANKING, "10");
long svcId4 = celix_bundleContext_registerService(ctx, svc4, "NA",
props4); //no update
//unregister svc3 should lead to set (new highest ranking)
@@ -1088,12 +1088,12 @@ TEST_F(CelixBundleContextServicesTestSuite,
TrackerOfAllServicesSetTest) {
//register svc3 should lead to second set call
properties_t *props3 = celix_properties_create();
- celix_properties_set(props3, OSGI_FRAMEWORK_SERVICE_RANKING, "10");
+ celix_properties_set(props3, CELIX_FRAMEWORK_SERVICE_RANKING, "10");
long svcId3 = celix_bundleContext_registerService(ctx, svc3, "NA",
props3); //call 2
//register svc4 should lead to no set (lower ranking)
properties_t *props4 = celix_properties_create();
- celix_properties_set(props4, OSGI_FRAMEWORK_SERVICE_RANKING, "10");
+ celix_properties_set(props4, CELIX_FRAMEWORK_SERVICE_RANKING, "10");
long svcId4 = celix_bundleContext_registerService(ctx, svc4, "NA",
props4); //no update
//unregister svc3 should lead to set (new highest ranking)
diff --git a/libs/framework/gtest/src/CxxBundleContextTestSuite.cc
b/libs/framework/gtest/src/CxxBundleContextTestSuite.cc
index b5438455..f602ac78 100644
--- a/libs/framework/gtest/src/CxxBundleContextTestSuite.cc
+++ b/libs/framework/gtest/src/CxxBundleContextTestSuite.cc
@@ -144,13 +144,13 @@ TEST_F(CxxBundleContextTestSuite, UseServicesTest) {
.setTimeout(std::chrono::seconds{1})
.addUseCallback([&countFromFunction](CInterface&, const
celix::Properties& props){
countFromFunction += 1;
- auto id = props.getAsLong(OSGI_FRAMEWORK_SERVICE_ID, -1L);
+ auto id = props.getAsLong(CELIX_FRAMEWORK_SERVICE_PID, -1L);
EXPECT_GT(id, -1L);
})
.build();
count +=
ctx->useServices<CInterface>().addUseCallback([&countFromFunction](CInterface&,
const celix::Properties& props, const celix::Bundle& bnd) {
countFromFunction += 1;
- EXPECT_GE(props.getAsLong(OSGI_FRAMEWORK_SERVICE_ID, -1L), 0);
+ EXPECT_GE(props.getAsLong(CELIX_FRAMEWORK_SERVICE_PID, -1L), 0);
EXPECT_GE(bnd.getId(), -1L);
}).build();
EXPECT_EQ(count, 4);
diff --git a/libs/framework/include/celix/Trackers.h
b/libs/framework/include/celix/Trackers.h
index 28edb482..6f192714 100644
--- a/libs/framework/include/celix/Trackers.h
+++ b/libs/framework/include/celix/Trackers.h
@@ -400,8 +400,8 @@ namespace celix {
}
static std::shared_ptr<SvcEntry> createEntry(void* voidSvc, const
celix_properties_t* cProps, const celix_bundle_t* cBnd) {
- long svcId = celix_properties_getAsLong(cProps,
OSGI_FRAMEWORK_SERVICE_ID, -1L);
- long svcRanking = celix_properties_getAsLong(cProps,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
+ long svcId = celix_properties_getAsLong(cProps,
CELIX_FRAMEWORK_SERVICE_ID, -1L);
+ long svcRanking = celix_properties_getAsLong(cProps,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
auto svc = std::shared_ptr<I>{static_cast<I*>(voidSvc),
[](I*){/*nop*/}};
auto props = celix::Properties::wrap(cProps);
auto owner =
std::make_shared<celix::Bundle>(const_cast<celix_bundle_t*>(cBnd));
@@ -523,7 +523,7 @@ namespace celix {
};
opts.removeWithOwner = [](void *handle, void*, const
celix_properties_t* cProps, const celix_bundle_t*) {
auto tracker = static_cast<ServiceTracker<I>*>(handle);
- long svcId = celix_properties_getAsLong(cProps,
OSGI_FRAMEWORK_SERVICE_ID, -1L);
+ long svcId = celix_properties_getAsLong(cProps,
CELIX_FRAMEWORK_SERVICE_ID, -1L);
std::shared_ptr<SvcEntry> entry{};
{
std::lock_guard<std::mutex> lck{tracker->mutex};
diff --git a/libs/framework/include/celix_constants.h
b/libs/framework/include/celix_constants.h
index f7f343c8..eb506ec2 100644
--- a/libs/framework/include/celix_constants.h
+++ b/libs/framework/include/celix_constants.h
@@ -27,7 +27,7 @@ extern "C" {
#endif
/**
- * Collection of celix constants. Note that the CELIX_ macros are preferred
over the OSGI_ variants.
+ * Collection of celix constants.
*/
/**
@@ -37,7 +37,6 @@ extern "C" {
* This property is set by the Celix framework when a service is registered.
*/
#define CELIX_FRAMEWORK_SERVICE_NAME "objectClass"
-#define OSGI_FRAMEWORK_OBJECTCLASS CELIX_FRAMEWORK_SERVICE_NAME
/**
* @brief Service property (named "service.id") identifying a service's
registration number (of type long).
@@ -47,7 +46,6 @@ extern "C" {
* Celix framework was started.
*/
#define CELIX_FRAMEWORK_SERVICE_ID "service.id"
-#define OSGI_FRAMEWORK_SERVICE_ID CELIX_FRAMEWORK_SERVICE_ID
/**
* @brief Service property (named service.bundleid) identifying the bundle id
of the bundle registering the service.
@@ -79,7 +77,6 @@ extern "C" {
#define CELIX_FRAMEWORK_SERVICE_SCOPE_BUNDLE "bundle"
#define CELIX_FRAMEWORK_SERVICE_PID "service.pid"
-#define OSGI_FRAMEWORK_SERVICE_PID CELIX_FRAMEWORK_SERVICE_PID
/**
* @brief The bundle id (value 0) used to identify the Celix framework.
@@ -101,7 +98,6 @@ extern "C" {
* service, whereas a service with a ranking of LONG_MIN is very unlikely to
be returned.
*/
#define CELIX_FRAMEWORK_SERVICE_RANKING "service.ranking"
-#define OSGI_FRAMEWORK_SERVICE_RANKING CELIX_FRAMEWORK_SERVICE_RANKING
/**
* @brief Service property (named "service.version") specifying the optional
version of a service.
@@ -133,11 +129,6 @@ extern "C" {
#define CELIX_FRAMEWORK_BUNDLE_ACTIVATOR_STOP "celix_bundleActivator_stop"
#define CELIX_FRAMEWORK_BUNDLE_ACTIVATOR_DESTROY
"celix_bundleActivator_destroy"
-#define OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_CREATE
"bundleActivator_create"
-#define OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_START
"bundleActivator_start"
-#define OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_STOP "bundleActivator_stop"
-#define OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_DESTROY
"bundleActivator_destroy"
-
#define CELIX_FRAMEWORK_BUNDLE_SYMBOLICNAME "Bundle-SymbolicName"
#define CELIX_FRAMEWORK_BUNDLE_NAME "Bundle-Name"
#define CELIX_FRAMEWORK_BUNDLE_GROUP "Bundle-Group"
diff --git a/libs/framework/src/bundle_context.c
b/libs/framework/src/bundle_context.c
index 1e6640b1..9ffdb126 100644
--- a/libs/framework/src/bundle_context.c
+++ b/libs/framework/src/bundle_context.c
@@ -1015,7 +1015,7 @@ bool celix_bundleContext_useServiceWithId(
celix_service_use_options_t opts = CELIX_EMPTY_SERVICE_USE_OPTIONS;
char filter[64];
- snprintf(filter, 64, "(%s=%li)", OSGI_FRAMEWORK_SERVICE_ID, serviceId);
+ snprintf(filter, 64, "(%s=%li)", CELIX_FRAMEWORK_SERVICE_PID, serviceId);
opts.filter.serviceName = serviceName;
opts.filter.filter = filter;
@@ -1396,8 +1396,8 @@ static celix_status_t
bundleContext_callServicedTrackerTrackerCallback(void *han
memset(&trkInfo, 0, sizeof(trkInfo));
trkInfo.bundleId = celix_bundle_getId(bnd);
trkInfo.filter = filter;
- trkInfo.serviceName = celix_filter_findAttribute(filter,
OSGI_FRAMEWORK_OBJECTCLASS);
- const char *filterSvcName = celix_filter_findAttribute(filter,
OSGI_FRAMEWORK_OBJECTCLASS);
+ trkInfo.serviceName = celix_filter_findAttribute(filter,
CELIX_FRAMEWORK_SERVICE_NAME);
+ const char *filterSvcName = celix_filter_findAttribute(filter,
CELIX_FRAMEWORK_SERVICE_NAME);
bool match = entry->serviceName == NULL || (filterSvcName != NULL
&& strncmp(filterSvcName, entry->serviceName, 1024*1024) == 0);
diff --git a/libs/framework/src/celix_libloader.c
b/libs/framework/src/celix_libloader.c
index d49ab6c0..f11053bf 100644
--- a/libs/framework/src/celix_libloader.c
+++ b/libs/framework/src/celix_libloader.c
@@ -57,9 +57,6 @@ celix_bundle_activator_create_fp
celix_libloader_findBundleActivatorCreate(celix
celix_bundle_activator_create_fp result = NULL;
if (bundleActivatorHandle != NULL) {
result = (celix_bundle_activator_create_fp)
dlsym(bundleActivatorHandle, CELIX_FRAMEWORK_BUNDLE_ACTIVATOR_CREATE);
- if (result == NULL) {
- result = (celix_bundle_activator_create_fp)
dlsym(bundleActivatorHandle, OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_CREATE);
- }
}
return result;
}
@@ -68,9 +65,6 @@ celix_bundle_activator_start_fp
celix_libloader_findBundleActivatorStart(celix_l
celix_bundle_activator_start_fp result = NULL;
if (bundleActivatorHandle != NULL) {
result = (celix_bundle_activator_start_fp)
dlsym(bundleActivatorHandle, CELIX_FRAMEWORK_BUNDLE_ACTIVATOR_START);
- if (result == NULL) {
- result = (celix_bundle_activator_start_fp)
dlsym(bundleActivatorHandle, OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_START);
- }
}
return result;
}
@@ -79,9 +73,6 @@ celix_bundle_activator_stop_fp
celix_libloader_findBundleActivatorStop(celix_lib
celix_bundle_activator_stop_fp result = NULL;
if (bundleActivatorHandle != NULL) {
result = (celix_bundle_activator_stop_fp) dlsym(bundleActivatorHandle,
CELIX_FRAMEWORK_BUNDLE_ACTIVATOR_STOP);
- if (result == NULL) {
- result = (celix_bundle_activator_stop_fp)
dlsym(bundleActivatorHandle, OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_STOP);
- }
}
return result;
}
@@ -90,9 +81,6 @@ celix_bundle_activator_destroy_fp
celix_libloader_findBundleActivatorDestroy(cel
celix_bundle_activator_destroy_fp result = NULL;
if (bundleActivatorHandle != NULL) {
result = (celix_bundle_activator_destroy_fp)
dlsym(bundleActivatorHandle, CELIX_FRAMEWORK_BUNDLE_ACTIVATOR_DESTROY);
- if (result == NULL) {
- result = (celix_bundle_activator_destroy_fp)
dlsym(bundleActivatorHandle,
OSGI_FRAMEWORK_DEPRECATED_BUNDLE_ACTIVATOR_DESTROY);
- }
}
return result;
}
diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c
index 3458aec9..a2040cd3 100644
--- a/libs/framework/src/framework.c
+++ b/libs/framework/src/framework.c
@@ -827,7 +827,7 @@ celix_status_t fw_getServiceReferences(framework_pt
framework, array_list_pt *re
status = CELIX_DO_IF(status,
serviceReference_getServiceRegistration(ref, ®));
status = CELIX_DO_IF(status,
serviceRegistration_getProperties(reg, &props));
if (status == CELIX_SUCCESS) {
- serviceNameObjectClass = properties_get(props,
OSGI_FRAMEWORK_OBJECTCLASS);
+ serviceNameObjectClass = properties_get(props,
CELIX_FRAMEWORK_SERVICE_NAME);
if (!serviceReference_isAssignableTo(ref, bundle,
serviceNameObjectClass)) {
serviceReference_release(ref, NULL);
arrayList_remove(*references, refIdx);
diff --git a/libs/framework/src/service_reference.c
b/libs/framework/src/service_reference.c
index ec9e1fa9..604ee70a 100644
--- a/libs/framework/src/service_reference.c
+++ b/libs/framework/src/service_reference.c
@@ -263,8 +263,8 @@ celix_status_t
serviceReference_compareTo(service_reference_pt reference, servic
long id, other_id;
const char* id_str;
const char* other_id_str;
- serviceReference_getProperty(reference, (char *)
OSGI_FRAMEWORK_SERVICE_ID, &id_str);
- serviceReference_getProperty(compareTo, (char *)
OSGI_FRAMEWORK_SERVICE_ID, &other_id_str);
+ serviceReference_getProperty(reference, (char *)
CELIX_FRAMEWORK_SERVICE_PID, &id_str);
+ serviceReference_getProperty(compareTo, (char *)
CELIX_FRAMEWORK_SERVICE_PID, &other_id_str);
id = atol(id_str);
other_id = atol(other_id_str);
@@ -273,8 +273,8 @@ celix_status_t
serviceReference_compareTo(service_reference_pt reference, servic
long rank, other_rank;
const char *rank_str;
const char* other_rank_str;
- serviceReference_getProperty(reference, OSGI_FRAMEWORK_SERVICE_RANKING,
&rank_str);
- serviceReference_getProperty(compareTo, OSGI_FRAMEWORK_SERVICE_RANKING,
&other_rank_str);
+ serviceReference_getProperty(reference,
CELIX_FRAMEWORK_SERVICE_RANKING, &rank_str);
+ serviceReference_getProperty(compareTo,
CELIX_FRAMEWORK_SERVICE_RANKING, &other_rank_str);
rank = rank_str == NULL ? 0 : atol(rank_str);
other_rank = other_rank_str == NULL ? 0 : atol(other_rank_str);
diff --git a/libs/framework/src/service_registration.c
b/libs/framework/src/service_registration.c
index f4832c51..76046787 100644
--- a/libs/framework/src/service_registration.c
+++ b/libs/framework/src/service_registration.c
@@ -100,10 +100,10 @@ static celix_status_t
serviceRegistration_initializeProperties(service_registrat
snprintf(sId, 32, "%lu", registration->serviceId);
- properties_set(dictionary, (char *) OSGI_FRAMEWORK_SERVICE_ID, sId);
+ properties_set(dictionary, (char *) CELIX_FRAMEWORK_SERVICE_PID, sId);
- if (properties_get(dictionary, (char *) OSGI_FRAMEWORK_OBJECTCLASS) ==
NULL) {
- properties_set(dictionary, (char *) OSGI_FRAMEWORK_OBJECTCLASS,
registration->className);
+ if (properties_get(dictionary, (char *) CELIX_FRAMEWORK_SERVICE_NAME)
== NULL) {
+ properties_set(dictionary, (char *)
CELIX_FRAMEWORK_SERVICE_NAME, registration->className);
}
registration->properties = dictionary;
diff --git a/libs/framework/src/service_registry.c
b/libs/framework/src/service_registry.c
index ed4e8664..54e076d3 100644
--- a/libs/framework/src/service_registry.c
+++ b/libs/framework/src/service_registry.c
@@ -470,7 +470,7 @@ static void
serviceRegistry_logWarningServiceReferenceUsageCount(service_registr
const char* service_name = "unknown";
const char* bundle_provider_name = "unknown";
if (refCount > 0 && ref != NULL) {
- serviceReference_getProperty(ref, OSGI_FRAMEWORK_OBJECTCLASS,
&service_name);
+ serviceReference_getProperty(ref, CELIX_FRAMEWORK_SERVICE_NAME,
&service_name);
service_registration_pt reg = NULL;
bundle_pt providedBnd = NULL;
serviceReference_getServiceRegistration(ref, ®);
@@ -840,13 +840,13 @@ char*
celix_serviceRegistry_createFilterFor(celix_service_registry_t* registry,
//setting filter
if (additionalFilterIn != NULL && versionRange != NULL) {
- asprintf(&filter, "(&(%s=%s)%s%s)", OSGI_FRAMEWORK_OBJECTCLASS,
serviceName, versionRange, additionalFilterIn);
+ asprintf(&filter, "(&(%s=%s)%s%s)", CELIX_FRAMEWORK_SERVICE_NAME,
serviceName, versionRange, additionalFilterIn);
} else if (versionRange != NULL) {
- asprintf(&filter, "(&(%s=%s)%s)", OSGI_FRAMEWORK_OBJECTCLASS,
serviceName, versionRange);
+ asprintf(&filter, "(&(%s=%s)%s)", CELIX_FRAMEWORK_SERVICE_NAME,
serviceName, versionRange);
} else if (additionalFilterIn != NULL) {
- asprintf(&filter, "(&(%s=%s)%s)", OSGI_FRAMEWORK_OBJECTCLASS,
serviceName, additionalFilterIn);
+ asprintf(&filter, "(&(%s=%s)%s)", CELIX_FRAMEWORK_SERVICE_NAME,
serviceName, additionalFilterIn);
} else {
- asprintf(&filter, "(&(%s=%s))", OSGI_FRAMEWORK_OBJECTCLASS,
serviceName);
+ asprintf(&filter, "(&(%s=%s))", CELIX_FRAMEWORK_SERVICE_NAME,
serviceName);
}
return filter;
@@ -861,11 +861,11 @@ static int
celix_serviceRegistry_compareRegistrations(const void *a, const void
serviceRegistration_getProperties((service_registration_t*)regA, &propsA);
serviceRegistration_getProperties((service_registration_t*)regB, &propsB);
- long servIdA = celix_properties_getAsLong(propsA,
OSGI_FRAMEWORK_SERVICE_ID, 0);
- long servIdB = celix_properties_getAsLong(propsB,
OSGI_FRAMEWORK_SERVICE_ID, 0);
+ long servIdA = celix_properties_getAsLong(propsA,
CELIX_FRAMEWORK_SERVICE_PID, 0);
+ long servIdB = celix_properties_getAsLong(propsB,
CELIX_FRAMEWORK_SERVICE_PID, 0);
- long servRankingA = celix_properties_getAsLong(propsA,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
- long servRankingB = celix_properties_getAsLong(propsB,
OSGI_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingA = celix_properties_getAsLong(propsA,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
+ long servRankingB = celix_properties_getAsLong(propsB,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
return celix_utils_compareServiceIdsAndRanking(servIdA, servRankingA,
servIdB, servRankingB);
}
diff --git a/libs/framework/src/service_tracker.c
b/libs/framework/src/service_tracker.c
index 76e69565..4eb3d3f5 100644
--- a/libs/framework/src/service_tracker.c
+++ b/libs/framework/src/service_tracker.c
@@ -54,7 +54,7 @@ static inline celix_tracked_entry_t*
tracked_create(service_reference_pt ref, vo
tracked->serviceRanking = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_RANKING, 0);
tracked->properties = props;
tracked->serviceOwner = bnd;
- tracked->serviceName = celix_properties_get(props,
OSGI_FRAMEWORK_OBJECTCLASS, "Error");
+ tracked->serviceName = celix_properties_get(props,
CELIX_FRAMEWORK_SERVICE_NAME, "Error");
tracked->useCount = 1;
celixThreadMutex_create(&tracked->mutex, NULL);
@@ -96,7 +96,7 @@ celix_status_t serviceTracker_create(bundle_context_pt
context, const char * ser
status = CELIX_ILLEGAL_ARGUMENT;
} else {
char *filter = NULL;
- asprintf(&filter, "(%s=%s)", OSGI_FRAMEWORK_OBJECTCLASS, service);
+ asprintf(&filter, "(%s=%s)", CELIX_FRAMEWORK_SERVICE_NAME, service);
serviceTracker_createWithFilter(context, filter, customizer, tracker);
free(filter);
}
@@ -441,7 +441,7 @@ static void serviceTracker_checkAndInvokeSetService(void
*handle, void *highestS
//no services available anymore -> unset == call with NULL
update = true;
} else {
- svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1);
+ svcId = celix_properties_getAsLong(props, CELIX_FRAMEWORK_SERVICE_PID,
-1);
}
if (svcId >= 0) {
celixThreadMutex_lock(&tracker->mutex);
diff --git
a/misc/experimental/bundles/config_admin/config_admin_tst/config_admin_test.cpp
b/misc/experimental/bundles/config_admin/config_admin_tst/config_admin_test.cpp
index a6fe6df2..c0a622d1 100644
---
a/misc/experimental/bundles/config_admin/config_admin_tst/config_admin_test.cpp
+++
b/misc/experimental/bundles/config_admin/config_admin_tst/config_admin_test.cpp
@@ -176,7 +176,7 @@ tst2_service_pt test2Serv = NULL;
properties = NULL;
configuration->configuration_getProperties(configuration->handle, &properties);
if (properties != NULL) {
- const char *test_value = properties_get(properties,
(char*)OSGI_FRAMEWORK_SERVICE_PID);
+ const char *test_value = properties_get(properties,
(char*)CELIX_FRAMEWORK_SERVICE_PID);
CHECK_TEXT("base.device1", test_value);
test_value = properties_get(properties, (char *)prop1);
CHECK_TEXT("printer", test_value);
@@ -196,7 +196,7 @@ tst2_service_pt test2Serv = NULL;
configuration->configuration_getProperties(configuration->handle, &properties);
CHECK((properties != NULL));
if (properties != NULL) {
- const char *test_value =
properties_get(properties, (char*)OSGI_FRAMEWORK_SERVICE_PID);
+ const char *test_value =
properties_get(properties, (char*)CELIX_FRAMEWORK_SERVICE_PID);
CHECK_TEXT("base.device1", test_value);
test_value = properties_get(properties, (char
*)key);
CHECK_TEXT("printer", test_value);
@@ -239,14 +239,14 @@ tst2_service_pt test2Serv = NULL;
properties = NULL;
configuration->configuration_getProperties(configuration->handle, &properties);
if (properties != NULL) {
- const char *test_value =
properties_get(properties, (char*)OSGI_FRAMEWORK_SERVICE_PID);
+ const char *test_value =
properties_get(properties, (char*)CELIX_FRAMEWORK_SERVICE_PID);
CHECK_TEXT("base.device1", test_value);
test_value = properties_get(properties, (char
*)prop1);
CHECK_TEXT("printer", test_value);
}
configuration2->configuration_getProperties(configuration2->handle,
&properties);
if (properties != NULL) {
- const char *test_value =
properties_get(properties, (char*)OSGI_FRAMEWORK_SERVICE_PID);
+ const char *test_value =
properties_get(properties, (char*)CELIX_FRAMEWORK_SERVICE_PID);
CHECK_TEXT("test2_pid", test_value);
test_value = properties_get(properties, (char
*)prop1);
CHECK_TEXT("test2_printer", test_value);
diff --git
a/misc/experimental/bundles/config_admin/config_admin_tst/example_test/private/src/activator.c
b/misc/experimental/bundles/config_admin/config_admin_tst/example_test/private/src/activator.c
index 755faccb..94c53900 100644
---
a/misc/experimental/bundles/config_admin/config_admin_tst/example_test/private/src/activator.c
+++
b/misc/experimental/bundles/config_admin/config_admin_tst/example_test/private/src/activator.c
@@ -149,7 +149,7 @@ celix_status_t bundleActivator_start(void * userData,
bundle_context_pt ctx) {
configuration->configuration_getProperties(configuration->handle, &dictionary);
if (dictionary == NULL) {
dictionary = properties_create();
- properties_set(dictionary, (char *)
OSGI_FRAMEWORK_SERVICE_PID, pid);
+ properties_set(dictionary, (char *)
CELIX_FRAMEWORK_SERVICE_PID, pid);
properties_set(dictionary, (char *)
"type", (char*)"default_value");
}
// the service has to be registered with a
properties/dictionary structure that at least contains a pid to assure it
diff --git
a/misc/experimental/bundles/config_admin/config_admin_tst/example_test2/private/src/activator.c
b/misc/experimental/bundles/config_admin/config_admin_tst/example_test2/private/src/activator.c
index 02c07e66..b5c6b193 100644
---
a/misc/experimental/bundles/config_admin/config_admin_tst/example_test2/private/src/activator.c
+++
b/misc/experimental/bundles/config_admin/config_admin_tst/example_test2/private/src/activator.c
@@ -70,7 +70,7 @@ int my_get_type(void *handle, char* value) {
properties_pt propsRx;
act->configuration->configuration_getProperties(act->configuration->handle,
&propsRx);
if (propsRx != NULL) {
- printf("[ TEST ]: PROP=%s - VALUE=%s \n",
(char*)OSGI_FRAMEWORK_SERVICE_PID,
properties_get(propsRx,(char*)OSGI_FRAMEWORK_SERVICE_PID));
+ printf("[ TEST ]: PROP=%s - VALUE=%s \n",
(char*)CELIX_FRAMEWORK_SERVICE_PID,
properties_get(propsRx,(char*)CELIX_FRAMEWORK_SERVICE_PID));
strcpy(value, properties_get(propsRx,"type"));
}
else {
@@ -141,7 +141,7 @@ celix_status_t bundleActivator_start(void * userData,
bundle_context_pt ctx) {
properties_pt dictionary;
dictionary = properties_create();
- properties_set(dictionary, (char *)
OSGI_FRAMEWORK_SERVICE_PID, pid);
+ properties_set(dictionary, (char *)
CELIX_FRAMEWORK_SERVICE_PID, pid);
properties_set(dictionary, (char *) "type",
(char*)"test2_default_value");
status = bundleContext_registerService(ctx,
(char *) MANAGED_SERVICE_SERVICE_NAME,
@@ -178,7 +178,7 @@ celix_status_t bundleActivator_start(void * userData,
bundle_context_pt ctx) {
properties_pt propsRx = properties_create();
configuration_getProperties(configuration,
&propsRx);
- printf("[ TEST ]: PROP=%s - VALUE=%s \n",
(char*)OSGI_FRAMEWORK_SERVICE_PID,
properties_get(propsRx,(char*)OSGI_FRAMEWORK_SERVICE_PID));
+ printf("[ TEST ]: PROP=%s - VALUE=%s \n",
(char*)CELIX_FRAMEWORK_SERVICE_PID,
properties_get(propsRx,(char*)CELIX_FRAMEWORK_SERVICE_PID));
printf("[ TEST ]: PROP=%s - VALUE=%s \n",
prop1, properties_get(propsRx,prop1));
printf("/////////////////// END TESTS
///////////////// \n");
diff --git
a/misc/experimental/bundles/config_admin/service/private/src/configuration_impl.c
b/misc/experimental/bundles/config_admin/service/private/src/configuration_impl.c
index 04ff778f..b6ef5c6d 100644
---
a/misc/experimental/bundles/config_admin/service/private/src/configuration_impl.c
+++
b/misc/experimental/bundles/config_admin/service/private/src/configuration_impl.c
@@ -202,7 +202,7 @@ celix_status_t
configuration_create2(configuration_admin_factory_pt factory, con
conf_impl->factoryPid = strdup(value);
else
conf_impl->factoryPid = NULL;
- value = properties_get(dictionary, (char *)OSGI_FRAMEWORK_SERVICE_PID);
+ value = properties_get(dictionary, (char *)CELIX_FRAMEWORK_SERVICE_PID);
if (value != NULL)
conf_impl->pid = strdup(value);
else
@@ -598,7 +598,7 @@ celix_status_t
configuration_updateDictionary(configuration_impl_pt configuratio
if ( newDictionary != NULL ){
- hashMap_remove(newDictionary, (void *)
OSGI_FRAMEWORK_SERVICE_PID);
+ hashMap_remove(newDictionary, (void *)
CELIX_FRAMEWORK_SERVICE_PID);
hashMap_remove(newDictionary, (void *) SERVICE_FACTORYPID);
hashMap_remove(newDictionary, (void *) SERVICE_BUNDLELOCATION);
}
@@ -636,8 +636,8 @@ celix_status_t
configuration_setAutoProperties(configuration_impl_pt configurati
configuration_lock(configuration);
// (2) set service.pid
-// if (properties_get(*properties, (char*)OSGI_FRAMEWORK_SERVICE_PID) !=
NULL) {
- properties_set(*properties, (char*)OSGI_FRAMEWORK_SERVICE_PID,
configuration->pid);
+// if (properties_get(*properties, (char*)CELIX_FRAMEWORK_SERVICE_PID) !=
NULL) {
+ properties_set(*properties, (char*)CELIX_FRAMEWORK_SERVICE_PID,
configuration->pid);
// }
// (3) set factory.pid
diff --git
a/misc/experimental/bundles/config_admin/service/private/src/managed_service_tracker.c
b/misc/experimental/bundles/config_admin/service/private/src/managed_service_tracker.c
index 131d2fef..e667d9dd 100644
---
a/misc/experimental/bundles/config_admin/service/private/src/managed_service_tracker.c
+++
b/misc/experimental/bundles/config_admin/service/private/src/managed_service_tracker.c
@@ -211,7 +211,7 @@ celix_status_t managedServiceTracker_addingService(void *
handle, service_refere
// (1) reference.getPid
- status = serviceReference_getProperty(reference,
OSGI_FRAMEWORK_SERVICE_PID, &pid);
+ status = serviceReference_getProperty(reference,
CELIX_FRAMEWORK_SERVICE_PID, &pid);
if (status != CELIX_SUCCESS || pid == NULL) {
*service = NULL;
printf(" [ ERROR ]: Tracker - PID is NULL \n");
@@ -286,7 +286,7 @@ celix_status_t managedServiceTracker_removedService(void *
handle, service_refer
bundle_context_pt context;
- status = serviceReference_getProperty(reference,
OSGI_FRAMEWORK_SERVICE_PID, &pid);
+ status = serviceReference_getProperty(reference,
CELIX_FRAMEWORK_SERVICE_PID, &pid);
if (status != CELIX_SUCCESS || pid == NULL){
return CELIX_ILLEGAL_ARGUMENT;
}
diff --git
a/misc/experimental/bundles/pubsub_admin_nanomsg/src/pubsub_nanomsg_admin.cc
b/misc/experimental/bundles/pubsub_admin_nanomsg/src/pubsub_nanomsg_admin.cc
index 3e628dbf..84b3b7dd 100644
--- a/misc/experimental/bundles/pubsub_admin_nanomsg/src/pubsub_nanomsg_admin.cc
+++ b/misc/experimental/bundles/pubsub_admin_nanomsg/src/pubsub_nanomsg_admin.cc
@@ -43,7 +43,7 @@
pubsub_nanomsg_admin::pubsub_nanomsg_admin(celix_bundle_context_t *_ctx):
ctx{_ctx},
L{ctx, "pubsub_nanomsg_admin"} {
verbose = celix_bundleContext_getPropertyAsBool(ctx,
PUBSUB_NANOMSG_VERBOSE_KEY, PUBSUB_NANOMSG_VERBOSE_DEFAULT);
- fwUUID = celix_bundleContext_getProperty(ctx,
OSGI_FRAMEWORK_FRAMEWORK_UUID, nullptr);
+ fwUUID = celix_bundleContext_getProperty(ctx,
CELIX_FRAMEWORK_FRAMEWORK_UUID, nullptr);
char *ip = nullptr;
const char *confIp = celix_bundleContext_getProperty(ctx,
PUBSUB_NANOMSG_PSA_IP_KEY , nullptr);
@@ -212,7 +212,7 @@ void pubsub_nanomsg_admin::stop() {
void pubsub_nanomsg_admin::addSerializerSvc(void *svc, const
celix_properties_t *props) {
const char *serType = celix_properties_get(props,
PUBSUB_SERIALIZER_TYPE_KEY, nullptr);
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
if (serType == nullptr) {
L.INFO("[PSA_NANOMSG] Ignoring serializer service without ",
PUBSUB_SERIALIZER_TYPE_KEY, " property");
@@ -232,7 +232,7 @@ void pubsub_nanomsg_admin::addSerializerSvc(void *svc,
const celix_properties_t
void pubsub_nanomsg_admin::removeSerializerSvc(void */*svc*/, const
celix_properties_t *props) {
- long svcId = celix_properties_getAsLong(props, OSGI_FRAMEWORK_SERVICE_ID,
-1L);
+ long svcId = celix_properties_getAsLong(props,
CELIX_FRAMEWORK_SERVICE_PID, -1L);
//remove serializer
// 1) First find entry and