incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1551490 [1/2] - in /incubator/celix/trunk: dependency_manager/private/src/ dependency_manager/public/include/ deployment_admin/private/src/ deployment_admin/public/include/ device_access/device_access/private/src/ device_access/device_acce...
Date Tue, 17 Dec 2013 08:59:25 GMT
Author: abroekhuis
Date: Tue Dec 17 08:59:23 2013
New Revision: 1551490

URL: http://svn.apache.org/r1551490
Log:
CELIX-101: Applied patch. Renamed OSGI_DEPENDENCYMANAGER_* to DEPENDENCYMANGER_* since the DependencyManager isn’t part of the OSGi spec.

Modified:
    incubator/celix/trunk/dependency_manager/private/src/service_component.c
    incubator/celix/trunk/dependency_manager/private/src/service_dependency.c
    incubator/celix/trunk/dependency_manager/public/include/service_component.h
    incubator/celix/trunk/deployment_admin/private/src/deployment_admin.c
    incubator/celix/trunk/deployment_admin/private/src/deployment_package.c
    incubator/celix/trunk/deployment_admin/public/include/resource_processor.h
    incubator/celix/trunk/device_access/device_access/private/src/device_manager.c
    incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c
    incubator/celix/trunk/device_access/device_access/private/src/driver_matcher.c
    incubator/celix/trunk/device_access/device_access/public/include/device.h
    incubator/celix/trunk/device_access/device_access/public/include/driver.h
    incubator/celix/trunk/device_access/device_access/public/include/driver_locator.h
    incubator/celix/trunk/device_access/device_access/public/include/driver_selector.h
    incubator/celix/trunk/device_access/driver_locator/private/src/activator.c
    incubator/celix/trunk/device_access/driver_locator/private/src/driver_locator.c
    incubator/celix/trunk/device_access/example/base_driver/private/src/activator.c
    incubator/celix/trunk/device_access/example/consuming_driver/private/src/activator.c
    incubator/celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c
    incubator/celix/trunk/device_access/example/refining_driver/private/src/activator.c
    incubator/celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c
    incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-listener/private/src/listener_example.c
    incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-lookup/private/src/activator.c
    incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/dependency_activator.c
    incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/tracker.c
    incubator/celix/trunk/framework/private/src/bundle.c
    incubator/celix/trunk/framework/private/src/bundle_archive.c
    incubator/celix/trunk/framework/private/src/bundle_cache.c
    incubator/celix/trunk/framework/private/src/celix_log.c
    incubator/celix/trunk/framework/private/src/framework.c
    incubator/celix/trunk/framework/private/src/manifest_parser.c
    incubator/celix/trunk/framework/private/src/service_registration.c
    incubator/celix/trunk/framework/private/src/service_registry.c
    incubator/celix/trunk/framework/private/src/service_tracker.c
    incubator/celix/trunk/framework/private/src/version.c
    incubator/celix/trunk/framework/private/test/bundle_test.cpp
    incubator/celix/trunk/framework/private/test/service_tracker_test.cpp
    incubator/celix/trunk/framework/public/include/bundle_event.h
    incubator/celix/trunk/framework/public/include/bundle_state.h
    incubator/celix/trunk/framework/public/include/celix_log.h
    incubator/celix/trunk/framework/public/include/constants.h
    incubator/celix/trunk/framework/public/include/framework_event.h
    incubator/celix/trunk/framework/public/include/listener_hook_service.h
    incubator/celix/trunk/framework/public/include/service_event.h
    incubator/celix/trunk/launcher/private/src/launcher.c
    incubator/celix/trunk/log_service/private/src/log.c
    incubator/celix/trunk/log_service/private/src/log_service_activator.c
    incubator/celix/trunk/log_service/public/include/log_reader_service.h
    incubator/celix/trunk/log_service/public/include/log_service.h
    incubator/celix/trunk/log_writer/private/src/log_writer.c
    incubator/celix/trunk/remote_services/calculator_endpoint/private/src/calculator_endpoint_activator.c
    incubator/celix/trunk/remote_services/calculator_proxy/private/src/calculator_proxy_activator.c
    incubator/celix/trunk/remote_services/calculator_service/private/src/calculator_activator.c
    incubator/celix/trunk/remote_services/calculator_shell/private/src/calculator_shell_activator.c
    incubator/celix/trunk/remote_services/discovery_bonjour/private/src/discovery.c
    incubator/celix/trunk/remote_services/discovery_bonjour/private/src/discovery_activator.c
    incubator/celix/trunk/remote_services/discovery_slp/private/src/discovery.c
    incubator/celix/trunk/remote_services/discovery_slp/private/src/discovery_activator.c
    incubator/celix/trunk/remote_services/endpoint_listener/public/include/endpoint_listener.h
    incubator/celix/trunk/remote_services/remote_service_admin/public/include/remote_endpoint.h
    incubator/celix/trunk/remote_services/remote_service_admin/public/include/remote_proxy.h
    incubator/celix/trunk/remote_services/remote_service_admin/public/include/remote_service_admin.h
    incubator/celix/trunk/remote_services/remote_service_admin_http/private/src/export_registration_impl.c
    incubator/celix/trunk/remote_services/remote_service_admin_http/private/src/import_registration_impl.c
    incubator/celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_activator.c
    incubator/celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
    incubator/celix/trunk/remote_services/topology_manager/private/src/activator.c
    incubator/celix/trunk/remote_services/topology_manager/private/src/topology_manager.c
    incubator/celix/trunk/remote_services/utils/public/include/remote_constants.h
    incubator/celix/trunk/remote_shell/private/src/shell_mediator.c
    incubator/celix/trunk/shell/private/src/help_command.c
    incubator/celix/trunk/shell/private/src/inspect_command.c
    incubator/celix/trunk/shell/private/src/log_command.c
    incubator/celix/trunk/shell/private/src/ps_command.c
    incubator/celix/trunk/shell/private/src/shell.c
    incubator/celix/trunk/shell/public/include/command.h
    incubator/celix/trunk/shell/public/include/shell.h
    incubator/celix/trunk/shell_tui/private/src/shell_tui.c

Modified: incubator/celix/trunk/dependency_manager/private/src/service_component.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/private/src/service_component.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/private/src/service_component.c (original)
+++ incubator/celix/trunk/dependency_manager/private/src/service_component.c Tue Dec 17 08:59:23 2013
@@ -199,7 +199,7 @@ void serviceComponent_dependencyUnavaila
 
 void serviceComponent_start(service_pt service) {
 	state_pt old, new;
-	bundleContext_registerService(service->context, SERVICE_COMPONENT_NAME, service, NULL, &service->serviceRegistration);
+	bundleContext_registerService(service->context, DEPENDENCYMANAGER_SERVICE_COMPONENT_NAME, service, NULL, &service->serviceRegistration);
 	apr_thread_mutex_lock(service->mutex);
 	old = service->state;
 	new = state_create(arrayList_clone(service->dependencies), true);

Modified: incubator/celix/trunk/dependency_manager/private/src/service_dependency.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/private/src/service_dependency.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/private/src/service_dependency.c (original)
+++ incubator/celix/trunk/dependency_manager/private/src/service_dependency.c Tue Dec 17 08:59:23 2013
@@ -164,10 +164,10 @@ service_dependency_pt serviceDependency_
 
 	if (filter != NULL) {
 		if (serviceName != NULL) {
-			int len = strlen(serviceName) + strlen(OBJECTCLASS) + strlen(filter) + 7;
+			int len = strlen(serviceName) + strlen(OSGI_FRAMEWORK_OBJECTCLASS) + strlen(filter) + 7;
 			char *nfilter = malloc(sizeof(char) * len);
 			strcpy(nfilter, "(&(");
-			strcat(nfilter, OBJECTCLASS);
+			strcat(nfilter, OSGI_FRAMEWORK_OBJECTCLASS);
 			strcat(nfilter, "=");
 			strcat(nfilter, serviceName);
 			strcat(nfilter, ")");

Modified: incubator/celix/trunk/dependency_manager/public/include/service_component.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/public/include/service_component.h?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/public/include/service_component.h (original)
+++ incubator/celix/trunk/dependency_manager/public/include/service_component.h Tue Dec 17 08:59:23 2013
@@ -27,7 +27,7 @@
 #ifndef SERVICE_COMPONENT_H_
 #define SERVICE_COMPONENT_H_
 
-#define SERVICE_COMPONENT_NAME "ServiceComponent"
+#define DEPENDENCYMANAGER_SERVICE_COMPONENT_NAME "ServiceComponent"
 
 typedef struct service * service_pt;
 

Modified: incubator/celix/trunk/deployment_admin/private/src/deployment_admin.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/deployment_admin.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/deployment_admin.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/deployment_admin.c Tue Dec 17 08:59:23 2013
@@ -435,9 +435,9 @@ celix_status_t deploymentAdmin_processDe
 		char *filter = NULL;
 
 		apr_pool_create(&tmpPool, admin->pool);
-		filter = apr_pstrcat(tmpPool, "(", SERVICE_PID, "=", info->resourceProcessor, ")", NULL);
+		filter = apr_pstrcat(tmpPool, "(", OSGI_FRAMEWORK_SERVICE_PID, "=", info->resourceProcessor, ")", NULL);
 
-		status = bundleContext_getServiceReferences(admin->context, RESOURCE_PROCESSOR_SERVICE, filter, &services);
+		status = bundleContext_getServiceReferences(admin->context, DEPLOYMENTADMIN_RESOURCE_PROCESSOR_SERVICE, filter, &services);
 		if (status == CELIX_SUCCESS) {
 			if (services != NULL && arrayList_size(services) > 0) {
 				service_reference_pt ref = arrayList_get(services, 0);
@@ -489,9 +489,9 @@ celix_status_t deploymentAdmin_dropDeplo
 
 
 				apr_pool_create(&tmpPool, admin->pool);
-				filter = apr_pstrcat(tmpPool, "(", SERVICE_PID, "=", info->resourceProcessor, ")", NULL);
+				filter = apr_pstrcat(tmpPool, "(", OSGI_FRAMEWORK_SERVICE_PID, "=", info->resourceProcessor, ")", NULL);
 
-				status = bundleContext_getServiceReferences(admin->context, RESOURCE_PROCESSOR_SERVICE, filter, &services);
+				status = bundleContext_getServiceReferences(admin->context, DEPLOYMENTADMIN_RESOURCE_PROCESSOR_SERVICE, filter, &services);
 				if (status == CELIX_SUCCESS) {
 					if (services != NULL && arrayList_size(services) > 0) {
 						service_reference_pt ref = arrayList_get(services, 0);

Modified: incubator/celix/trunk/deployment_admin/private/src/deployment_package.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/deployment_package.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/deployment_package.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/deployment_package.c Tue Dec 17 08:59:23 2013
@@ -146,8 +146,8 @@ celix_status_t deploymentPackage_process
 			bundle_info_pt info = apr_palloc(package->pool, sizeof(*info));
 			info->path = name;
 			info->attributes = values;
-			info->symbolicName = properties_get(values, (char *) BUNDLE_SYMBOLICNAME);
-			char *version = properties_get(values, (char *) BUNDLE_VERSION);
+			info->symbolicName = properties_get(values, (char *) OSGI_FRAMEWORK_BUNDLE_SYMBOLICNAME);
+			char *version = properties_get(values, (char *) OSGI_FRAMEWORK_BUNDLE_VERSION);
 			info->version = NULL;
 			status = version_createVersionFromString(package->pool, version, &info->version);
 			char *customizer = properties_get(values, (char *) DEPLOYMENTPACKAGE_CUSTOMIZER);
@@ -168,7 +168,7 @@ celix_status_t deploymentPackage_process
 }
 
 static celix_status_t deploymentPackage_isBundleResource(properties_pt attributes, bool *isBundleResource) {
-	*isBundleResource = properties_get(attributes, (char *) BUNDLE_SYMBOLICNAME) != NULL;
+	*isBundleResource = properties_get(attributes, (char *) OSGI_FRAMEWORK_BUNDLE_SYMBOLICNAME) != NULL;
 	return CELIX_SUCCESS;
 }
 

Modified: incubator/celix/trunk/deployment_admin/public/include/resource_processor.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/public/include/resource_processor.h?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/public/include/resource_processor.h (original)
+++ incubator/celix/trunk/deployment_admin/public/include/resource_processor.h Tue Dec 17 08:59:23 2013
@@ -29,7 +29,7 @@
 
 #include "celix_errno.h"
 
-#define RESOURCE_PROCESSOR_SERVICE "resource_processor"
+#define DEPLOYMENTADMIN_RESOURCE_PROCESSOR_SERVICE "resource_processor"
 
 typedef struct resource_processor *resource_processor_pt;
 

Modified: incubator/celix/trunk/device_access/device_access/private/src/device_manager.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/src/device_manager.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/src/device_manager.c (original)
+++ incubator/celix/trunk/device_access/device_access/private/src/device_manager.c Tue Dec 17 08:59:23 2013
@@ -243,7 +243,7 @@ celix_status_t deviceManager_matchAttach
 				celix_status_t substatus = driverAttributes_match(attributes, reference, &match);
 				if (substatus == CELIX_SUCCESS) {
 					printf("DEVICE_MANAGER: Found match: %d\n", match);
-					if (match <= DEVICE_MATCH_NONE) {
+					if (match <= OSGI_DEVICEACCESS_DEVICE_MATCH_NONE) {
 						continue;
 					}
 					driverMatcher_add(matcher, match, attributes);
@@ -264,7 +264,7 @@ celix_status_t deviceManager_matchAttach
 						properties_pt properties = NULL;
 						status = serviceRegistration_getProperties(registration, &properties);
 						if (status == CELIX_SUCCESS) {
-							char *driverId = properties_get(properties, (char *) DRIVER_ID);
+							char *driverId = properties_get(properties, (char *) OSGI_DEVICEACCESS_DRIVER_ID);
 							driver_attributes_pt finalAttributes = hashMap_get(manager->drivers, match->reference);
 							if (finalAttributes == NULL) {
 								status = deviceManager_noDriverFound(manager, service, reference);
@@ -307,8 +307,8 @@ celix_status_t deviceManager_noDriverFou
 		properties_pt properties = NULL;
 		status = serviceRegistration_getProperties(registration, &properties);
 		if (status == CELIX_SUCCESS) {
-			char *objectClass = properties_get(properties, (char *) OBJECTCLASS);
-			if (strcmp(objectClass, DRIVER_SERVICE_NAME) == 0) {
+			char *objectClass = properties_get(properties, (char *) OSGI_FRAMEWORK_OBJECTCLASS);
+			if (strcmp(objectClass, OSGI_DEVICEACCESS_DRIVER_SERVICE_NAME) == 0) {
 				device_service_pt device = service;
 				status = device->noDriverFound(device->device);
 			}
@@ -551,7 +551,7 @@ celix_status_t deviceManager_isDriverBun
 						properties_pt properties = NULL;
 						substatus = serviceRegistration_getProperties(registration, &properties);
 						if (substatus == CELIX_SUCCESS) {
-							char *object = properties_get(properties, (char *) OBJECTCLASS);
+							char *object = properties_get(properties, (char *) OSGI_FRAMEWORK_OBJECTCLASS);
 																if (strcmp(object, "driver") == 0) {
 																	*isDriver = true;
 																	break;

Modified: incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c (original)
+++ incubator/celix/trunk/device_access/device_access/private/src/driver_attributes.c Tue Dec 17 08:59:23 2013
@@ -151,14 +151,14 @@ celix_status_t driverAttributes_isInUse(
 			for (i = 0; i < arrayList_size(references); i++) {
 				service_reference_pt ref = arrayList_get(references, i);
 				char *object = NULL;
-				status = get_property_from_registration(ref, (char *) OBJECTCLASS, &object);
+				status = get_property_from_registration(ref, (char *) OSGI_FRAMEWORK_OBJECTCLASS, &object);
 
 				if (status == CELIX_SUCCESS) {
 					char *category = NULL;
 					status = get_property_from_registration(ref, "DEVICE_CATEGORY", &category);
 
 					if (status == CELIX_SUCCESS) {
-						if ((object != NULL && strcmp(object, DEVICE_SERVICE_NAME) == 0) || (category != NULL)) {
+						if ((object != NULL && strcmp(object, OSGI_DEVICEACCESS_DEVICE_SERVICE_NAME) == 0) || (category != NULL)) {
 							*inUse = true;
 						}
 					}

Modified: incubator/celix/trunk/device_access/device_access/private/src/driver_matcher.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/src/driver_matcher.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/src/driver_matcher.c (original)
+++ incubator/celix/trunk/device_access/device_access/private/src/driver_matcher.c Tue Dec 17 08:59:23 2013
@@ -143,7 +143,7 @@ celix_status_t driverMatcher_getBestMatc
 		status = CELIX_ILLEGAL_ARGUMENT;
 	} else {
 		service_reference_pt selectorRef = NULL;
-		status = bundleContext_getServiceReference(matcher->context, DRIVER_SELECTOR_SERVICE_NAME, &selectorRef);
+		status = bundleContext_getServiceReference(matcher->context, OSGI_DEVICEACCESS_DRIVER_SELECTOR_SERVICE_NAME, &selectorRef);
 		if (status == CELIX_SUCCESS) {
 			int index = -1;
 			if (selectorRef != NULL) {
@@ -206,8 +206,8 @@ celix_status_t driverMatcher_getBestMatc
 						status = serviceRegistration_getProperties(registration, &properties);
 						if (status == CELIX_SUCCESS) {
 
-							rank1Str = properties_getWithDefault(properties, (char *) SERVICE_RANKING, "0");
-							rank2Str = properties_getWithDefault(properties, (char *) SERVICE_RANKING, "0");
+							rank1Str = properties_getWithDefault(properties, (char *) OSGI_FRAMEWORK_SERVICE_RANKING, "0");
+							rank2Str = properties_getWithDefault(properties, (char *) OSGI_FRAMEWORK_SERVICE_RANKING, "0");
 
 							rank1 = atoi(rank1Str);
 							rank2 = atoi(rank2Str);
@@ -221,8 +221,8 @@ celix_status_t driverMatcher_getBestMatc
 								char *id1Str, *id2Str;
 								long id1, id2;
 
-								id1Str = properties_get(properties, (char *) SERVICE_ID);
-								id2Str = properties_get(properties, (char *) SERVICE_ID);
+								id1Str = properties_get(properties, (char *) OSGI_FRAMEWORK_SERVICE_ID);
+								id2Str = properties_get(properties, (char *) OSGI_FRAMEWORK_SERVICE_ID);
 
 								id1 = atol(id1Str);
 								id2 = atol(id2Str);

Modified: incubator/celix/trunk/device_access/device_access/public/include/device.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/public/include/device.h?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/public/include/device.h (original)
+++ incubator/celix/trunk/device_access/device_access/public/include/device.h Tue Dec 17 08:59:23 2013
@@ -28,12 +28,12 @@
 
 #include "celix_errno.h"
 
-#define DEVICE_CATEGORY	"DEVICE_CATEGORY"
-#define DEVICE_SERIAL	"DEVICE_SERIAL"
+#define OSGI_DEVICEACCESS_DEVICE_CATEGORY	"DEVICE_CATEGORY"
+#define OSGI_DEVICEACCESS_DEVICE_SERIAL	"DEVICE_SERIAL"
 
-#define DEVICE_SERVICE_NAME "device"
+#define OSGI_DEVICEACCESS_DEVICE_SERVICE_NAME "device"
 
-static const int DEVICE_MATCH_NONE	= 0;
+static const int OSGI_DEVICEACCESS_DEVICE_MATCH_NONE	= 0;
 
 typedef struct device * device_pt;
 

Modified: incubator/celix/trunk/device_access/device_access/public/include/driver.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/public/include/driver.h?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/public/include/driver.h (original)
+++ incubator/celix/trunk/device_access/device_access/public/include/driver.h Tue Dec 17 08:59:23 2013
@@ -29,9 +29,9 @@
 #include "celix_errno.h"
 #include "service_reference.h"
 
-#define DRIVER_SERVICE_NAME "driver"
+#define OSGI_DEVICEACCESS_DRIVER_SERVICE_NAME "driver"
 
-#define DRIVER_ID "DRIVER_ID"
+#define OSGI_DEVICEACCESS_DRIVER_ID "DRIVER_ID"
 
 struct driver_service {
 	void *driver;

Modified: incubator/celix/trunk/device_access/device_access/public/include/driver_locator.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/public/include/driver_locator.h?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/public/include/driver_locator.h (original)
+++ incubator/celix/trunk/device_access/device_access/public/include/driver_locator.h Tue Dec 17 08:59:23 2013
@@ -30,7 +30,7 @@
 #include "properties.h"
 #include "array_list.h"
 
-#define DRIVER_LOCATOR_SERVICE_NAME "driver_locator"
+#define OSGI_DEVICEACCESS_DRIVER_LOCATOR_SERVICE_NAME "driver_locator"
 
 typedef struct driver_locator *driver_locator_pt;
 

Modified: incubator/celix/trunk/device_access/device_access/public/include/driver_selector.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/public/include/driver_selector.h?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/public/include/driver_selector.h (original)
+++ incubator/celix/trunk/device_access/device_access/public/include/driver_selector.h Tue Dec 17 08:59:23 2013
@@ -26,7 +26,7 @@
 #ifndef DRIVER_SELECTOR_H_
 #define DRIVER_SELECTOR_H_
 
-#define DRIVER_SELECTOR_SERVICE_NAME "driver_selector"
+#define OSGI_DEVICEACCESS_DRIVER_SELECTOR_SERVICE_NAME "driver_selector"
 
 typedef struct driver_selector *driver_selector_pt;
 

Modified: incubator/celix/trunk/device_access/driver_locator/private/src/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/driver_locator/private/src/activator.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/driver_locator/private/src/activator.c (original)
+++ incubator/celix/trunk/device_access/driver_locator/private/src/activator.c Tue Dec 17 08:59:23 2013
@@ -78,7 +78,7 @@ celix_status_t bundleActivator_start(voi
         if (bi->locator->path == NULL ) {
         	bi->locator->path = (char *)DEFAULT_LOCATOR_PATH;
         }
-        bundleContext_registerService(context, DRIVER_LOCATOR_SERVICE_NAME, bi->service, NULL, &bi->locatorRegistration);
+        bundleContext_registerService(context, OSGI_DEVICEACCESS_DRIVER_LOCATOR_SERVICE_NAME, bi->service, NULL, &bi->locatorRegistration);
     } else {
         status = CELIX_START_ERROR;
     }

Modified: incubator/celix/trunk/device_access/driver_locator/private/src/driver_locator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/driver_locator/private/src/driver_locator.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/driver_locator/private/src/driver_locator.c (original)
+++ incubator/celix/trunk/device_access/driver_locator/private/src/driver_locator.c Tue Dec 17 08:59:23 2013
@@ -37,7 +37,7 @@
 celix_status_t driverLocator_findDrivers(driver_locator_pt locator, apr_pool_t *pool, properties_pt props, array_list_pt *drivers) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	char *category = properties_get(props, DEVICE_CATEGORY);
+	char *category = properties_get(props, OSGI_DEVICEACCESS_DEVICE_CATEGORY);
 
 	status = arrayList_create(drivers);
 	if (status == CELIX_SUCCESS) {

Modified: incubator/celix/trunk/device_access/example/base_driver/private/src/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/example/base_driver/private/src/activator.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/example/base_driver/private/src/activator.c (original)
+++ incubator/celix/trunk/device_access/example/base_driver/private/src/activator.c Tue Dec 17 08:59:23 2013
@@ -74,10 +74,10 @@ static celix_status_t bundleActivator_re
 		status = baseDriver_createService(device, &service);
 		if (status == CELIX_SUCCESS) {
 			properties_pt props = properties_create();
-			properties_set(props, DEVICE_CATEGORY, BASE_DRIVER_DEVICE_CATEGORY);
-			properties_set(props, DEVICE_SERIAL, serial);
+			properties_set(props, OSGI_DEVICEACCESS_DEVICE_CATEGORY, BASE_DRIVER_DEVICE_CATEGORY);
+			properties_set(props, OSGI_DEVICEACCESS_DEVICE_SERIAL, serial);
 			service_registration_pt service_registration = NULL;
-			status = bundleContext_registerService(bi->context, DEVICE_SERVICE_NAME, service, props, &service_registration);
+			status = bundleContext_registerService(bi->context, OSGI_DEVICEACCESS_DEVICE_SERVICE_NAME, service, props, &service_registration);
 			if (status == CELIX_SUCCESS) {
 				arrayList_add(bi->serviceRegistrations, service_registration);
 //				service_registration = NULL;

Modified: incubator/celix/trunk/device_access/example/consuming_driver/private/src/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/example/consuming_driver/private/src/activator.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/example/consuming_driver/private/src/activator.c (original)
+++ incubator/celix/trunk/device_access/example/consuming_driver/private/src/activator.c Tue Dec 17 08:59:23 2013
@@ -75,7 +75,7 @@ celix_status_t bundleActivator_start(voi
 		if (status == CELIX_SUCCESS) {
 			properties_pt props = properties_create();
 			properties_set(props, "DRIVER_ID", CONSUMING_DRIVER_ID);
-			status = bundleContext_registerService(context, DRIVER_SERVICE_NAME, service, props, &bi->registration);
+			status = bundleContext_registerService(context, OSGI_DEVICEACCESS_DRIVER_SERVICE_NAME, service, props, &bi->registration);
 		}
 	}
 

Modified: incubator/celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c (original)
+++ incubator/celix/trunk/device_access/example/consuming_driver/private/src/consuming_driver.c Tue Dec 17 08:59:23 2013
@@ -133,7 +133,7 @@ celix_status_t consumingDriver_match(voi
 	if (status == CELIX_SUCCESS) {
 		status = serviceRegistration_getProperties(registration, &properties);
 		if (status == CELIX_SUCCESS) {
-			char *category = properties_get(properties, DEVICE_CATEGORY);
+			char *category = properties_get(properties, OSGI_DEVICEACCESS_DEVICE_CATEGORY);
 			if (strcmp(category, REFINING_DRIVER_DEVICE_CATEGORY) == 0) {
 				match = 10;
 			}

Modified: incubator/celix/trunk/device_access/example/refining_driver/private/src/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/example/refining_driver/private/src/activator.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/example/refining_driver/private/src/activator.c (original)
+++ incubator/celix/trunk/device_access/example/refining_driver/private/src/activator.c Tue Dec 17 08:59:23 2013
@@ -75,7 +75,7 @@ celix_status_t bundleActivator_start(voi
 		if (status == CELIX_SUCCESS) {
 			properties_pt props = properties_create();
 			properties_set(props, "DRIVER_ID", REFINING_DRIVER_ID);
-			status = bundleContext_registerService(context, DRIVER_SERVICE_NAME, service, props, &bi->registration);
+			status = bundleContext_registerService(context, OSGI_DEVICEACCESS_DRIVER_SERVICE_NAME, service, props, &bi->registration);
 		}
 	}
 

Modified: incubator/celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c (original)
+++ incubator/celix/trunk/device_access/example/refining_driver/private/src/refining_driver.c Tue Dec 17 08:59:23 2013
@@ -129,7 +129,7 @@ static celix_status_t refiningDriver_sto
 static celix_status_t refiningDriver_serviceChanged(service_listener_pt listener, service_event_pt event) {
 	celix_status_t status =  CELIX_SUCCESS;
 	refining_driver_device_pt device = listener->handle;
-	if (event->type == SERVICE_EVENT_UNREGISTERING) {
+	if (event->type == OSGI_FRAMEWORK_SERVICE_EVENT_UNREGISTERING) {
 		bool equal = false;
 		status = serviceReference_equals(device->baseServiceReference, event->reference, &equal);
 		if (status == CELIX_SUCCESS && equal) {
@@ -195,9 +195,9 @@ static celix_status_t refiningDriver_reg
 	status = refiningDriverDevice_createService(device, &service);
 	if (status == CELIX_SUCCESS) {
 		properties_pt props = properties_create();
-		properties_set(props, DEVICE_CATEGORY, REFINING_DRIVER_DEVICE_CATEGORY);
-		properties_set(props, DEVICE_SERIAL, serial);
-		status = bundleContext_registerService(driver->context, DEVICE_SERVICE_NAME, service, props, &device->deviceRegistration);
+		properties_set(props, OSGI_DEVICEACCESS_DEVICE_CATEGORY, REFINING_DRIVER_DEVICE_CATEGORY);
+		properties_set(props, OSGI_DEVICEACCESS_DEVICE_SERIAL, serial);
+		status = bundleContext_registerService(driver->context, OSGI_DEVICEACCESS_DEVICE_SERVICE_NAME, service, props, &device->deviceRegistration);
 	}
 
 	if (status == CELIX_SUCCESS) {
@@ -239,7 +239,7 @@ celix_status_t refiningDriver_match(void
 	if (status == CELIX_SUCCESS) {
 		status = serviceRegistration_getProperties(registration, &properties);
 		if (status == CELIX_SUCCESS) {
-			char *category = properties_get(properties, DEVICE_CATEGORY);
+			char *category = properties_get(properties, OSGI_DEVICEACCESS_DEVICE_CATEGORY);
 			if (strcmp(category, BASE_DRIVER_DEVICE_CATEGORY) == 0) {
 				match = 10;
 			}

Modified: incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-listener/private/src/listener_example.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-listener/private/src/listener_example.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-listener/private/src/listener_example.c (original)
+++ incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-listener/private/src/listener_example.c Tue Dec 17 08:59:23 2013
@@ -94,7 +94,7 @@ celix_status_t bundleActivator_start(voi
 		char filter[30];
 		array_list_pt logServices = NULL;
 		apr_pool_t *pool;
-		sprintf(filter, "(objectClass=%s)", LOG_SERVICE_NAME);
+		sprintf(filter, "(objectClass=%s)", OSGI_LOGSERVICE_NAME);
 
 		bundleContext_getMemoryPool(context, &pool);
 
@@ -113,7 +113,7 @@ celix_status_t bundleActivator_start(voi
 				service_reference_pt logService = (service_reference_pt) arrayList_get(logServices, i);
 				service_event_pt event = apr_palloc(activator->pool, sizeof(*event));
 				event->reference = logService;
-				event->type = SERVICE_EVENT_REGISTERED;
+				event->type = OSGI_FRAMEWORK_SERVICE_EVENT_REGISTERED;
 
 				listenerExample_serviceChanged(listener, event);
 			}
@@ -151,13 +151,13 @@ void listenerExample_serviceChanged(serv
 	apr_thread_mutex_lock(activator->logServiceReferencesLock);
 
 	switch (event->type) {
-	case SERVICE_EVENT_REGISTERED:
+	case OSGI_FRAMEWORK_SERVICE_EVENT_REGISTERED:
 		arrayList_add(activator->logServiceReferences, event->reference);
 		break;
 //	case MODIFIED:
 //		// only the service metadata has changed, so no need to do anything here
 //		break;
-	case SERVICE_EVENT_UNREGISTERING:
+	case OSGI_FRAMEWORK_SERVICE_EVENT_UNREGISTERING:
 		arrayList_remove(activator->logServiceReferences,
 				arrayList_indexOf(activator->logServiceReferences, event->reference));
 		break;
@@ -187,7 +187,7 @@ static void *APR_THREAD_FUNC listenerExa
 		log_service_pt logService = NULL;
 		listenerExample_getLogService(activator, &logService);
 		if (logService != NULL) {
-			(*(logService->log))(logService->logger, LOG_INFO, "ping");
+			(*(logService->log))(logService->logger, OSGI_LOGSERVICE_INFO, "ping");
 		} else {
 			listenerExample_alternativeLog(activator, "No LogService available. Printing to standard out.");
 		}

Modified: incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-lookup/private/src/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-lookup/private/src/activator.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-lookup/private/src/activator.c (original)
+++ incubator/celix/trunk/examples/osgi-in-action/chapter04-correct-lookup/private/src/activator.c Tue Dec 17 08:59:23 2013
@@ -99,7 +99,7 @@ void *APR_THREAD_FUNC LogServiceTest(apr
 	while (apr_os_thread_current() == *logThread) {
 		service_reference_pt logServiceRef = NULL;
 		// lookup the current "best" LogService each time, just before we need to use it
-		status = bundleContext_getServiceReference(m_context, (char *) LOG_SERVICE_NAME, &logServiceRef);
+		status = bundleContext_getServiceReference(m_context, (char *) OSGI_LOGSERVICE_NAME, &logServiceRef);
 		// if the service reference is null then we know there's no log service available
 		if (status == CELIX_SUCCESS && logServiceRef != NULL) {
 			void *log = NULL;
@@ -108,7 +108,7 @@ void *APR_THREAD_FUNC LogServiceTest(apr
 			logService = (LOG_SERVICE) log;
 			// if the dereferenced instance is null then we know the service has been removed
 			if (logService != NULL) {
-				(*(logService->log))(logService->logger, LOG_INFO, "ping");
+				(*(logService->log))(logService->logger, OSGI_LOGSERVICE_INFO, "ping");
 			} else {
 				alternativeLog("LogService has gone", data);
 			}

Modified: incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/dependency_activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/dependency_activator.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/dependency_activator.c (original)
+++ incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/dependency_activator.c Tue Dec 17 08:59:23 2013
@@ -65,7 +65,7 @@ void dm_init(void * userData, bundle_con
 
 	dep2 = dependencyActivatorBase_createServiceDependency(manager);
     serviceDependency_setRequired(dep2, false);
-    serviceDependency_setService(dep2, (char *) LOG_SERVICE_NAME, NULL);
+    serviceDependency_setService(dep2, (char *) OSGI_LOGSERVICE_NAME, NULL);
     serviceDependency_setCallbacks(dep2, tracker_addLog, tracker_modifiedLog, tracker_removeLog);
     serviceComponent_addServiceDependency(service, dep2);
 

Modified: incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/tracker.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/tracker.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/tracker.c (original)
+++ incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/tracker.c Tue Dec 17 08:59:23 2013
@@ -40,7 +40,7 @@ static void *APR_THREAD_FUNC dp_send(apr
 			publisher_service_pt pub = (publisher_service_pt) arrayList_get(data->publishers, i);
 			pub->invoke(pub->publisher, "Tracker message");
 			if (data->logger != NULL) {
-				data->logger->log(data->logger->logger, LOG_INFO, "Sending message to publisher");
+				data->logger->log(data->logger->logger, OSGI_LOGSERVICE_INFO, "Sending message to publisher");
 			}
 		}
 		apr_sleep(1000000);
@@ -94,14 +94,14 @@ void tracker_addLog(void *handle, servic
     struct data * data = (struct data *) handle;
     printf("Add log\n");
     data->logger = service;
-    ((log_service_pt) service)->log(((log_service_pt) service)->logger, LOG_DEBUG, "test");
+    ((log_service_pt) service)->log(((log_service_pt) service)->logger, OSGI_LOGSERVICE_DEBUG, "test");
 }
 
 void tracker_modifiedLog(void *handle, service_reference_pt ref, void *service) {
     struct data * data = (struct data *) handle;
     printf("Modify log\n");
     data->logger = service;
-    ((log_service_pt) service)->log(((log_service_pt) service)->logger, LOG_DEBUG, "test");
+    ((log_service_pt) service)->log(((log_service_pt) service)->logger, OSGI_LOGSERVICE_DEBUG, "test");
 }
 
 void tracker_removeLog(void *handle, service_reference_pt ref, void *service) {

Modified: incubator/celix/trunk/framework/private/src/bundle.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle.c Tue Dec 17 08:59:23 2013
@@ -62,7 +62,7 @@ celix_status_t bundle_create(bundle_pt *
         (*bundle)->activator = NULL;
         (*bundle)->context = NULL;
         (*bundle)->framework = NULL;
-        (*bundle)->state = BUNDLE_INSTALLED;
+        (*bundle)->state = OSGI_FRAMEWORK_BUNDLE_INSTALLED;
         (*bundle)->modules = NULL;
         arrayList_create(&(*bundle)->modules);
 
@@ -100,7 +100,7 @@ celix_status_t bundle_createFromArchive(
 	(*bundle)->activator = NULL;
 	(*bundle)->context = NULL;
 	(*bundle)->framework = framework;
-	(*bundle)->state = BUNDLE_INSTALLED;
+	(*bundle)->state = OSGI_FRAMEWORK_BUNDLE_INSTALLED;
 	(*bundle)->modules = NULL;
 	arrayList_create(&(*bundle)->modules);
 
@@ -376,7 +376,7 @@ celix_status_t bundle_setPersistentState
 	status = bundle_isSystemBundle(bundle, &systemBundle);
 	if (status == CELIX_SUCCESS) {
 		if (!systemBundle) {
-			status = bundleArchive_setPersistentState(bundle->archive, BUNDLE_INSTALLED);
+			status = bundleArchive_setPersistentState(bundle->archive, OSGI_FRAMEWORK_BUNDLE_INSTALLED);
 		}
 	}
 
@@ -392,7 +392,7 @@ celix_status_t bundle_setPersistentState
 	status = bundle_isSystemBundle(bundle, &systemBundle);
 	if (status == CELIX_SUCCESS) {
 		if (!systemBundle) {
-			status = bundleArchive_setPersistentState(bundle->archive, BUNDLE_UNINSTALLED);
+			status = bundleArchive_setPersistentState(bundle->archive, OSGI_FRAMEWORK_BUNDLE_UNINSTALLED);
 		}
 	}
 
@@ -642,7 +642,7 @@ celix_status_t bundle_refresh(bundle_pt 
 		if (status == CELIX_SUCCESS) {
 			status = bundle_addModule(bundle, module);
 			if (status == CELIX_SUCCESS) {
-				bundle->state = BUNDLE_INSTALLED;
+				bundle->state = OSGI_FRAMEWORK_BUNDLE_INSTALLED;
 			}
 		}
 	}

Modified: incubator/celix/trunk/framework/private/src/bundle_archive.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle_archive.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle_archive.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle_archive.c Tue Dec 17 08:59:23 2013
@@ -90,7 +90,7 @@ celix_status_t bundleArchive_createSyste
                 archive->archiveRoot = NULL;
                 archive->archiveRootDir = NULL;
                 archive->refreshCount = -1;
-                archive->persistentState = BUNDLE_UNKNOWN;
+                archive->persistentState = OSGI_FRAMEWORK_BUNDLE_UNKNOWN;
                 time(&archive->lastModified);
 
                 *bundle_archive = archive;
@@ -320,7 +320,7 @@ celix_status_t bundleArchive_getPersiste
 	celix_status_t status = CELIX_SUCCESS;
 	apr_status_t apr_status;
 
-	if (archive->persistentState != BUNDLE_UNKNOWN) {
+	if (archive->persistentState != OSGI_FRAMEWORK_BUNDLE_UNKNOWN) {
 		*state = archive->persistentState;
 	} else {
 		apr_file_t *persistentStateLocationFile;
@@ -342,13 +342,13 @@ celix_status_t bundleArchive_getPersiste
 
                 if (status == CELIX_SUCCESS) {
                     if (stateString != NULL && (strcmp(stateString, "active") == 0)) {
-                        archive->persistentState = BUNDLE_ACTIVE;
+                        archive->persistentState = OSGI_FRAMEWORK_BUNDLE_ACTIVE;
                     } else if (stateString != NULL && (strcmp(stateString, "starting") == 0)) {
-                        archive->persistentState = BUNDLE_STARTING;
+                        archive->persistentState = OSGI_FRAMEWORK_BUNDLE_STARTING;
                     } else if (stateString != NULL && (strcmp(stateString, "uninstalled") == 0)) {
-                        archive->persistentState = BUNDLE_UNINSTALLED;
+                        archive->persistentState = OSGI_FRAMEWORK_BUNDLE_UNINSTALLED;
                     } else {
-                        archive->persistentState = BUNDLE_INSTALLED;
+                        archive->persistentState = OSGI_FRAMEWORK_BUNDLE_INSTALLED;
                     }
 
                     *state = archive->persistentState;
@@ -382,13 +382,13 @@ celix_status_t bundleArchive_setPersiste
             if (status == CELIX_SUCCESS) {
                 char * s;
                 switch (state) {
-                    case BUNDLE_ACTIVE:
+                    case OSGI_FRAMEWORK_BUNDLE_ACTIVE:
                         s = "active";
                         break;
-                    case BUNDLE_STARTING:
+                    case OSGI_FRAMEWORK_BUNDLE_STARTING:
                         s = "starting";
                         break;
-                    case BUNDLE_UNINSTALLED:
+                    case OSGI_FRAMEWORK_BUNDLE_UNINSTALLED:
                         s = "uninstalled";
                         break;
                     default:

Modified: incubator/celix/trunk/framework/private/src/bundle_cache.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle_cache.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle_cache.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle_cache.c Tue Dec 17 08:59:23 2013
@@ -52,7 +52,7 @@ celix_status_t bundleCache_create(proper
     	apr_pool_pre_cleanup_register(mp, cache, bundleCache_destroy);
 
 		if (configurationMap != NULL && mp != NULL && *bundle_cache == NULL) {
-            char * cacheDir = properties_get(configurationMap, (char *) FRAMEWORK_STORAGE);
+            char * cacheDir = properties_get(configurationMap, (char *) OSGI_FRAMEWORK_FRAMEWORK_STORAGE);
 			cache->configurationMap = configurationMap;
             if (cacheDir == NULL) {
                 cacheDir = ".cache";

Modified: incubator/celix/trunk/framework/private/src/celix_log.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/celix_log.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/celix_log.c (original)
+++ incubator/celix/trunk/framework/private/src/celix_log.c Tue Dec 17 08:59:23 2013
@@ -35,22 +35,22 @@ void framework_log(framework_log_level_t
     va_start(listPointer, fmsg);
     vsprintf(msg, fmsg, listPointer);
     switch (level) {
-        case FW_LOG_ERROR:
+        case OSGI_FRAMEWORK_LOG_ERROR:
             levelStr = "ERROR";
             break;
-        case FW_LOG_WARNING:
+        case OSGI_FRAMEWORK_LOG_WARNING:
             levelStr = "WARNING";
             break;
-        case FW_LOG_INFO:
+        case OSGI_FRAMEWORK_LOG_INFO:
             levelStr = "INFO";
             break;
-        case FW_LOG_DEBUG:
+        case OSGI_FRAMEWORK_LOG_DEBUG:
         default:
             levelStr = "DEBUG";
             break;
     }
 
-    if (level == FW_LOG_ERROR) {
+    if (level == OSGI_FRAMEWORK_LOG_ERROR) {
         printf("%s: %s\n\tat %s(%s:%d)\n", levelStr, msg, func, file, line);
     } else {
         printf("%s: %s\n", levelStr, msg);

Modified: incubator/celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/framework.c?rev=1551490&r1=1551489&r2=1551490&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/framework.c (original)
+++ incubator/celix/trunk/framework/private/src/framework.c Tue Dec 17 08:59:23 2013
@@ -200,16 +200,16 @@ celix_status_t framework_create(framewor
                 //
             } else {
                 status = CELIX_FRAMEWORK_EXCEPTION;
-                fw_logCode(FW_LOG_ERROR, status, "Could not create framework");
+                fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not create framework");
             }
         } else {
             status = CELIX_FRAMEWORK_EXCEPTION;
-            fw_logCode(FW_LOG_ERROR, status, "Could not create framework");
+            fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not create framework");
         }
     } else {
         error = "FW exception";
         status = CELIX_FRAMEWORK_EXCEPTION;
-        fw_logCode(FW_LOG_ERROR, CELIX_ENOMEM, "Could not create framework");
+        fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, CELIX_ENOMEM, "Could not create framework");
     }
 
     return status;
@@ -298,7 +298,7 @@ celix_status_t fw_init(framework_pt fram
 	char uuid[APR_UUID_FORMATTED_LENGTH+1];
 
 	celix_status_t status = CELIX_SUCCESS;
-	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, framework->bundle, BUNDLE_INSTALLED|BUNDLE_RESOLVED|BUNDLE_STARTING|BUNDLE_ACTIVE));
+	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, framework->bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED|OSGI_FRAMEWORK_BUNDLE_RESOLVED|OSGI_FRAMEWORK_BUNDLE_STARTING|OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 	status = CELIX_DO_IF(status, arrayList_create(&framework->serviceListeners));
 	status = CELIX_DO_IF(status, arrayList_create(&framework->bundleListeners));
 	status = CELIX_DO_IF(status, arrayList_create(&framework->frameworkListeners));
@@ -306,15 +306,15 @@ celix_status_t fw_init(framework_pt fram
 	status = CELIX_DO_IF(status, apr_thread_create(&framework->dispatcherThread, NULL, fw_eventDispatcher, framework, framework->mp));
 	status = CELIX_DO_IF(status, bundle_getState(framework->bundle, &state));
 	if (status == CELIX_SUCCESS) {
-	    if ((state == BUNDLE_INSTALLED) || (state == BUNDLE_RESOLVED)) {
+	    if ((state == OSGI_FRAMEWORK_BUNDLE_INSTALLED) || (state == OSGI_FRAMEWORK_BUNDLE_RESOLVED)) {
 	        bundle_state_e state;
 	        properties_pt props = properties_create();
-	        properties_set(props, (char *) FRAMEWORK_STORAGE, ".cache");
+	        properties_set(props, (char *) OSGI_FRAMEWORK_FRAMEWORK_STORAGE, ".cache");
 
 	        status = CELIX_DO_IF(status, bundleCache_create(props, framework->mp, &framework->cache));
 	        status = CELIX_DO_IF(status, bundle_getState(framework->bundle, &state));
 	        if (status == CELIX_SUCCESS) {
-	            if (state == BUNDLE_INSTALLED) {
+	            if (state == OSGI_FRAMEWORK_BUNDLE_INSTALLED) {
 	                // clean cache
 	                // bundleCache_delete(framework->cache);
 	            }
@@ -327,7 +327,7 @@ celix_status_t fw_init(framework_pt fram
         apr_uuid_t aprUuid;
         apr_uuid_get(&aprUuid);
         apr_uuid_format(uuid, &aprUuid);
-        setenv(FRAMEWORK_UUID, uuid, true);
+        setenv(OSGI_FRAMEWORK_FRAMEWORK_UUID, uuid, true);
 
         framework->installedBundleMap = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
 	}
@@ -345,7 +345,7 @@ celix_status_t fw_init(framework_pt fram
             hashMap_destroy(wires, false, false);
         } else {
             status = CELIX_BUNDLE_EXCEPTION;
-            fw_logCode(FW_LOG_ERROR, status, "Unresolved constraints in System Bundle");
+            fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Unresolved constraints in System Bundle");
         }
     }
 
@@ -360,7 +360,7 @@ celix_status_t fw_init(framework_pt fram
             framework->nextBundleId = framework->nextBundleId > id + 1 ? framework->nextBundleId : id + 1;
 
             bundleArchive_getPersistentState(archive1, &bundleState);
-            if (bundleState == BUNDLE_UNINSTALLED) {
+            if (bundleState == OSGI_FRAMEWORK_BUNDLE_UNINSTALLED) {
                 bundleArchive_closeAndDelete(archive1);
             } else {
                 bundle_pt bundle = NULL;
@@ -373,7 +373,7 @@ celix_status_t fw_init(framework_pt fram
     }
 
     status = CELIX_DO_IF(status, serviceRegistry_create(framework->mp, framework, fw_serviceChanged, &framework->registry));
-    status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, framework->bundle, BUNDLE_STARTING));
+    status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, framework->bundle, OSGI_FRAMEWORK_BUNDLE_STARTING));
     status = CELIX_DO_IF(status, apr_thread_cond_create(&framework->shutdownGate, framework->mp));
     if (status == CELIX_SUCCESS) {
         handle_t handle = NULL;
@@ -382,7 +382,7 @@ celix_status_t fw_init(framework_pt fram
             bundle_setHandle(framework->bundle, handle);
         } else {
             status = CELIX_FRAMEWORK_EXCEPTION;
-            fw_logCode(FW_LOG_ERROR,  status, "Could not get handle to framework library");
+            fw_logCode(OSGI_FRAMEWORK_LOG_ERROR,  status, "Could not get handle to framework library");
         }
     }
 
@@ -396,10 +396,10 @@ celix_status_t fw_init(framework_pt fram
             bundle_context_pt context = NULL;
             void * userData = NULL;
 
-            create_function_pt create = (create_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), BUNDLE_ACTIVATOR_CREATE);
-            start_function_pt start = (start_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), BUNDLE_ACTIVATOR_START);
-            stop_function_pt stop = (stop_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), BUNDLE_ACTIVATOR_STOP);
-            destroy_function_pt destroy = (destroy_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), BUNDLE_ACTIVATOR_DESTROY);
+            create_function_pt create = (create_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_CREATE);
+            start_function_pt start = (start_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_START);
+            stop_function_pt stop = (stop_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_STOP);
+            destroy_function_pt destroy = (destroy_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_DESTROY);
 
             activator->start = start;
             activator->stop = stop;
@@ -423,7 +423,7 @@ celix_status_t fw_init(framework_pt fram
     }
 
     if (status != CELIX_SUCCESS) {
-       fw_logCode(FW_LOG_ERROR, status, "Could not init framework");
+       fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not init framework");
     }
 
     framework_releaseBundleLock(framework, framework->bundle);
@@ -435,30 +435,30 @@ celix_status_t framework_start(framework
 	celix_status_t status = CELIX_SUCCESS;
 	bundle_state_e state;
 
-	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, framework->bundle, BUNDLE_INSTALLED|BUNDLE_RESOLVED|BUNDLE_STARTING|BUNDLE_ACTIVE));
+	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, framework->bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED|OSGI_FRAMEWORK_BUNDLE_RESOLVED|OSGI_FRAMEWORK_BUNDLE_STARTING|OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 	status = CELIX_DO_IF(status, bundle_getState(framework->bundle, &state));
 	if (status == CELIX_SUCCESS) {
-	    if ((state == BUNDLE_INSTALLED) || (state == BUNDLE_RESOLVED)) {
+	    if ((state == OSGI_FRAMEWORK_BUNDLE_INSTALLED) || (state == OSGI_FRAMEWORK_BUNDLE_RESOLVED)) {
 	        status = CELIX_DO_IF(status, fw_init(framework));
         }
 	}
 
 	status = CELIX_DO_IF(status, bundle_getState(framework->bundle, &state));
 	if (status == CELIX_SUCCESS) {
-	    if (state == BUNDLE_STARTING) {
-	        status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, framework->bundle, BUNDLE_ACTIVE));
+	    if (state == OSGI_FRAMEWORK_BUNDLE_STARTING) {
+	        status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, framework->bundle, OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 	    }
 
 	    framework_releaseBundleLock(framework, framework->bundle);
 	}
 
-	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_STARTED, framework->bundle));
-	status = CELIX_DO_IF(status, fw_fireFrameworkEvent(framework, FRAMEWORK_EVENT_STARTED, framework->bundle, 0));
+	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_STARTED, framework->bundle));
+	status = CELIX_DO_IF(status, fw_fireFrameworkEvent(framework, OSGI_FRAMEWORK_EVENT_STARTED, framework->bundle, 0));
 
 	if (status != CELIX_SUCCESS) {
        status = CELIX_BUNDLE_EXCEPTION;
-       fw_logCode(FW_LOG_ERROR, status, "Could not start framework");
-       fw_fireFrameworkEvent(framework, FRAMEWORK_EVENT_ERROR, framework->bundle, status);
+       fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not start framework");
+       fw_fireFrameworkEvent(framework, OSGI_FRAMEWORK_EVENT_ERROR, framework->bundle, status);
     }
 
 	return status;
@@ -473,7 +473,7 @@ celix_status_t fw_getProperty(framework_
 
 	if (framework == NULL || name == NULL || *value != NULL) {
 		status = CELIX_ILLEGAL_ARGUMENT;
-		fw_logCode(FW_LOG_ERROR, status, "Missing required arguments");
+		fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Missing required arguments");
 	} else {
 		if (framework->configurationMap != NULL) {
 			*value = properties_get(framework->configurationMap, (char *) name);
@@ -500,8 +500,8 @@ celix_status_t fw_installBundle2(framewo
   	status = CELIX_DO_IF(status, framework_acquireInstallLock(framework, location));
   	status = CELIX_DO_IF(status, bundle_getState(framework->bundle, &state));
   	if (status == CELIX_SUCCESS) {
-        if (state == BUNDLE_STOPPING || state == BUNDLE_UNINSTALLED) {
-            fw_log(FW_LOG_INFO,  "The framework is being shutdown");
+        if (state == OSGI_FRAMEWORK_BUNDLE_STOPPING || state == OSGI_FRAMEWORK_BUNDLE_UNINSTALLED) {
+            fw_log(OSGI_FRAMEWORK_LOG_INFO,  "The framework is being shutdown");
             status = CELIX_DO_IF(status, framework_releaseInstallLock(framework, location));
             status = CELIX_FRAMEWORK_SHUTDOWN;
         }
@@ -544,9 +544,9 @@ celix_status_t fw_installBundle2(framewo
     status = CELIX_DO_IF(status, framework_releaseInstallLock(framework, location));
 
     if (status != CELIX_SUCCESS) {
-    	fw_logCode(FW_LOG_ERROR, status, "Could not install bundle");
+    	fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not install bundle");
     } else {
-        status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_INSTALLED, *bundle));
+        status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_INSTALLED, *bundle));
     }
 
   	return status;
@@ -613,30 +613,30 @@ celix_status_t fw_startBundle(framework_
 	char *error = NULL;
 
 
-	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, BUNDLE_INSTALLED|BUNDLE_RESOLVED|BUNDLE_STARTING|BUNDLE_ACTIVE));
+	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED|OSGI_FRAMEWORK_BUNDLE_RESOLVED|OSGI_FRAMEWORK_BUNDLE_STARTING|OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 	status = CELIX_DO_IF(status, bundle_getState(bundle, &state));
 
 	if (status == CELIX_SUCCESS) {
 	    switch (state) {
-            case BUNDLE_UNKNOWN:
+            case OSGI_FRAMEWORK_BUNDLE_UNKNOWN:
                 error = "state is unknown";
                 status = CELIX_ILLEGAL_STATE;
                 break;
-            case BUNDLE_UNINSTALLED:
+            case OSGI_FRAMEWORK_BUNDLE_UNINSTALLED:
                 error = "bundle is uninstalled";
                 status = CELIX_ILLEGAL_STATE;
                 break;
-            case BUNDLE_STARTING:
+            case OSGI_FRAMEWORK_BUNDLE_STARTING:
                 error = "bundle is starting";
                 status = CELIX_BUNDLE_EXCEPTION;
                 break;
-            case BUNDLE_STOPPING:
+            case OSGI_FRAMEWORK_BUNDLE_STOPPING:
                 error = "bundle is stopping";
                 status = CELIX_BUNDLE_EXCEPTION;
                 break;
-            case BUNDLE_ACTIVE:
+            case OSGI_FRAMEWORK_BUNDLE_ACTIVE:
                 break;
-            case BUNDLE_INSTALLED:
+            case OSGI_FRAMEWORK_BUNDLE_INSTALLED:
                 bundle_getCurrentModule(bundle, &module);
                 if (!module_isResolved(module)) {
                     wires = resolver_resolve(module);
@@ -650,7 +650,7 @@ celix_status_t fw_startBundle(framework_
                     hashMap_destroy(wires, false, false);
                 }
                 /* no break */
-            case BUNDLE_RESOLVED:
+            case OSGI_FRAMEWORK_BUNDLE_RESOLVED:
                 status = CELIX_DO_IF(status, bundleContext_create(framework, bundle, &context));
                 status = CELIX_DO_IF(status, bundle_setContext(bundle, context));
 
@@ -659,7 +659,7 @@ celix_status_t fw_startBundle(framework_
                 status = CELIX_DO_IF(status, bundleArchive_getCurrentRevision(archive, &revision));
                 status = CELIX_DO_IF(status, bundleRevision_getManifest(revision, &manifest));
                 if (status == CELIX_SUCCESS) {
-                    library = manifest_getValue(manifest, HEADER_LIBRARY);
+                    library = manifest_getValue(manifest, OSGI_FRAMEWORK_HEADER_LIBRARY);
                 }
 
                 status = CELIX_DO_IF(status, bundleArchive_getRefreshCount(archive, &refreshCount));
@@ -690,18 +690,18 @@ celix_status_t fw_startBundle(framework_
                         } else {
                             void * userData = NULL;
                             bundle_context_pt context;
-                            create_function_pt create = (create_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), BUNDLE_ACTIVATOR_CREATE);
-                            start_function_pt start = (start_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), BUNDLE_ACTIVATOR_START);
-                            stop_function_pt stop = (stop_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), BUNDLE_ACTIVATOR_STOP);
-                            destroy_function_pt destroy = (destroy_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), BUNDLE_ACTIVATOR_DESTROY);
+                            create_function_pt create = (create_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_CREATE);
+                            start_function_pt start = (start_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_START);
+                            stop_function_pt stop = (stop_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_STOP);
+                            destroy_function_pt destroy = (destroy_function_pt) fw_getSymbol((handle_t) bundle_getHandle(bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_DESTROY);
 
                             activator->start = start;
                             activator->stop = stop;
                             activator->destroy = destroy;
                             status = CELIX_DO_IF(status, bundle_setActivator(bundle, activator));
 
-                            status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, BUNDLE_STARTING));
-                            status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_STARTING, bundle));
+                            status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_STARTING));
+                            status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_STARTING, bundle));
 
                             status = CELIX_DO_IF(status, bundle_getContext(bundle, &context));
 
@@ -719,8 +719,8 @@ celix_status_t fw_startBundle(framework_
                                 }
                             }
 
-                            status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, BUNDLE_ACTIVE));
-                            status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_STARTED, bundle));
+                            status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_ACTIVE));
+                            status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_STARTED, bundle));
                         }
                     }
                 }
@@ -739,9 +739,9 @@ celix_status_t fw_startBundle(framework_
 	    module_getSymbolicName(module, &symbolicName);
 	    bundle_getBundleId(bundle, &id);
 	    if (error != NULL) {
-	        fw_logCode(FW_LOG_ERROR, status, "Could not start bundle: %s [%ld]; cause: %s", symbolicName, id, error);
+	        fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not start bundle: %s [%ld]; cause: %s", symbolicName, id, error);
 	    } else {
-	        fw_logCode(FW_LOG_ERROR, status, "Could not start bundle: %s [%ld]", symbolicName, id);
+	        fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not start bundle: %s [%ld]", symbolicName, id);
 	    }
 	}
 
@@ -755,10 +755,10 @@ celix_status_t framework_updateBundle(fr
 	bundle_archive_pt archive = NULL;
 	char *error = NULL;
 
-	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, BUNDLE_INSTALLED|BUNDLE_RESOLVED|BUNDLE_ACTIVE));
+	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED|OSGI_FRAMEWORK_BUNDLE_RESOLVED|OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 	status = CELIX_DO_IF(status, bundle_getState(bundle, &oldState));
 	if (status == CELIX_SUCCESS) {
-        if (oldState == BUNDLE_ACTIVE) {
+        if (oldState == OSGI_FRAMEWORK_BUNDLE_ACTIVE) {
             fw_stopBundle(framework, bundle, false);
         }
 	}
@@ -777,15 +777,15 @@ celix_status_t framework_updateBundle(fr
 	status = CELIX_DO_IF(status, framework_releaseGlobalLock(framework));
 
 	status = CELIX_DO_IF(status, bundleArchive_setLastModified(archive, time(NULL)));
-	status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, BUNDLE_INSTALLED));
+	status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED));
 
-	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_UNRESOLVED, bundle));
-	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_UPDATED, bundle));
+	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_UNRESOLVED, bundle));
+	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_UPDATED, bundle));
 
     // Refresh packages?
 
 	if (status == CELIX_SUCCESS) {
-	    if (oldState == BUNDLE_ACTIVE) {
+	    if (oldState == OSGI_FRAMEWORK_BUNDLE_ACTIVE) {
 	        status = CELIX_DO_IF(status, fw_startBundle(framework, bundle, 1));
 	    }
 	}
@@ -800,9 +800,9 @@ celix_status_t framework_updateBundle(fr
         module_getSymbolicName(module, &symbolicName);
         bundle_getBundleId(bundle, &id);
         if (error != NULL) {
-            fw_logCode(FW_LOG_ERROR, status, "Cannot update bundle: %s [%ld]; cause: %s", symbolicName, id, error);
+            fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Cannot update bundle: %s [%ld]; cause: %s", symbolicName, id, error);
         } else {
-            fw_logCode(FW_LOG_ERROR, status, "Cannot update bundle: %s [%ld]", symbolicName, id);
+            fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Cannot update bundle: %s [%ld]", symbolicName, id);
         }
 	}
 
@@ -820,7 +820,7 @@ celix_status_t fw_stopBundle(framework_p
     long id = 0;
     char *error = NULL;
 
-	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, BUNDLE_INSTALLED|BUNDLE_RESOLVED|BUNDLE_STARTING|BUNDLE_ACTIVE));
+	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED|OSGI_FRAMEWORK_BUNDLE_RESOLVED|OSGI_FRAMEWORK_BUNDLE_STARTING|OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 
 	if (record) {
 	    status = CELIX_DO_IF(status, bundle_setPersistentStateInactive(bundle));
@@ -829,34 +829,34 @@ celix_status_t fw_stopBundle(framework_p
 	status = CELIX_DO_IF(status, bundle_getState(bundle, &state));
 	if (status == CELIX_SUCCESS) {
 	    switch (state) {
-            case BUNDLE_UNKNOWN:
+            case OSGI_FRAMEWORK_BUNDLE_UNKNOWN:
                 status = CELIX_ILLEGAL_STATE;
                 error = "state is unknown";
                 break;
-            case BUNDLE_UNINSTALLED:
+            case OSGI_FRAMEWORK_BUNDLE_UNINSTALLED:
                 status = CELIX_ILLEGAL_STATE;
                 error = "bundle is uninstalled";
                 break;
-            case BUNDLE_STARTING:
+            case OSGI_FRAMEWORK_BUNDLE_STARTING:
                 status = CELIX_BUNDLE_EXCEPTION;
                 error = "bundle is starting";
                 break;
-            case BUNDLE_STOPPING:
+            case OSGI_FRAMEWORK_BUNDLE_STOPPING:
                 status = CELIX_BUNDLE_EXCEPTION;
                 error = "bundle is stopping";
                 break;
-            case BUNDLE_INSTALLED:
-            case BUNDLE_RESOLVED:
+            case OSGI_FRAMEWORK_BUNDLE_INSTALLED:
+            case OSGI_FRAMEWORK_BUNDLE_RESOLVED:
                 break;
-            case BUNDLE_ACTIVE:
+            case OSGI_FRAMEWORK_BUNDLE_ACTIVE:
                 wasActive = true;
                 break;
         }
 	}
 
 
-	status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, BUNDLE_STOPPING));
-	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_STOPPING, bundle));
+	status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_STOPPING));
+	status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_STOPPING, bundle));
     status = CELIX_DO_IF(status, bundle_getBundleId(bundle, &id));
 	if (status == CELIX_SUCCESS) {
 	    if (wasActive || (id == 0)) {
@@ -900,7 +900,7 @@ celix_status_t fw_stopBundle(framework_p
                 // #TODO enable dlclose call
                 dlclose(bundle_getHandle(bundle));
 
-                status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, BUNDLE_RESOLVED));
+                status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_RESOLVED));
             }
 	    }
 	}
@@ -915,12 +915,12 @@ celix_status_t fw_stopBundle(framework_p
         module_getSymbolicName(module, &symbolicName);
         bundle_getBundleId(bundle, &id);
         if (error != NULL) {
-            fw_logCode(FW_LOG_ERROR, status, "Cannot stop bundle: %s [%ld]; cause: %s", symbolicName, id, error);
+            fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Cannot stop bundle: %s [%ld]; cause: %s", symbolicName, id, error);
         } else {
-            fw_logCode(FW_LOG_ERROR, status, "Cannot stop bundle: %s [%ld]", symbolicName, id);
+            fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Cannot stop bundle: %s [%ld]", symbolicName, id);
         }
  	} else {
-        fw_fireBundleEvent(framework, BUNDLE_EVENT_STOPPED, bundle);
+        fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_STOPPED, bundle);
  	}
 
 	return status;
@@ -935,7 +935,7 @@ celix_status_t fw_uninstallBundle(framew
     bundle_pt target;
     char *error = NULL;
 
-    status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, BUNDLE_INSTALLED|BUNDLE_RESOLVED|BUNDLE_STARTING|BUNDLE_ACTIVE|BUNDLE_STOPPING));
+    status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED|OSGI_FRAMEWORK_BUNDLE_RESOLVED|OSGI_FRAMEWORK_BUNDLE_STARTING|OSGI_FRAMEWORK_BUNDLE_ACTIVE|OSGI_FRAMEWORK_BUNDLE_STOPPING));
     status = CELIX_DO_IF(status, fw_stopBundle(framework, bundle, true));
     if (status == CELIX_SUCCESS) {
         locked = framework_acquireGlobalLock(framework);
@@ -961,20 +961,20 @@ celix_status_t fw_uninstallBundle(framew
 
     if (status == CELIX_SUCCESS) {
         if (target == NULL) {
-            fw_log(FW_LOG_ERROR, "Could not remove bundle from installed map");
+            fw_log(OSGI_FRAMEWORK_LOG_ERROR, "Could not remove bundle from installed map");
         }
     }
 
-    status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, BUNDLE_INSTALLED));
+    status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED));
 
-    status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_UNRESOLVED, bundle));
+    status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_UNRESOLVED, bundle));
 
-    status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, BUNDLE_UNINSTALLED));
+    status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_UNINSTALLED));
     status = CELIX_DO_IF(status, bundleArchive_setLastModified(archive, time(NULL)));
 
     framework_releaseBundleLock(framework, bundle);
 
-    status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, BUNDLE_EVENT_UNINSTALLED, bundle));
+    status = CELIX_DO_IF(status, fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_UNINSTALLED, bundle));
 
     if (status == CELIX_SUCCESS) {
         locked = framework_acquireGlobalLock(framework);
@@ -1046,7 +1046,7 @@ celix_status_t fw_refreshBundles(framewo
                 bundle_pt bundle = (bundle_pt) newTargets[i];
                 helpers[i].framework = framework;
                 helpers[i].bundle = bundle;
-                helpers[i].oldState = BUNDLE_INSTALLED;
+                helpers[i].oldState = OSGI_FRAMEWORK_BUNDLE_INSTALLED;
             }
 
             for (i = 0; i < nrofvalues; i++) {
@@ -1079,19 +1079,19 @@ celix_status_t fw_refreshBundle(framewor
     celix_status_t status = CELIX_SUCCESS;
     bundle_state_e state;
 
-    status = framework_acquireBundleLock(framework, bundle, BUNDLE_INSTALLED | BUNDLE_RESOLVED);
+    status = framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED | OSGI_FRAMEWORK_BUNDLE_RESOLVED);
     if (status != CELIX_SUCCESS) {
         printf("Cannot refresh bundle");
         framework_releaseBundleLock(framework, bundle);
     } else {
     	bool fire;
 		bundle_getState(bundle, &state);
-        fire = (state != BUNDLE_INSTALLED);
+        fire = (state != OSGI_FRAMEWORK_BUNDLE_INSTALLED);
         bundle_refresh(bundle);
 
         if (fire) {
-            framework_setBundleStateAndNotify(framework, bundle, BUNDLE_INSTALLED);
-            fw_fireBundleEvent(framework, BUNDLE_EVENT_UNRESOLVED, bundle);
+            framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED);
+            fw_fireBundleEvent(framework, OSGI_FRAMEWORK_BUNDLE_EVENT_UNRESOLVED, bundle);
         }
 
         framework_releaseBundleLock(framework, bundle);
@@ -1105,8 +1105,8 @@ celix_status_t fw_refreshBundle(framewor
 celix_status_t fw_refreshHelper_stop(struct fw_refreshHelper * refreshHelper) {
 	bundle_state_e state;
 	bundle_getState(refreshHelper->bundle, &state);
-    if (state == BUNDLE_ACTIVE) {
-        refreshHelper->oldState = BUNDLE_ACTIVE;
+    if (state == OSGI_FRAMEWORK_BUNDLE_ACTIVE) {
+        refreshHelper->oldState = OSGI_FRAMEWORK_BUNDLE_ACTIVE;
         fw_stopBundle(refreshHelper->framework, refreshHelper->bundle, false);
     }
 
@@ -1116,7 +1116,7 @@ celix_status_t fw_refreshHelper_stop(str
 celix_status_t fw_refreshHelper_refreshOrRemove(struct fw_refreshHelper * refreshHelper) {
 	bundle_state_e state;
 	bundle_getState(refreshHelper->bundle, &state);
-    if (state == BUNDLE_UNINSTALLED) {
+    if (state == OSGI_FRAMEWORK_BUNDLE_UNINSTALLED) {
         bundle_closeAndDelete(refreshHelper->bundle);
         refreshHelper->bundle = NULL;
     } else {
@@ -1126,7 +1126,7 @@ celix_status_t fw_refreshHelper_refreshO
 }
 
 celix_status_t fw_refreshHelper_restart(struct fw_refreshHelper * refreshHelper) {
-    if ((refreshHelper->bundle != NULL) && (refreshHelper->oldState == BUNDLE_ACTIVE)) {
+    if ((refreshHelper->bundle != NULL) && (refreshHelper->oldState == OSGI_FRAMEWORK_BUNDLE_ACTIVE)) {
         fw_startBundle(refreshHelper->framework, refreshHelper->bundle, 0);
     }
     return CELIX_SUCCESS;
@@ -1192,7 +1192,7 @@ celix_status_t fw_registerService(framew
 	    error = "ServiceName and SvcObj cannot be null";
 	}
 
-	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, BUNDLE_STARTING|BUNDLE_ACTIVE));
+	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_STARTING|OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 	status = CELIX_DO_IF(status, serviceRegistry_registerService(framework->registry, bundle, serviceName, svcObj, properties, registration));
 	bool res = framework_releaseBundleLock(framework, bundle);
 	if (!res) {
@@ -1202,7 +1202,7 @@ celix_status_t fw_registerService(framew
 
 	if (status == CELIX_SUCCESS) {
 	    // If this is a listener hook, invoke the callback with all current listeners
-        if (strcmp(serviceName, listener_hook_service_name) == 0) {
+        if (strcmp(serviceName, OSGI_FRAMEWORK_LISTENER_HOOK_SERVICE_NAME) == 0) {
             unsigned int i;
             array_list_pt infos = NULL;
             apr_pool_t *subpool;
@@ -1242,7 +1242,7 @@ celix_status_t fw_registerService(framew
                         arrayList_add(infos, info);
                     }
                     if (subs != CELIX_SUCCESS) {
-                        fw_logCode(FW_LOG_ERROR, status, "Could not pass all listeners to the hook: %s", serviceName);
+                        fw_logCode(OSGI_FRAMEWORK_LOG_ERROR, status, "Could not pass all listeners to the hook: %s", serviceName);
                     }
                 }
 
@@ -1275,7 +1275,7 @@ celix_status_t fw_registerServiceFactory
         error = "Service name and factory cannot be null";
     }
 
-	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, BUNDLE_STARTING|BUNDLE_ACTIVE));
+	status = CELIX_DO_IF(status, framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_STARTING|OSGI_FRAMEWORK_BUNDLE_ACTIVE));
 	status = CELIX_DO_IF(status, serviceRegistry_registerServiceFactory(framework->registry, bundle, serviceName, factory, properties, registration));
     if (!framework_releaseBundleLock(framework, bundle)) {
         status = CELIX_ILLEGAL_STATE;
@@ -1316,7 +1316,7 @@ celix_status_t fw_getServiceReferences(f
             status = CELIX_DO_IF(status, serviceReference_getServiceRegistration(ref, &reg));
             status = CELIX_DO_IF(status, serviceRegistration_getProperties(reg, &props));
             if (status == CELIX_SUCCESS) {
-                serviceName = properties_get(props, (char *) OBJECTCLASS);
+                serviceName = properties_get(props, (char *) OSGI_FRAMEWORK_OBJECTCLASS);
                 if (!serviceReference_isAssignableTo(ref, bundle, serviceName)) {
                     arrayList_remove(*references, refIdx);
                     refIdx--;
@@ -1574,7 +1574,7 @@ void fw_serviceChanged(framework_pt fram
 				event->reference = reference;
 
 				element->listener->serviceChanged(element->listener, event);
-			} else if (eventType == SERVICE_EVENT_MODIFIED) {
+			} else if (eventType == OSGI_FRAMEWORK_SERVICE_EVENT_MODIFIED) {
 				bool matchResult = false;
 				int matched = 0;
 				if (element->filter != NULL) {
@@ -1588,7 +1588,7 @@ void fw_serviceChanged(framework_pt fram
 					serviceRegistry_createServiceReference(framework->registry, element->listener->pool, registration, &reference);
 
 					endmatch->reference = reference;
-					endmatch->type = SERVICE_EVENT_MODIFIED_ENDMATCH;
+					endmatch->type = OSGI_FRAMEWORK_SERVICE_EVENT_MODIFIED_ENDMATCH;
 					element->listener->serviceChanged(element->listener, endmatch);
 				}
 			}
@@ -1642,12 +1642,12 @@ celix_status_t framework_markBundleResol
 	bundle_state_e state;
 
 	if (bundle != NULL) {
-		framework_acquireBundleLock(framework, bundle, BUNDLE_INSTALLED|BUNDLE_RESOLVED|BUNDLE_ACTIVE);
+		framework_acquireBundleLock(framework, bundle, OSGI_FRAMEWORK_BUNDLE_INSTALLED|OSGI_FRAMEWORK_BUNDLE_RESOLVED|OSGI_FRAMEWORK_BUNDLE_ACTIVE);
 		bundle_getState(bundle, &state);
-		if (state != BUNDLE_INSTALLED) {
+		if (state != OSGI_FRAMEWORK_BUNDLE_INSTALLED) {
 			printf("Trying to resolve a resolved bundle");
 		} else {
-			framework_setBundleStateAndNotify(framework, bundle, BUNDLE_RESOLVED);
+			framework_setBundleStateAndNotify(framework, bundle, OSGI_FRAMEWORK_BUNDLE_RESOLVED);
 			// framework_fireBundleEvent(BUNDLE_EVENT_RESOLVED, bundle);
 		}
 		framework_releaseBundleLock(framework, bundle);
@@ -1721,20 +1721,20 @@ celix_status_t framework_setBundleStateA
 
 	int err = apr_thread_mutex_lock(framework->bundleLock);
 	if (err != 0) {
-		fw_log(FW_LOG_ERROR,  "Failed to lock");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Failed to lock");
 		return CELIX_BUNDLE_EXCEPTION;
 	}
 
 	bundle_setState(bundle, state);
 	err = apr_thread_cond_broadcast(framework->condition);
 	if (err != 0) {
-		fw_log(FW_LOG_ERROR,  "Failed to broadcast");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Failed to broadcast");
 		ret = CELIX_BUNDLE_EXCEPTION;
 	}
 
 	err = apr_thread_mutex_unlock(framework->bundleLock);
 	if (err != 0) {
-		fw_log(FW_LOG_ERROR,  "Failed to unlock");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Failed to unlock");
 		return CELIX_BUNDLE_EXCEPTION;
 	}
 	return CELIX_SUCCESS;
@@ -1748,7 +1748,7 @@ celix_status_t framework_acquireBundleLo
 
 	int err = apr_thread_mutex_lock(framework->bundleLock);
 	if (err != APR_SUCCESS) {
-		fw_log(FW_LOG_ERROR,  "Failed to lock");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Failed to lock");
 		status = CELIX_BUNDLE_EXCEPTION;
 	} else {
 		bool lockable = false;
@@ -1862,7 +1862,7 @@ bool framework_acquireGlobalLock(framewo
 celix_status_t framework_releaseGlobalLock(framework_pt framework) {
 	int status = CELIX_SUCCESS;
 	if (apr_thread_mutex_lock(framework->bundleLock) != 0) {
-		fw_log(FW_LOG_ERROR,  "Error locking framework bundle lock");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error locking framework bundle lock");
 		return CELIX_FRAMEWORK_EXCEPTION;
 	}
 
@@ -1871,7 +1871,7 @@ celix_status_t framework_releaseGlobalLo
 		if (framework->globalLockCount == 0) {
 			framework->globalLockThread = 0;
 			if (apr_thread_cond_broadcast(framework->condition) != 0) {
-				fw_log(FW_LOG_ERROR,  "Failed to broadcast global lock release.");
+				fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Failed to broadcast global lock release.");
 				status = CELIX_FRAMEWORK_EXCEPTION;
 				// still need to unlock before returning
 			}
@@ -1881,7 +1881,7 @@ celix_status_t framework_releaseGlobalLo
 	}
 
 	if (apr_thread_mutex_unlock(framework->bundleLock) != 0) {
-		fw_log(FW_LOG_ERROR,  "Error unlocking framework bundle lock");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error unlocking framework bundle lock");
 		return CELIX_FRAMEWORK_EXCEPTION;
 	}
 
@@ -1892,21 +1892,21 @@ celix_status_t framework_releaseGlobalLo
 
 celix_status_t framework_waitForStop(framework_pt framework) {
 	if (apr_thread_mutex_lock(framework->mutex) != 0) {
-		fw_log(FW_LOG_ERROR, "Error locking the framework, shutdown gate not set.");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR, "Error locking the framework, shutdown gate not set.");
 		return CELIX_FRAMEWORK_EXCEPTION;
 	}
 	while (!framework->shutdown) {
 		apr_status_t apr_status = apr_thread_cond_wait(framework->shutdownGate, framework->mutex);
 		if (apr_status != 0) {
-			fw_log(FW_LOG_ERROR, "Error waiting for shutdown gate.");
+			fw_log(OSGI_FRAMEWORK_LOG_ERROR, "Error waiting for shutdown gate.");
 			return CELIX_FRAMEWORK_EXCEPTION;
 		}
 	}
 	if (apr_thread_mutex_unlock(framework->mutex) != 0) {
-		fw_log(FW_LOG_ERROR, "Error unlocking the framework.");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR, "Error unlocking the framework.");
 		return CELIX_FRAMEWORK_EXCEPTION;
 	}
-	fw_log(FW_LOG_INFO, "FRAMEWORK: Successful shutdown");
+	fw_log(OSGI_FRAMEWORK_LOG_INFO, "FRAMEWORK: Successful shutdown");
 	return CELIX_SUCCESS;
 }
 
@@ -1916,14 +1916,14 @@ static void *APR_THREAD_FUNC framework_s
 	hash_map_iterator_pt iterator;
 	int err;
 
-	fw_log(FW_LOG_INFO, "FRAMEWORK: Shutdown");
+	fw_log(OSGI_FRAMEWORK_LOG_INFO, "FRAMEWORK: Shutdown");
 
 	iterator = hashMapIterator_create(fw->installedBundleMap);
 	while (hashMapIterator_hasNext(iterator)) {
 		bundle_pt bundle = (bundle_pt) hashMapIterator_nextValue(iterator);
 		bundle_state_e state;
 		bundle_getState(bundle, &state);
-		if (state == BUNDLE_ACTIVE || state == BUNDLE_STARTING) {
+		if (state == OSGI_FRAMEWORK_BUNDLE_ACTIVE || state == OSGI_FRAMEWORK_BUNDLE_STARTING) {
 			char *location;
 			bundle_archive_pt archive = NULL;
 
@@ -1936,17 +1936,17 @@ static void *APR_THREAD_FUNC framework_s
 
 	err = apr_thread_mutex_lock(fw->mutex);
 	if (err != 0) {
-		fw_log(FW_LOG_ERROR,  "Error locking the framework, cannot exit clean.");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error locking the framework, cannot exit clean.");
 		apr_thread_exit(thd, APR_ENOLOCK);
 		return NULL;
 	}
 	fw->shutdown = true;
 	err = apr_thread_cond_broadcast(fw->shutdownGate);
 	if (err != 0) {
-		fw_log(FW_LOG_ERROR,  "Error waking the shutdown gate, cannot exit clean.");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error waking the shutdown gate, cannot exit clean.");
 		err = apr_thread_mutex_unlock(fw->mutex);
 		if (err != 0) {
-			fw_log(FW_LOG_ERROR,  "Error unlocking the framework, cannot exit clean.");
+			fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error unlocking the framework, cannot exit clean.");
 		}
 
 		apr_thread_exit(thd, APR_ENOLOCK);
@@ -1954,10 +1954,10 @@ static void *APR_THREAD_FUNC framework_s
 	}
 	err = apr_thread_mutex_unlock(fw->mutex);
 	if (err != 0) {
-		fw_log(FW_LOG_ERROR,  "Error unlocking the framework, cannot exit clean.");
+		fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error unlocking the framework, cannot exit clean.");
 	}
 
-	fw_log(FW_LOG_INFO, "FRAMEWORK: Shutdown done\n");
+	fw_log(OSGI_FRAMEWORK_LOG_INFO, "FRAMEWORK: Shutdown done\n");
 	apr_thread_exit(thd, APR_SUCCESS);
 
 	return NULL;
@@ -1980,9 +1980,9 @@ celix_status_t framework_getFrameworkBun
 celix_status_t fw_fireBundleEvent(framework_pt framework, bundle_event_type_e eventType, bundle_pt bundle) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	if ((eventType != BUNDLE_EVENT_STARTING)
-			&& (eventType != BUNDLE_EVENT_STOPPING)
-			&& (eventType != BUNDLE_EVENT_LAZY_ACTIVATION)) {
+	if ((eventType != OSGI_FRAMEWORK_BUNDLE_EVENT_STARTING)
+			&& (eventType != OSGI_FRAMEWORK_BUNDLE_EVENT_STOPPING)
+			&& (eventType != OSGI_FRAMEWORK_BUNDLE_EVENT_LAZY_ACTIVATION)) {
 		request_pt request = (request_pt) malloc(sizeof(*request));
 		if (!request) {
 			status = CELIX_ENOMEM;
@@ -2062,7 +2062,7 @@ static void *APR_THREAD_FUNC fw_eventDis
 		apr_status_t status;
 
 		if (apr_thread_mutex_lock(framework->dispatcherLock) != 0) {
-			fw_log(FW_LOG_ERROR,  "Error locking the dispatcher");
+			fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error locking the dispatcher");
 			return NULL;
 		}
 
@@ -2081,7 +2081,7 @@ static void *APR_THREAD_FUNC fw_eventDis
 		request = (request_pt) arrayList_remove(framework->requests, 0);
 
 		if ((status = apr_thread_mutex_unlock(framework->dispatcherLock)) != 0) {
-			fw_log(FW_LOG_ERROR,  "Error unlocking the dispatcher.");
+			fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Error unlocking the dispatcher.");
 			apr_thread_exit(thd, status);
 			return NULL;
 		}
@@ -2121,7 +2121,7 @@ celix_status_t fw_invokeBundleListener(f
 	// We only support async bundle listeners for now
 	bundle_state_e state;
 	bundle_getState(bundle, &state);
-	if (state == BUNDLE_STARTING || state == BUNDLE_ACTIVE) {
+	if (state == OSGI_FRAMEWORK_BUNDLE_STARTING || state == OSGI_FRAMEWORK_BUNDLE_ACTIVE) {
 
 		listener->bundleChanged(listener, event);
 	}
@@ -2132,7 +2132,7 @@ celix_status_t fw_invokeBundleListener(f
 celix_status_t fw_invokeFrameworkListener(framework_pt framework, framework_listener_pt listener, framework_event_pt event, bundle_pt bundle) {
 	bundle_state_e state;
 	bundle_getState(bundle, &state);
-	if (state == BUNDLE_STARTING || state == BUNDLE_ACTIVE) {
+	if (state == OSGI_FRAMEWORK_BUNDLE_STARTING || state == OSGI_FRAMEWORK_BUNDLE_ACTIVE) {
 		listener->frameworkEvent(listener, event);
 	}
 
@@ -2152,12 +2152,12 @@ celix_status_t bundleActivator_stop(void
 
 	if (bundleContext_getFramework(context, &framework) == CELIX_SUCCESS) {
 
-	    fw_log(FW_LOG_INFO, "FRAMEWORK: Start shutdownthread");
+	    fw_log(OSGI_FRAMEWORK_LOG_INFO, "FRAMEWORK: Start shutdownthread");
 	    if (apr_thread_create(&shutdownThread, NULL, framework_shutdown, framework, framework->mp) == APR_SUCCESS) {
 //            apr_thread_join(&status, shutdownThread);
             apr_thread_detach(shutdownThread);
 	    } else {
-            fw_log(FW_LOG_ERROR,  "Could not create shutdown thread, normal exit not possible.");
+            fw_log(OSGI_FRAMEWORK_LOG_ERROR,  "Could not create shutdown thread, normal exit not possible.");
 	        status = CELIX_FRAMEWORK_EXCEPTION;
 	    }
 	} else {



Mime
View raw message