celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject svn commit: r1492377 [6/12] - in /incubator/celix/trunk: dependency_manager/private/src/ dependency_manager/public/include/ deployment_admin/private/include/ deployment_admin/private/src/ deployment_admin/public/include/ device_access/device_access/pri...
Date Wed, 12 Jun 2013 19:08:55 GMT
Modified: incubator/celix/trunk/framework/private/src/manifest_parser.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/manifest_parser.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/manifest_parser.c (original)
+++ incubator/celix/trunk/framework/private/src/manifest_parser.c Wed Jun 12 19:08:50 2013
@@ -38,27 +38,27 @@
 #include "linked_list_iterator.h"
 
 struct manifestParser {
-	module_t owner;
-	MANIFEST manifest;
+	module_pt owner;
+	manifest_pt manifest;
 
-	version_t bundleVersion;
+	version_pt bundleVersion;
 	char * bundleSymbolicName;
-	linked_list_t capabilities;
-	linked_list_t requirements;
+	linked_list_pt capabilities;
+	linked_list_pt requirements;
 };
 
-static linked_list_t manifestParser_parseImportHeader(char * header, apr_pool_t *memory_pool);
-static linked_list_t manifestParser_parseExportHeader(module_t module, char * header, apr_pool_t *memory_pool);
-static linked_list_t manifestParser_parseDelimitedString(char * value, char * delim, apr_pool_t *memory_pool);
-static linked_list_t manifestParser_parseStandardHeaderClause(char * clauseString, apr_pool_t *memory_pool);
-static linked_list_t manifestParser_parseStandardHeader(char * header, apr_pool_t *memory_pool);
+static linked_list_pt manifestParser_parseImportHeader(char * header, apr_pool_t *memory_pool);
+static linked_list_pt manifestParser_parseExportHeader(module_pt module, char * header, apr_pool_t *memory_pool);
+static linked_list_pt manifestParser_parseDelimitedString(char * value, char * delim, apr_pool_t *memory_pool);
+static linked_list_pt manifestParser_parseStandardHeaderClause(char * clauseString, apr_pool_t *memory_pool);
+static linked_list_pt manifestParser_parseStandardHeader(char * header, apr_pool_t *memory_pool);
 
-celix_status_t manifestParser_create(module_t owner, MANIFEST manifest, apr_pool_t *memory_pool, manifest_parser_t *manifest_parser) {
+celix_status_t manifestParser_create(module_pt owner, manifest_pt manifest, apr_pool_t *memory_pool, manifest_parser_pt *manifest_parser) {
 	celix_status_t status;
-    manifest_parser_t parser;
+    manifest_parser_pt parser;
 
     status = CELIX_SUCCESS;
-	parser = (manifest_parser_t) apr_pcalloc(memory_pool, sizeof(*parser));
+	parser = (manifest_parser_pt) apr_pcalloc(memory_pool, sizeof(*parser));
 	if (parser) {
 		char * bundleVersion = NULL;
 		char * bundleSymbolicName = NULL;
@@ -91,8 +91,8 @@ celix_status_t manifestParser_create(mod
 	return status;
 }
 
-static linked_list_t manifestParser_parseDelimitedString(char * value, char * delim, apr_pool_t *memory_pool) {
-    linked_list_t list;
+static linked_list_pt manifestParser_parseDelimitedString(char * value, char * delim, apr_pool_t *memory_pool) {
+    linked_list_pt list;
     apr_pool_t *temp_pool;
 
     if (linkedList_create(memory_pool, &list) == CELIX_SUCCESS) {
@@ -158,11 +158,11 @@ static linked_list_t manifestParser_pars
 	return list;
 }
 
-static linked_list_t manifestParser_parseStandardHeaderClause(char * clauseString, apr_pool_t *memory_pool) {
-	linked_list_t paths;
+static linked_list_pt manifestParser_parseStandardHeaderClause(char * clauseString, apr_pool_t *memory_pool) {
+	linked_list_pt paths;
 	apr_pool_t *temp_pool;
-    linked_list_t clause;
-    linked_list_t pieces;
+    linked_list_pt clause;
+    linked_list_pt pieces;
 
     clause = NULL;
     pieces = NULL;
@@ -172,8 +172,8 @@ static linked_list_t manifestParser_pars
         if (linkedList_create(memory_pool, &paths) == CELIX_SUCCESS) {
             int pathCount = 0;
             int pieceIdx;
-			hash_map_t dirsMap = NULL;
-			hash_map_t attrsMap = NULL;
+			hash_map_pt dirsMap = NULL;
+			hash_map_pt attrsMap = NULL;
 			char * sepPtr;
             char * sep;
 
@@ -224,7 +224,7 @@ static linked_list_t manifestParser_pars
                 if (strcmp(sep, DIRECTIVE_SEP) == 0) {
                     // Not implemented
                 } else {
-                	attribute_t attr = NULL;
+                	attribute_pt attr = NULL;
 					if (hashMap_containsKey(attrsMap, key)) {
                         return NULL;
                     }
@@ -250,11 +250,11 @@ static linked_list_t manifestParser_pars
 	return clause;
 }
 
-static linked_list_t manifestParser_parseStandardHeader(char * header, apr_pool_t *memory_pool) {
+static linked_list_pt manifestParser_parseStandardHeader(char * header, apr_pool_t *memory_pool) {
     int i;
     char *clauseString;
-    linked_list_t clauseStrings = NULL;
-    linked_list_t completeList = NULL;
+    linked_list_pt clauseStrings = NULL;
+    linked_list_pt completeList = NULL;
 
     if (linkedList_create(memory_pool, &completeList) == CELIX_SUCCESS) {
         if (header != NULL) {
@@ -275,28 +275,28 @@ static linked_list_t manifestParser_pars
 	return completeList;
 }
 
-static linked_list_t manifestParser_parseImportHeader(char * header, apr_pool_t *memory_pool) {
+static linked_list_pt manifestParser_parseImportHeader(char * header, apr_pool_t *memory_pool) {
     apr_pool_t *temp_pool;
-    linked_list_t clauses;
-    linked_list_t requirements;
+    linked_list_pt clauses;
+    linked_list_pt requirements;
 
     if (apr_pool_create(&temp_pool, memory_pool) == APR_SUCCESS) {
         int clauseIdx;
-		linked_list_iterator_t iter;
+		linked_list_iterator_pt iter;
 		clauses = manifestParser_parseStandardHeader(header, memory_pool);
         linkedList_create(memory_pool, &requirements);
         
         for (clauseIdx = 0; clauseIdx < linkedList_size(clauses); clauseIdx++) {
-            linked_list_t clause = linkedList_get(clauses, clauseIdx);
+            linked_list_pt clause = linkedList_get(clauses, clauseIdx);
 
-            linked_list_t paths = linkedList_get(clause, 0);
-            hash_map_t directives = linkedList_get(clause, 1);
-            hash_map_t attributes = linkedList_get(clause, 2);
+            linked_list_pt paths = linkedList_get(clause, 0);
+            hash_map_pt directives = linkedList_get(clause, 1);
+            hash_map_pt attributes = linkedList_get(clause, 2);
 
             int pathIdx;
             for (pathIdx = 0; pathIdx < linkedList_size(paths); pathIdx++) {
-            	attribute_t name = NULL;
-				requirement_t req = NULL;
+            	attribute_pt name = NULL;
+				requirement_pt req = NULL;
 				char * path = (char *) linkedList_get(paths, pathIdx);
                 if (strlen(path) == 0) {
                     return NULL;
@@ -315,9 +315,9 @@ static linked_list_t manifestParser_pars
 
         iter = linkedListIterator_create(clauses, 0);
         while(linkedListIterator_hasNext(iter)) {
-            linked_list_t clause = linkedListIterator_next(iter);
+            linked_list_pt clause = linkedListIterator_next(iter);
 
-            linked_list_t paths = linkedList_get(clause, 0);
+            linked_list_pt paths = linkedList_get(clause, 0);
 
             linkedListIterator_remove(iter);
         }
@@ -329,27 +329,27 @@ static linked_list_t manifestParser_pars
 	return requirements;
 }
 
-static linked_list_t manifestParser_parseExportHeader(module_t module, char * header, apr_pool_t *memory_pool) {
-    linked_list_t clauses;
-    linked_list_t capabilities;
+static linked_list_pt manifestParser_parseExportHeader(module_pt module, char * header, apr_pool_t *memory_pool) {
+    linked_list_pt clauses;
+    linked_list_pt capabilities;
 	int clauseIdx;
-	linked_list_iterator_t iter;
+	linked_list_iterator_pt iter;
     clauses = manifestParser_parseStandardHeader(header, memory_pool);
     linkedList_create(memory_pool, &capabilities);
 
     
     for (clauseIdx = 0; clauseIdx < linkedList_size(clauses); clauseIdx++) {
-        linked_list_t clause = linkedList_get(clauses, clauseIdx);
+        linked_list_pt clause = linkedList_get(clauses, clauseIdx);
 
-        linked_list_t paths = linkedList_get(clause, 0);
-        hash_map_t directives = linkedList_get(clause, 1);
-        hash_map_t attributes = linkedList_get(clause, 2);
+        linked_list_pt paths = linkedList_get(clause, 0);
+        hash_map_pt directives = linkedList_get(clause, 1);
+        hash_map_pt attributes = linkedList_get(clause, 2);
 
         int pathIdx;
         for (pathIdx = 0; pathIdx < linkedList_size(paths); pathIdx++) {
             char * path = (char *) linkedList_get(paths, pathIdx);
-            attribute_t name = NULL;
-			capability_t cap = NULL;
+            attribute_pt name = NULL;
+			capability_pt cap = NULL;
 			if (strlen(path) == 0) {
                 return NULL;
             }
@@ -366,9 +366,9 @@ static linked_list_t manifestParser_pars
     }
     iter = linkedListIterator_create(clauses, 0);
     while(linkedListIterator_hasNext(iter)) {
-        linked_list_t clause = linkedListIterator_next(iter);
+        linked_list_pt clause = linkedListIterator_next(iter);
 
-        linked_list_t paths = linkedList_get(clause, 0);
+        linked_list_pt paths = linkedList_get(clause, 0);
 
         linkedListIterator_remove(iter);
     }
@@ -377,16 +377,16 @@ static linked_list_t manifestParser_pars
 	return capabilities;
 }
 
-celix_status_t manifestParser_getSymbolicName(manifest_parser_t parser, apr_pool_t *pool, char **symbolicName) {
+celix_status_t manifestParser_getSymbolicName(manifest_parser_pt parser, apr_pool_t *pool, char **symbolicName) {
 	*symbolicName = apr_pstrdup(pool, parser->bundleSymbolicName);
 	return CELIX_SUCCESS;
 }
 
-celix_status_t manifestParser_getBundleVersion(manifest_parser_t parser, apr_pool_t *pool, version_t *version) {
+celix_status_t manifestParser_getBundleVersion(manifest_parser_pt parser, apr_pool_t *pool, version_pt *version) {
 	return version_clone(parser->bundleVersion, pool, version);
 }
 
-celix_status_t manifestParser_getCapabilities(manifest_parser_t parser, apr_pool_t *pool, linked_list_t *capabilities) {
+celix_status_t manifestParser_getCapabilities(manifest_parser_pt parser, apr_pool_t *pool, linked_list_pt *capabilities) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	status = linkedList_clone(parser->capabilities, pool, capabilities);
@@ -394,7 +394,7 @@ celix_status_t manifestParser_getCapabil
 	return status;
 }
 
-celix_status_t manifestParser_getRequirements(manifest_parser_t parser, apr_pool_t *pool, linked_list_t *requirements) {
+celix_status_t manifestParser_getRequirements(manifest_parser_pt parser, apr_pool_t *pool, linked_list_pt *requirements) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	status = linkedList_clone(parser->requirements, pool, requirements);

Modified: incubator/celix/trunk/framework/private/src/module.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/module.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/module.c (original)
+++ incubator/celix/trunk/framework/private/src/module.c Wed Jun 12 19:08:50 2013
@@ -36,25 +36,25 @@
 #include "bundle.h"
 
 struct module {
-	linked_list_t capabilities;
-	linked_list_t requirements;
-	linked_list_t wires;
+	linked_list_pt capabilities;
+	linked_list_pt requirements;
+	linked_list_pt wires;
 
-	array_list_t dependentImporters;
+	array_list_pt dependentImporters;
 
-	version_t version;
+	version_pt version;
 	char * symbolicName;
 	bool resolved;
 
-	MANIFEST headerMap;
+	manifest_pt headerMap;
 	char * id;
 
 	struct bundle * bundle;
 };
 
-module_t module_create(MANIFEST headerMap, char * moduleId, bundle_t bundle) {
-    module_t module;
-    manifest_parser_t mp;
+module_pt module_create(manifest_pt headerMap, char * moduleId, bundle_pt bundle) {
+    module_pt module;
+    manifest_parser_pt mp;
     apr_pool_t *pool;
     apr_pool_t *bundlePool = NULL;
 
@@ -64,7 +64,7 @@ module_t module_create(MANIFEST headerMa
     if (headerMap != NULL) {
     	bundle_getMemoryPool(bundle, &bundlePool);
 
-        module = (module_t) apr_palloc(bundlePool, sizeof(*module));
+        module = (module_pt) apr_palloc(bundlePool, sizeof(*module));
         module->headerMap = headerMap;
         module->id = apr_pstrdup(bundlePool, moduleId);
         module->bundle = bundle;
@@ -97,8 +97,8 @@ module_t module_create(MANIFEST headerMa
     return module;
 }
 
-module_t module_createFrameworkModule(bundle_t bundle) {
-    module_t module;
+module_pt module_createFrameworkModule(bundle_pt bundle) {
+    module_pt module;
     apr_pool_t *capabilities_pool;
     apr_pool_t *requirements_pool;
     apr_pool_t *dependentImporters_pool;
@@ -106,7 +106,7 @@ module_t module_createFrameworkModule(bu
 
     bundle_getMemoryPool(bundle, &bundlePool);
 
-	module = (module_t) apr_palloc(bundlePool, sizeof(*module));
+	module = (module_pt) apr_palloc(bundlePool, sizeof(*module));
 	if (module) {
 	    if (apr_pool_create(&capabilities_pool, bundlePool) == APR_SUCCESS) {
 	        if (apr_pool_create(&requirements_pool, bundlePool) == APR_SUCCESS) {
@@ -131,20 +131,20 @@ module_t module_createFrameworkModule(bu
 	return module;
 }
 
-void module_destroy(module_t module) {
+void module_destroy(module_pt module) {
 	arrayList_destroy(module->dependentImporters);
 
 	module->headerMap = NULL;
 }
 
-wire_t module_getWire(module_t module, char * serviceName) {
-	wire_t wire = NULL;
+wire_pt module_getWire(module_pt module, char * serviceName) {
+	wire_pt wire = NULL;
 	if (module->wires != NULL) {
-		linked_list_iterator_t iterator = linkedListIterator_create(module->wires, 0);
+		linked_list_iterator_pt iterator = linkedListIterator_create(module->wires, 0);
 		while (linkedListIterator_hasNext(iterator)) {
 			char *name;
-			wire_t next = linkedListIterator_next(iterator);
-			capability_t cap = NULL;
+			wire_pt next = linkedListIterator_next(iterator);
+			capability_pt cap = NULL;
 			wire_getCapability(next, &cap);
 			capability_getServiceName(cap, &name);
 			if (strcasecmp(name, serviceName) == 0) {
@@ -156,11 +156,11 @@ wire_t module_getWire(module_t module, c
 	return wire;
 }
 
-version_t module_getVersion(module_t module) {
+version_pt module_getVersion(module_pt module) {
 	return module->version;
 }
 
-celix_status_t module_getSymbolicName(module_t module, char **symbolicName) {
+celix_status_t module_getSymbolicName(module_pt module, char **symbolicName) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (module == NULL || *symbolicName != NULL) {
@@ -172,19 +172,19 @@ celix_status_t module_getSymbolicName(mo
 	return status;
 }
 
-char * module_getId(module_t module) {
+char * module_getId(module_pt module) {
 	return module->id;
 }
 
-linked_list_t module_getWires(module_t module) {
+linked_list_pt module_getWires(module_pt module) {
 	return module->wires;
 }
 
-void module_setWires(module_t module, linked_list_t wires) {
+void module_setWires(module_pt module, linked_list_pt wires) {
     int i = 0;
     for (i = 0; (module->wires != NULL) && (i < linkedList_size(module->wires)); i++) {
-        wire_t wire = (wire_t) linkedList_get(module->wires, i);
-        module_t exporter = NULL;
+        wire_pt wire = (wire_pt) linkedList_get(module->wires, i);
+        module_pt exporter = NULL;
         wire_getExporter(wire, &exporter);
         module_removeDependentImporter(exporter, module);
     }
@@ -192,49 +192,49 @@ void module_setWires(module_t module, li
 	module->wires = wires;
 
 	for (i = 0; (module->wires != NULL) && (i < linkedList_size(module->wires)); i++) {
-        wire_t wire = (wire_t) linkedList_get(module->wires, i);
-        module_t exporter = NULL;
+        wire_pt wire = (wire_pt) linkedList_get(module->wires, i);
+        module_pt exporter = NULL;
         wire_getExporter(wire, &exporter);
         module_addDependentImporter(exporter, module);
     }
 }
 
-bool module_isResolved(module_t module) {
+bool module_isResolved(module_pt module) {
 	return module->resolved;
 }
 
-void module_setResolved(module_t module) {
+void module_setResolved(module_pt module) {
 	module->resolved = true;
 }
 
-bundle_t module_getBundle(module_t module) {
+bundle_pt module_getBundle(module_pt module) {
 	return module->bundle;
 }
 
-linked_list_t module_getRequirements(module_t module) {
+linked_list_pt module_getRequirements(module_pt module) {
 	return module->requirements;
 }
 
-linked_list_t module_getCapabilities(module_t module) {
+linked_list_pt module_getCapabilities(module_pt module) {
 	return module->capabilities;
 }
 
-array_list_t module_getDependentImporters(module_t module) {
+array_list_pt module_getDependentImporters(module_pt module) {
     return module->dependentImporters;
 }
 
-void module_addDependentImporter(module_t module, module_t importer) {
+void module_addDependentImporter(module_pt module, module_pt importer) {
     if (!arrayList_contains(module->dependentImporters, importer)) {
         arrayList_add(module->dependentImporters, importer);
     }
 }
 
-void module_removeDependentImporter(module_t module, module_t importer) {
+void module_removeDependentImporter(module_pt module, module_pt importer) {
     arrayList_removeElement(module->dependentImporters, importer);
 }
 
-array_list_t module_getDependents(module_t module) {
-    array_list_t dependents = NULL;
+array_list_pt module_getDependents(module_pt module) {
+    array_list_pt dependents = NULL;
     apr_pool_t *bundlePool = NULL;
     bundle_getMemoryPool(module->bundle, &bundlePool);
     arrayList_create(bundlePool, &dependents);

Modified: incubator/celix/trunk/framework/private/src/properties.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/properties.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/properties.c (original)
+++ incubator/celix/trunk/framework/private/src/properties.c Wed Jun 12 19:08:50 2013
@@ -73,14 +73,14 @@
 //	return oldValue == NULL ? NULL : oldValue->value;
 //}
 
-properties_t properties_create(void) {
+properties_pt properties_create(void) {
 	return hashMap_create(string_hash, string_hash, string_equals, string_equals);
 }
 
-void properties_destroy(properties_t properties) {
-	hash_map_iterator_t iter = hashMapIterator_create(properties);
+void properties_destroy(properties_pt properties) {
+	hash_map_iterator_pt iter = hashMapIterator_create(properties);
 	while (hashMapIterator_hasNext(iter)) {
-		hash_map_entry_t entry = hashMapIterator_nextEntry(iter);
+		hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
 		free(hashMapEntry_getKey(entry));
 		free(hashMapEntry_getValue(entry));
 	}
@@ -88,8 +88,8 @@ void properties_destroy(properties_t pro
 	hashMap_destroy(properties, false, false);
 }
 
-properties_t properties_load(char * filename) {
-	properties_t props = properties_create();
+properties_pt properties_load(char * filename) {
+	properties_pt props = properties_create();
 	FILE *file = fopen ( filename, "r" );
 
 	char * cont = strdup("\\");
@@ -142,13 +142,13 @@ properties_t properties_load(char * file
 /**
  * Header is ignored for now, cannot handle comments yet
  */
-void properties_store(properties_t properties, char * filename, char * header) {
+void properties_store(properties_pt properties, char * filename, char * header) {
 	FILE *file = fopen ( filename, "w+" );
 	if (file != NULL) {
 		if (hashMap_size(properties) > 0) {
-			hash_map_iterator_t iterator = hashMapIterator_create(properties);
+			hash_map_iterator_pt iterator = hashMapIterator_create(properties);
 			while (hashMapIterator_hasNext(iterator)) {
-				hash_map_entry_t entry = hashMapIterator_nextEntry(iterator);
+				hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
 
 				char * line = strdup(hashMapEntry_getKey(entry));
 				strcat(line, "=");
@@ -163,15 +163,15 @@ void properties_store(properties_t prope
 	}
 }
 
-char * properties_get(properties_t properties, char * key) {
+char * properties_get(properties_pt properties, char * key) {
 	return hashMap_get(properties, key);
 }
 
-char * properties_getWithDefault(properties_t properties, char * key, char * defaultValue) {
+char * properties_getWithDefault(properties_pt properties, char * key, char * defaultValue) {
 	char * value = properties_get(properties, key);
 	return value == NULL ? defaultValue : value;
 }
 
-char * properties_set(properties_t properties, char * key, char * value) {
+char * properties_set(properties_pt properties, char * key, char * value) {
 	return hashMap_put(properties, strdup(key), strdup(value));
 }

Modified: incubator/celix/trunk/framework/private/src/requirement.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/requirement.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/requirement.c (original)
+++ incubator/celix/trunk/framework/private/src/requirement.c Wed Jun 12 19:08:50 2013
@@ -31,35 +31,35 @@
 
 struct requirement {
 	char * targetName;
-	version_range_t versionRange;
-	hash_map_t attributes;
-	hash_map_t directives;
+	version_range_pt versionRange;
+	hash_map_pt attributes;
+	hash_map_pt directives;
 };
 
 apr_status_t requirement_destroy(void *requirementP);
 
-celix_status_t requirement_create(apr_pool_t *pool, hash_map_t directives, hash_map_t attributes, requirement_t *requirement) {
+celix_status_t requirement_create(apr_pool_t *pool, hash_map_pt directives, hash_map_pt attributes, requirement_pt *requirement) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	*requirement = (requirement_t) apr_palloc(pool, sizeof(**requirement));
+	*requirement = (requirement_pt) apr_palloc(pool, sizeof(**requirement));
 	if (!*requirement) {
 		status = CELIX_ENOMEM;
 	} else {
-		attribute_t serviceAttribute = NULL;
-		attribute_t versionAttribute = NULL;
+		attribute_pt serviceAttribute = NULL;
+		attribute_pt versionAttribute = NULL;
 
 		apr_pool_pre_cleanup_register(pool, *requirement, requirement_destroy);
 
 		(*requirement)->attributes = attributes;
 		(*requirement)->directives = directives;
 
-		serviceAttribute = (attribute_t) hashMap_get(attributes, "service");
+		serviceAttribute = (attribute_pt) hashMap_get(attributes, "service");
 		status = attribute_getValue(serviceAttribute, &(*requirement)->targetName);
 		if (status == CELIX_SUCCESS) {
 			(*requirement)->versionRange = NULL;
 			status = versionRange_createInfiniteVersionRange(pool, &(*requirement)->versionRange);
 			if (status == CELIX_SUCCESS) {
-				versionAttribute = (attribute_t) hashMap_get(attributes, "version");
+				versionAttribute = (attribute_pt) hashMap_get(attributes, "version");
 				if (versionAttribute != NULL) {
 					char *versionStr = NULL;
 					attribute_getValue(versionAttribute, &versionStr);
@@ -74,10 +74,10 @@ celix_status_t requirement_create(apr_po
 }
 
 apr_status_t requirement_destroy(void *requirementP) {
-	requirement_t requirement = requirementP;
-	hash_map_iterator_t attrIter = hashMapIterator_create(requirement->attributes);
+	requirement_pt requirement = requirementP;
+	hash_map_iterator_pt attrIter = hashMapIterator_create(requirement->attributes);
 	while (hashMapIterator_hasNext(attrIter)) {
-		attribute_t attr = hashMapIterator_nextValue(attrIter);
+		attribute_pt attr = hashMapIterator_nextValue(attrIter);
 		hashMapIterator_remove(attrIter);
 	}
 	hashMapIterator_destroy(attrIter);
@@ -91,20 +91,20 @@ apr_status_t requirement_destroy(void *r
 	return APR_SUCCESS;
 }
 
-celix_status_t requirement_getVersionRange(requirement_t requirement, version_range_t *range) {
+celix_status_t requirement_getVersionRange(requirement_pt requirement, version_range_pt *range) {
 	*range = requirement->versionRange;
 	return CELIX_SUCCESS;
 }
 
-celix_status_t requirement_getTargetName(requirement_t requirement, char **targetName) {
+celix_status_t requirement_getTargetName(requirement_pt requirement, char **targetName) {
 	*targetName = requirement->targetName;
 	return CELIX_SUCCESS;
 }
 
-celix_status_t requirement_isSatisfied(requirement_t requirement, capability_t capability, bool *inRange) {
+celix_status_t requirement_isSatisfied(requirement_pt requirement, capability_pt capability, bool *inRange) {
 	celix_status_t status = CELIX_SUCCESS;
-	version_t version = NULL;
-	version_range_t range = NULL;
+	version_pt version = NULL;
+	version_range_pt range = NULL;
 
 	status = capability_getVersion(capability, &version);
 	if (status == CELIX_SUCCESS) {

Modified: incubator/celix/trunk/framework/private/src/resolver.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/resolver.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/resolver.c (original)
+++ incubator/celix/trunk/framework/private/src/resolver.c Wed Jun 12 19:08:50 2013
@@ -34,36 +34,36 @@
 
 struct capabilityList {
 	char * serviceName;
-	linked_list_t capabilities;
+	linked_list_pt capabilities;
 };
 
-typedef struct capabilityList * capability_t_LIST;
+typedef struct capabilityList * capability_list_pt;
 
 struct candidateSet {
-	module_t module;
-	requirement_t requirement;
-	linked_list_t candidates;
+	module_pt module;
+	requirement_pt requirement;
+	linked_list_pt candidates;
 };
 
-typedef struct candidateSet * CANDIDATE_SET;
+typedef struct candidateSet * candidate_set_pt;
 
 // List containing module_ts
-linked_list_t m_modules = NULL;
+linked_list_pt m_modules = NULL;
 // List containing capability_t_LISTs
-linked_list_t m_unresolvedServices = NULL;
+linked_list_pt m_unresolvedServices = NULL;
 // List containing capability_t_LISTs
-linked_list_t m_resolvedServices = NULL;
+linked_list_pt m_resolvedServices = NULL;
 
-int resolver_populateCandidatesMap(hash_map_t candidatesMap, module_t targetModule);
-capability_t_LIST resolver_getCapabilityList(linked_list_t list, char * name);
-void resolver_removeInvalidCandidate(module_t module, hash_map_t candidates, linked_list_t invalid);
-hash_map_t resolver_populateWireMap(hash_map_t candidates, module_t importer, hash_map_t wireMap);
-
-hash_map_t resolver_resolve(module_t root) {
-	hash_map_t candidatesMap = NULL;
-	hash_map_t wireMap = NULL;
-	hash_map_t resolved = NULL;
-	hash_map_iterator_t iter = NULL;
+int resolver_populateCandidatesMap(hash_map_pt candidatesMap, module_pt targetModule);
+capability_list_pt resolver_getCapabilityList(linked_list_pt list, char * name);
+void resolver_removeInvalidCandidate(module_pt module, hash_map_pt candidates, linked_list_pt invalid);
+hash_map_pt resolver_populateWireMap(hash_map_pt candidates, module_pt importer, hash_map_pt wireMap);
+
+hash_map_pt resolver_resolve(module_pt root) {
+	hash_map_pt candidatesMap = NULL;
+	hash_map_pt wireMap = NULL;
+	hash_map_pt resolved = NULL;
+	hash_map_iterator_pt iter = NULL;
 
 	if (module_isResolved(root)) {
 	    printf("already resolved\n");
@@ -73,16 +73,16 @@ hash_map_t resolver_resolve(module_t roo
 	candidatesMap = hashMap_create(NULL, NULL, NULL, NULL);
 
 	if (resolver_populateCandidatesMap(candidatesMap, root) != 0) {
-		hash_map_iterator_t iter = hashMapIterator_create(candidatesMap);
+		hash_map_iterator_pt iter = hashMapIterator_create(candidatesMap);
 		while (hashMapIterator_hasNext(iter)) {
-			hash_map_entry_t entry = hashMapIterator_nextEntry(iter);
-			module_t key = hashMapEntry_getKey(entry);
-			linked_list_t value = hashMapEntry_getValue(entry);
+			hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+			module_pt key = hashMapEntry_getKey(entry);
+			linked_list_pt value = hashMapEntry_getValue(entry);
 			hashMapIterator_remove(iter);
 			if (value != NULL) {
-				linked_list_iterator_t candSetIter = linkedListIterator_create(value, 0);
+				linked_list_iterator_pt candSetIter = linkedListIterator_create(value, 0);
 				while (linkedListIterator_hasNext(candSetIter)) {
-					CANDIDATE_SET set = linkedListIterator_next(candSetIter);
+					candidate_set_pt set = linkedListIterator_next(candSetIter);
 					free(set);
 					linkedListIterator_remove(candSetIter);
 				}
@@ -98,14 +98,14 @@ hash_map_t resolver_resolve(module_t roo
 	resolved = resolver_populateWireMap(candidatesMap, root, wireMap);
 	iter = hashMapIterator_create(candidatesMap);
 	while (hashMapIterator_hasNext(iter)) {
-		hash_map_entry_t entry = hashMapIterator_nextEntry(iter);
-		module_t key = hashMapEntry_getKey(entry);
-		linked_list_t value = hashMapEntry_getValue(entry);
+		hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+		module_pt key = hashMapEntry_getKey(entry);
+		linked_list_pt value = hashMapEntry_getValue(entry);
 		hashMapIterator_remove(iter);
 		if (value != NULL) {
-			linked_list_iterator_t candSetIter = linkedListIterator_create(value, 0);
+			linked_list_iterator_pt candSetIter = linkedListIterator_create(value, 0);
 			while (linkedListIterator_hasNext(candSetIter)) {
-				CANDIDATE_SET set = linkedListIterator_next(candSetIter);
+				candidate_set_pt set = linkedListIterator_next(candSetIter);
 				free(set);
 			}
 			linkedListIterator_destroy(candSetIter);
@@ -116,19 +116,19 @@ hash_map_t resolver_resolve(module_t roo
 	return resolved;
 }
 
-int resolver_populateCandidatesMap(hash_map_t candidatesMap, module_t targetModule) {
-    linked_list_t candSetList;
+int resolver_populateCandidatesMap(hash_map_pt candidatesMap, module_pt targetModule) {
+    linked_list_pt candSetList;
 	apr_pool_t *candSetList_pool;
-    linked_list_t candidates;
+    linked_list_pt candidates;
     apr_pool_t *candidates_pool;
-    linked_list_t invalid;
+    linked_list_pt invalid;
     apr_pool_t *invalid_pool;
     int i;
     int c;
-    requirement_t req;
-    capability_t_LIST capList;
+    requirement_pt req;
+    capability_list_pt capList;
     apr_pool_t *bundlePool = NULL;
-    bundle_t bundle = NULL;
+    bundle_pt bundle = NULL;
 
     bundle = module_getBundle(targetModule);
     bundle_getMemoryPool(bundle, &bundlePool);
@@ -144,14 +144,14 @@ int resolver_populateCandidatesMap(hash_
 	    if (linkedList_create(candSetList_pool, &candSetList) == CELIX_SUCCESS) {
             for (i = 0; i < linkedList_size(module_getRequirements(targetModule)); i++) {
             	char *targetName = NULL;
-                req = (requirement_t) linkedList_get(module_getRequirements(targetModule), i);
+                req = (requirement_pt) linkedList_get(module_getRequirements(targetModule), i);
                 requirement_getTargetName(req, &targetName);
                 capList = resolver_getCapabilityList(m_resolvedServices, targetName);
 
                 if (apr_pool_create(&candidates_pool, bundlePool) == APR_SUCCESS) {
                     if (linkedList_create(candidates_pool, &candidates) == CELIX_SUCCESS) {
                         for (c = 0; (capList != NULL) && (c < linkedList_size(capList->capabilities)); c++) {
-                            capability_t cap = (capability_t) linkedList_get(capList->capabilities, c);
+                            capability_pt cap = (capability_pt) linkedList_get(capList->capabilities, c);
                             bool satisfied = false;
                             requirement_isSatisfied(req, cap, &satisfied);
                             if (satisfied) {
@@ -160,7 +160,7 @@ int resolver_populateCandidatesMap(hash_
                         }
                         capList = resolver_getCapabilityList(m_unresolvedServices, targetName);
                         for (c = 0; (capList != NULL) && (c < linkedList_size(capList->capabilities)); c++) {
-                            capability_t cap = (capability_t) linkedList_get(capList->capabilities, c);
+                            capability_pt cap = (capability_pt) linkedList_get(capList->capabilities, c);
                             bool satisfied = false;
                             requirement_isSatisfied(req, cap, &satisfied);
                             if (satisfied) {
@@ -169,10 +169,10 @@ int resolver_populateCandidatesMap(hash_
                         }
 
                         if (linkedList_size(candidates) > 0) {
-                            linked_list_iterator_t iterator = NULL;
+                            linked_list_iterator_pt iterator = NULL;
                             for (iterator = linkedListIterator_create(candidates, 0); linkedListIterator_hasNext(iterator); ) {
-                                capability_t candidate = (capability_t) linkedListIterator_next(iterator);
-                            	module_t module = NULL;
+                                capability_pt candidate = (capability_pt) linkedListIterator_next(iterator);
+                            	module_pt module = NULL;
                             	capability_getModule(candidate, &module);
                                 if (!module_isResolved(module)) {
                                     if (resolver_populateCandidatesMap(candidatesMap, module) != 0) {
@@ -198,7 +198,7 @@ int resolver_populateCandidatesMap(hash_
                             }
                             return -1;
                         } else if (linkedList_size(candidates) > 0) {
-                            CANDIDATE_SET cs = (CANDIDATE_SET) malloc(sizeof(*cs));
+                            candidate_set_pt cs = (candidate_set_pt) malloc(sizeof(*cs));
                             cs->candidates = candidates;
                             cs->module = targetModule;
                             cs->requirement = req;
@@ -214,22 +214,22 @@ int resolver_populateCandidatesMap(hash_
 	return 0;
 }
 
-void resolver_removeInvalidCandidate(module_t invalidModule, hash_map_t candidates, linked_list_t invalid) {
-	hash_map_iterator_t iterator;
+void resolver_removeInvalidCandidate(module_pt invalidModule, hash_map_pt candidates, linked_list_pt invalid) {
+	hash_map_iterator_pt iterator;
 	hashMap_remove(candidates, invalidModule);
 	
 	for (iterator = hashMapIterator_create(candidates); hashMapIterator_hasNext(iterator); ) {
-		hash_map_entry_t entry = hashMapIterator_nextEntry(iterator);
-		module_t module = (module_t) hashMapEntry_getKey(entry);
-		linked_list_t candSetList = (linked_list_t) hashMapEntry_getValue(entry);
+		hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
+		module_pt module = (module_pt) hashMapEntry_getKey(entry);
+		linked_list_pt candSetList = (linked_list_pt) hashMapEntry_getValue(entry);
 		if (candSetList != NULL) {
-			linked_list_iterator_t itCandSetList;
+			linked_list_iterator_pt itCandSetList;
 			for (itCandSetList = linkedListIterator_create(candSetList, 0); linkedListIterator_hasNext(itCandSetList); ) {
-				CANDIDATE_SET set = (CANDIDATE_SET) linkedListIterator_next(itCandSetList);
-				linked_list_iterator_t candIter;
+				candidate_set_pt set = (candidate_set_pt) linkedListIterator_next(itCandSetList);
+				linked_list_iterator_pt candIter;
 				for (candIter = linkedListIterator_create(set->candidates, 0); linkedListIterator_hasNext(candIter); ) {
-					capability_t candCap = (capability_t) linkedListIterator_next(candIter);
-					module_t module = NULL;
+					capability_pt candCap = (capability_pt) linkedListIterator_next(candIter);
+					module_pt module = NULL;
 					capability_getModule(candCap, &module);
 					if (module == invalidModule) {
 						linkedListIterator_remove(candIter);
@@ -249,22 +249,22 @@ void resolver_removeInvalidCandidate(mod
 
 	if (linkedList_size(invalid) > 0) {
 		while (!linkedList_isEmpty(invalid)) {
-			module_t m = (module_t) linkedList_removeIndex(invalid, 0);
+			module_pt m = (module_pt) linkedList_removeIndex(invalid, 0);
 			resolver_removeInvalidCandidate(m, candidates, invalid);
 		}
 	}
 }
 
-void resolver_addModule(module_t module) {
+void resolver_addModule(module_pt module) {
     apr_pool_t *modules_pool;
     apr_pool_t *unresolvedServices_pool;
     apr_pool_t *resolvedServices_pool;
     int i;
-    capability_t cap;
-    capability_t_LIST list;
+    capability_pt cap;
+    capability_list_pt list;
     apr_pool_t *capabilities_pool;
     apr_pool_t *bundlePool = NULL;
-	bundle_t bundle = NULL;
+	bundle_pt bundle = NULL;
 
 	bundle = module_getBundle(module);
 	bundle_getMemoryPool(bundle, &bundlePool);
@@ -286,12 +286,12 @@ void resolver_addModule(module_t module)
 
         for (i = 0; i < linkedList_size(module_getCapabilities(module)); i++) {
 			char *serviceName = NULL;
-            cap = (capability_t) linkedList_get(module_getCapabilities(module), i);
+            cap = (capability_pt) linkedList_get(module_getCapabilities(module), i);
             capability_getServiceName(cap, &serviceName);
             list = resolver_getCapabilityList(m_unresolvedServices, serviceName);
             if (list == NULL) {
                 if (apr_pool_create(&capabilities_pool, bundlePool) == APR_SUCCESS) {
-                    list = (capability_t_LIST) apr_palloc(capabilities_pool, sizeof(*list));
+                    list = (capability_list_pt) apr_palloc(capabilities_pool, sizeof(*list));
                     if (list != NULL) {
                         list->serviceName = apr_pstrdup(capabilities_pool, serviceName);
                         if (linkedList_create(capabilities_pool, &list->capabilities) == APR_SUCCESS) {
@@ -305,17 +305,17 @@ void resolver_addModule(module_t module)
 	}
 }
 
-void resolver_removeModule(module_t module) {
-    linked_list_t caps = NULL;
+void resolver_removeModule(module_pt module) {
+    linked_list_pt caps = NULL;
 	linkedList_removeElement(m_modules, module);
     caps = module_getCapabilities(module);
     if (caps != NULL)
     {
         int i = 0;
         for (i = 0; i < linkedList_size(caps); i++) {
-            capability_t cap = (capability_t) linkedList_get(caps, i);
+            capability_pt cap = (capability_pt) linkedList_get(caps, i);
             char *serviceName = NULL;
-			capability_t_LIST list;
+			capability_list_pt list;
 			capability_getServiceName(cap, &serviceName);
             list = resolver_getCapabilityList(m_unresolvedServices, serviceName);
             if (list != NULL) {
@@ -329,13 +329,13 @@ void resolver_removeModule(module_t modu
     }
 }
 
-void resolver_moduleResolved(module_t module) {
+void resolver_moduleResolved(module_pt module) {
     int capIdx;
-    linked_list_t capsCopy;
+    linked_list_pt capsCopy;
     apr_pool_t *capsCopy_pool;
     apr_pool_t *capabilities_pool;
     apr_pool_t *bundlePool = NULL;
-	bundle_t bundle = NULL;
+	bundle_pt bundle = NULL;
 
 	bundle = module_getBundle(module);
 	bundle_getMemoryPool(bundle, &bundlePool);
@@ -343,12 +343,12 @@ void resolver_moduleResolved(module_t mo
 	if (module_isResolved(module)) {
 	    if (apr_pool_create(&capsCopy_pool, bundlePool) == APR_SUCCESS) {
 	        if (linkedList_create(capsCopy_pool, &capsCopy) == APR_SUCCESS) {
-                linked_list_t wires = NULL;
+                linked_list_pt wires = NULL;
 
 				for (capIdx = 0; (module_getCapabilities(module) != NULL) && (capIdx < linkedList_size(module_getCapabilities(module))); capIdx++) {
-                    capability_t cap = (capability_t) linkedList_get(module_getCapabilities(module), capIdx);
+                    capability_pt cap = (capability_pt) linkedList_get(module_getCapabilities(module), capIdx);
                     char *serviceName = NULL;
-					capability_t_LIST list;
+					capability_list_pt list;
 					capability_getServiceName(cap, &serviceName);
                     list = resolver_getCapabilityList(m_unresolvedServices, serviceName);
                     linkedList_removeElement(list->capabilities, cap);
@@ -358,12 +358,12 @@ void resolver_moduleResolved(module_t mo
 
                 wires = module_getWires(module);
                 for (capIdx = 0; (capsCopy != NULL) && (capIdx < linkedList_size(capsCopy)); capIdx++) {
-                    capability_t cap = linkedList_get(capsCopy, capIdx);
+                    capability_pt cap = linkedList_get(capsCopy, capIdx);
 
                     int wireIdx = 0;
                     for (wireIdx = 0; (wires != NULL) && (wireIdx < linkedList_size(wires)); wireIdx++) {
-                        wire_t wire = (wire_t) linkedList_get(wires, wireIdx);
-                        requirement_t req = NULL;
+                        wire_pt wire = (wire_pt) linkedList_get(wires, wireIdx);
+                        requirement_pt req = NULL;
                         bool satisfied = false;
                         wire_getRequirement(wire, &req);
 						requirement_isSatisfied(req, cap, &satisfied);
@@ -375,17 +375,17 @@ void resolver_moduleResolved(module_t mo
                 }
 
                 for (capIdx = 0; (capsCopy != NULL) && (capIdx < linkedList_size(capsCopy)); capIdx++) {
-                    capability_t cap = linkedList_get(capsCopy, capIdx);
+                    capability_pt cap = linkedList_get(capsCopy, capIdx);
 
                     if (cap != NULL) {
                     	char *serviceName = NULL;
-						capability_t_LIST list;
+						capability_list_pt list;
 						capability_getServiceName(cap, &serviceName);
 
                         list = resolver_getCapabilityList(m_resolvedServices, serviceName);
                         if (list == NULL) {
                             if (apr_pool_create(&capabilities_pool, bundlePool) == APR_SUCCESS) {
-                                list = (capability_t_LIST) apr_palloc(capabilities_pool, sizeof(*list));
+                                list = (capability_list_pt) apr_palloc(capabilities_pool, sizeof(*list));
                                 if (list != NULL) {
                                     list->serviceName = apr_pstrdup(capabilities_pool, serviceName);
                                     if (linkedList_create(capabilities_pool, &list->capabilities) == APR_SUCCESS) {
@@ -404,11 +404,11 @@ void resolver_moduleResolved(module_t mo
 	}
 }
 
-capability_t_LIST resolver_getCapabilityList(linked_list_t list, char * name) {
-	capability_t_LIST capabilityList = NULL;
-	linked_list_iterator_t iterator = linkedListIterator_create(list, 0);
+capability_list_pt resolver_getCapabilityList(linked_list_pt list, char * name) {
+	capability_list_pt capabilityList = NULL;
+	linked_list_iterator_pt iterator = linkedListIterator_create(list, 0);
 	while (linkedListIterator_hasNext(iterator)) {
-		capability_t_LIST services = (capability_t_LIST) linkedListIterator_next(iterator);
+		capability_list_pt services = (capability_list_pt) linkedListIterator_next(iterator);
 		if (strcmp(services->serviceName, name) == 0) {
 			capabilityList = services;
 			break;
@@ -418,24 +418,24 @@ capability_t_LIST resolver_getCapability
 	return capabilityList;
 }
 
-hash_map_t resolver_populateWireMap(hash_map_t candidates, module_t importer, hash_map_t wireMap) {
-    linked_list_t serviceWires;
+hash_map_pt resolver_populateWireMap(hash_map_pt candidates, module_pt importer, hash_map_pt wireMap) {
+    linked_list_pt serviceWires;
     apr_pool_t *serviceWires_pool;
-    linked_list_t emptyWires;
+    linked_list_pt emptyWires;
     apr_pool_t *emptyWires_pool;
     apr_pool_t *bundlePool = NULL;
-	bundle_t bundle = NULL;
+	bundle_pt bundle = NULL;
 
 	bundle = module_getBundle(importer);
 	bundle_getMemoryPool(bundle, &bundlePool);
 
     if (candidates && importer && wireMap) {
-        linked_list_t candSetList = NULL;
+        linked_list_pt candSetList = NULL;
 		if (module_isResolved(importer) || (hashMap_get(wireMap, importer))) {
             return wireMap;
         }
 
-        candSetList = (linked_list_t) hashMap_get(candidates, importer);
+        candSetList = (linked_list_pt) hashMap_get(candidates, importer);
 
         if (apr_pool_create(&serviceWires_pool, bundlePool) == APR_SUCCESS) {
             if (apr_pool_create(&emptyWires_pool, bundlePool) == APR_SUCCESS) {
@@ -446,15 +446,15 @@ hash_map_t resolver_populateWireMap(hash
 						hashMap_put(wireMap, importer, emptyWires);
                         
                         for (candSetIdx = 0; candSetIdx < linkedList_size(candSetList); candSetIdx++) {
-                            CANDIDATE_SET cs = (CANDIDATE_SET) linkedList_get(candSetList, candSetIdx);
+                            candidate_set_pt cs = (candidate_set_pt) linkedList_get(candSetList, candSetIdx);
 
-                            module_t module = NULL;
-                            capability_getModule(((capability_t) linkedList_get(cs->candidates, 0)), &module);
+                            module_pt module = NULL;
+                            capability_getModule(((capability_pt) linkedList_get(cs->candidates, 0)), &module);
                             if (importer != module) {
-                                wire_t wire = NULL;
+                                wire_pt wire = NULL;
                                 wire_create(serviceWires_pool, importer, cs->requirement,
                                         module,
-                                        ((capability_t) linkedList_get(cs->candidates, 0)), &wire);
+                                        ((capability_pt) linkedList_get(cs->candidates, 0)), &wire);
                                 linkedList_addElement(serviceWires, wire);
                             }
 

Modified: incubator/celix/trunk/framework/private/src/service_reference.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/service_reference.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_reference.c (original)
+++ incubator/celix/trunk/framework/private/src/service_reference.c Wed Jun 12 19:08:50 2013
@@ -34,13 +34,13 @@
 #include "bundle.h"
 
 struct serviceReference {
-	bundle_t bundle;
+	bundle_pt bundle;
 	struct serviceRegistration * registration;
 };
 
 apr_status_t serviceReference_destroy(void *referenceP);
 
-celix_status_t serviceReference_create(apr_pool_t *pool, bundle_t bundle, service_registration_t registration, service_reference_t *reference) {
+celix_status_t serviceReference_create(apr_pool_t *pool, bundle_pt bundle, service_registration_pt registration, service_reference_pt *reference) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	*reference = apr_palloc(pool, sizeof(**reference));
@@ -57,36 +57,36 @@ celix_status_t serviceReference_create(a
 }
 
 apr_status_t serviceReference_destroy(void *referenceP) {
-	service_reference_t reference = referenceP;
+	service_reference_pt reference = referenceP;
 	reference->bundle = NULL;
 	reference->registration = NULL;
 	return APR_SUCCESS;
 }
 
-celix_status_t serviceReference_getBundle(service_reference_t reference, bundle_t *bundle) {
+celix_status_t serviceReference_getBundle(service_reference_pt reference, bundle_pt *bundle) {
 	*bundle = reference->bundle;
 	return CELIX_SUCCESS;
 }
 
-celix_status_t serviceReference_getServiceRegistration(service_reference_t reference, service_registration_t *registration) {
+celix_status_t serviceReference_getServiceRegistration(service_reference_pt reference, service_registration_pt *registration) {
 	*registration = reference->registration;
 	return CELIX_SUCCESS;
 }
 
-celix_status_t serviceReference_invalidate(service_reference_t reference) {
+celix_status_t serviceReference_invalidate(service_reference_pt reference) {
 	reference->registration = NULL;
 	return CELIX_SUCCESS;
 }
 
-bool serviceReference_isAssignableTo(service_reference_t reference, bundle_t requester, char * serviceName) {
+bool serviceReference_isAssignableTo(service_reference_pt reference, bundle_pt requester, char * serviceName) {
 	bool allow = true;
 
-	bundle_t provider = reference->bundle;
+	bundle_pt provider = reference->bundle;
 	if (requester == provider) {
 		return allow;
 	}
-//	wire_t providerWire = module_getWire(bundle_getCurrentModule(provider), serviceName);
-//	wire_t requesterWire = module_getWire(bundle_getCurrentModule(requester), serviceName);
+//	wire_pt providerWire = module_getWire(bundle_getCurrentModule(provider), serviceName);
+//	wire_pt requesterWire = module_getWire(bundle_getCurrentModule(requester), serviceName);
 //
 //	if (providerWire == NULL && requesterWire != NULL) {
 //		allow = (bundle_getCurrentModule(provider) == wire_getExporter(requesterWire));
@@ -101,10 +101,10 @@ bool serviceReference_isAssignableTo(ser
 	return allow;
 }
 
-celix_status_t serviceReference_getUsingBundles(service_reference_t reference, apr_pool_t *pool, array_list_t *bundles) {
+celix_status_t serviceReference_getUsingBundles(service_reference_pt reference, apr_pool_t *pool, array_list_pt *bundles) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	service_registry_t registry = NULL;
+	service_registry_pt registry = NULL;
 	serviceRegistration_getRegistry(reference->registration, &registry);
 
 	*bundles = serviceRegistry_getUsingBundles(registry, pool, reference);
@@ -112,7 +112,7 @@ celix_status_t serviceReference_getUsing
 	return status;
 }
 
-celix_status_t serviceReference_equals(service_reference_t reference, service_reference_t compareTo, bool *equal) {
+celix_status_t serviceReference_equals(service_reference_pt reference, service_reference_pt compareTo, bool *equal) {
 	*equal = (reference->registration == compareTo->registration);
 	return CELIX_SUCCESS;
 }
@@ -124,7 +124,7 @@ int serviceReference_equals2(void *refer
 }
 
 unsigned int serviceReference_hashCode(void *referenceP) {
-	service_reference_t reference = referenceP;
+	service_reference_pt reference = referenceP;
 	int prime = 31;
 	int result = 1;
 	result = prime * result;

Modified: incubator/celix/trunk/framework/private/src/service_registration.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/service_registration.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_registration.c (original)
+++ incubator/celix/trunk/framework/private/src/service_registration.c Wed Jun 12 19:08:50 2013
@@ -40,11 +40,11 @@ struct service {
 };
 
 struct serviceRegistration {
-	service_registry_t registry;
+	service_registry_pt registry;
 	char * className;
-	array_list_t references;
-	bundle_t bundle;
-	properties_t properties;
+	array_list_pt references;
+	bundle_pt bundle;
+	properties_pt properties;
 	void * svcObj;
 	long serviceId;
 
@@ -58,28 +58,28 @@ struct serviceRegistration {
 	int nrOfServices;
 };
 
-static celix_status_t serviceRegistration_initializeProperties(service_registration_t registration, properties_t properties);
+static celix_status_t serviceRegistration_initializeProperties(service_registration_pt registration, properties_pt properties);
 
-celix_status_t serviceRegistration_createInternal(apr_pool_t *pool, service_registry_t registry, bundle_t bundle, char * serviceName, long serviceId,
-        void * serviceObject, properties_t dictionary, bool isFactory, service_registration_t *registration);
+celix_status_t serviceRegistration_createInternal(apr_pool_t *pool, service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId,
+        void * serviceObject, properties_pt dictionary, bool isFactory, service_registration_pt *registration);
 
-service_registration_t serviceRegistration_create(apr_pool_t *pool, service_registry_t registry, bundle_t bundle, char * serviceName, long serviceId, void * serviceObject, properties_t dictionary) {
-    service_registration_t registration = NULL;
+service_registration_pt serviceRegistration_create(apr_pool_t *pool, service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId, void * serviceObject, properties_pt dictionary) {
+    service_registration_pt registration = NULL;
 	serviceRegistration_createInternal(pool, registry, bundle, serviceName, serviceId, serviceObject, dictionary, false, &registration);
 	return registration;
 }
 
-service_registration_t serviceRegistration_createServiceFactory(apr_pool_t *pool, service_registry_t registry, bundle_t bundle, char * serviceName, long serviceId, void * serviceObject, properties_t dictionary) {
-    service_registration_t registration = NULL;
+service_registration_pt serviceRegistration_createServiceFactory(apr_pool_t *pool, service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId, void * serviceObject, properties_pt dictionary) {
+    service_registration_pt registration = NULL;
     serviceRegistration_createInternal(pool, registry, bundle, serviceName, serviceId, serviceObject, dictionary, true, &registration);
     return registration;
 }
 
-celix_status_t serviceRegistration_createInternal(apr_pool_t *pool, service_registry_t registry, bundle_t bundle, char * serviceName, long serviceId,
-        void * serviceObject, properties_t dictionary, bool isFactory, service_registration_t *registration) {
+celix_status_t serviceRegistration_createInternal(apr_pool_t *pool, service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId,
+        void * serviceObject, properties_pt dictionary, bool isFactory, service_registration_pt *registration) {
     celix_status_t status = CELIX_SUCCESS;
 
-    *registration = (service_registration_t) apr_palloc(pool, sizeof(**registration));
+    *registration = (service_registration_pt) apr_palloc(pool, sizeof(**registration));
     (*registration)->isServiceFactory = isFactory;
     (*registration)->registry = registry;
     (*registration)->className = apr_pstrdup(pool,serviceName);
@@ -90,7 +90,7 @@ celix_status_t serviceRegistration_creat
 	(*registration)->serviceId = serviceId;
 	(*registration)->svcObj = serviceObject;
 	if (isFactory) {
-	    (*registration)->serviceFactory = (service_factory_t) (*registration)->svcObj;
+	    (*registration)->serviceFactory = (service_factory_pt) (*registration)->svcObj;
 	} else {
 	    (*registration)->serviceFactory = NULL;
 	}
@@ -105,7 +105,7 @@ celix_status_t serviceRegistration_creat
 	return CELIX_SUCCESS;
 }
 
-void serviceRegistration_destroy(service_registration_t registration) {
+void serviceRegistration_destroy(service_registration_pt registration) {
 	registration->className = NULL;
 	registration->registry = NULL;
 
@@ -117,7 +117,7 @@ void serviceRegistration_destroy(service
 //	free(registration);
 }
 
-static celix_status_t serviceRegistration_initializeProperties(service_registration_t registration, properties_t dictionary) {
+static celix_status_t serviceRegistration_initializeProperties(service_registration_pt registration, properties_pt dictionary) {
 	char * sId = (char *)malloc(sizeof(registration->serviceId) + 1);
 
 	if (dictionary == NULL) {
@@ -134,17 +134,17 @@ static celix_status_t serviceRegistratio
 	return CELIX_SUCCESS;
 }
 
-bool serviceRegistration_isValid(service_registration_t registration) {
+bool serviceRegistration_isValid(service_registration_pt registration) {
 	return registration == NULL ? false : registration->svcObj != NULL;
 }
 
-void serviceRegistration_invalidate(service_registration_t registration) {
+void serviceRegistration_invalidate(service_registration_pt registration) {
 	apr_thread_mutex_lock(registration->mutex);
 	registration->svcObj = NULL;
 	apr_thread_mutex_unlock(registration->mutex);
 }
 
-celix_status_t serviceRegistration_unregister(service_registration_t registration) {
+celix_status_t serviceRegistration_unregister(service_registration_pt registration) {
 	celix_status_t status = CELIX_SUCCESS;
 	apr_thread_mutex_lock(registration->mutex);
 	if (!serviceRegistration_isValid(registration) || registration->isUnregistering) {
@@ -155,7 +155,7 @@ celix_status_t serviceRegistration_unreg
 	}
 	apr_thread_mutex_unlock(registration->mutex);
 
-//	bundle_t bundle = NULL;
+//	bundle_pt bundle = NULL;
 //	status = serviceReference_getBundle(registration->reference, &bundle);
 	if (status == CELIX_SUCCESS) {
 		serviceRegistry_unregisterService(registration->registry, registration->bundle, registration);
@@ -164,9 +164,9 @@ celix_status_t serviceRegistration_unreg
 	return status;
 }
 
-celix_status_t serviceRegistration_getService(service_registration_t registration, bundle_t bundle, void **service) {
+celix_status_t serviceRegistration_getService(service_registration_pt registration, bundle_pt bundle, void **service) {
     if (registration->isServiceFactory) {
-        service_factory_t factory = registration->serviceFactory;
+        service_factory_pt factory = registration->serviceFactory;
         factory->getService(registration->serviceFactory, bundle, registration, service);
     } else {
         (*service) = registration->svcObj;
@@ -174,7 +174,7 @@ celix_status_t serviceRegistration_getSe
     return CELIX_SUCCESS;
 }
 
-celix_status_t serviceRegistration_getProperties(service_registration_t registration, properties_t *properties) {
+celix_status_t serviceRegistration_getProperties(service_registration_pt registration, properties_pt *properties) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (registration != NULL && *properties == NULL) {
@@ -186,8 +186,8 @@ celix_status_t serviceRegistration_getPr
 	return status;
 }
 
-celix_status_t serviceRegistration_setProperties(service_registration_t registration, properties_t properties) {
-	properties_t oldProps = registration->properties;
+celix_status_t serviceRegistration_setProperties(service_registration_pt registration, properties_pt properties) {
+	properties_pt oldProps = registration->properties;
 
 	serviceRegistration_initializeProperties(registration, properties);
 
@@ -196,7 +196,7 @@ celix_status_t serviceRegistration_setPr
 	return CELIX_SUCCESS;
 }
 
-celix_status_t serviceRegistration_getRegistry(service_registration_t registration, service_registry_t *registry) {
+celix_status_t serviceRegistration_getRegistry(service_registration_pt registration, service_registry_pt *registry) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (registration != NULL && *registry == NULL) {
@@ -208,7 +208,7 @@ celix_status_t serviceRegistration_getRe
 	return status;
 }
 
-celix_status_t serviceRegistration_getServiceReferences(service_registration_t registration, array_list_t *references) {
+celix_status_t serviceRegistration_getServiceReferences(service_registration_pt registration, array_list_pt *references) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (registration != NULL && *references == NULL) {
@@ -220,7 +220,7 @@ celix_status_t serviceRegistration_getSe
 	return status;
 }
 
-celix_status_t serviceRegistration_getBundle(service_registration_t registration, bundle_t *bundle) {
+celix_status_t serviceRegistration_getBundle(service_registration_pt registration, bundle_pt *bundle) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (registration != NULL && *bundle == NULL) {
@@ -232,7 +232,7 @@ celix_status_t serviceRegistration_getBu
 	return status;
 }
 
-celix_status_t serviceRegistration_getServiceName(service_registration_t registration, char **serviceName) {
+celix_status_t serviceRegistration_getServiceName(service_registration_pt registration, char **serviceName) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (registration != NULL && *serviceName == NULL) {

Modified: incubator/celix/trunk/framework/private/src/service_registry.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/service_registry.c?rev=1492377&r1=1492376&r2=1492377&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_registry.c (original)
+++ incubator/celix/trunk/framework/private/src/service_registry.c Wed Jun 12 19:08:50 2013
@@ -36,37 +36,37 @@
 #include "framework.h"
 
 struct serviceRegistry {
-    framework_t framework;
-	hash_map_t serviceRegistrations;
-	hash_map_t serviceReferences;
-	hash_map_t inUseMap;
-	void (*serviceChanged)(framework_t, service_event_type_e, service_registration_t, properties_t);
+    framework_pt framework;
+	hash_map_pt serviceRegistrations;
+	hash_map_pt serviceReferences;
+	hash_map_pt inUseMap;
+	void (*serviceChanged)(framework_pt, service_event_type_e, service_registration_pt, properties_pt);
 	long currentServiceId;
 
-	array_list_t listenerHooks;
+	array_list_pt listenerHooks;
 
 	apr_thread_mutex_t * mutex;
 };
 
 struct usageCount {
 	unsigned int count;
-	service_reference_t reference;
+	service_reference_pt reference;
 	void * service;
 };
 
-typedef struct usageCount * USAGE_COUNT;
+typedef struct usageCount * usage_count_pt;
 
-celix_status_t serviceRegistry_registerServiceInternal(service_registry_t registry, bundle_t bundle, char * serviceName, void * serviceObject, properties_t dictionary, bool isFactory, service_registration_t *registration);
-celix_status_t serviceRegistry_addHooks(service_registry_t registry, char *serviceName, void *serviceObject, service_registration_t registration);
-celix_status_t serviceRegistry_removeHook(service_registry_t registry, service_registration_t registration);
+celix_status_t serviceRegistry_registerServiceInternal(service_registry_pt registry, bundle_pt bundle, char * serviceName, void * serviceObject, properties_pt dictionary, bool isFactory, service_registration_pt *registration);
+celix_status_t serviceRegistry_addHooks(service_registry_pt registry, char *serviceName, void *serviceObject, service_registration_pt registration);
+celix_status_t serviceRegistry_removeHook(service_registry_pt registry, service_registration_pt registration);
 
 apr_status_t serviceRegistry_removeReference(void *referenceP);
 
-USAGE_COUNT serviceRegistry_getUsageCount(service_registry_t registry, bundle_t bundle, service_reference_t reference) {
-	array_list_t usages = (array_list_t) hashMap_get(registry->inUseMap, bundle);
+usage_count_pt serviceRegistry_getUsageCount(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference) {
+	array_list_pt usages = (array_list_pt) hashMap_get(registry->inUseMap, bundle);
 	unsigned int i;
 	for (i = 0; (usages != NULL) && (i < arrayList_size(usages)); i++) {
-		USAGE_COUNT usage = (USAGE_COUNT) arrayList_get(usages, i);
+		usage_count_pt usage = (usage_count_pt) arrayList_get(usages, i);
 		if (usage->reference == reference) {
 			return usage;
 		}
@@ -74,15 +74,15 @@ USAGE_COUNT serviceRegistry_getUsageCoun
 	return NULL;
 }
 
-USAGE_COUNT serviceRegistry_addUsageCount(service_registry_t registry, bundle_t bundle, service_reference_t reference) {
-	array_list_t usages = hashMap_get(registry->inUseMap, bundle);
-	USAGE_COUNT usage = (USAGE_COUNT) malloc(sizeof(*usage));
+usage_count_pt serviceRegistry_addUsageCount(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference) {
+	array_list_pt usages = hashMap_get(registry->inUseMap, bundle);
+	usage_count_pt usage = (usage_count_pt) malloc(sizeof(*usage));
 	usage->reference = reference;
 	usage->count = 0;
 	usage->service = NULL;
 
 	if (usages == NULL) {
-		module_t mod = NULL;
+		module_pt mod = NULL;
 		apr_pool_t *pool = NULL;
 		bundle_getMemoryPool(bundle, &pool);
 		arrayList_create(pool, &usages);
@@ -93,12 +93,12 @@ USAGE_COUNT serviceRegistry_addUsageCoun
 	return usage;
 }
 
-void serviceRegistry_flushUsageCount(service_registry_t registry, bundle_t bundle, service_reference_t reference) {
-	array_list_t usages = hashMap_get(registry->inUseMap, bundle);
+void serviceRegistry_flushUsageCount(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference) {
+	array_list_pt usages = hashMap_get(registry->inUseMap, bundle);
 	if (usages != NULL) {
-		array_list_iterator_t iter = arrayListIterator_create(usages);
+		array_list_iterator_pt iter = arrayListIterator_create(usages);
 		while (arrayListIterator_hasNext(iter)) {
-			USAGE_COUNT usage = arrayListIterator_next(iter);
+			usage_count_pt usage = arrayListIterator_next(iter);
 			if (usage->reference == reference) {
 				arrayListIterator_remove(iter);
 				free(usage);
@@ -108,18 +108,18 @@ void serviceRegistry_flushUsageCount(ser
 		if (arrayList_size(usages) > 0) {
 			hashMap_put(registry->inUseMap, bundle, usages);
 		} else {
-			array_list_t removed = hashMap_remove(registry->inUseMap, bundle);
+			array_list_pt removed = hashMap_remove(registry->inUseMap, bundle);
 			arrayList_destroy(removed);
 		}
 	}
 }
 
-service_registry_t serviceRegistry_create(framework_t framework, void (*serviceChanged)(framework_t, service_event_type_e, service_registration_t, properties_t)) {
-	service_registry_t registry;
+service_registry_pt serviceRegistry_create(framework_pt framework, void (*serviceChanged)(framework_pt, service_event_type_e, service_registration_pt, properties_pt)) {
+	service_registry_pt registry;
 	apr_pool_t *pool = NULL;
 
 	framework_getMemoryPool(framework, &pool);
-	registry = (service_registry_t) apr_palloc(pool, (sizeof(*registry)));
+	registry = (service_registry_pt) apr_palloc(pool, (sizeof(*registry)));
 	if (registry == NULL) {
 	    // no memory
 	} else {
@@ -138,7 +138,7 @@ service_registry_t serviceRegistry_creat
 	return registry;
 }
 
-celix_status_t serviceRegistry_destroy(service_registry_t registry) {
+celix_status_t serviceRegistry_destroy(service_registry_pt registry) {
     hashMap_destroy(registry->inUseMap, false, false);
     hashMap_destroy(registry->serviceRegistrations, false, false);
     arrayList_destroy(registry->listenerHooks);
@@ -147,19 +147,19 @@ celix_status_t serviceRegistry_destroy(s
     return CELIX_SUCCESS;
 }
 
-celix_status_t serviceRegistry_getRegisteredServices(service_registry_t registry, apr_pool_t *pool, bundle_t bundle, array_list_t *services) {
+celix_status_t serviceRegistry_getRegisteredServices(service_registry_pt registry, apr_pool_t *pool, bundle_pt bundle, array_list_pt *services) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	array_list_t regs = (array_list_t) hashMap_get(registry->serviceRegistrations, bundle);
+	array_list_pt regs = (array_list_pt) hashMap_get(registry->serviceRegistrations, bundle);
 	if (regs != NULL) {
 		unsigned int i;
 		arrayList_create(pool, services);
 		
 		for (i = 0; i < arrayList_size(regs); i++) {
-			service_registration_t reg = arrayList_get(regs, i);
+			service_registration_pt reg = arrayList_get(regs, i);
 			if (serviceRegistration_isValid(reg)) {
 				// #todo Create SERVICE_REFERECEN for each registration
-				service_reference_t reference = NULL;
+				service_reference_pt reference = NULL;
 				serviceRegistry_createServiceReference(registry, pool, reg, &reference);
 				arrayList_add(*services, reference);
 			}
@@ -169,20 +169,20 @@ celix_status_t serviceRegistry_getRegist
 	return status;
 }
 
-service_registration_t serviceRegistry_registerService(service_registry_t registry, bundle_t bundle, char * serviceName, void * serviceObject, properties_t dictionary) {
-    service_registration_t registration = NULL;
+service_registration_pt serviceRegistry_registerService(service_registry_pt registry, bundle_pt bundle, char * serviceName, void * serviceObject, properties_pt dictionary) {
+    service_registration_pt registration = NULL;
     serviceRegistry_registerServiceInternal(registry, bundle, serviceName, serviceObject, dictionary, false, &registration);
     return registration;
 }
 
-service_registration_t serviceRegistry_registerServiceFactory(service_registry_t registry, bundle_t bundle, char * serviceName, service_factory_t factory, properties_t dictionary) {
-    service_registration_t registration = NULL;
+service_registration_pt serviceRegistry_registerServiceFactory(service_registry_pt registry, bundle_pt bundle, char * serviceName, service_factory_pt factory, properties_pt dictionary) {
+    service_registration_pt registration = NULL;
     serviceRegistry_registerServiceInternal(registry, bundle, serviceName, (void *) factory, dictionary, true, &registration);
     return registration;
 }
 
-celix_status_t serviceRegistry_registerServiceInternal(service_registry_t registry, bundle_t bundle, char * serviceName, void * serviceObject, properties_t dictionary, bool isFactory, service_registration_t *registration) {
-	array_list_t regs;
+celix_status_t serviceRegistry_registerServiceInternal(service_registry_pt registry, bundle_pt bundle, char * serviceName, void * serviceObject, properties_pt dictionary, bool isFactory, service_registration_pt *registration) {
+	array_list_pt regs;
 	apr_pool_t *pool = NULL;
 	apr_thread_mutex_lock(registry->mutex);
 
@@ -196,7 +196,7 @@ celix_status_t serviceRegistry_registerS
 
 	serviceRegistry_addHooks(registry, serviceName, serviceObject, *registration);
 
-	regs = (array_list_t) hashMap_get(registry->serviceRegistrations, bundle);
+	regs = (array_list_pt) hashMap_get(registry->serviceRegistrations, bundle);
 	if (regs == NULL) {
 		regs = NULL;
 		arrayList_create(pool, &regs);
@@ -207,7 +207,7 @@ celix_status_t serviceRegistry_registerS
 	apr_thread_mutex_unlock(registry->mutex);
 
 	if (registry->serviceChanged != NULL) {
-//		service_event_t event = (service_event_t) malloc(sizeof(*event));
+//		service_event_pt event = (service_event_pt) malloc(sizeof(*event));
 //		event->type = REGISTERED;
 //		event->reference = (*registration)->reference;
 		registry->serviceChanged(registry->framework, SERVICE_EVENT_REGISTERED, *registration, NULL);
@@ -218,17 +218,17 @@ celix_status_t serviceRegistry_registerS
 	return CELIX_SUCCESS;
 }
 
-void serviceRegistry_unregisterService(service_registry_t registry, bundle_t bundle, service_registration_t registration) {
-	// array_list_t clients;
+void serviceRegistry_unregisterService(service_registry_pt registry, bundle_pt bundle, service_registration_pt registration) {
+	// array_list_pt clients;
 	unsigned int i;
-	array_list_t regs;
-	array_list_t references = NULL;
+	array_list_pt regs;
+	array_list_pt references = NULL;
 
 	apr_thread_mutex_lock(registry->mutex);
 
 	serviceRegistry_removeHook(registry, registration);
 
-	regs = (array_list_t) hashMap_get(registry->serviceRegistrations, bundle);
+	regs = (array_list_pt) hashMap_get(registry->serviceRegistrations, bundle);
 	if (regs != NULL) {
 		arrayList_removeElement(regs, registration);
 		hashMap_put(registry->serviceRegistrations, bundle, regs);
@@ -245,15 +245,15 @@ void serviceRegistry_unregisterService(s
 
 	serviceRegistration_getServiceReferences(registration, &references);
 	for (i = 0; i < arrayList_size(references); i++) {
-		service_reference_t reference = (service_reference_t) arrayList_get(references, i);
+		service_reference_pt reference = (service_reference_pt) arrayList_get(references, i);
 		apr_pool_t *pool = NULL;
-		array_list_t clients = NULL;
+		array_list_pt clients = NULL;
 		unsigned int j;
 
 		framework_getMemoryPool(registry->framework, &pool);
 		clients = serviceRegistry_getUsingBundles(registry, pool, reference);
 		for (j = 0; (clients != NULL) && (j < arrayList_size(clients)); j++) {
-			bundle_t client = (bundle_t) arrayList_get(clients, j);
+			bundle_pt client = (bundle_pt) arrayList_get(clients, j);
 			while (serviceRegistry_ungetService(registry, client, reference)) {
 				;
 			}
@@ -270,22 +270,22 @@ void serviceRegistry_unregisterService(s
 
 }
 
-void serviceRegistry_unregisterServices(service_registry_t registry, bundle_t bundle) {
-	array_list_t regs = NULL;
+void serviceRegistry_unregisterServices(service_registry_pt registry, bundle_pt bundle) {
+	array_list_pt regs = NULL;
 	unsigned int i;
 	apr_thread_mutex_lock(registry->mutex);
-	regs = (array_list_t) hashMap_get(registry->serviceRegistrations, bundle);
+	regs = (array_list_pt) hashMap_get(registry->serviceRegistrations, bundle);
 	apr_thread_mutex_unlock(registry->mutex);
 	
 	for (i = 0; (regs != NULL) && i < arrayList_size(regs); i++) {
-		service_registration_t reg = arrayList_get(regs, i);
+		service_registration_pt reg = arrayList_get(regs, i);
 		if (serviceRegistration_isValid(reg)) {
 			serviceRegistration_unregister(reg);
 		}
 	}
 
 	if (regs != NULL && arrayList_isEmpty(regs)) {
-		array_list_t removed = hashMap_remove(registry->serviceRegistrations, bundle);
+		array_list_pt removed = hashMap_remove(registry->serviceRegistrations, bundle);
 		arrayList_destroy(removed);
 		removed = NULL;
 	}
@@ -295,11 +295,11 @@ void serviceRegistry_unregisterServices(
 	apr_thread_mutex_unlock(registry->mutex);
 }
 
-celix_status_t serviceRegistry_createServiceReference(service_registry_t registry, apr_pool_t *pool, service_registration_t registration, service_reference_t *reference) {
+celix_status_t serviceRegistry_createServiceReference(service_registry_pt registry, apr_pool_t *pool, service_registration_pt registration, service_reference_pt *reference) {
 	celix_status_t status = CELIX_SUCCESS;
 
-	bundle_t bundle = NULL;
-	array_list_t references = NULL;
+	bundle_pt bundle = NULL;
+	array_list_pt references = NULL;
 
 	apr_pool_t *spool = NULL;
 	apr_pool_create(&spool, pool);
@@ -315,20 +315,20 @@ celix_status_t serviceRegistry_createSer
 	return status;
 }
 
-celix_status_t serviceRegistry_getServiceReferences(service_registry_t registry, apr_pool_t *pool, const char *serviceName, filter_t filter, array_list_t *references) {
+celix_status_t serviceRegistry_getServiceReferences(service_registry_pt registry, apr_pool_t *pool, const char *serviceName, filter_pt filter, array_list_pt *references) {
 	celix_status_t status = CELIX_SUCCESS;
-	hash_map_values_t registrations;
-	hash_map_iterator_t iterator;
+	hash_map_values_pt registrations;
+	hash_map_iterator_pt iterator;
 	arrayList_create(pool, references);
 
 	registrations = hashMapValues_create(registry->serviceRegistrations);
 	iterator = hashMapValues_iterator(registrations);
 	while (hashMapIterator_hasNext(iterator)) {
-		array_list_t regs = (array_list_t) hashMapIterator_nextValue(iterator);
+		array_list_pt regs = (array_list_pt) hashMapIterator_nextValue(iterator);
 		unsigned int regIdx;
 		for (regIdx = 0; (regs != NULL) && regIdx < arrayList_size(regs); regIdx++) {
-			service_registration_t registration = (service_registration_t) arrayList_get(regs, regIdx);
-			properties_t props = NULL;
+			service_registration_pt registration = (service_registration_pt) arrayList_get(regs, regIdx);
+			properties_pt props = NULL;
 
 			status = serviceRegistration_getProperties(registration, &props);
 			if (status == CELIX_SUCCESS) {
@@ -352,7 +352,7 @@ celix_status_t serviceRegistry_getServic
 				}
 				if (matched) {
 					if (serviceRegistration_isValid(registration)) {
-						service_reference_t reference = NULL;
+						service_reference_pt reference = NULL;
 						serviceRegistry_createServiceReference(registry, pool, registration, &reference);
 						arrayList_add(*references, reference);
 					}
@@ -367,12 +367,12 @@ celix_status_t serviceRegistry_getServic
 }
 
 apr_status_t serviceRegistry_removeReference(void *referenceP) {
-	service_reference_t reference = referenceP;
-	service_registration_t registration = NULL;
+	service_reference_pt reference = referenceP;
+	service_registration_pt registration = NULL;
 	serviceReference_getServiceRegistration(reference, &registration);
 
 	if (registration != NULL) {
-		array_list_t references = NULL;
+		array_list_pt references = NULL;
 		serviceRegistration_getServiceReferences(registration, &references);
 		arrayList_removeElement(references, reference);
 	}
@@ -380,17 +380,17 @@ apr_status_t serviceRegistry_removeRefer
 	return APR_SUCCESS;
 }
 
-array_list_t serviceRegistry_getServicesInUse(service_registry_t registry, bundle_t bundle) {
-	array_list_t usages = hashMap_get(registry->inUseMap, bundle);
+array_list_pt serviceRegistry_getServicesInUse(service_registry_pt registry, bundle_pt bundle) {
+	array_list_pt usages = hashMap_get(registry->inUseMap, bundle);
 	if (usages != NULL) {
 		unsigned int i;
-		array_list_t references = NULL;
+		array_list_pt references = NULL;
 		apr_pool_t *pool = NULL;
 		bundle_getMemoryPool(bundle, &pool);
 		arrayList_create(pool, &references);
 		
 		for (i = 0; i < arrayList_size(usages); i++) {
-			USAGE_COUNT usage = arrayList_get(usages, i);
+			usage_count_pt usage = arrayList_get(usages, i);
 			arrayList_add(references, usage->reference);
 		}
 		return references;
@@ -398,10 +398,10 @@ array_list_t serviceRegistry_getServices
 	return NULL;
 }
 
-void * serviceRegistry_getService(service_registry_t registry, bundle_t bundle, service_reference_t reference) {
-	service_registration_t registration = NULL;
+void * serviceRegistry_getService(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference) {
+	service_registration_pt registration = NULL;
 	void * service = NULL;
-	USAGE_COUNT usage = NULL;
+	usage_count_pt usage = NULL;
 	serviceReference_getServiceRegistration(reference, &registration);
 	
 	apr_thread_mutex_lock(registry->mutex);
@@ -430,9 +430,9 @@ void * serviceRegistry_getService(servic
 	return service;
 }
 
-bool serviceRegistry_ungetService(service_registry_t registry, bundle_t bundle, service_reference_t reference) {
-	service_registration_t registration = NULL;
-	USAGE_COUNT usage = NULL;
+bool serviceRegistry_ungetService(service_registry_pt registry, bundle_pt bundle, service_reference_pt reference) {
+	service_registration_pt registration = NULL;
+	usage_count_pt usage = NULL;
 	serviceReference_getServiceRegistration(reference, &registration);
 	
 	apr_thread_mutex_lock(registry->mutex);
@@ -456,9 +456,9 @@ bool serviceRegistry_ungetService(servic
 	return true;
 }
 
-void serviceRegistry_ungetServices(service_registry_t registry, bundle_t bundle) {
-	array_list_t fusages;
-	array_list_t usages;
+void serviceRegistry_ungetServices(service_registry_pt registry, bundle_pt bundle) {
+	array_list_pt fusages;
+	array_list_pt usages;
 	unsigned int i;
 
 	apr_pool_t *pool = NULL;
@@ -476,8 +476,8 @@ void serviceRegistry_ungetServices(servi
 	fusages = arrayList_clone(pool, usages);
 	
 	for (i = 0; i < arrayList_size(fusages); i++) {
-		USAGE_COUNT usage = arrayList_get(fusages, i);
-		service_reference_t reference = usage->reference;
+		usage_count_pt usage = arrayList_get(fusages, i);
+		service_reference_pt reference = usage->reference;
 		while (serviceRegistry_ungetService(registry, bundle, reference)) {
 			//
 		}
@@ -486,20 +486,20 @@ void serviceRegistry_ungetServices(servi
 	arrayList_destroy(fusages);
 }
 
-array_list_t serviceRegistry_getUsingBundles(service_registry_t registry, apr_pool_t *pool, service_reference_t reference) {
-	array_list_t bundles = NULL;
-	hash_map_iterator_t iter;
+array_list_pt serviceRegistry_getUsingBundles(service_registry_pt registry, apr_pool_t *pool, service_reference_pt reference) {
+	array_list_pt bundles = NULL;
+	hash_map_iterator_pt iter;
 	apr_pool_t *npool;
 	apr_pool_create(&npool, pool);
 	arrayList_create(npool, &bundles);
 	iter = hashMapIterator_create(registry->inUseMap);
 	while (hashMapIterator_hasNext(iter)) {
-		hash_map_entry_t entry = hashMapIterator_nextEntry(iter);
-		bundle_t bundle = hashMapEntry_getKey(entry);
-		array_list_t usages = hashMapEntry_getValue(entry);
+		hash_map_entry_pt entry = hashMapIterator_nextEntry(iter);
+		bundle_pt bundle = hashMapEntry_getKey(entry);
+		array_list_pt usages = hashMapEntry_getValue(entry);
 		unsigned int i;
 		for (i = 0; i < arrayList_size(usages); i++) {
-			USAGE_COUNT usage = arrayList_get(usages, i);
+			usage_count_pt usage = arrayList_get(usages, i);
 			if (usage->reference == reference) {
 				arrayList_add(bundles, bundle);
 			}
@@ -509,7 +509,7 @@ array_list_t serviceRegistry_getUsingBun
 	return bundles;
 }
 
-celix_status_t serviceRegistry_addHooks(service_registry_t registry, char *serviceName, void *serviceObject, service_registration_t registration) {
+celix_status_t serviceRegistry_addHooks(service_registry_pt registry, char *serviceName, void *serviceObject, service_registration_pt registration) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (strcmp(listener_hook_service_name, serviceName) == 0) {
@@ -519,11 +519,11 @@ celix_status_t serviceRegistry_addHooks(
 	return status;
 }
 
-celix_status_t serviceRegistry_removeHook(service_registry_t registry, service_registration_t registration) {
+celix_status_t serviceRegistry_removeHook(service_registry_pt registry, service_registration_pt registration) {
 	celix_status_t status = CELIX_SUCCESS;
 	char *serviceName = NULL;
 
-	properties_t props = NULL;
+	properties_pt props = NULL;
 	serviceRegistration_getProperties(registration, &props);
 	serviceName = properties_get(props, (char *) OBJECTCLASS);
 	if (strcmp(listener_hook_service_name, serviceName) == 0) {
@@ -533,7 +533,7 @@ celix_status_t serviceRegistry_removeHoo
 	return status;
 }
 
-celix_status_t serviceRegistry_getListenerHooks(service_registry_t registry, apr_pool_t *pool, array_list_t *hooks) {
+celix_status_t serviceRegistry_getListenerHooks(service_registry_pt registry, apr_pool_t *pool, array_list_pt *hooks) {
 	celix_status_t status = CELIX_SUCCESS;
 
 	if (registry == NULL || *hooks != NULL) {
@@ -543,8 +543,8 @@ celix_status_t serviceRegistry_getListen
 		if (status == CELIX_SUCCESS) {
 			unsigned int i;
 			for (i = 0; i < arrayList_size(registry->listenerHooks); i++) {
-				service_registration_t registration = arrayList_get(registry->listenerHooks, i);
-				service_reference_t reference = NULL;
+				service_registration_pt registration = arrayList_get(registry->listenerHooks, i);
+				service_reference_pt reference = NULL;
 				serviceRegistry_createServiceReference(registry, pool, registration, &reference);
 				arrayList_add(*hooks, reference);
 			}
@@ -554,7 +554,7 @@ celix_status_t serviceRegistry_getListen
 	return status;
 }
 
-celix_status_t serviceRegistry_servicePropertiesModified(service_registry_t registry, service_registration_t registration, properties_t oldprops) {
+celix_status_t serviceRegistry_servicePropertiesModified(service_registry_pt registry, service_registration_pt registration, properties_pt oldprops) {
 	if (registry->serviceChanged != NULL) {
 		registry->serviceChanged(registry->framework, SERVICE_EVENT_MODIFIED, registration, oldprops);
 	}



Mime
View raw message