You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by ab...@apache.org on 2012/12/05 10:06:34 UTC
svn commit: r1417320 [1/7] - in /incubator/celix/trunk:
dependency_manager/private/src/ dependency_manager/public/include/
deployment_admin/private/include/ deployment_admin/private/src/
device_access/device_access/private/include/ device_access/device...
Author: abroekhuis
Date: Wed Dec 5 09:05:46 2012
New Revision: 1417320
URL: http://svn.apache.org/viewvc?rev=1417320&view=rev
Log:
CELIX-41: Updated most of the typedefs to a lowercase format.
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/dependency_manager.h
incubator/celix/trunk/dependency_manager/public/include/service_component_private.h
incubator/celix/trunk/dependency_manager/public/include/service_dependency.h
incubator/celix/trunk/deployment_admin/private/include/deployment_admin.h
incubator/celix/trunk/deployment_admin/private/include/deployment_package.h
incubator/celix/trunk/deployment_admin/private/include/log.h
incubator/celix/trunk/deployment_admin/private/include/log_event.h
incubator/celix/trunk/deployment_admin/private/include/log_store.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/private/src/log.c
incubator/celix/trunk/deployment_admin/private/src/log_store.c
incubator/celix/trunk/deployment_admin/private/src/log_sync.c
incubator/celix/trunk/device_access/device_access/private/include/device_manager.h
incubator/celix/trunk/device_access/device_access/private/include/driver_attributes.h
incubator/celix/trunk/device_access/device_access/private/include/driver_loader.h
incubator/celix/trunk/device_access/device_access/private/include/driver_matcher.h
incubator/celix/trunk/device_access/device_access/private/src/activator.c
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_loader.c
incubator/celix/trunk/device_access/device_access/private/src/driver_matcher.c
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/device_access/public/include/match.h
incubator/celix/trunk/device_access/driver_locator/private/include/driver_locator_private.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/include/consuming_driver_private.h
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/include/refining_driver_private.h
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/echo_service/client/private/src/echo_client.c
incubator/celix/trunk/examples/echo_service/server/private/src/echo_server_activator.c
incubator/celix/trunk/examples/mongoose/private/src/activator.c
incubator/celix/trunk/examples/osgi-in-action/chapter01-greeting-example/client/private/src/client.c
incubator/celix/trunk/examples/osgi-in-action/chapter01-greeting-example/greeting/private/src/activator.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/osgi-in-action/chapter04-paint-example/circle/private/src/activator.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/circle/private/src/circle_shape.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/include/paint_frame.h
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/default_shape.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/paint_frame.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/square/private/src/activator.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/square/private/src/square_shape.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/triangle/private/src/activator.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/triangle/private/src/triangle_shape.c
incubator/celix/trunk/examples/whiteboard/publisherA/private/src/activator.c
incubator/celix/trunk/examples/whiteboard/publisherB/private/src/activator.c
incubator/celix/trunk/examples/whiteboard/tracker/private/src/activator.c
incubator/celix/trunk/examples/whiteboard/tracker_depman/private/include/tracker.h
incubator/celix/trunk/examples/whiteboard/tracker_depman/private/src/tracker.c
incubator/celix/trunk/framework/private/include/attribute.h
incubator/celix/trunk/framework/private/include/bundle_cache.h
incubator/celix/trunk/framework/private/include/manifest_parser.h
incubator/celix/trunk/framework/private/include/resolver.h
incubator/celix/trunk/framework/private/src/attribute.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/bundle_context.c
incubator/celix/trunk/framework/private/src/bundle_revision.c
incubator/celix/trunk/framework/private/src/capability.c
incubator/celix/trunk/framework/private/src/filter.c
incubator/celix/trunk/framework/private/src/framework.c
incubator/celix/trunk/framework/private/src/manifest.c
incubator/celix/trunk/framework/private/src/manifest_parser.c
incubator/celix/trunk/framework/private/src/module.c
incubator/celix/trunk/framework/private/src/properties.c
incubator/celix/trunk/framework/private/src/requirement.c
incubator/celix/trunk/framework/private/src/resolver.c
incubator/celix/trunk/framework/private/src/service_reference.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/service_tracker_customizer.c
incubator/celix/trunk/framework/private/src/version.c
incubator/celix/trunk/framework/private/src/version_range.c
incubator/celix/trunk/framework/private/src/wire.c
incubator/celix/trunk/framework/public/include/bundle.h
incubator/celix/trunk/framework/public/include/bundle_archive.h
incubator/celix/trunk/framework/public/include/bundle_context.h
incubator/celix/trunk/framework/public/include/bundle_event.h
incubator/celix/trunk/framework/public/include/bundle_listener.h
incubator/celix/trunk/framework/public/include/bundle_revision.h
incubator/celix/trunk/framework/public/include/bundle_state.h
incubator/celix/trunk/framework/public/include/capability.h
incubator/celix/trunk/framework/public/include/filter.h
incubator/celix/trunk/framework/public/include/framework.h
incubator/celix/trunk/framework/public/include/listener_hook_service.h
incubator/celix/trunk/framework/public/include/manifest.h
incubator/celix/trunk/framework/public/include/module.h
incubator/celix/trunk/framework/public/include/properties.h
incubator/celix/trunk/framework/public/include/requirement.h
incubator/celix/trunk/framework/public/include/service_event.h
incubator/celix/trunk/framework/public/include/service_factory.h
incubator/celix/trunk/framework/public/include/service_listener.h
incubator/celix/trunk/framework/public/include/service_reference.h
incubator/celix/trunk/framework/public/include/service_registration.h
incubator/celix/trunk/framework/public/include/service_registry.h
incubator/celix/trunk/framework/public/include/service_tracker.h
incubator/celix/trunk/framework/public/include/service_tracker_customizer.h
incubator/celix/trunk/framework/public/include/version.h
incubator/celix/trunk/framework/public/include/version_range.h
incubator/celix/trunk/framework/public/include/wire.h
incubator/celix/trunk/launcher/private/src/launcher.c
incubator/celix/trunk/log_service/private/include/log.h
incubator/celix/trunk/log_service/private/include/log_factory.h
incubator/celix/trunk/log_service/private/include/log_reader_service_impl.h
incubator/celix/trunk/log_service/private/include/log_service_impl.h
incubator/celix/trunk/log_service/private/src/log.c
incubator/celix/trunk/log_service/private/src/log_entry.c
incubator/celix/trunk/log_service/private/src/log_factory.c
incubator/celix/trunk/log_service/private/src/log_reader_service_impl.c
incubator/celix/trunk/log_service/private/src/log_service_activator.c
incubator/celix/trunk/log_service/private/src/log_service_impl.c
incubator/celix/trunk/log_service/public/include/log_entry.h
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/calc_shell/private/src/add_command.c
incubator/celix/trunk/remote_services/calc_shell/private/src/calc_shell_activator.c
incubator/celix/trunk/remote_services/calc_shell/private/src/sqrt_command.c
incubator/celix/trunk/remote_services/calc_shell/private/src/sub_command.c
incubator/celix/trunk/remote_services/discovery/private/include/discovery.h
incubator/celix/trunk/remote_services/discovery/private/src/discovery.c
incubator/celix/trunk/remote_services/discovery/private/src/discovery_activator.c
incubator/celix/trunk/remote_services/endpoint_listener/public/include/endpoint_listener.h
incubator/celix/trunk/remote_services/example_endpoint/private/src/example_endpoint_activator.c
incubator/celix/trunk/remote_services/example_proxy/private/src/example_proxy_activator.c
incubator/celix/trunk/remote_services/example_service/private/src/example_activator.c
incubator/celix/trunk/remote_services/remote_service_admin/private/include/export_registration_impl.h
incubator/celix/trunk/remote_services/remote_service_admin/private/include/import_registration_impl.h
incubator/celix/trunk/remote_services/remote_service_admin/private/include/remote_service_admin_impl.h
incubator/celix/trunk/remote_services/remote_service_admin/private/src/export_registration_impl.c
incubator/celix/trunk/remote_services/remote_service_admin/private/src/import_registration_impl.c
incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_activator.c
incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
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/remote_service_admin_activator.c
incubator/celix/trunk/remote_services/remote_service_admin_http/private/src/remote_service_admin_http_impl.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/include/topology_manager.h
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/shell/private/include/shell_private.h
incubator/celix/trunk/shell/private/src/inspect_command.c
incubator/celix/trunk/shell/private/src/install_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/private/src/start_command.c
incubator/celix/trunk/shell/private/src/stop_command.c
incubator/celix/trunk/shell/private/src/uninstall_command.c
incubator/celix/trunk/shell/private/src/update_command.c
incubator/celix/trunk/shell/public/include/shell.h
incubator/celix/trunk/shell_tui/private/src/shell_tui.c
incubator/celix/trunk/utils/CMakeLists.txt
incubator/celix/trunk/utils/private/include/array_list_private.h
incubator/celix/trunk/utils/private/include/hash_map_private.h
incubator/celix/trunk/utils/private/include/linked_list_private.h
incubator/celix/trunk/utils/private/src/array_list.c
incubator/celix/trunk/utils/private/src/hash_map.c
incubator/celix/trunk/utils/private/src/linked_list_iterator.c
incubator/celix/trunk/utils/private/src/linkedlist.c
incubator/celix/trunk/utils/private/test/array_list_test.c
incubator/celix/trunk/utils/private/test/hash_map_test.c
incubator/celix/trunk/utils/private/test/hash_map_test_hash.c
incubator/celix/trunk/utils/private/test/linked_list_test.c
incubator/celix/trunk/utils/public/include/array_list.h
incubator/celix/trunk/utils/public/include/hash_map.h
incubator/celix/trunk/utils/public/include/linked_list_iterator.h
incubator/celix/trunk/utils/public/include/linkedlist.h
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=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/private/src/service_component.c (original)
+++ incubator/celix/trunk/dependency_manager/private/src/service_component.c Wed Dec 5 09:05:46 2012
@@ -41,7 +41,7 @@ typedef enum state_state {
} STATE_STATE;
struct state {
- ARRAY_LIST dependencies;
+ array_list_t dependencies;
STATE_STATE state;
};
@@ -53,7 +53,7 @@ struct executorEntry {
struct executor {
struct executorEntry * active;
- LINKED_LIST workQueue;
+ linked_list_t workQueue;
apr_thread_mutex_t *mutex;
};
@@ -221,7 +221,7 @@ void serviceComponent_stop(SERVICE servi
serviceRegistration_unregister(service->serviceRegistration);
}
-SERVICE serviceComponent_setInterface(SERVICE service, char * serviceName, PROPERTIES properties) {
+SERVICE serviceComponent_setInterface(SERVICE service, char * serviceName, properties_t properties) {
service->serviceName = serviceName;
service->properties = properties;
@@ -253,8 +253,8 @@ void serviceComponent_deactivateService(
}
void serviceComponent_startTrackingOptional(SERVICE service, STATE state) {
- ARRAY_LIST deps = arrayList_clone(service->pool, state->dependencies);
- ARRAY_LIST_ITERATOR i = arrayListIterator_create(deps);
+ array_list_t deps = arrayList_clone(service->pool, state->dependencies);
+ array_list_iterator_t i = arrayListIterator_create(deps);
while (arrayListIterator_hasNext(i)) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) arrayListIterator_next(i);
if (!dependency->required) {
@@ -266,8 +266,8 @@ void serviceComponent_startTrackingOptio
}
void serviceComponent_stopTrackingOptional(SERVICE service, STATE state) {
- ARRAY_LIST deps = arrayList_clone(service->pool, state->dependencies);
- ARRAY_LIST_ITERATOR i = arrayListIterator_create(deps);
+ array_list_t deps = arrayList_clone(service->pool, state->dependencies);
+ array_list_iterator_t i = arrayListIterator_create(deps);
while (arrayListIterator_hasNext(i)) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) arrayListIterator_next(i);
if (!dependency->required) {
@@ -280,8 +280,8 @@ void serviceComponent_stopTrackingOption
void serviceComponent_startTrackingRequired(SERVICE service, void * arg) {
STATE state = (STATE) arg;
- ARRAY_LIST deps = arrayList_clone(service->pool, state->dependencies);
- ARRAY_LIST_ITERATOR i = arrayListIterator_create(deps);
+ array_list_t deps = arrayList_clone(service->pool, state->dependencies);
+ array_list_iterator_t i = arrayListIterator_create(deps);
while (arrayListIterator_hasNext(i)) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) arrayListIterator_next(i);
if (dependency->required) {
@@ -294,8 +294,8 @@ void serviceComponent_startTrackingRequi
void serviceComponent_stopTrackingRequired(SERVICE service, void * arg) {
STATE state = (STATE) arg;
- ARRAY_LIST deps = arrayList_clone(service->pool, state->dependencies);
- ARRAY_LIST_ITERATOR i = arrayListIterator_create(deps);
+ array_list_t deps = arrayList_clone(service->pool, state->dependencies);
+ array_list_iterator_t i = arrayListIterator_create(deps);
while (arrayListIterator_hasNext(i)) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) arrayListIterator_next(i);
if (dependency->required) {
@@ -310,7 +310,7 @@ void serviceComponent_initService(SERVIC
}
void serviceComponent_configureService(SERVICE service, STATE state) {
- ARRAY_LIST_ITERATOR i = arrayListIterator_create(state->dependencies);
+ array_list_iterator_t i = arrayListIterator_create(state->dependencies);
while (arrayListIterator_hasNext(i)) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) arrayListIterator_next(i);
if (dependency->autoConfigureField != NULL) {
@@ -324,7 +324,7 @@ void serviceComponent_configureService(S
}
void serviceComponent_destroyService(SERVICE service, STATE state) {
- ARRAY_LIST_ITERATOR i = arrayListIterator_create(state->dependencies);
+ array_list_iterator_t i = arrayListIterator_create(state->dependencies);
while (arrayListIterator_hasNext(i)) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) arrayListIterator_next(i);
if (dependency->required) {
@@ -360,7 +360,7 @@ char * serviceComponent_getName(SERVICE
return service->serviceName;
}
-STATE state_create(ARRAY_LIST dependencies, bool active) {
+STATE state_create(array_list_t dependencies, bool active) {
STATE state = (STATE) malloc(sizeof(*state));
state->dependencies = dependencies;
if (active) {
@@ -409,7 +409,7 @@ bool state_isTrackingOptional(STATE stat
return state->state == STATE_TRACKING_OPTIONAL;
}
-ARRAY_LIST state_getDependencies(STATE state) {
+array_list_t state_getDependencies(STATE state) {
return state->dependencies;
}
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=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/private/src/service_dependency.c (original)
+++ incubator/celix/trunk/dependency_manager/private/src/service_dependency.c Wed Dec 5 09:05:46 2012
@@ -31,10 +31,10 @@
#include "bundle_context.h"
#include "constants.h"
-celix_status_t serviceDependency_addingService(void * handle, SERVICE_REFERENCE reference, void **service);
-celix_status_t serviceDependency_addedService(void * handle, SERVICE_REFERENCE reference, void * service);
-celix_status_t serviceDependency_modifiedService(void * handle, SERVICE_REFERENCE reference, void * service);
-celix_status_t serviceDependency_removedService(void * handle, SERVICE_REFERENCE reference, void * service);
+celix_status_t serviceDependency_addingService(void * handle, service_reference_t reference, void **service);
+celix_status_t serviceDependency_addedService(void * handle, service_reference_t reference, void * service);
+celix_status_t serviceDependency_modifiedService(void * handle, service_reference_t reference, void * service);
+celix_status_t serviceDependency_removedService(void * handle, service_reference_t reference, void * service);
SERVICE_DEPENDENCY serviceDependency_create(bundle_context_t context) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) malloc(sizeof(*dependency));
@@ -97,7 +97,7 @@ void serviceDependency_stop(SERVICE_DEPE
serviceTracker_close(dependency->tracker);
}
-celix_status_t serviceDependency_addingService(void * handle, SERVICE_REFERENCE reference, void **service) {
+celix_status_t serviceDependency_addingService(void * handle, service_reference_t reference, void **service) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) handle;
bundleContext_getService(dependency->context, reference, service);
dependency->reference = reference;
@@ -105,7 +105,7 @@ celix_status_t serviceDependency_addingS
return CELIX_SUCCESS;
}
-celix_status_t serviceDependency_addedService(void * handle, SERVICE_REFERENCE reference, void * service) {
+celix_status_t serviceDependency_addedService(void * handle, service_reference_t reference, void * service) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) handle;
if (!dependency->available) {
dependency->available = true;
@@ -125,7 +125,7 @@ void serviceDependency_invokeAdded(SERVI
}
}
-celix_status_t serviceDependency_modifiedService(void * handle, SERVICE_REFERENCE reference, void * service) {
+celix_status_t serviceDependency_modifiedService(void * handle, service_reference_t reference, void * service) {
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) handle;
dependency->reference = reference;
dependency->serviceInstance = service;
@@ -137,7 +137,7 @@ celix_status_t serviceDependency_modifie
return CELIX_SUCCESS;
}
-celix_status_t serviceDependency_removedService(void * handle, SERVICE_REFERENCE reference, void * service) {
+celix_status_t serviceDependency_removedService(void * handle, service_reference_t reference, void * service) {
bool result;
SERVICE_DEPENDENCY dependency = (SERVICE_DEPENDENCY) handle;
if (dependency->available && serviceTracker_getService(dependency->tracker) == NULL) {
@@ -193,9 +193,9 @@ SERVICE_DEPENDENCY serviceDependency_set
return dependency;
}
-SERVICE_DEPENDENCY serviceDependency_setCallbacks(SERVICE_DEPENDENCY dependency, void (*added)(void * handle, SERVICE_REFERENCE reference, void *),
- void (*changed)(void * handle, SERVICE_REFERENCE reference, void *),
- void (*removed)(void * handle, SERVICE_REFERENCE reference, void *)) {
+SERVICE_DEPENDENCY serviceDependency_setCallbacks(SERVICE_DEPENDENCY dependency, void (*added)(void * handle, service_reference_t reference, void *),
+ void (*changed)(void * handle, service_reference_t reference, void *),
+ void (*removed)(void * handle, service_reference_t reference, void *)) {
dependency->added = added;
dependency->changed = changed;
dependency->removed = removed;
Modified: incubator/celix/trunk/dependency_manager/public/include/dependency_manager.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/public/include/dependency_manager.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/public/include/dependency_manager.h (original)
+++ incubator/celix/trunk/dependency_manager/public/include/dependency_manager.h Wed Dec 5 09:05:46 2012
@@ -32,7 +32,7 @@
struct dependencyManager {
bundle_context_t context;
- ARRAY_LIST services;
+ array_list_t services;
};
typedef struct dependencyManager * DEPENDENCY_MANAGER;
Modified: incubator/celix/trunk/dependency_manager/public/include/service_component_private.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/public/include/service_component_private.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/public/include/service_component_private.h (original)
+++ incubator/celix/trunk/dependency_manager/public/include/service_component_private.h Wed Dec 5 09:05:46 2012
@@ -39,7 +39,7 @@ typedef struct executor * EXECUTOR;
struct service {
apr_pool_t *pool;
- ARRAY_LIST dependencies;
+ array_list_t dependencies;
void (*init)(void * userData);
void (*start)(void * userData);
void (*stop)(void * userData);
@@ -47,13 +47,13 @@ struct service {
char * serviceName;
void * impl;
- PROPERTIES properties;
+ properties_t properties;
bundle_context_t context;
DEPENDENCY_MANAGER manager;
- SERVICE_REGISTRATION registration;
- SERVICE_REGISTRATION serviceRegistration;
+ service_registration_t registration;
+ service_registration_t serviceRegistration;
bool registered;
@@ -71,7 +71,7 @@ void serviceComponent_dependencyChanged(
void serviceComponent_dependencyUnavailable(SERVICE service, SERVICE_DEPENDENCY dependency);
void serviceComponent_start(SERVICE service);
void serviceComponent_stop(SERVICE service);
-SERVICE serviceComponent_setInterface(SERVICE service, char * serviceName, PROPERTIES properties);
+SERVICE serviceComponent_setInterface(SERVICE service, char * serviceName, properties_t properties);
SERVICE serviceComponent_setImplementation(SERVICE service, void * implementation);
void serviceComponent_activateService(SERVICE service, void * arg);
void serviceComponent_deactivateService(SERVICE service, void * arg);
@@ -88,12 +88,12 @@ void serviceComponent_updateInstance(SER
char * serviceComponent_getName(SERVICE service);
-STATE state_create(ARRAY_LIST dependencies, bool active);
+STATE state_create(array_list_t dependencies, bool active);
void state_destroy(STATE state);
bool state_isInactive(STATE state);
bool state_isWaitingForRequired(STATE state);
bool state_isTrackingOptional(STATE state);
-ARRAY_LIST state_getDependencies(STATE state);
+array_list_t state_getDependencies(STATE state);
EXECUTOR executor_create(apr_pool_t *memory_pool);
void executor_enqueue(EXECUTOR executor, SERVICE service, void (*function), void * argument);
Modified: incubator/celix/trunk/dependency_manager/public/include/service_dependency.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/public/include/service_dependency.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/public/include/service_dependency.h (original)
+++ incubator/celix/trunk/dependency_manager/public/include/service_dependency.h Wed Dec 5 09:05:46 2012
@@ -34,9 +34,9 @@
struct serviceDependency {
char * interface;
- void (*added)(void * handle, SERVICE_REFERENCE reference, void *);
- void (*changed)(void * handle, SERVICE_REFERENCE reference, void *);
- void (*removed)(void * handle, SERVICE_REFERENCE reference, void *);
+ void (*added)(void * handle, service_reference_t reference, void *);
+ void (*changed)(void * handle, service_reference_t reference, void *);
+ void (*removed)(void * handle, service_reference_t reference, void *);
void ** autoConfigureField;
bool started;
@@ -44,7 +44,7 @@ struct serviceDependency {
bool required;
service_tracker_t tracker;
SERVICE service;
- SERVICE_REFERENCE reference;
+ service_reference_t reference;
bundle_context_t context;
void * serviceInstance;
char * trackedServiceName;
@@ -58,9 +58,9 @@ void * serviceDependency_getService(SERV
SERVICE_DEPENDENCY serviceDependency_setRequired(SERVICE_DEPENDENCY dependency, bool required);
SERVICE_DEPENDENCY serviceDependency_setService(SERVICE_DEPENDENCY dependency, char * serviceName, char * filter);
-SERVICE_DEPENDENCY serviceDependency_setCallbacks(SERVICE_DEPENDENCY dependency, void (*added)(void * handle, SERVICE_REFERENCE reference, void *),
- void (*changed)(void * handle, SERVICE_REFERENCE reference, void *),
- void (*removed)(void * handle, SERVICE_REFERENCE reference, void *));
+SERVICE_DEPENDENCY serviceDependency_setCallbacks(SERVICE_DEPENDENCY dependency, void (*added)(void * handle, service_reference_t reference, void *),
+ void (*changed)(void * handle, service_reference_t reference, void *),
+ void (*removed)(void * handle, service_reference_t reference, void *));
SERVICE_DEPENDENCY serviceDependency_setAutoConfigure(SERVICE_DEPENDENCY dependency, void ** field);
void serviceDependency_start(SERVICE_DEPENDENCY dependency, SERVICE service);
Modified: incubator/celix/trunk/deployment_admin/private/include/deployment_admin.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/include/deployment_admin.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/include/deployment_admin.h (original)
+++ incubator/celix/trunk/deployment_admin/private/include/deployment_admin.h Wed Dec 5 09:05:46 2012
@@ -40,7 +40,7 @@ struct deployment_admin {
bool running;
char *current;
- HASH_MAP packages;
+ hash_map_t packages;
char *targetIdentification;
char *pollUrl;
};
Modified: incubator/celix/trunk/deployment_admin/private/include/deployment_package.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/include/deployment_package.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/include/deployment_package.h (original)
+++ incubator/celix/trunk/deployment_admin/private/include/deployment_package.h Wed Dec 5 09:05:46 2012
@@ -36,18 +36,18 @@
struct bundle_info {
char *path;
- VERSION version;
+ version_t version;
char *symbolicName;
bool customizer;
- PROPERTIES attributes;
+ properties_t attributes;
};
typedef struct bundle_info *bundle_info_t;
struct resource_info {
char *path;
- PROPERTIES attributes;
+ properties_t attributes;
char *resourceProcessor;
};
@@ -58,21 +58,21 @@ struct deployment_package {
apr_pool_t *pool;
bundle_context_t context;
MANIFEST manifest;
- ARRAY_LIST bundleInfos;
- ARRAY_LIST resourceInfos;
- HASH_MAP nameToBundleInfo;
- HASH_MAP pathToEntry;
+ array_list_t bundleInfos;
+ array_list_t resourceInfos;
+ hash_map_t nameToBundleInfo;
+ hash_map_t pathToEntry;
};
typedef struct deployment_package *deployment_package_t;
celix_status_t deploymentPackage_create(apr_pool_t *pool, bundle_context_t context, MANIFEST manifest, deployment_package_t *package);
celix_status_t deploymentPackage_getName(deployment_package_t package, char **name);
-celix_status_t deploymentPackage_getBundleInfos(deployment_package_t package, ARRAY_LIST *infos);
+celix_status_t deploymentPackage_getBundleInfos(deployment_package_t package, array_list_t *infos);
celix_status_t deploymentPackage_getBundleInfoByName(deployment_package_t package, char *name, bundle_info_t *info);
-celix_status_t deploymentPackage_getResourceInfos(deployment_package_t package, ARRAY_LIST *infos);
+celix_status_t deploymentPackage_getResourceInfos(deployment_package_t package, array_list_t *infos);
celix_status_t deploymentPackage_getResourceInfoByPath(deployment_package_t package, char *path, resource_info_t *info);
-celix_status_t deploymentPackage_getBundle(deployment_package_t package, char *name, BUNDLE *bundle);
-celix_status_t deploymentPackage_getVersion(deployment_package_t package, VERSION *version);
+celix_status_t deploymentPackage_getBundle(deployment_package_t package, char *name, bundle_t *bundle);
+celix_status_t deploymentPackage_getVersion(deployment_package_t package, version_t *version);
#endif /* DEPLOYMENT_PACKAGE_H_ */
Modified: incubator/celix/trunk/deployment_admin/private/include/log.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/include/log.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/include/log.h (original)
+++ incubator/celix/trunk/deployment_admin/private/include/log.h Wed Dec 5 09:05:46 2012
@@ -35,6 +35,6 @@
typedef struct log *log_t;
celix_status_t log_create(apr_pool_t *pool, log_store_t store, log_t *log);
-celix_status_t log_log(log_t log, unsigned int type, PROPERTIES properties);
+celix_status_t log_log(log_t log, unsigned int type, properties_t properties);
#endif /* LOG_H_ */
Modified: incubator/celix/trunk/deployment_admin/private/include/log_event.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/include/log_event.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/include/log_event.h (original)
+++ incubator/celix/trunk/deployment_admin/private/include/log_event.h Wed Dec 5 09:05:46 2012
@@ -35,7 +35,7 @@ struct log_event {
unsigned long id;
unsigned long time;
unsigned int type;
- PROPERTIES properties;
+ properties_t properties;
};
typedef struct log_event *log_event_t;
Modified: incubator/celix/trunk/deployment_admin/private/include/log_store.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/include/log_store.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/include/log_store.h (original)
+++ incubator/celix/trunk/deployment_admin/private/include/log_store.h Wed Dec 5 09:05:46 2012
@@ -35,10 +35,10 @@
typedef struct log_store *log_store_t;
celix_status_t logStore_create(apr_pool_t *pool, log_store_t *store);
-celix_status_t logStore_put(log_store_t store, unsigned int type, PROPERTIES properties, log_event_t *event);
+celix_status_t logStore_put(log_store_t store, unsigned int type, properties_t properties, log_event_t *event);
celix_status_t logStore_getLogId(log_store_t store, unsigned long *id);
-celix_status_t logStore_getEvents(log_store_t store, ARRAY_LIST *events);
+celix_status_t logStore_getEvents(log_store_t store, array_list_t *events);
celix_status_t logStore_getHighestId(log_store_t store, long *id);
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=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/deployment_admin.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/deployment_admin.c Wed Dec 5 09:05:46 2012
@@ -56,7 +56,7 @@ static void *APR_THREAD_FUNC deploymentA
celix_status_t deploymentAdmin_download(char * url, char **inputFile);
size_t deploymentAdmin_writeData(void *ptr, size_t size, size_t nmemb, FILE *stream);
static celix_status_t deploymentAdmin_deleteTree(char * directory, apr_pool_t *mp);
-celix_status_t deploymentAdmin_readVersions(deployment_admin_t admin, ARRAY_LIST *versions);
+celix_status_t deploymentAdmin_readVersions(deployment_admin_t admin, array_list_t *versions);
celix_status_t deploymentAdmin_stopDeploymentPackageBundles(deployment_admin_t admin, deployment_package_t target);
celix_status_t deploymentAdmin_updateDeploymentPackageBundles(deployment_admin_t admin, deployment_package_t source);
@@ -118,7 +118,7 @@ static void *APR_THREAD_FUNC deploymentA
while (admin->running) {
//poll ace
- ARRAY_LIST versions = NULL;
+ array_list_t versions = NULL;
deploymentAdmin_readVersions(admin, &versions);
char *last = arrayList_get(versions, arrayList_size(versions) - 1);
@@ -156,7 +156,7 @@ static void *APR_THREAD_FUNC deploymentA
char *name = NULL;
deploymentPackage_getName(source, &name);
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
bundleContext_getBundle(admin->context, &bundle);
char *entry = NULL;
bundle_getEntry(bundle, "/", admin->pool, &entry);
@@ -220,7 +220,7 @@ size_t deploymentAdmin_parseVersions(voi
return realsize;
}
-celix_status_t deploymentAdmin_readVersions(deployment_admin_t admin, ARRAY_LIST *versions) {
+celix_status_t deploymentAdmin_readVersions(deployment_admin_t admin, array_list_t *versions) {
celix_status_t status = CELIX_SUCCESS;
arrayList_create(admin->pool, versions);
CURL *curl;
@@ -328,11 +328,11 @@ celix_status_t deploymentAdmin_stopDeplo
celix_status_t status = CELIX_SUCCESS;
if (target != NULL) {
- ARRAY_LIST infos = NULL;
+ array_list_t infos = NULL;
deploymentPackage_getBundleInfos(target, &infos);
int i;
for (i = 0; i < arrayList_size(infos); i++) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
bundle_info_t info = arrayList_get(infos, i);
deploymentPackage_getBundle(target, info->symbolicName, &bundle);
if (bundle != NULL) {
@@ -349,11 +349,11 @@ celix_status_t deploymentAdmin_stopDeplo
celix_status_t deploymentAdmin_updateDeploymentPackageBundles(deployment_admin_t admin, deployment_package_t source) {
celix_status_t status = CELIX_SUCCESS;
- ARRAY_LIST infos = NULL;
+ array_list_t infos = NULL;
deploymentPackage_getBundleInfos(source, &infos);
int i;
for (i = 0; i < arrayList_size(infos); i++) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
bundle_info_t info = arrayList_get(infos, i);
bundleContext_getBundle(admin->context, &bundle);
@@ -364,7 +364,7 @@ celix_status_t deploymentAdmin_updateDep
char *bundlePath = apr_pstrcat(admin->pool, entry, "repo/", name, "/", info->path, NULL);
char *bsn = apr_pstrcat(admin->pool, "osgi-dp:", info->symbolicName, NULL);
- BUNDLE updateBundle = NULL;
+ bundle_t updateBundle = NULL;
deploymentPackage_getBundle(source, info->symbolicName, &updateBundle);
if (updateBundle != NULL) {
//printf("Update bundle from: %s\n", bundlePath);
@@ -382,8 +382,8 @@ celix_status_t deploymentAdmin_startDepl
celix_status_t status = CELIX_SUCCESS;
apr_pool_t *tmpPool = NULL;
- ARRAY_LIST bundles = NULL;
- ARRAY_LIST sourceInfos = NULL;
+ array_list_t bundles = NULL;
+ array_list_t sourceInfos = NULL;
apr_pool_create(&tmpPool, admin->pool);
arrayList_create(tmpPool, &bundles);
@@ -393,7 +393,7 @@ celix_status_t deploymentAdmin_startDepl
for (i = 0; i < arrayList_size(sourceInfos); i++) {
bundle_info_t sourceInfo = arrayList_get(sourceInfos, i);
if (sourceInfo->customizer) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
deploymentPackage_getBundle(source, sourceInfo->symbolicName, &bundle);
if (bundle != NULL) {
arrayList_add(bundles, bundle);
@@ -402,12 +402,12 @@ celix_status_t deploymentAdmin_startDepl
}
if (target != NULL) {
- ARRAY_LIST targetInfos = NULL;
+ array_list_t targetInfos = NULL;
deploymentPackage_getBundleInfos(target, &targetInfos);
for (i = 0; i < arrayList_size(targetInfos); i++) {
bundle_info_t targetInfo = arrayList_get(targetInfos, i);
if (targetInfo->customizer) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
deploymentPackage_getBundle(target, targetInfo->symbolicName, &bundle);
if (bundle != NULL) {
arrayList_add(bundles, bundle);
@@ -417,7 +417,7 @@ celix_status_t deploymentAdmin_startDepl
}
for (i = 0; i < arrayList_size(bundles); i++) {
- BUNDLE bundle = arrayList_get(bundles, i);
+ bundle_t bundle = arrayList_get(bundles, i);
bundle_start(bundle, 0);
}
@@ -429,13 +429,13 @@ celix_status_t deploymentAdmin_startDepl
celix_status_t deploymentAdmin_processDeploymentPackageResources(deployment_admin_t admin, deployment_package_t source) {
celix_status_t status = CELIX_SUCCESS;
- ARRAY_LIST infos = NULL;
+ array_list_t infos = NULL;
deploymentPackage_getResourceInfos(source, &infos);
int i;
for (i = 0; i < arrayList_size(infos); i++) {
resource_info_t info = arrayList_get(infos, i);
apr_pool_t *tmpPool = NULL;
- ARRAY_LIST services = NULL;
+ array_list_t services = NULL;
char *filter = NULL;
apr_pool_create(&tmpPool, admin->pool);
@@ -444,13 +444,13 @@ celix_status_t deploymentAdmin_processDe
status = bundleContext_getServiceReferences(admin->context, RESOURCE_PROCESSOR_SERVICE, filter, &services);
if (status == CELIX_SUCCESS) {
if (services != NULL && arrayList_size(services) > 0) {
- SERVICE_REFERENCE ref = arrayList_get(services, 0);
+ service_reference_t ref = arrayList_get(services, 0);
// In Felix a check is done to assure the processor belongs to the deployment package
// Is this according to spec?
void *processorP = NULL;
status = bundleContext_getService(admin->context, ref, &processorP);
if (status == CELIX_SUCCESS) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
char *entry = NULL;
char *name = NULL;
char *packageName = NULL;
@@ -479,7 +479,7 @@ celix_status_t deploymentAdmin_dropDeplo
celix_status_t status = CELIX_SUCCESS;
if (target != NULL) {
- ARRAY_LIST infos = NULL;
+ array_list_t infos = NULL;
deploymentPackage_getResourceInfos(target, &infos);
int i;
for (i = 0; i < arrayList_size(infos); i++) {
@@ -488,7 +488,7 @@ celix_status_t deploymentAdmin_dropDeplo
deploymentPackage_getResourceInfoByPath(source, info->path, &sourceInfo);
if (sourceInfo == NULL) {
apr_pool_t *tmpPool = NULL;
- ARRAY_LIST services = NULL;
+ array_list_t services = NULL;
char *filter = NULL;
@@ -498,13 +498,13 @@ celix_status_t deploymentAdmin_dropDeplo
status = bundleContext_getServiceReferences(admin->context, RESOURCE_PROCESSOR_SERVICE, filter, &services);
if (status == CELIX_SUCCESS) {
if (services != NULL && arrayList_size(services) > 0) {
- SERVICE_REFERENCE ref = arrayList_get(services, 0);
+ service_reference_t ref = arrayList_get(services, 0);
// In Felix a check is done to assure the processor belongs to the deployment package
// Is this according to spec?
void *processorP = NULL;
status = bundleContext_getService(admin->context, ref, &processorP);
if (status == CELIX_SUCCESS) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
char *packageName = NULL;
resource_processor_service_t processor = processorP;
@@ -526,7 +526,7 @@ celix_status_t deploymentAdmin_dropDeplo
celix_status_t status = CELIX_SUCCESS;
if (target != NULL) {
- ARRAY_LIST targetInfos = NULL;
+ array_list_t targetInfos = NULL;
deploymentPackage_getBundleInfos(target, &targetInfos);
int i;
for (i = 0; i < arrayList_size(targetInfos); i++) {
@@ -535,7 +535,7 @@ celix_status_t deploymentAdmin_dropDeplo
bundle_info_t info = NULL;
deploymentPackage_getBundleInfoByName(source, targetInfo->symbolicName, &info);
if (info == NULL) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
deploymentPackage_getBundle(target, targetInfo->symbolicName, &bundle);
bundle_uninstall(bundle);
}
@@ -549,11 +549,11 @@ celix_status_t deploymentAdmin_dropDeplo
celix_status_t deploymentAdmin_startDeploymentPackageBundles(deployment_admin_t admin, deployment_package_t source) {
celix_status_t status = CELIX_SUCCESS;
- ARRAY_LIST infos = NULL;
+ array_list_t infos = NULL;
deploymentPackage_getBundleInfos(source, &infos);
int i;
for (i = 0; i < arrayList_size(infos); i++) {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
bundle_info_t info = arrayList_get(infos, i);
if (!info->customizer) {
deploymentPackage_getBundle(source, info->symbolicName, &bundle);
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=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/deployment_package.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/deployment_package.c Wed Dec 5 09:05:46 2012
@@ -38,7 +38,7 @@ static const char * const RESOURCE_PROCE
static const char * const DEPLOYMENTPACKAGE_CUSTOMIZER = "DeploymentPackage-Customizer";
celix_status_t deploymentPackage_processEntries(deployment_package_t package);
-static celix_status_t deploymentPackage_isBundleResource(PROPERTIES attributes, bool *isBundleResource);
+static celix_status_t deploymentPackage_isBundleResource(properties_t attributes, bool *isBundleResource);
static celix_status_t deploymentPackage_parseBooleanHeader(char *value, bool *boolValue);
celix_status_t deploymentPackage_create(apr_pool_t *pool, bundle_context_t context, MANIFEST manifest, deployment_package_t *package) {
@@ -83,7 +83,7 @@ celix_status_t deploymentPackage_getName
return CELIX_SUCCESS;
}
-celix_status_t deploymentPackage_getBundleInfos(deployment_package_t package, ARRAY_LIST *infos) {
+celix_status_t deploymentPackage_getBundleInfos(deployment_package_t package, array_list_t *infos) {
*infos = arrayList_clone(package->pool, package->bundleInfos);
return CELIX_SUCCESS;
}
@@ -93,14 +93,14 @@ celix_status_t deploymentPackage_getBund
return CELIX_SUCCESS;
}
-celix_status_t deploymentPackage_getBundle(deployment_package_t package, char *name, BUNDLE *bundle) {
+celix_status_t deploymentPackage_getBundle(deployment_package_t package, char *name, bundle_t *bundle) {
if (hashMap_containsKey(package->nameToBundleInfo, name)) {
- ARRAY_LIST bundles = NULL;
+ array_list_t bundles = NULL;
bundleContext_getBundles(package->context, &bundles);
int i;
for (i = 0; i < arrayList_size(bundles); i++) {
- BUNDLE ibundle = arrayList_get(bundles, i);
- MODULE module = NULL;
+ bundle_t ibundle = arrayList_get(bundles, i);
+ module_t module = NULL;
bundle_getCurrentModule(ibundle, &module);
char *bsn = NULL;
module_getSymbolicName(module, &bsn);
@@ -114,7 +114,7 @@ celix_status_t deploymentPackage_getBund
return CELIX_SUCCESS;
}
-celix_status_t deploymentPackage_getResourceInfos(deployment_package_t package, ARRAY_LIST *infos) {
+celix_status_t deploymentPackage_getResourceInfos(deployment_package_t package, array_list_t *infos) {
*infos = arrayList_clone(package->pool, package->resourceInfos);
return CELIX_SUCCESS;
}
@@ -124,7 +124,7 @@ celix_status_t deploymentPackage_getReso
return CELIX_SUCCESS;
}
-celix_status_t deploymentPackage_getVersion(deployment_package_t package, VERSION *version) {
+celix_status_t deploymentPackage_getVersion(deployment_package_t package, version_t *version) {
char *versionStr = manifest_getValue(package->manifest, "DeploymentPackage-Version");
return version_createVersionFromString(package->pool, versionStr, version);
}
@@ -132,13 +132,13 @@ celix_status_t deploymentPackage_getVers
celix_status_t deploymentPackage_processEntries(deployment_package_t package) {
celix_status_t status = CELIX_SUCCESS;
- HASH_MAP entries = NULL;
+ hash_map_t entries = NULL;
manifest_getEntries(package->manifest, &entries);
- HASH_MAP_ITERATOR iter = hashMapIterator_create(entries);
+ hash_map_iterator_t iter = hashMapIterator_create(entries);
while (hashMapIterator_hasNext(iter)) {
- HASH_MAP_ENTRY entry = hashMapIterator_nextEntry(iter);
+ hash_map_entry_t entry = hashMapIterator_nextEntry(iter);
char *name = hashMapEntry_getKey(entry);
- PROPERTIES values = hashMapEntry_getValue(entry);
+ properties_t values = hashMapEntry_getValue(entry);
bool isBundleResource;
deploymentPackage_isBundleResource(values, &isBundleResource);
@@ -167,7 +167,7 @@ celix_status_t deploymentPackage_process
return status;
}
-static celix_status_t deploymentPackage_isBundleResource(PROPERTIES attributes, bool *isBundleResource) {
+static celix_status_t deploymentPackage_isBundleResource(properties_t attributes, bool *isBundleResource) {
*isBundleResource = properties_get(attributes, (char *) BUNDLE_SYMBOLICNAME) != NULL;
return CELIX_SUCCESS;
}
Modified: incubator/celix/trunk/deployment_admin/private/src/log.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/log.c?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/log.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/log.c Wed Dec 5 09:05:46 2012
@@ -49,7 +49,7 @@ celix_status_t log_create(apr_pool_t *po
return status;
}
-celix_status_t log_log(log_t log, unsigned int type, PROPERTIES properties) {
+celix_status_t log_log(log_t log, unsigned int type, properties_t properties) {
celix_status_t status = CELIX_SUCCESS;
log_event_t event = NULL;
Modified: incubator/celix/trunk/deployment_admin/private/src/log_store.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/log_store.c?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/log_store.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/log_store.c Wed Dec 5 09:05:46 2012
@@ -39,7 +39,7 @@ struct log_store {
unsigned long storeId;
- ARRAY_LIST logEvents;
+ array_list_t logEvents;
};
static celix_status_t logStore_getNextID(log_store_t store, unsigned long *id);
@@ -58,7 +58,7 @@ celix_status_t logStore_create(apr_pool_
return status;
}
-celix_status_t logStore_put(log_store_t store, unsigned int type, PROPERTIES properties, log_event_t *event) {
+celix_status_t logStore_put(log_store_t store, unsigned int type, properties_t properties, log_event_t *event) {
celix_status_t status = CELIX_SUCCESS;
*event = apr_palloc(store->pool, sizeof(**event));
@@ -81,7 +81,7 @@ celix_status_t logStore_getLogId(log_sto
return CELIX_SUCCESS;
}
-celix_status_t logStore_getEvents(log_store_t store, ARRAY_LIST *events) {
+celix_status_t logStore_getEvents(log_store_t store, array_list_t *events) {
*events = store->logEvents;
return CELIX_SUCCESS;
}
Modified: incubator/celix/trunk/deployment_admin/private/src/log_sync.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/log_sync.c?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/log_sync.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/log_sync.c Wed Dec 5 09:05:46 2012
@@ -141,7 +141,7 @@ static void *APR_THREAD_FUNC logSync_syn
if (highest >= 0) {
int i;
for (i = descriptor->high + 1; i <= highest; i++) {
- ARRAY_LIST events = NULL;
+ array_list_t events = NULL;
logStore_getEvents(logSync->logStore, &events);
log_event_t event = arrayList_get(events, i);
// printf("Event id: %ld\n", event->id);
Modified: incubator/celix/trunk/device_access/device_access/private/include/device_manager.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/include/device_manager.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/include/device_manager.h (original)
+++ incubator/celix/trunk/device_access/device_access/private/include/device_manager.h Wed Dec 5 09:05:46 2012
@@ -34,18 +34,18 @@ celix_status_t deviceManager_create(apr_
celix_status_t deviceManager_destroy(device_manager_t manager);
celix_status_t deviceManager_matchAttachDriver(device_manager_t manager, apr_pool_t *attachPool, driver_loader_t loader,
- ARRAY_LIST driverIds, ARRAY_LIST included, ARRAY_LIST excluded, void *service, SERVICE_REFERENCE reference);
-celix_status_t deviceManager_noDriverFound(device_manager_t manager, void *service, SERVICE_REFERENCE reference);
+ array_list_t driverIds, array_list_t included, array_list_t excluded, void *service, service_reference_t reference);
+celix_status_t deviceManager_noDriverFound(device_manager_t manager, void *service, service_reference_t reference);
-celix_status_t deviceManager_locatorAdded(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_locatorModified(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_locatorRemoved(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_deviceAdded(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_deviceModified(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_deviceRemoved(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_driverAdded(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_driverModified(void * handle, SERVICE_REFERENCE ref, void * service);
-celix_status_t deviceManager_driverRemoved(void * handle, SERVICE_REFERENCE ref, void * service);
+celix_status_t deviceManager_locatorAdded(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_locatorModified(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_locatorRemoved(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_deviceAdded(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_deviceModified(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_deviceRemoved(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_driverAdded(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_driverModified(void * handle, service_reference_t ref, void * service);
+celix_status_t deviceManager_driverRemoved(void * handle, service_reference_t ref, void * service);
celix_status_t deviceManager_getBundleContext(device_manager_t manager, bundle_context_t *context);
Modified: incubator/celix/trunk/device_access/device_access/private/include/driver_attributes.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/include/driver_attributes.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/include/driver_attributes.h (original)
+++ incubator/celix/trunk/device_access/device_access/private/include/driver_attributes.h Wed Dec 5 09:05:46 2012
@@ -30,13 +30,13 @@
typedef struct driver_attributes *driver_attributes_t;
-celix_status_t driverAttributes_create(apr_pool_t *pool, SERVICE_REFERENCE reference, driver_service_t driver, driver_attributes_t *attributes);
+celix_status_t driverAttributes_create(apr_pool_t *pool, service_reference_t reference, driver_service_t driver, driver_attributes_t *attributes);
-celix_status_t driverAttributes_getReference(driver_attributes_t driverAttributes, SERVICE_REFERENCE *reference);
+celix_status_t driverAttributes_getReference(driver_attributes_t driverAttributes, service_reference_t *reference);
celix_status_t driverAttributes_getDriverId(driver_attributes_t driverAttributes, char **driverId);
-celix_status_t driverAttributes_match(driver_attributes_t driverAttributes, SERVICE_REFERENCE reference, int *match);
-celix_status_t driverAttributes_attach(driver_attributes_t driverAttributes, SERVICE_REFERENCE reference, char **attach);
+celix_status_t driverAttributes_match(driver_attributes_t driverAttributes, service_reference_t reference, int *match);
+celix_status_t driverAttributes_attach(driver_attributes_t driverAttributes, service_reference_t reference, char **attach);
celix_status_t driverAttributes_isInUse(driver_attributes_t driverAttributes, bool *inUse);
Modified: incubator/celix/trunk/device_access/device_access/private/include/driver_loader.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/include/driver_loader.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/include/driver_loader.h (original)
+++ incubator/celix/trunk/device_access/device_access/private/include/driver_loader.h Wed Dec 5 09:05:46 2012
@@ -35,12 +35,12 @@ typedef struct driver_loader *driver_loa
celix_status_t driverLoader_create(apr_pool_t *pool, bundle_context_t context, driver_loader_t *loader);
-celix_status_t driverLoader_findDrivers(driver_loader_t loader, apr_pool_t *pool, ARRAY_LIST locators, PROPERTIES properties, ARRAY_LIST *driversIds);
-celix_status_t driverLoader_findDriversForLocator(driver_loader_t loader, apr_pool_t *pool, driver_locator_service_t locator, PROPERTIES properties, ARRAY_LIST *driversIds);
+celix_status_t driverLoader_findDrivers(driver_loader_t loader, apr_pool_t *pool, array_list_t locators, properties_t properties, array_list_t *driversIds);
+celix_status_t driverLoader_findDriversForLocator(driver_loader_t loader, apr_pool_t *pool, driver_locator_service_t locator, properties_t properties, array_list_t *driversIds);
-celix_status_t driverLoader_loadDrivers(driver_loader_t loader, apr_pool_t *pool, ARRAY_LIST locators, ARRAY_LIST driverIds, ARRAY_LIST *references);
-celix_status_t driverLoader_loadDriver(driver_loader_t loader, apr_pool_t *pool, ARRAY_LIST locators, char *driverId, ARRAY_LIST *references);
-celix_status_t driverLoader_loadDriverForLocator(driver_loader_t loader, apr_pool_t *pool, driver_locator_service_t locator, char *driverId, ARRAY_LIST *references);
+celix_status_t driverLoader_loadDrivers(driver_loader_t loader, apr_pool_t *pool, array_list_t locators, array_list_t driverIds, array_list_t *references);
+celix_status_t driverLoader_loadDriver(driver_loader_t loader, apr_pool_t *pool, array_list_t locators, char *driverId, array_list_t *references);
+celix_status_t driverLoader_loadDriverForLocator(driver_loader_t loader, apr_pool_t *pool, driver_locator_service_t locator, char *driverId, array_list_t *references);
celix_status_t driverLoader_unloadDrivers(driver_loader_t loader, driver_attributes_t finalDriver);
Modified: incubator/celix/trunk/device_access/device_access/private/include/driver_matcher.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/include/driver_matcher.h?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/include/driver_matcher.h (original)
+++ incubator/celix/trunk/device_access/device_access/private/include/driver_matcher.h Wed Dec 5 09:05:46 2012
@@ -36,6 +36,6 @@ celix_status_t driverMatcher_create(apr_
celix_status_t driverMatcher_add(driver_matcher_t matcher, int match, driver_attributes_t attributes);
-celix_status_t driverMatcher_getBestMatch(driver_matcher_t matcher, apr_pool_t *pool, SERVICE_REFERENCE reference, match_t *match);
+celix_status_t driverMatcher_getBestMatch(driver_matcher_t matcher, apr_pool_t *pool, service_reference_t reference, match_t *match);
#endif /* DRIVER_MATCHER_H_ */
Modified: incubator/celix/trunk/device_access/device_access/private/src/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/device_access/private/src/activator.c?rev=1417320&r1=1417319&r2=1417320&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/device_access/private/src/activator.c (original)
+++ incubator/celix/trunk/device_access/device_access/private/src/activator.c Wed Dec 5 09:05:46 2012
@@ -49,7 +49,7 @@ static celix_status_t deviceManagerBundl
static celix_status_t deviceManagerBundle_createDriverTracker(device_manager_bundle_instance_t bundleData);
static celix_status_t deviceManagerBundle_createDeviceTracker(device_manager_bundle_instance_t bundleData);
-celix_status_t addingService_dummy_func(void * handle, SERVICE_REFERENCE reference, void **service) {
+celix_status_t addingService_dummy_func(void * handle, service_reference_t reference, void **service) {
celix_status_t status = CELIX_SUCCESS;
device_manager_t dm = handle;
bundle_context_t context = NULL;
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=1417320&r1=1417319&r2=1417320&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 Wed Dec 5 09:05:46 2012
@@ -44,15 +44,15 @@
struct device_manager {
apr_pool_t *pool;
bundle_context_t context;
- HASH_MAP devices;
- HASH_MAP drivers;
- ARRAY_LIST locators;
+ hash_map_t devices;
+ hash_map_t drivers;
+ array_list_t locators;
driver_selector_service_t selector;
};
-static celix_status_t deviceManager_attachAlgorithm(device_manager_t manager, SERVICE_REFERENCE ref, void *service);
-static celix_status_t deviceManager_getIdleDevices(device_manager_t manager, apr_pool_t *pool, ARRAY_LIST *idleDevices);
-static celix_status_t deviceManager_isDriverBundle(device_manager_t manager, BUNDLE bundle, bool *isDriver);
+static celix_status_t deviceManager_attachAlgorithm(device_manager_t manager, service_reference_t ref, void *service);
+static celix_status_t deviceManager_getIdleDevices(device_manager_t manager, apr_pool_t *pool, array_list_t *idleDevices);
+static celix_status_t deviceManager_isDriverBundle(device_manager_t manager, bundle_t bundle, bool *isDriver);
celix_status_t deviceManager_create(apr_pool_t *pool, bundle_context_t context, device_manager_t *manager) {
celix_status_t status = CELIX_SUCCESS;
@@ -88,45 +88,45 @@ celix_status_t deviceManager_destroy(dev
return status;
}
-celix_status_t deviceManager_selectorAdded(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_selectorAdded(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Add selector\n");
device_manager_t manager = handle;
manager->selector = (driver_selector_service_t) service;
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_selectorModified(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_selectorModified(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Modify selector\n");
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_selectorRemoved(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_selectorRemoved(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Remove selector\n");
device_manager_t manager = handle;
manager->selector = NULL;
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_locatorAdded(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_locatorAdded(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Add locator\n");
device_manager_t manager = handle;
arrayList_add(manager->locators, service);
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_locatorModified(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_locatorModified(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Modify locator\n");
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_locatorRemoved(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_locatorRemoved(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Remove locator\n");
device_manager_t manager = handle;
arrayList_removeElement(manager->locators, service);
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_deviceAdded(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_deviceAdded(void * handle, service_reference_t ref, void * service) {
celix_status_t status = CELIX_SUCCESS;
printf("DEVICE_MANAGER: Add device\n");
device_manager_t manager = handle;
@@ -136,7 +136,7 @@ celix_status_t deviceManager_deviceAdded
return status;
}
-static celix_status_t deviceManager_attachAlgorithm(device_manager_t manager, SERVICE_REFERENCE ref, void *service) {
+static celix_status_t deviceManager_attachAlgorithm(device_manager_t manager, service_reference_t ref, void *service) {
celix_status_t status = CELIX_SUCCESS;
apr_pool_t *attachPool = NULL;
@@ -147,10 +147,10 @@ static celix_status_t deviceManager_atta
driver_loader_t loader = NULL;
status = driverLoader_create(attachPool, manager->context, &loader);
if (status == CELIX_SUCCESS) {
- ARRAY_LIST included = NULL;
- ARRAY_LIST excluded = NULL;
+ array_list_t included = NULL;
+ array_list_t excluded = NULL;
- ARRAY_LIST driverIds = NULL;
+ array_list_t driverIds = NULL;
hashMap_put(manager->devices, ref, service);
@@ -158,15 +158,15 @@ static celix_status_t deviceManager_atta
if (status == CELIX_SUCCESS) {
status = arrayList_create(attachPool, &excluded);
if (status == CELIX_SUCCESS) {
- SERVICE_REGISTRATION registration = NULL;
+ service_registration_t registration = NULL;
status = serviceReference_getServiceRegistration(ref, ®istration);
if (status == CELIX_SUCCESS) {
- PROPERTIES properties = NULL;
+ properties_t properties = NULL;
status = serviceRegistration_getProperties(registration, &properties);
if (status == CELIX_SUCCESS) {
status = driverLoader_findDrivers(loader, attachPool, manager->locators, properties, &driverIds);
if (status == CELIX_SUCCESS) {
- HASH_MAP_ITERATOR iter = hashMapIterator_create(manager->drivers);
+ hash_map_iterator_t iter = hashMapIterator_create(manager->drivers);
while (hashMapIterator_hasNext(iter)) {
driver_attributes_t driverAttributes = hashMapIterator_nextValue(iter);
arrayList_add(included, driverAttributes);
@@ -176,7 +176,7 @@ static celix_status_t deviceManager_atta
celix_status_t substatus = driverAttributes_getDriverId(driverAttributes, &id);
if (substatus == CELIX_SUCCESS) {
// arrayList_removeElement(driverIds, id);
- ARRAY_LIST_ITERATOR idsIter = arrayListIterator_create(driverIds);
+ array_list_iterator_t idsIter = arrayListIterator_create(driverIds);
while (arrayListIterator_hasNext(idsIter)) {
char *value = arrayListIterator_next(idsIter);
if (strcmp(value, id) == 0) {
@@ -207,10 +207,10 @@ static celix_status_t deviceManager_atta
}
celix_status_t deviceManager_matchAttachDriver(device_manager_t manager, apr_pool_t *attachPool, driver_loader_t loader,
- ARRAY_LIST driverIds, ARRAY_LIST included, ARRAY_LIST excluded, void *service, SERVICE_REFERENCE reference) {
+ array_list_t driverIds, array_list_t included, array_list_t excluded, void *service, service_reference_t reference) {
celix_status_t status = CELIX_SUCCESS;
- ARRAY_LIST references = NULL;
+ array_list_t references = NULL;
int i;
for (i = 0; i < arrayList_size(excluded); i++) {
@@ -226,7 +226,7 @@ celix_status_t deviceManager_matchAttach
status = driverLoader_loadDrivers(loader, attachPool, manager->locators, driverIds, &references);
if (status == CELIX_SUCCESS) {
for (i = 0; i < arrayList_size(references); i++) {
- SERVICE_REFERENCE reference = arrayList_get(references, i);
+ service_reference_t reference = arrayList_get(references, i);
driver_attributes_t attributes = hashMap_get(manager->drivers, reference);
if (attributes != NULL) {
arrayList_add(included, attributes);
@@ -258,10 +258,10 @@ celix_status_t deviceManager_matchAttach
if (match == NULL) {
status = deviceManager_noDriverFound(manager, service, reference);
} else {
- SERVICE_REGISTRATION registration = NULL;
+ service_registration_t registration = NULL;
status = serviceReference_getServiceRegistration(match->reference, ®istration);
if (status == CELIX_SUCCESS) {
- PROPERTIES properties = NULL;
+ properties_t properties = NULL;
status = serviceRegistration_getProperties(registration, &properties);
if (status == CELIX_SUCCESS) {
char *driverId = properties_get(properties, (char *) DRIVER_ID);
@@ -273,7 +273,7 @@ celix_status_t deviceManager_matchAttach
status = driverAttributes_attach(finalAttributes, reference, &newDriverId);
if (status == CELIX_SUCCESS) {
if (newDriverId != NULL) {
- ARRAY_LIST ids = NULL;
+ array_list_t ids = NULL;
arrayList_create(attachPool, &ids);
arrayList_add(ids, newDriverId);
arrayList_add(excluded, finalAttributes);
@@ -299,12 +299,12 @@ celix_status_t deviceManager_matchAttach
return status;
}
-celix_status_t deviceManager_noDriverFound(device_manager_t manager, void *service, SERVICE_REFERENCE reference) {
+celix_status_t deviceManager_noDriverFound(device_manager_t manager, void *service, service_reference_t reference) {
celix_status_t status = CELIX_SUCCESS;
- SERVICE_REGISTRATION registration = NULL;
+ service_registration_t registration = NULL;
status = serviceReference_getServiceRegistration(reference, ®istration);
if (status == CELIX_SUCCESS) {
- PROPERTIES properties = NULL;
+ properties_t properties = NULL;
status = serviceRegistration_getProperties(registration, &properties);
if (status == CELIX_SUCCESS) {
char *objectClass = properties_get(properties, (char *) OBJECTCLASS);
@@ -317,7 +317,7 @@ celix_status_t deviceManager_noDriverFou
return status;
}
-celix_status_t deviceManager_deviceModified(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_deviceModified(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Modify device\n");
// #TODO the device properties could be changed
//device_manager_t manager = handle;
@@ -325,14 +325,14 @@ celix_status_t deviceManager_deviceModif
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_deviceRemoved(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_deviceRemoved(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Remove device\n");
device_manager_t manager = handle;
hashMap_remove(manager->devices, ref);
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_driverAdded(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_driverAdded(void * handle, service_reference_t ref, void * service) {
celix_status_t status = CELIX_SUCCESS;
printf("DEVICE_MANAGER: Add driver\n");
@@ -350,13 +350,13 @@ celix_status_t deviceManager_driverAdded
return status;
}
-celix_status_t deviceManager_driverModified(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_driverModified(void * handle, service_reference_t ref, void * service) {
printf("DEVICE_MANAGER: Modify driver\n");
// #TODO the driver properties could be changed?
return CELIX_SUCCESS;
}
-celix_status_t deviceManager_driverRemoved(void * handle, SERVICE_REFERENCE ref, void * service) {
+celix_status_t deviceManager_driverRemoved(void * handle, service_reference_t ref, void * service) {
celix_status_t status = CELIX_SUCCESS;
printf("DEVICE_MANAGER: Remove driver\n");
@@ -368,18 +368,18 @@ celix_status_t deviceManager_driverRemov
if (aprStatus != APR_SUCCESS) {
status = CELIX_ILLEGAL_ARGUMENT;
} else {
- ARRAY_LIST idleDevices = NULL;
+ array_list_t idleDevices = NULL;
status = deviceManager_getIdleDevices(manager, idleCheckPool, &idleDevices);
if (status == CELIX_SUCCESS) {
int i;
for (i = 0; i < arrayList_size(idleDevices); i++) {
celix_status_t forStatus = CELIX_SUCCESS;
- SERVICE_REFERENCE ref = arrayList_get(idleDevices, i);
+ service_reference_t ref = arrayList_get(idleDevices, i);
char *bsn = NULL;
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
forStatus = serviceReference_getBundle(ref, &bundle);
if (forStatus == CELIX_SUCCESS) {
- MODULE module = NULL;
+ module_t module = NULL;
forStatus = bundle_getCurrentModule(bundle, &module);
if (forStatus == CELIX_SUCCESS) {
forStatus = module_getSymbolicName(module, &bsn);
@@ -404,7 +404,7 @@ celix_status_t deviceManager_driverRemov
}
- HASH_MAP_ITERATOR iter = hashMapIterator_create(manager->drivers);
+ hash_map_iterator_t iter = hashMapIterator_create(manager->drivers);
while (hashMapIterator_hasNext(iter)) {
driver_attributes_t da = hashMapIterator_nextValue(iter);
//driverAttributes_tryUninstall(da);
@@ -421,42 +421,42 @@ celix_status_t deviceManager_driverRemov
}
-celix_status_t deviceManager_getIdleDevices(device_manager_t manager, apr_pool_t *pool, ARRAY_LIST *idleDevices) {
+celix_status_t deviceManager_getIdleDevices(device_manager_t manager, apr_pool_t *pool, array_list_t *idleDevices) {
celix_status_t status = CELIX_SUCCESS;
status = arrayList_create(pool, idleDevices);
if (status == CELIX_SUCCESS) {
- HASH_MAP_ITERATOR iter = hashMapIterator_create(manager->devices);
+ hash_map_iterator_t iter = hashMapIterator_create(manager->devices);
while (hashMapIterator_hasNext(iter)) {
celix_status_t substatus = CELIX_SUCCESS;
- SERVICE_REFERENCE ref = hashMapIterator_nextKey(iter);
+ service_reference_t ref = hashMapIterator_nextKey(iter);
char *bsn = NULL;
- MODULE module = NULL;
- BUNDLE bundle = NULL;
+ module_t module = NULL;
+ bundle_t bundle = NULL;
substatus = serviceReference_getBundle(ref, &bundle);
if (substatus == CELIX_SUCCESS) {
substatus = bundle_getCurrentModule(bundle, &module);
if (substatus == CELIX_SUCCESS) {
substatus = module_getSymbolicName(module, &bsn);
if (substatus == CELIX_SUCCESS) {
- SERVICE_REGISTRATION registration = NULL;
+ service_registration_t registration = NULL;
substatus = serviceReference_getServiceRegistration(ref, ®istration);
if (substatus == CELIX_SUCCESS) {
- SERVICE_REGISTRY registry = NULL;
+ service_registry_t registry = NULL;
substatus = serviceRegistration_getRegistry(registration, ®istry);
if (substatus == CELIX_SUCCESS) {
printf("DEVICE_MANAGER: Check idle device: %s\n", bsn);
- ARRAY_LIST bundles = serviceRegistry_getUsingBundles(registry, pool, ref);
+ array_list_t bundles = serviceRegistry_getUsingBundles(registry, pool, ref);
bool inUse = false;
int i;
for (i = 0; i < arrayList_size(bundles); i++) {
- BUNDLE bundle = arrayList_get(bundles, i);
+ bundle_t bundle = arrayList_get(bundles, i);
bool isDriver;
celix_status_t sstatus = deviceManager_isDriverBundle(manager, bundle, &isDriver);
if (sstatus == CELIX_SUCCESS) {
if (isDriver) {
char *bsn = NULL;
- MODULE module = NULL;
+ module_t module = NULL;
bundle_getCurrentModule(bundle, &module);
module_getSymbolicName(module, &bsn);
@@ -485,20 +485,20 @@ celix_status_t deviceManager_getIdleDevi
//TODO examply for discussion only, remove after discussion
#define DO_IF_SUCCESS(status, call_func) ((status) == CELIX_SUCCESS) ? (call_func) : (status)
-celix_status_t deviceManager_getIdleDevices_exmaple(device_manager_t manager, apr_pool_t *pool, ARRAY_LIST *idleDevices) {
+celix_status_t deviceManager_getIdleDevices_exmaple(device_manager_t manager, apr_pool_t *pool, array_list_t *idleDevices) {
celix_status_t status = CELIX_SUCCESS;
status = arrayList_create(pool, idleDevices);
if (status == CELIX_SUCCESS) {
- HASH_MAP_ITERATOR iter = hashMapIterator_create(manager->devices);
+ hash_map_iterator_t iter = hashMapIterator_create(manager->devices);
while (hashMapIterator_hasNext(iter)) {
celix_status_t substatus = CELIX_SUCCESS;
- SERVICE_REFERENCE ref = hashMapIterator_nextKey(iter);
+ service_reference_t ref = hashMapIterator_nextKey(iter);
char *bsn = NULL;
- MODULE module = NULL;
- BUNDLE bundle = NULL;
- SERVICE_REGISTRATION registration = NULL;
- SERVICE_REGISTRY registry = NULL;
+ module_t module = NULL;
+ bundle_t bundle = NULL;
+ service_registration_t registration = NULL;
+ service_registry_t registry = NULL;
substatus = serviceReference_getBundle(ref, &bundle);
substatus = DO_IF_SUCCESS(substatus, bundle_getCurrentModule(bundle, &module));
substatus = DO_IF_SUCCESS(substatus, module_getSymbolicName(module, &bsn));
@@ -506,18 +506,18 @@ celix_status_t deviceManager_getIdleDevi
substatus = DO_IF_SUCCESS(substatus, serviceRegistration_getRegistry(registration, ®istry));
if (substatus == CELIX_SUCCESS) {
- ARRAY_LIST bundles = serviceRegistry_getUsingBundles(registry, pool, ref);
+ array_list_t bundles = serviceRegistry_getUsingBundles(registry, pool, ref);
printf("DEVICE_MANAGER: Check idle device: %s\n", bsn);
bool inUse = false;
int i;
for (i = 0; i < arrayList_size(bundles); i++) {
- BUNDLE bundle = arrayList_get(bundles, i);
+ bundle_t bundle = arrayList_get(bundles, i);
bool isDriver;
celix_status_t sstatus = deviceManager_isDriverBundle(manager, bundle, &isDriver);
if (sstatus == CELIX_SUCCESS) {
if (isDriver) {
char *bsn = NULL;
- MODULE module = NULL;
+ module_t module = NULL;
bundle_getCurrentModule(bundle, &module);
module_getSymbolicName(module, &bsn);
@@ -538,11 +538,11 @@ celix_status_t deviceManager_getIdleDevi
return status;
}
-celix_status_t deviceManager_isDriverBundle(device_manager_t manager, BUNDLE bundle, bool *isDriver) {
+celix_status_t deviceManager_isDriverBundle(device_manager_t manager, bundle_t bundle, bool *isDriver) {
celix_status_t status = CELIX_SUCCESS;
(*isDriver) = false;
- ARRAY_LIST refs = NULL;
+ array_list_t refs = NULL;
apr_pool_t *pool = NULL;
status = bundle_getMemoryPool(bundle, &pool);
if (status == CELIX_SUCCESS) {
@@ -552,11 +552,11 @@ celix_status_t deviceManager_isDriverBun
int i;
for (i = 0; i < arrayList_size(refs); i++) {
celix_status_t substatus = CELIX_SUCCESS;
- SERVICE_REFERENCE ref = arrayList_get(refs, i);
- SERVICE_REGISTRATION registration = NULL;
+ service_reference_t ref = arrayList_get(refs, i);
+ service_registration_t registration = NULL;
substatus = serviceReference_getServiceRegistration(ref, ®istration);
if (substatus == CELIX_SUCCESS) {
- PROPERTIES properties = NULL;
+ properties_t properties = NULL;
substatus = serviceRegistration_getProperties(registration, &properties);
if (substatus == CELIX_SUCCESS) {
char *object = properties_get(properties, (char *) OBJECTCLASS);
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=1417320&r1=1417319&r2=1417320&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 Wed Dec 5 09:05:46 2012
@@ -36,20 +36,20 @@
struct driver_attributes {
apr_pool_t *pool;
- BUNDLE bundle;
- SERVICE_REFERENCE reference;
+ bundle_t bundle;
+ service_reference_t reference;
driver_service_t driver;
bool dynamic;
};
-celix_status_t driverAttributes_create(apr_pool_t *pool, SERVICE_REFERENCE reference, driver_service_t driver, driver_attributes_t *attributes) {
+celix_status_t driverAttributes_create(apr_pool_t *pool, service_reference_t reference, driver_service_t driver, driver_attributes_t *attributes) {
celix_status_t status = CELIX_SUCCESS;
*attributes = apr_palloc(pool, sizeof(**attributes));
if (!*attributes) {
status = CELIX_ENOMEM;
} else {
- BUNDLE bundle = NULL;
+ bundle_t bundle = NULL;
bundle_archive_t bundleArchive = NULL;
status = serviceReference_getBundle(reference, &bundle);
@@ -75,7 +75,7 @@ celix_status_t driverAttributes_create(a
return status;
}
-celix_status_t driverAttributes_getReference(driver_attributes_t driverAttributes, SERVICE_REFERENCE *reference) {
+celix_status_t driverAttributes_getReference(driver_attributes_t driverAttributes, service_reference_t *reference) {
*reference = driverAttributes->reference;
return CELIX_SUCCESS;
@@ -83,11 +83,11 @@ celix_status_t driverAttributes_getRefer
celix_status_t driverAttributes_getDriverId(driver_attributes_t driverAttributes, char **driverId) {
celix_status_t status = CELIX_SUCCESS;
- SERVICE_REGISTRATION registration = NULL;
+ service_registration_t registration = NULL;
status = serviceReference_getServiceRegistration(driverAttributes->reference, ®istration);
if (status == CELIX_SUCCESS) {
- PROPERTIES properties = NULL;
+ properties_t properties = NULL;
status = serviceRegistration_getProperties(registration, &properties);
if (status == CELIX_SUCCESS) {
@@ -108,7 +108,7 @@ celix_status_t driverAttributes_getDrive
return status;
}
-celix_status_t driverAttributes_match(driver_attributes_t driverAttributes, SERVICE_REFERENCE reference, int *match) {
+celix_status_t driverAttributes_match(driver_attributes_t driverAttributes, service_reference_t reference, int *match) {
celix_status_t status = CELIX_SUCCESS;
status = driverAttributes->driver->match(driverAttributes->driver->driver, reference, match);
@@ -116,13 +116,13 @@ celix_status_t driverAttributes_match(dr
return status;
}
-celix_status_t static get_property_from_registration(SERVICE_REFERENCE ref, char *key, char **prop_value) {
+celix_status_t static get_property_from_registration(service_reference_t ref, char *key, char **prop_value) {
celix_status_t status = CELIX_SUCCESS;
- SERVICE_REGISTRATION registration = NULL;
+ service_registration_t registration = NULL;
status = serviceReference_getServiceRegistration(ref, ®istration);
if (status == CELIX_SUCCESS) {
- PROPERTIES properties = NULL;
+ properties_t properties = NULL;
status = serviceRegistration_getProperties(registration, &properties);
if (status == CELIX_SUCCESS) {
@@ -141,7 +141,7 @@ celix_status_t static get_property_from_
celix_status_t driverAttributes_isInUse(driver_attributes_t driverAttributes, bool *inUse) {
celix_status_t status = CELIX_SUCCESS;
- ARRAY_LIST references = NULL;
+ array_list_t references = NULL;
status = bundle_getServicesInUse(driverAttributes->bundle, &references);
if (status == CELIX_SUCCESS) {
if (references == NULL || arrayList_size(references) == 0) {
@@ -149,7 +149,7 @@ celix_status_t driverAttributes_isInUse(
} else {
int i;
for (i = 0; i < arrayList_size(references); i++) {
- SERVICE_REFERENCE ref = arrayList_get(references, i);
+ service_reference_t ref = arrayList_get(references, i);
char *object = NULL;
status = get_property_from_registration(ref, (char *) OBJECTCLASS, &object);
@@ -170,7 +170,7 @@ celix_status_t driverAttributes_isInUse(
return status;
}
-celix_status_t driverAttributes_attach(driver_attributes_t driverAttributes, SERVICE_REFERENCE reference, char **attach) {
+celix_status_t driverAttributes_attach(driver_attributes_t driverAttributes, service_reference_t reference, char **attach) {
celix_status_t status = CELIX_SUCCESS;
status = driverAttributes->driver->attach(driverAttributes->driver->driver, reference, attach);