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 2011/12/15 11:12:06 UTC
svn commit: r1214685 [1/4] - in /incubator/celix/trunk: ./ cmake/
dependency_manager/ deployment_admin/private/src/
examples/osgi-in-action/chapter04-paint-example/paint/private/src/
examples/whiteboard/publisherA/ examples/whiteboard/publisherB/ frame...
Author: abroekhuis
Date: Thu Dec 15 10:12:04 2011
New Revision: 1214685
URL: http://svn.apache.org/viewvc?rev=1214685&view=rev
Log:
API Fixes
Updated APIs for APR usage. Refactored code to create a new service_reference for each requester.
Added:
incubator/celix/trunk/Hello world Massif.launch
incubator/celix/trunk/framework/Doxyfile.in
incubator/celix/trunk/framework/private/include/framework_log.h
Modified:
incubator/celix/trunk/.cproject
incubator/celix/trunk/Hello World.launch
incubator/celix/trunk/Remote Services.launch
incubator/celix/trunk/WB Dependency Manager.launch
incubator/celix/trunk/cmake/Packaging.cmake
incubator/celix/trunk/dependency_manager/service_component.c
incubator/celix/trunk/dependency_manager/service_dependency.c
incubator/celix/trunk/deployment_admin/private/src/deployment_package.c
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c
incubator/celix/trunk/examples/whiteboard/publisherA/activator.c
incubator/celix/trunk/examples/whiteboard/publisherB/activator.c
incubator/celix/trunk/framework/private/include/bundle.h
incubator/celix/trunk/framework/private/include/capability.h
incubator/celix/trunk/framework/private/include/framework.h
incubator/celix/trunk/framework/private/include/headers.h
incubator/celix/trunk/framework/private/include/manifest_parser.h
incubator/celix/trunk/framework/private/include/requirement.h
incubator/celix/trunk/framework/private/include/service_reference.h
incubator/celix/trunk/framework/private/include/service_registration.h
incubator/celix/trunk/framework/private/include/service_registry.h
incubator/celix/trunk/framework/private/include/version.h
incubator/celix/trunk/framework/private/include/version_range.h
incubator/celix/trunk/framework/private/include/wire.h
incubator/celix/trunk/framework/private/src/bundle.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_parser.c
incubator/celix/trunk/framework/private/src/module.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/version.c
incubator/celix/trunk/framework/private/src/version_range.c
incubator/celix/trunk/framework/private/src/wire.c
incubator/celix/trunk/launcher/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/private/src/log_service_impl.c
incubator/celix/trunk/log_writer/dependency_activator.c
incubator/celix/trunk/log_writer/log_writer.c
incubator/celix/trunk/log_writer/log_writer.h
incubator/celix/trunk/remote_services/discovery/private/src/discovery.c
incubator/celix/trunk/remote_services/remote_service_admin/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/shell/inspect_command.c
incubator/celix/trunk/shell/shell.c
incubator/celix/trunk/shell_tui/shell_tui.c
incubator/celix/trunk/target.cmake
incubator/celix/trunk/utils/private/src/array_list.c
incubator/celix/trunk/utils/private/src/linkedlist.c
incubator/celix/trunk/utils/public/include/linkedlist.h
Modified: incubator/celix/trunk/.cproject
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/.cproject?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/.cproject (original)
+++ incubator/celix/trunk/.cproject Thu Dec 15 10:12:04 2011
@@ -100,7 +100,7 @@
<buildTargets>
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
- <buildArguments>-j4 -C ${workspace_loc:/celix}/build</buildArguments>
+ <buildArguments>-C ${workspace_loc:/celix}/build</buildArguments>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
@@ -116,6 +116,7 @@
</target>
<target name="run cmake" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>cmake</buildCommand>
+ <buildArguments/>
<buildTarget>-E chdir ${workspace_loc:/celix}/build cmake -G "Unix Makefiles" ../</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
Modified: incubator/celix/trunk/Hello World.launch
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/Hello%20World.launch?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/Hello World.launch (original)
+++ incubator/celix/trunk/Hello World.launch Thu Dec 15 10:12:04 2011
@@ -29,7 +29,7 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="componentData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="key-hashMapIterator_remove-(cast)" val="char *"/><content id="userData-userData-fw_startBundle-(cast)" val="log_writer_t"/><content id="*userData-userData-bundleActivator_create-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="userData-*userData-userData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="userData-data-bundleActivator_start-(cast)" val="log_writer_t"/><content id="userData-fw_startBundle-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="userData-bundleActivator_stop-(cast)" val="DEPENDE
NCY_ACTIVATOR_BASE"/><content id="userData-userData-bundleActivator_stop-(cast)" val="log_writer_t"/></contentList>"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="element-next-header-capabilities-parser-manifestParser_getCapabilities-(cast)" val="CAPABILITY"/><content id="userData-bundleActivator_stop-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="componentData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="key-hashMapIterator_remove-(cast)" val="char *"/><content id="userData-userData-fw_startBundle-(cast)" val="log_writer_t"/><content id="*userData-userData-bundleActivator_create-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="userData-*userData-userData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="userData-data-bundleA
ctivator_start-(cast)" val="log_writer_t"/><content id="userData-fw_startBundle-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="userData-userData-bundleActivator_stop-(cast)" val="log_writer_t"/></contentList>"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/launcher/launcher"/>
Added: incubator/celix/trunk/Hello world Massif.launch
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/Hello%20world%20Massif.launch?rev=1214685&view=auto
==============================================================================
--- incubator/celix/trunk/Hello world Massif.launch (added)
+++ incubator/celix/trunk/Hello world Massif.launch Thu Dec 15 10:12:04 2011
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.linuxtools.valgrind.launch.valgrindLaunch">
+<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>
+<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/launcher/launcher"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="celix"/>
+<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.macosx.base.1808592147"/>
+<stringAttribute key="org.eclipse.cdt.launch.WORKING_DIRECTORY" value="${workspace_loc:celix/build/deploy/hello_world}"/>
+<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/celix"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DYLD_LIBRARY_PATH" value="${workspace_loc:celix/build/framework}:${workspace_loc:celix/build/utils}"/>
+</mapAttribute>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.BRANCH_SIM" value="false"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.CACHE_SIM" value="true"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1" value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1_ASSOC" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1_LSIZE" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1_SIZE" value="0"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1" value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1_ASSOC" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1_LSIZE" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1_SIZE" value="0"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2" value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2_ASSOC" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2_LSIZE" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2_SIZE" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.helgrind.HELGRIND_CACHESIZE" value="1000000"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.helgrind.HELGRIND_HISTORYLEVEL" value="full"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.helgrind.HELGRIND_LOCKORDERS" value="true"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_BELOWMAIN" value="false"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_DEMANGLE" value="true"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_DSYMUTIL" value="true"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_ERRLIMIT" value="true"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_FREERES" value="true"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_MAINSTACK" value="0"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_MAINSTACK_BOOL" value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_MAXFRAME" value="2000000"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_NUMCALLERS" value="12"/>
+<listAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_SUPPFILES"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_TRACECHILD" value="true"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.launch.OUTPUT_DIR" value="/Users/alexander/Documents/Projects/CelixGIT/.metadata/.plugins/org.eclipse.linuxtools.valgrind.launch"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.launch.TOOL" value="org.eclipse.linuxtools.valgrind.launch.massif"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_ALIGNMENT_BOOL" value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_ALIGNMENT_VAL" value="0"/>
+<listAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_ALLOCFN"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_DEPTH" value="30"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_DETAILEDFREQ" value="10"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_HEAP" value="true"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_HEAPADMIN" value="8"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_MAXSNAPSHOTS" value="100"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_PEAKINACCURACY" value="10"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_STACKS" value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_THRESHOLD" value="10"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_TIMEUNIT" value="i"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_ALIGNMENT_BOOL" value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_ALIGNMENT_VAL" value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_FREELIST" value="10000000"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_GCCWORK" value="false"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_LEAKCHECK" value="true"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_LEAKRES" value="low"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_PARTIAL" value="false"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_SHOWREACH" value="false"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_TRACKORIGINS" value="false"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_UNDEF" value="true"/>
+</launchConfiguration>
Modified: incubator/celix/trunk/Remote Services.launch
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/Remote%20Services.launch?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/Remote Services.launch (original)
+++ incubator/celix/trunk/Remote Services.launch Thu Dec 15 10:12:04 2011
@@ -29,7 +29,7 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="userData-bundleActivator_stop-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="*table-table-exportedServices-admin-activator-bundleActivator_stop-(cast_to_array)" val="0:1"/><content id="componentData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="key-hashMapIterator_remove-(cast)" val="char *"/><content id="userData-userData-fw_startBundle-(cast)" val="log_writer_t"/><content id="*userData-userData-bundleActivator_create-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="userData-*userData-userData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="userData-data-bundleAct
ivator_start-(cast)" val="log_writer_t"/><content id="userData-fw_startBundle-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="userData-userData-bundleActivator_stop-(cast)" val="log_writer_t"/></contentList>"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="userData-fw_startBundle-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="ref-fw_addServiceListener-(cast)" val="SERVICE_REGISTRATION"/><content id="*elementData-elementData-listenerHooks-fw_addServiceListener-(cast)" val="listener_hook_service_t"/><content id="userData-bundleActivator_stop-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="*table-table-exportedServices-admin-activator-bundleActivator_stop-(cast_to_array)" val="0:1"/><content id="componentData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="key-hashMapIterator_remove-(cast)" val="char *"/><content id="userData-userData-f
w_startBundle-(cast)" val="log_writer_t"/><content id="*userData-userData-bundleActivator_create-(cast)" val="DEPENDENCY_ACTIVATOR_BASE"/><content id="userData-*userData-userData-bundleActivator_create-(cast)" val="log_writer_t"/><content id="userData-data-bundleActivator_start-(cast)" val="log_writer_t"/><content id="userData-userData-bundleActivator_stop-(cast)" val="log_writer_t"/></contentList>"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/launcher/launcher"/>
Modified: incubator/celix/trunk/WB Dependency Manager.launch
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/WB%20Dependency%20Manager.launch?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/WB Dependency Manager.launch (original)
+++ incubator/celix/trunk/WB Dependency Manager.launch Thu Dec 15 10:12:04 2011
@@ -29,7 +29,7 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="element-linkedList_addElement-(cast)" val="log_entry_t"/><content id="service-tracker_addLog-(cast)" val="log_service_t"/><content id="factory-logFactory_getService-(cast)" val="service_factory_t"/><content id="pool-factory-factory-logFactory_getService-(cast)" val="apr_pool_t *"/><content id="factory-factory-logFactory_getService-(cast)" val="log_service_factory_t"/></contentList>"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="*elementData-elementData-null-findFwServiceTracker-(cast_to_array)" val="0:2"/><content id="elementData-null-findFwServiceTracker-(cast_to_array)" val="0:2"/><content id="element-linkedList_addElement-(cast)" val="log_entry_t"/><content id="service-tracker_addLog-(cast)" val="log_service_t"/><content id="factory-logFactory_getService-(cast)" val="service_factory_t"/><content id="pool-factory-factory-logFactory_getService-(cast)" val="apr_pool_t *"/><content id="factory-factory-logFactory_getService-(cast)" val="log_service_factory_t"/><content id="elementData-null-findFwServiceTracker-(cast)" val="vo
id *[2]"/><content id="elementData[0]-elementData-null-findFwServiceTracker-(cast)" val="FW_SERVICE_TRACKER"/><content id="elementData[1]-elementData-null-findFwServiceTracker-(cast)" val="FW_SERVICE_TRACKER"/></contentList>"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/launcher/launcher"/>
Modified: incubator/celix/trunk/cmake/Packaging.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Packaging.cmake?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Packaging.cmake (original)
+++ incubator/celix/trunk/cmake/Packaging.cmake Thu Dec 15 10:12:04 2011
@@ -138,7 +138,7 @@ MACRO(deploy)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/run.sh.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/run.sh @ONLY)
GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)
- SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}")
+ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles")
#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME} DESTINATION . COMPONENT ${DEPLOY_COMPONENT})
#ADD_CUSTOM_TARGET(clean_${__packageTarget}
Modified: incubator/celix/trunk/dependency_manager/service_component.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/service_component.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/service_component.c (original)
+++ incubator/celix/trunk/dependency_manager/service_component.c Thu Dec 15 10:12:04 2011
@@ -386,8 +386,10 @@ STATE state_create(ARRAY_LIST dependenci
}
void state_destroy(STATE state) {
- arrayList_destroy(state->dependencies);
- state->dependencies = NULL;
+ if (state->dependencies != NULL) {
+ arrayList_destroy(state->dependencies);
+ state->dependencies = NULL;
+ }
state->state = STATE_INACTIVE;
free(state);
state = NULL;
Modified: incubator/celix/trunk/dependency_manager/service_dependency.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/service_dependency.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/service_dependency.c (original)
+++ incubator/celix/trunk/dependency_manager/service_dependency.c Thu Dec 15 10:12:04 2011
@@ -93,6 +93,7 @@ void serviceDependency_start(SERVICE_DEP
void serviceDependency_stop(SERVICE_DEPENDENCY dependency, SERVICE service) {
dependency->started = true;
serviceTracker_close(dependency->tracker);
+ tracker_destroy(dependency->tracker);
}
celix_status_t serviceDependency_addingService(void * handle, SERVICE_REFERENCE reference, void **service) {
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=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/deployment_package.c (original)
+++ incubator/celix/trunk/deployment_admin/private/src/deployment_package.c Thu Dec 15 10:12:04 2011
@@ -83,8 +83,7 @@ celix_status_t deploymentPackage_getBund
celix_status_t deploymentPackage_getVersion(deployment_package_t package, VERSION *version) {
char *versionStr = manifest_getValue(package->manifest, "DeploymentPackage-Version");
- *version = version_createVersionFromString(versionStr);
- return CELIX_SUCCESS;
+ return version_createVersionFromString(package->pool, versionStr, version);
}
celix_status_t deploymentPackage_setBundleInfos(deployment_package_t package) {
@@ -103,7 +102,8 @@ celix_status_t deploymentPackage_setBund
info->attributes = values;
info->symbolicName = properties_get(values, (char *) BUNDLE_SYMBOLICNAME);
char *version = properties_get(values, (char *) BUNDLE_VERSION);
- info->version = version_createVersionFromString(version);
+ info->version = NULL;
+ status = version_createVersionFromString(package->pool, version, &info->version);
arrayList_add(package->bundleInfos, info);
}
Modified: incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c (original)
+++ incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c Thu Dec 15 10:12:04 2011
@@ -29,6 +29,7 @@
#include "simple_shape.h"
#include "paint_frame.h"
#include "service_tracker.h"
+#include "service_reference.h"
struct paintFrameActivatorData {
SERVICE_REGISTRATION reg;
@@ -97,20 +98,26 @@ celix_status_t addingServ(void * handle,
celix_status_t addedServ(void * handle, SERVICE_REFERENCE ref, void * service) {
struct paintFrameActivatorData * data = (struct paintFrameActivatorData *) handle;
- char * serviceName = properties_get(ref->registration->properties, "name");
+ SERVICE_REGISTRATION reg = NULL;
+ serviceReference_getServiceRegistration(ref, ®);
+ char * serviceName = properties_get(reg->properties, "name");
paintFrame_addShape(data->paint_frame, data->context, service);
return CELIX_SUCCESS;
}
celix_status_t modifiedServ(void * handle, SERVICE_REFERENCE ref, void * service) {
struct paintFrameActivatorData * data = (struct paintFrameActivatorData *) handle;
- char * serviceName = properties_get(ref->registration->properties, "name");
+ SERVICE_REGISTRATION reg = NULL;
+ serviceReference_getServiceRegistration(ref, ®);
+ char * serviceName = properties_get(reg->properties, "name");
return CELIX_SUCCESS;
}
celix_status_t removedServ(void * handle, SERVICE_REFERENCE ref, void * service) {
struct paintFrameActivatorData * data = (struct paintFrameActivatorData *) handle;
- char * serviceName = properties_get(ref->registration->properties, "name");
+ SERVICE_REGISTRATION reg = NULL;
+ serviceReference_getServiceRegistration(ref, ®);
+ char * serviceName = properties_get(reg->properties, "name");
paintFrame_removeShape(data->paint_frame, service);
return CELIX_SUCCESS;
}
Modified: incubator/celix/trunk/examples/whiteboard/publisherA/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/whiteboard/publisherA/activator.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/examples/whiteboard/publisherA/activator.c (original)
+++ incubator/celix/trunk/examples/whiteboard/publisherA/activator.c Thu Dec 15 10:12:04 2011
@@ -28,10 +28,13 @@
#include "bundle_context.h"
#include "publisher_private.h"
#include "celix_errno.h"
+#include "service_registration.h"
struct activatorData {
PUBLISHER_SERVICE ps;
PUBLISHER pub;
+
+ SERVICE_REGISTRATION reg;
};
celix_status_t bundleActivator_create(BUNDLE_CONTEXT context, void **userData) {
@@ -56,12 +59,12 @@ celix_status_t bundleActivator_start(voi
data->pub = apr_pcalloc(pool, sizeof(*(data->pub)));
data->ps->invoke = publisher_invoke;
data->ps->publisher = data->pub;
+ data->reg = NULL;
PROPERTIES props = properties_create();
properties_set(props, "id", "A");
- SERVICE_REGISTRATION service_registration = NULL;
- status = bundleContext_registerService(context, PUBLISHER_NAME, data->ps, props, &service_registration);
+ status = bundleContext_registerService(context, PUBLISHER_NAME, data->ps, props, &data->reg);
if (status != CELIX_SUCCESS) {
printf("Error: %s\n", celix_strerror(status));
}
@@ -73,6 +76,10 @@ celix_status_t bundleActivator_start(voi
celix_status_t bundleActivator_stop(void * userData, BUNDLE_CONTEXT context) {
celix_status_t status = CELIX_SUCCESS;
+
+ struct activatorData * data = (struct activatorData *) userData;
+ serviceRegistration_unregister(data->reg);
+
return status;
}
Modified: incubator/celix/trunk/examples/whiteboard/publisherB/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/whiteboard/publisherB/activator.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/examples/whiteboard/publisherB/activator.c (original)
+++ incubator/celix/trunk/examples/whiteboard/publisherB/activator.c Thu Dec 15 10:12:04 2011
@@ -27,10 +27,13 @@
#include "bundle_activator.h"
#include "bundle_context.h"
#include "publisher_private.h"
+#include "service_registration.h"
struct activatorData {
PUBLISHER_SERVICE ps;
PUBLISHER pub;
+
+ SERVICE_REGISTRATION reg;
};
celix_status_t bundleActivator_create(BUNDLE_CONTEXT context, void **userData) {
@@ -54,12 +57,12 @@ celix_status_t bundleActivator_start(voi
data->pub = apr_pcalloc(pool, sizeof(*(data->pub)));
data->ps->invoke = publisher_invoke;
data->ps->publisher = data->pub;
+ data->reg = NULL;
PROPERTIES props = properties_create();
properties_set(props, "id", "B");
- SERVICE_REGISTRATION service_registration = NULL;
- bundleContext_registerService(context, PUBLISHER_NAME, data->ps, props, &service_registration);
+ bundleContext_registerService(context, PUBLISHER_NAME, data->ps, props, &data->reg);
} else {
status = CELIX_START_ERROR;
}
@@ -68,6 +71,10 @@ celix_status_t bundleActivator_start(voi
celix_status_t bundleActivator_stop(void * userData, BUNDLE_CONTEXT context) {
celix_status_t status = CELIX_SUCCESS;
+
+ struct activatorData * data = (struct activatorData *) userData;
+ serviceRegistration_unregister(data->reg);
+
return status;
}