incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1528389 - in /incubator/celix/trunk/framework/private: include/ src/ test/
Date Wed, 02 Oct 2013 09:10:39 GMT
Author: abroekhuis
Date: Wed Oct  2 09:10:38 2013
New Revision: 1528389

URL: http://svn.apache.org/r1528389
Log:
CELIX-55: Moved local members (structs etc) to a private handler to be able to write tests

Added:
    incubator/celix/trunk/framework/private/include/attribute_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/bundle_cache_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/bundle_context_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/bundle_revision_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/capability_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/filter_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/requirement_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/service_reference_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/service_registration_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/service_registry_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/service_tracker_customizer_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/include/service_tracker_private.h
      - copied, changed from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h
Modified:
    incubator/celix/trunk/framework/private/include/bundle_private.h
    incubator/celix/trunk/framework/private/src/attribute.c
    incubator/celix/trunk/framework/private/src/bundle.c
    incubator/celix/trunk/framework/private/src/bundle_cache.c
    incubator/celix/trunk/framework/private/src/bundle_context.c
    incubator/celix/trunk/framework/private/src/bundle_revision.c
    incubator/celix/trunk/framework/private/src/capability.c
    incubator/celix/trunk/framework/private/src/filter.c
    incubator/celix/trunk/framework/private/src/requirement.c
    incubator/celix/trunk/framework/private/src/service_reference.c
    incubator/celix/trunk/framework/private/src/service_registration.c
    incubator/celix/trunk/framework/private/src/service_registry.c
    incubator/celix/trunk/framework/private/src/service_tracker.c
    incubator/celix/trunk/framework/private/src/service_tracker_customizer.c
    incubator/celix/trunk/framework/private/test/framework_test.c

Copied: incubator/celix/trunk/framework/private/include/attribute_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/attribute_private.h?p2=incubator/celix/trunk/framework/private/include/attribute_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/attribute_private.h Wed Oct  2 09:10:38
2013
@@ -17,17 +17,23 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * attribute_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 11, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef ATTRIBUTE_PRIVATE_H_
+#define ATTRIBUTE_PRIVATE_H_
 
+#include "attribute.h"
 
+struct attribute {
+	char * key;
+	char * value;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+
+#endif /* ATTRIBUTE_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/bundle_cache_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle_cache_private.h?p2=incubator/celix/trunk/framework/private/include/bundle_cache_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle_cache_private.h Wed Oct  2 09:10:38
2013
@@ -17,17 +17,24 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * bundle_cache_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 12, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef BUNDLE_CACHE_PRIVATE_H_
+#define BUNDLE_CACHE_PRIVATE_H_
 
+#include "bundle_cache.h"
 
+struct bundleCache {
+	properties_pt configurationMap;
+	char * cacheDir;
+	apr_pool_t *mp;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+
+#endif /* BUNDLE_CACHE_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/bundle_context_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle_context_private.h?p2=incubator/celix/trunk/framework/private/include/bundle_context_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle_context_private.h Wed Oct  2 09:10:38
2013
@@ -17,17 +17,24 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * bundle_context_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 12, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef BUNDLE_CONTEXT_PRIVATE_H_
+#define BUNDLE_CONTEXT_PRIVATE_H_
 
+#include "bundle_context.h"
 
+struct bundleContext {
+	struct framework * framework;
+	struct bundle * bundle;
+	apr_pool_t *pool;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+
+#endif /* BUNDLE_CONTEXT_PRIVATE_H_ */

Modified: incubator/celix/trunk/framework/private/include/bundle_private.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle_private.h?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle_private.h Wed Oct  2 09:10:38 2013
@@ -27,7 +27,23 @@
 #ifndef BUNDLE_PRIVATE_H_
 #define BUNDLE_PRIVATE_H_
 
+#include "bundle.h"
 
+struct bundle {
+	bundle_context_pt context;
+	activator_pt activator;
+	bundle_state_e state;
+	void * handle;
+	bundle_archive_pt archive;
+	array_list_pt modules;
+	manifest_pt manifest;
+	apr_pool_t *memoryPool;
 
+	apr_thread_mutex_t *lock;
+	int lockCount;
+	apr_os_thread_t lockThread;
+
+	struct framework * framework;
+};
 
 #endif /* BUNDLE_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/bundle_revision_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle_revision_private.h?p2=incubator/celix/trunk/framework/private/include/bundle_revision_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle_revision_private.h Wed Oct  2 09:10:38
2013
@@ -17,17 +17,23 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * bundle_revision_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 12, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef BUNDLE_REVISION_PRIVATE_H_
+#define BUNDLE_REVISION_PRIVATE_H_
 
+#include "bundle_revision.h"
 
+struct bundleRevision {
+	long revisionNr;
+	char *root;
+	char *location;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+#endif /* BUNDLE_REVISION_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/capability_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/capability_private.h?p2=incubator/celix/trunk/framework/private/include/capability_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/capability_private.h Wed Oct  2 09:10:38
2013
@@ -17,17 +17,25 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * capability_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 11, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef CAPABILITY_PRIVATE_H_
+#define CAPABILITY_PRIVATE_H_
 
+#include "capability.h"
 
+struct capability {
+	char * serviceName;
+	module_pt module;
+	version_pt version;
+	hash_map_pt attributes;
+	hash_map_pt directives;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+#endif /* CAPABILITY_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/filter_private.h (from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/filter_private.h?p2=incubator/celix/trunk/framework/private/include/filter_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/filter_private.h Wed Oct  2 09:10:38 2013
@@ -17,17 +17,40 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * filter_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 13, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef FILTER_PRIVATE_H_
+#define FILTER_PRIVATE_H_
 
+#include "filter.h"
+#include "array_list.h"
 
+typedef enum operand
+{
+	EQUAL,
+	APPROX,
+	GREATER,
+	LESS,
+	PRESENT,
+	SUBSTRING,
+	AND,
+	OR,
+	NOT,
+} OPERAND;
 
-#endif /* BUNDLE_PRIVATE_H_ */
+struct filter {
+	OPERAND operand;
+	char * attribute;
+	int operands;
+	void * value;
+	char *filterStr;
+};
+
+
+#endif /* FILTER_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/requirement_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/requirement_private.h?p2=incubator/celix/trunk/framework/private/include/requirement_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/requirement_private.h Wed Oct  2 09:10:38
2013
@@ -17,17 +17,24 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * requirement_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 11, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef REQUIREMENT_PRIVATE_H_
+#define REQUIREMENT_PRIVATE_H_
 
+#include "requirement.h"
 
+struct requirement {
+	char * targetName;
+	version_range_pt versionRange;
+	hash_map_pt attributes;
+	hash_map_pt directives;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+#endif /* REQUIREMENT_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/service_reference_private.h (from
r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/service_reference_private.h?p2=incubator/celix/trunk/framework/private/include/service_reference_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/service_reference_private.h Wed Oct  2
09:10:38 2013
@@ -17,17 +17,23 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * service_reference_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 6, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef SERVICE_REFERENCE_PRIVATE_H_
+#define SERVICE_REFERENCE_PRIVATE_H_
 
+#include "service_reference.h"
 
+struct serviceReference {
+	bundle_pt bundle;
+	struct serviceRegistration * registration;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+
+#endif /* SERVICE_REFERENCE_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/service_registration_private.h (from
r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/service_registration_private.h?p2=incubator/celix/trunk/framework/private/include/service_registration_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/service_registration_private.h Wed Oct
 2 09:10:38 2013
@@ -17,17 +17,41 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * service_registration_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 11, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef SERVICE_REGISTRATION_PRIVATE_H_
+#define SERVICE_REGISTRATION_PRIVATE_H_
 
+#include "service_registration.h"
 
+struct service {
+	char *name;
+	void *serviceStruct;
+};
 
-#endif /* BUNDLE_PRIVATE_H_ */
+struct serviceRegistration {
+	service_registry_pt registry;
+	char * className;
+	array_list_pt references;
+	bundle_pt bundle;
+	properties_pt properties;
+	void * svcObj;
+	long serviceId;
+
+	apr_thread_mutex_t *mutex;
+	bool isUnregistering;
+
+	bool isServiceFactory;
+	void *serviceFactory;
+
+	struct service *services;
+	int nrOfServices;
+};
+
+#endif /* SERVICE_REGISTRATION_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/service_registry_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/service_registry_private.h?p2=incubator/celix/trunk/framework/private/include/service_registry_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/service_registry_private.h Wed Oct  2
09:10:38 2013
@@ -17,17 +17,40 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * service_registry_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 7, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef SERVICE_REGISTRY_PRIVATE_H_
+#define SERVICE_REGISTRY_PRIVATE_H_
 
+#include "service_registry.h"
 
+struct serviceRegistry {
+	apr_pool_t *pool;
+	framework_pt framework;
+	hash_map_pt serviceRegistrations;
+	hash_map_pt serviceReferences;
+	hash_map_pt inUseMap;
+	serviceChanged_function_pt serviceChanged;
+	long currentServiceId;
 
-#endif /* BUNDLE_PRIVATE_H_ */
+	array_list_pt listenerHooks;
+
+	apr_thread_mutex_t * mutex;
+};
+
+struct usageCount {
+	unsigned int count;
+	service_reference_pt reference;
+	void * service;
+	apr_pool_t *pool;
+};
+
+typedef struct usageCount * usage_count_pt;
+
+#endif /* SERVICE_REGISTRY_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/service_tracker_customizer_private.h
(from r1528388, incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/service_tracker_customizer_private.h?p2=incubator/celix/trunk/framework/private/include/service_tracker_customizer_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/service_tracker_customizer_private.h Wed
Oct  2 09:10:38 2013
@@ -17,17 +17,29 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * service_tracker_customizer_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 7, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef SERVICE_TRACKER_CUSTOMIZER_PRIVATE_H_
+#define SERVICE_TRACKER_CUSTOMIZER_PRIVATE_H_
 
+#include "service_reference.h"
 
+#include "service_tracker_customizer.h"
 
-#endif /* BUNDLE_PRIVATE_H_ */
+
+struct serviceTrackerCustomizer {
+	void * handle;
+	celix_status_t (*addingService)(void * handle, service_reference_pt reference, void **service);
+	celix_status_t (*addedService)(void * handle, service_reference_pt reference, void * service);
+	celix_status_t (*modifiedService)(void * handle, service_reference_pt reference, void *
service);
+	celix_status_t (*removedService)(void * handle, service_reference_pt reference, void * service);
+};
+
+
+#endif /* SERVICE_TRACKER_CUSTOMIZER_PRIVATE_H_ */

Copied: incubator/celix/trunk/framework/private/include/service_tracker_private.h (from r1528388,
incubator/celix/trunk/framework/private/include/bundle_private.h)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/service_tracker_private.h?p2=incubator/celix/trunk/framework/private/include/service_tracker_private.h&p1=incubator/celix/trunk/framework/private/include/bundle_private.h&r1=1528388&r2=1528389&rev=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_private.h (original)
+++ incubator/celix/trunk/framework/private/include/service_tracker_private.h Wed Oct  2 09:10:38
2013
@@ -17,17 +17,35 @@
  *under the License.
  */
 /*
- * bundle_private.h
+ * service_tracker_private.h
  *
- *  \date       Feb 18, 2011
- *  \author    	<a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
- *  \copyright	Apache License, Version 2.0
+ *  \date       Feb 6, 2013
+ *  \author     <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project
Team</a>
+ *  \copyright  Apache License, Version 2.0
  */
 
-#ifndef BUNDLE_PRIVATE_H_
-#define BUNDLE_PRIVATE_H_
 
+#ifndef SERVICE_TRACKER_PRIVATE_H_
+#define SERVICE_TRACKER_PRIVATE_H_
 
+#include "service_tracker.h"
 
+struct serviceTracker {
+	bundle_context_pt context;
+	char * filter;
 
-#endif /* BUNDLE_PRIVATE_H_ */
+	apr_pool_t *pool;
+	service_tracker_pt tracker;
+	service_tracker_customizer_pt customizer;
+	service_listener_pt listener;
+	array_list_pt tracked;
+};
+
+struct tracked {
+	service_reference_pt reference;
+	void * service;
+};
+
+typedef struct tracked * tracked_pt;
+
+#endif /* SERVICE_TRACKER_PRIVATE_H_ */

Modified: incubator/celix/trunk/framework/private/src/attribute.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/attribute.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/attribute.c (original)
+++ incubator/celix/trunk/framework/private/src/attribute.c Wed Oct  2 09:10:38 2013
@@ -26,12 +26,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "attribute.h"
-
-struct attribute {
-	char * key;
-	char * value;
-};
+#include "attribute_private.h"
 
 celix_status_t attribute_create(apr_pool_t *memory_pool, char * key, char * value, attribute_pt
*attribute) {
 	celix_status_t status = CELIX_SUCCESS;

Modified: incubator/celix/trunk/framework/private/src/bundle.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle.c Wed Oct  2 09:10:38 2013
@@ -29,8 +29,8 @@
 #include <apr_portable.h>
 #include <apr_thread_proc.h>
 
-#include "bundle.h"
 #include "framework_private.h"
+#include "bundle_private.h"
 #include "manifest.h"
 #include "module.h"
 #include "version.h"
@@ -39,23 +39,6 @@
 #include "resolver.h"
 #include "utils.h"
 
-struct bundle {
-	bundle_context_pt context;
-	activator_pt activator;
-	bundle_state_e state;
-	void * handle;
-	bundle_archive_pt archive;
-	array_list_pt modules;
-	manifest_pt manifest;
-	apr_pool_t *memoryPool;
-
-	apr_thread_mutex_t *lock;
-	int lockCount;
-	apr_os_thread_t lockThread;
-
-	struct framework * framework;
-};
-
 celix_status_t bundle_createModule(bundle_pt bundle, module_pt *module);
 celix_status_t bundle_closeRevisions(bundle_pt bundle);
 

Modified: incubator/celix/trunk/framework/private/src/bundle_cache.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle_cache.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle_cache.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle_cache.c Wed Oct  2 09:10:38 2013
@@ -33,16 +33,10 @@
 #include <apr_file_io.h>
 #include <apr_strings.h>
 
-#include "bundle_cache.h"
+#include "bundle_cache_private.h"
 #include "bundle_archive.h"
 #include "constants.h"
 
-struct bundleCache {
-	properties_pt configurationMap;
-	char * cacheDir;
-	apr_pool_t *mp;
-};
-
 static celix_status_t bundleCache_deleteTree(char * directory, apr_pool_t *mp);
 static apr_status_t bundleCache_destroy(void *cacheP);
 

Modified: incubator/celix/trunk/framework/private/src/bundle_context.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle_context.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle_context.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle_context.c Wed Oct  2 09:10:38 2013
@@ -27,16 +27,10 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "bundle_context.h"
+#include "bundle_context_private.h"
 #include "framework_private.h"
 #include "bundle.h"
 
-struct bundleContext {
-	struct framework * framework;
-	struct bundle * bundle;
-	apr_pool_t *pool;
-};
-
 celix_status_t bundleContext_create(framework_pt framework, bundle_pt bundle, bundle_context_pt
*bundle_context) {
 	celix_status_t status = CELIX_SUCCESS;
 	bundle_context_pt context = NULL;

Modified: incubator/celix/trunk/framework/private/src/bundle_revision.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle_revision.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle_revision.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle_revision.c Wed Oct  2 09:10:38 2013
@@ -29,15 +29,9 @@
 #include <apr_strings.h>
 #include <apr_file_io.h>
 
-#include "bundle_revision.h"
+#include "bundle_revision_private.h"
 #include "archive.h"
 
-struct bundleRevision {
-	long revisionNr;
-	char *root;
-	char *location;
-};
-
 static apr_status_t bundleRevision_destroy(void *revisionP);
 
 celix_status_t bundleRevision_create(apr_pool_t *pool, char *root, char *location, long revisionNr,
char *inputFile, bundle_revision_pt *bundle_revision) {

Modified: incubator/celix/trunk/framework/private/src/capability.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/capability.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/capability.c (original)
+++ incubator/celix/trunk/framework/private/src/capability.c Wed Oct  2 09:10:38 2013
@@ -25,17 +25,9 @@
  */
 #include <stdlib.h>
 
-#include "capability.h"
+#include "capability_private.h"
 #include "attribute.h"
 
-struct capability {
-	char * serviceName;
-	module_pt module;
-	version_pt version;
-	hash_map_pt attributes;
-	hash_map_pt directives;
-};
-
 apr_status_t capability_destroy(void *capabilityP);
 
 celix_status_t capability_create(apr_pool_t *pool, module_pt module, hash_map_pt directives,
hash_map_pt attributes, capability_pt *capability) {

Modified: incubator/celix/trunk/framework/private/src/filter.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/filter.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/filter.c (original)
+++ incubator/celix/trunk/framework/private/src/filter.c Wed Oct  2 09:10:38 2013
@@ -28,30 +28,9 @@
 #include <stdlib.h>
 #include <ctype.h>
 
-#include "filter.h"
+#include "filter_private.h"
 #include "array_list.h"
 
-typedef enum operand
-{
-	EQUAL,
-	APPROX,
-	GREATER,
-	LESS,
-	PRESENT,
-	SUBSTRING,
-	AND,
-	OR,
-	NOT,
-} OPERAND;
-
-struct filter {
-	OPERAND operand;
-	char * attribute;
-	int operands;
-	void * value;
-	char *filterStr;
-};
-
 void filter_skipWhiteSpace(char * filterString, int * pos);
 filter_pt filter_parseFilter(char * filterString, int * pos, apr_pool_t *pool);
 filter_pt filter_parseFilterComp(char * filterString, int * pos, apr_pool_t *pool);

Modified: incubator/celix/trunk/framework/private/src/requirement.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/requirement.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/requirement.c (original)
+++ incubator/celix/trunk/framework/private/src/requirement.c Wed Oct  2 09:10:38 2013
@@ -25,17 +25,10 @@
  */
 #include <stdlib.h>
 
-#include "requirement.h"
+#include "requirement_private.h"
 #include "version_range.h"
 #include "attribute.h"
 
-struct requirement {
-	char * targetName;
-	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_pt directives, hash_map_pt attributes,
requirement_pt *requirement) {

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=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_reference.c (original)
+++ incubator/celix/trunk/framework/private/src/service_reference.c Wed Oct  2 09:10:38 2013
@@ -27,17 +27,12 @@
 #include <stdlib.h>
 
 #include "service_registry.h"
-#include "service_reference.h"
+#include "service_reference_private.h"
 #include "service_registration.h"
 #include "module.h"
 #include "wire.h"
 #include "bundle.h"
 
-struct serviceReference {
-	bundle_pt bundle;
-	struct serviceRegistration * registration;
-};
-
 apr_status_t serviceReference_destroy(void *referenceP);
 
 celix_status_t serviceReference_create(apr_pool_t *pool, bundle_pt bundle, service_registration_pt
registration, service_reference_pt *reference) {

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=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_registration.c (original)
+++ incubator/celix/trunk/framework/private/src/service_registration.c Wed Oct  2 09:10:38
2013
@@ -29,34 +29,11 @@
 
 #include <apr_strings.h>
 
-#include "service_registration.h"
+#include "service_registration_private.h"
 #include "constants.h"
 #include "service_factory.h"
 #include "service_reference.h"
 
-struct service {
-	char *name;
-	void *serviceStruct;
-};
-
-struct serviceRegistration {
-	service_registry_pt registry;
-	char * className;
-	array_list_pt references;
-	bundle_pt bundle;
-	properties_pt properties;
-	void * svcObj;
-	long serviceId;
-
-	apr_thread_mutex_t *mutex;
-	bool isUnregistering;
-
-	bool isServiceFactory;
-	void *serviceFactory;
-
-	struct service *services;
-	int nrOfServices;
-};
 
 static celix_status_t serviceRegistration_initializeProperties(service_registration_pt registration,
properties_pt properties);
 

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=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_registry.c (original)
+++ incubator/celix/trunk/framework/private/src/service_registry.c Wed Oct  2 09:10:38 2013
@@ -26,7 +26,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "service_registry.h"
+#include "service_registry_private.h"
 #include "service_registration.h"
 #include "module.h"
 #include "bundle.h"
@@ -35,29 +35,6 @@
 #include "service_reference.h"
 #include "framework_private.h"
 
-struct serviceRegistry {
-	apr_pool_t *pool;
-    framework_pt framework;
-	hash_map_pt serviceRegistrations;
-	hash_map_pt serviceReferences;
-	hash_map_pt inUseMap;
-	serviceChanged_function_pt serviceChanged;
-	long currentServiceId;
-
-	array_list_pt listenerHooks;
-
-	apr_thread_mutex_t * mutex;
-};
-
-struct usageCount {
-	unsigned int count;
-	service_reference_pt reference;
-	void * service;
-	apr_pool_t *pool;
-};
-
-typedef struct usageCount * usage_count_pt;
-
 apr_status_t serviceRegistry_destroy(void *handle);
 
 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);

Modified: incubator/celix/trunk/framework/private/src/service_tracker.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/service_tracker.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_tracker.c (original)
+++ incubator/celix/trunk/framework/private/src/service_tracker.c Wed Oct  2 09:10:38 2013
@@ -29,29 +29,11 @@
 
 #include <apr_strings.h>
 
-#include "service_tracker.h"
+#include "service_tracker_private.h"
 #include "bundle_context.h"
 #include "constants.h"
 #include "service_reference.h"
 
-struct serviceTracker {
-	bundle_context_pt context;
-	char * filter;
-
-	apr_pool_t *pool;
-	service_tracker_pt tracker;
-	service_tracker_customizer_pt customizer;
-	service_listener_pt listener;
-	array_list_pt tracked;
-};
-
-struct tracked {
-	service_reference_pt reference;
-	void * service;
-};
-
-typedef struct tracked * tracked_pt;
-
 static apr_status_t serviceTracker_destroy(void *trackerP);
 static celix_status_t serviceTracker_addingService(service_tracker_pt tracker, service_reference_pt
reference, void **service);
 static celix_status_t serviceTracker_track(service_tracker_pt tracker, service_reference_pt
reference, service_event_pt event);

Modified: incubator/celix/trunk/framework/private/src/service_tracker_customizer.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/service_tracker_customizer.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/service_tracker_customizer.c (original)
+++ incubator/celix/trunk/framework/private/src/service_tracker_customizer.c Wed Oct  2 09:10:38
2013
@@ -26,20 +26,10 @@
 
 #include <stdlib.h>
 
-#include "service_reference.h"
-
-#include "service_tracker_customizer.h"
+#include "service_tracker_customizer_private.h"
 
 static apr_status_t serviceTrackerCustomizer_destroy(void *customizerPointer);
 
-struct serviceTrackerCustomizer {
-	void * handle;
-	celix_status_t (*addingService)(void * handle, service_reference_pt reference, void **service);
-	celix_status_t (*addedService)(void * handle, service_reference_pt reference, void * service);
-	celix_status_t (*modifiedService)(void * handle, service_reference_pt reference, void *
service);
-	celix_status_t (*removedService)(void * handle, service_reference_pt reference, void * service);
-};
-
 celix_status_t serviceTrackerCustomizer_create(apr_pool_t *pool, void *handle,
 		adding_callback_pt addingFunction, added_callback_pt addedFunction,
 		modified_callback_pt modifiedFunction, removed_callback_pt removedFunction, service_tracker_customizer_pt
*customizer) {

Modified: incubator/celix/trunk/framework/private/test/framework_test.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/test/framework_test.c?rev=1528389&r1=1528388&r2=1528389&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/test/framework_test.c (original)
+++ incubator/celix/trunk/framework/private/test/framework_test.c Wed Oct  2 09:10:38 2013
@@ -29,7 +29,7 @@
 #include <stddef.h>
 
 #include "CUnit/Basic.h"
-#include "framework.h"
+#include "framework_private.h"
 
 void test_framework_create(void) {
 	struct framework * framework;



Mime
View raw message