You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by ab...@apache.org on 2012/11/27 12:34:01 UTC
svn commit: r1414132 [2/2] - in /incubator/celix/trunk: cmake/
dependency_manager/private/src/ dependency_manager/public/include/
examples/ framework/ framework/private/src/ framework/public/include/
launcher/private/src/ log_service/private/src/ shell...
Modified: incubator/celix/trunk/framework/public/include/bundle_archive.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/bundle_archive.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/bundle_archive.h (original)
+++ incubator/celix/trunk/framework/public/include/bundle_archive.h Tue Nov 27 11:33:50 2012
@@ -33,31 +33,33 @@
#include "bundle_state.h"
#include "celix_errno.h"
#include "celixbool.h"
+#include "framework_exports.h"
typedef struct bundleArchive * bundle_archive_t;
celix_status_t bundleArchive_create(char * archiveRoot, long id, char * location, char *inputFile, apr_pool_t *mp, bundle_archive_t *bundle_archive);
celix_status_t bundleArchive_createSystemBundleArchive(apr_pool_t *mp, bundle_archive_t *bundle_archive);
celix_status_t bundleArchive_recreate(char * archiveRoot, apr_pool_t *mp, bundle_archive_t *bundle_archive);
-celix_status_t bundleArchive_getId(bundle_archive_t archive, long *id);
-celix_status_t bundleArchive_getLocation(bundle_archive_t archive, char **location);
-celix_status_t bundleArchive_getArchiveRoot(bundle_archive_t archive, char **archiveRoot);
-
-celix_status_t bundleArchive_revise(bundle_archive_t archive, char * location, char *inputFile);
-celix_status_t bundleArchive_rollbackRevise(bundle_archive_t archive, bool *rolledback);
-celix_status_t bundleArchive_getRevision(bundle_archive_t archive, long revNr, BUNDLE_REVISION *revision);
-celix_status_t bundleArchive_getCurrentRevision(bundle_archive_t archive, BUNDLE_REVISION *revision);
-celix_status_t bundleArchive_getCurrentRevisionNumber(bundle_archive_t archive, long *revisionNumber);
-
-celix_status_t bundleArchive_getRefreshCount(bundle_archive_t archive, long *refreshCount);
-celix_status_t bundleArchive_setRefreshCount(bundle_archive_t archive);
-
-celix_status_t bundleArchive_close(bundle_archive_t archive);
-celix_status_t bundleArchive_closeAndDelete(bundle_archive_t archive);
-
-celix_status_t bundleArchive_setLastModified(bundle_archive_t archive, time_t lastModifiedTime);
-celix_status_t bundleArchive_getLastModified(bundle_archive_t archive, time_t *lastModified);
-celix_status_t bundleArchive_setPersistentState(bundle_archive_t archive, BUNDLE_STATE state);
-celix_status_t bundleArchive_getPersistentState(bundle_archive_t archive, BUNDLE_STATE *state);
+
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getId(bundle_archive_t archive, long *id);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getLocation(bundle_archive_t archive, char **location);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getArchiveRoot(bundle_archive_t archive, char **archiveRoot);
+
+FRAMEWORK_EXPORT celix_status_t bundleArchive_revise(bundle_archive_t archive, char * location, char *inputFile);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_rollbackRevise(bundle_archive_t archive, bool *rolledback);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getRevision(bundle_archive_t archive, long revNr, BUNDLE_REVISION *revision);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getCurrentRevision(bundle_archive_t archive, BUNDLE_REVISION *revision);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getCurrentRevisionNumber(bundle_archive_t archive, long *revisionNumber);
+
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getRefreshCount(bundle_archive_t archive, long *refreshCount);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_setRefreshCount(bundle_archive_t archive);
+
+FRAMEWORK_EXPORT celix_status_t bundleArchive_close(bundle_archive_t archive);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_closeAndDelete(bundle_archive_t archive);
+
+FRAMEWORK_EXPORT celix_status_t bundleArchive_setLastModified(bundle_archive_t archive, time_t lastModifiedTime);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getLastModified(bundle_archive_t archive, time_t *lastModified);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_setPersistentState(bundle_archive_t archive, BUNDLE_STATE state);
+FRAMEWORK_EXPORT celix_status_t bundleArchive_getPersistentState(bundle_archive_t archive, BUNDLE_STATE *state);
#endif /* BUNDLE_ARCHIVE_H_ */
Modified: incubator/celix/trunk/framework/public/include/bundle_context.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/bundle_context.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/bundle_context.h (original)
+++ incubator/celix/trunk/framework/public/include/bundle_context.h Tue Nov 27 11:33:50 2012
@@ -40,36 +40,36 @@ typedef struct bundleContext *bundle_con
#include "properties.h"
#include "array_list.h"
-celix_status_t bundleContext_create(FRAMEWORK framework, BUNDLE bundle, bundle_context_t *bundle_context);
-celix_status_t bundleContext_destroy(bundle_context_t context);
+FRAMEWORK_EXPORT celix_status_t bundleContext_create(FRAMEWORK framework, BUNDLE bundle, bundle_context_t *bundle_context);
+FRAMEWORK_EXPORT celix_status_t bundleContext_destroy(bundle_context_t context);
-celix_status_t bundleContext_getBundle(bundle_context_t context, BUNDLE *bundle);
-celix_status_t bundleContext_getFramework(bundle_context_t context, FRAMEWORK *framework);
-celix_status_t bundleContext_getMemoryPool(bundle_context_t context, apr_pool_t **memory_pool);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getBundle(bundle_context_t context, BUNDLE *bundle);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getFramework(bundle_context_t context, FRAMEWORK *framework);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getMemoryPool(bundle_context_t context, apr_pool_t **memory_pool);
-celix_status_t bundleContext_installBundle(bundle_context_t context, char * location, BUNDLE *bundle);
-celix_status_t bundleContext_installBundle2(bundle_context_t context, char * location, char *inputFile, BUNDLE *bundle);
+FRAMEWORK_EXPORT celix_status_t bundleContext_installBundle(bundle_context_t context, char * location, BUNDLE *bundle);
+FRAMEWORK_EXPORT celix_status_t bundleContext_installBundle2(bundle_context_t context, char * location, char *inputFile, BUNDLE *bundle);
-celix_status_t bundleContext_registerService(bundle_context_t context, char * serviceName, void * svcObj,
+FRAMEWORK_EXPORT celix_status_t bundleContext_registerService(bundle_context_t context, char * serviceName, void * svcObj,
PROPERTIES properties, SERVICE_REGISTRATION *service_registration);
-celix_status_t bundleContext_registerServiceFactory(bundle_context_t context, char * serviceName, service_factory_t factory,
+FRAMEWORK_EXPORT celix_status_t bundleContext_registerServiceFactory(bundle_context_t context, char * serviceName, service_factory_t factory,
PROPERTIES properties, SERVICE_REGISTRATION *service_registration);
-celix_status_t bundleContext_getServiceReferences(bundle_context_t context, const char * serviceName, char * filter, ARRAY_LIST *service_references);
-celix_status_t bundleContext_getServiceReference(bundle_context_t context, char * serviceName, SERVICE_REFERENCE *service_reference);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getServiceReferences(bundle_context_t context, const char * serviceName, char * filter, ARRAY_LIST *service_references);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getServiceReference(bundle_context_t context, char * serviceName, SERVICE_REFERENCE *service_reference);
-celix_status_t bundleContext_getService(bundle_context_t context, SERVICE_REFERENCE reference, void **service_instance);
-celix_status_t bundleContext_ungetService(bundle_context_t context, SERVICE_REFERENCE reference, bool *result);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getService(bundle_context_t context, SERVICE_REFERENCE reference, void **service_instance);
+FRAMEWORK_EXPORT celix_status_t bundleContext_ungetService(bundle_context_t context, SERVICE_REFERENCE reference, bool *result);
-celix_status_t bundleContext_getBundles(bundle_context_t context, ARRAY_LIST *bundles);
-celix_status_t bundleContext_getBundleById(bundle_context_t context, long id, BUNDLE *bundle);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getBundles(bundle_context_t context, ARRAY_LIST *bundles);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getBundleById(bundle_context_t context, long id, BUNDLE *bundle);
-celix_status_t bundleContext_addServiceListener(bundle_context_t context, SERVICE_LISTENER listener, char * filter);
-celix_status_t bundleContext_removeServiceListener(bundle_context_t context, SERVICE_LISTENER listener);
+FRAMEWORK_EXPORT celix_status_t bundleContext_addServiceListener(bundle_context_t context, SERVICE_LISTENER listener, char * filter);
+FRAMEWORK_EXPORT celix_status_t bundleContext_removeServiceListener(bundle_context_t context, SERVICE_LISTENER listener);
-celix_status_t bundleContext_addBundleListener(bundle_context_t context, bundle_listener_t listener);
-celix_status_t bundleContext_removeBundleListener(bundle_context_t context, bundle_listener_t listener);
+FRAMEWORK_EXPORT celix_status_t bundleContext_addBundleListener(bundle_context_t context, bundle_listener_t listener);
+FRAMEWORK_EXPORT celix_status_t bundleContext_removeBundleListener(bundle_context_t context, bundle_listener_t listener);
-celix_status_t bundleContext_getProperty(bundle_context_t context, const char *name, char **value);
+FRAMEWORK_EXPORT celix_status_t bundleContext_getProperty(bundle_context_t context, const char *name, char **value);
#endif /* BUNDLE_CONTEXT_H_ */
Modified: incubator/celix/trunk/framework/public/include/framework.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/framework.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/framework.h (original)
+++ incubator/celix/trunk/framework/public/include/framework.h Tue Nov 27 11:33:50 2012
@@ -41,62 +41,63 @@ typedef struct framework * FRAMEWORK;
#include "bundle_listener.h"
#include "service_registration.h"
#include "bundle_context.h"
+#include "framework_exports.h"
-celix_status_t framework_create(FRAMEWORK *framework, apr_pool_t *memoryPool, PROPERTIES config);
-celix_status_t framework_destroy(FRAMEWORK framework);
+FRAMEWORK_EXPORT celix_status_t framework_create(FRAMEWORK *framework, apr_pool_t *memoryPool, PROPERTIES config);
+FRAMEWORK_EXPORT celix_status_t framework_destroy(FRAMEWORK framework);
-celix_status_t fw_init(FRAMEWORK framework);
-celix_status_t framework_start(FRAMEWORK framework);
-void framework_stop(FRAMEWORK framework);
+FRAMEWORK_EXPORT celix_status_t fw_init(FRAMEWORK framework);
+FRAMEWORK_EXPORT celix_status_t framework_start(FRAMEWORK framework);
+FRAMEWORK_EXPORT void framework_stop(FRAMEWORK framework);
-celix_status_t fw_getProperty(FRAMEWORK framework, const char *name, char **value);
+FRAMEWORK_EXPORT celix_status_t fw_getProperty(FRAMEWORK framework, const char *name, char **value);
-celix_status_t fw_installBundle(FRAMEWORK framework, BUNDLE * bundle, char * location, char *inputFile);
-celix_status_t fw_uninstallBundle(FRAMEWORK framework, BUNDLE bundle);
+FRAMEWORK_EXPORT celix_status_t fw_installBundle(FRAMEWORK framework, BUNDLE * bundle, char * location, char *inputFile);
+FRAMEWORK_EXPORT celix_status_t fw_uninstallBundle(FRAMEWORK framework, BUNDLE bundle);
-celix_status_t framework_getBundleEntry(FRAMEWORK framework, BUNDLE bundle, char *name, apr_pool_t *pool, char **entry);
+FRAMEWORK_EXPORT celix_status_t framework_getBundleEntry(FRAMEWORK framework, BUNDLE bundle, char *name, apr_pool_t *pool, char **entry);
-celix_status_t fw_startBundle(FRAMEWORK framework, BUNDLE bundle, int options);
-celix_status_t framework_updateBundle(FRAMEWORK framework, BUNDLE bundle, char *inputFile);
-celix_status_t fw_stopBundle(FRAMEWORK framework, BUNDLE bundle, bool record);
+FRAMEWORK_EXPORT celix_status_t fw_startBundle(FRAMEWORK framework, BUNDLE bundle, int options);
+FRAMEWORK_EXPORT celix_status_t framework_updateBundle(FRAMEWORK framework, BUNDLE bundle, char *inputFile);
+FRAMEWORK_EXPORT celix_status_t fw_stopBundle(FRAMEWORK framework, BUNDLE bundle, bool record);
-celix_status_t fw_registerService(FRAMEWORK framework, SERVICE_REGISTRATION * registration, BUNDLE bundle, char * serviceName, void * svcObj, PROPERTIES properties);
-celix_status_t fw_registerServiceFactory(FRAMEWORK framework, SERVICE_REGISTRATION * registration, BUNDLE bundle, char * serviceName, service_factory_t factory, PROPERTIES properties);
-void fw_unregisterService(SERVICE_REGISTRATION registration);
+FRAMEWORK_EXPORT celix_status_t fw_registerService(FRAMEWORK framework, SERVICE_REGISTRATION * registration, BUNDLE bundle, char * serviceName, void * svcObj, PROPERTIES properties);
+FRAMEWORK_EXPORT celix_status_t fw_registerServiceFactory(FRAMEWORK framework, SERVICE_REGISTRATION * registration, BUNDLE bundle, char * serviceName, service_factory_t factory, PROPERTIES properties);
+FRAMEWORK_EXPORT void fw_unregisterService(SERVICE_REGISTRATION registration);
-celix_status_t fw_getServiceReferences(FRAMEWORK framework, ARRAY_LIST *references, BUNDLE bundle, const char * serviceName, char * filter);
-void * fw_getService(FRAMEWORK framework, BUNDLE bundle, SERVICE_REFERENCE reference);
-bool framework_ungetService(FRAMEWORK framework, BUNDLE bundle, SERVICE_REFERENCE reference);
-celix_status_t fw_getBundleRegisteredServices(FRAMEWORK framework, apr_pool_t *pool, BUNDLE bundle, ARRAY_LIST *services);
-celix_status_t fw_getBundleServicesInUse(FRAMEWORK framework, BUNDLE bundle, ARRAY_LIST *services);
+FRAMEWORK_EXPORT celix_status_t fw_getServiceReferences(FRAMEWORK framework, ARRAY_LIST *references, BUNDLE bundle, const char * serviceName, char * filter);
+FRAMEWORK_EXPORT void * fw_getService(FRAMEWORK framework, BUNDLE bundle, SERVICE_REFERENCE reference);
+FRAMEWORK_EXPORT bool framework_ungetService(FRAMEWORK framework, BUNDLE bundle, SERVICE_REFERENCE reference);
+FRAMEWORK_EXPORT celix_status_t fw_getBundleRegisteredServices(FRAMEWORK framework, apr_pool_t *pool, BUNDLE bundle, ARRAY_LIST *services);
+FRAMEWORK_EXPORT celix_status_t fw_getBundleServicesInUse(FRAMEWORK framework, BUNDLE bundle, ARRAY_LIST *services);
-void fw_addServiceListener(FRAMEWORK framework, BUNDLE bundle, SERVICE_LISTENER listener, char * filter);
-void fw_removeServiceListener(FRAMEWORK framework, BUNDLE bundle, SERVICE_LISTENER listener);
+FRAMEWORK_EXPORT void fw_addServiceListener(FRAMEWORK framework, BUNDLE bundle, SERVICE_LISTENER listener, char * filter);
+FRAMEWORK_EXPORT void fw_removeServiceListener(FRAMEWORK framework, BUNDLE bundle, SERVICE_LISTENER listener);
-celix_status_t fw_addBundleListener(FRAMEWORK framework, BUNDLE bundle, bundle_listener_t listener);
-celix_status_t fw_removeBundleListener(FRAMEWORK framework, BUNDLE bundle, bundle_listener_t listener);
+FRAMEWORK_EXPORT celix_status_t fw_addBundleListener(FRAMEWORK framework, BUNDLE bundle, bundle_listener_t listener);
+FRAMEWORK_EXPORT celix_status_t fw_removeBundleListener(FRAMEWORK framework, BUNDLE bundle, bundle_listener_t listener);
-void fw_serviceChanged(FRAMEWORK framework, SERVICE_EVENT_TYPE eventType, SERVICE_REGISTRATION registration, PROPERTIES oldprops);
+FRAMEWORK_EXPORT void fw_serviceChanged(FRAMEWORK framework, SERVICE_EVENT_TYPE eventType, SERVICE_REGISTRATION registration, PROPERTIES oldprops);
-celix_status_t fw_isServiceAssignable(FRAMEWORK fw, BUNDLE requester, SERVICE_REFERENCE reference, bool *assignable);
+FRAMEWORK_EXPORT celix_status_t fw_isServiceAssignable(FRAMEWORK fw, BUNDLE requester, SERVICE_REFERENCE reference, bool *assignable);
//bundle_archive_t fw_createArchive(long id, char * location);
//void revise(bundle_archive_t archive, char * location);
-celix_status_t getManifest(bundle_archive_t archive, apr_pool_t *pool, MANIFEST *manifest);
+FRAMEWORK_EXPORT celix_status_t getManifest(bundle_archive_t archive, apr_pool_t *pool, MANIFEST *manifest);
-BUNDLE findBundle(bundle_context_t context);
-SERVICE_REGISTRATION findRegistration(SERVICE_REFERENCE reference);
+FRAMEWORK_EXPORT BUNDLE findBundle(bundle_context_t context);
+FRAMEWORK_EXPORT SERVICE_REGISTRATION findRegistration(SERVICE_REFERENCE reference);
-SERVICE_REFERENCE listToArray(ARRAY_LIST list);
-celix_status_t framework_markResolvedModules(FRAMEWORK framework, HASH_MAP wires);
+FRAMEWORK_EXPORT SERVICE_REFERENCE listToArray(ARRAY_LIST list);
+FRAMEWORK_EXPORT celix_status_t framework_markResolvedModules(FRAMEWORK framework, HASH_MAP wires);
-celix_status_t framework_waitForStop(FRAMEWORK framework);
+FRAMEWORK_EXPORT celix_status_t framework_waitForStop(FRAMEWORK framework);
-ARRAY_LIST framework_getBundles(FRAMEWORK framework);
-BUNDLE framework_getBundle(FRAMEWORK framework, char * location);
-BUNDLE framework_getBundleById(FRAMEWORK framework, long id);
+FRAMEWORK_EXPORT ARRAY_LIST framework_getBundles(FRAMEWORK framework);
+FRAMEWORK_EXPORT BUNDLE framework_getBundle(FRAMEWORK framework, char * location);
+FRAMEWORK_EXPORT BUNDLE framework_getBundleById(FRAMEWORK framework, long id);
-celix_status_t framework_getMemoryPool(FRAMEWORK framework, apr_pool_t **pool);
-celix_status_t framework_getFrameworkBundle(FRAMEWORK framework, BUNDLE *bundle);
+FRAMEWORK_EXPORT celix_status_t framework_getMemoryPool(FRAMEWORK framework, apr_pool_t **pool);
+FRAMEWORK_EXPORT celix_status_t framework_getFrameworkBundle(FRAMEWORK framework, BUNDLE *bundle);
#endif /* FRAMEWORK_H_ */
Added: incubator/celix/trunk/framework/public/include/framework_exports.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/framework_exports.h?rev=1414132&view=auto
==============================================================================
--- incubator/celix/trunk/framework/public/include/framework_exports.h (added)
+++ incubator/celix/trunk/framework/public/include/framework_exports.h Tue Nov 27 11:33:50 2012
@@ -0,0 +1,44 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements. See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership. The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * exports.h
+ */
+
+#ifndef FRAMEWORK_EXPORTS_H_
+#define FRAMEWORK_EXPORTS_H_
+
+/* Cmake will define celix_framework_EXPORTS on Windows when it
+configures to build a shared library. If you are going to use
+another build system on windows or create the visual studio
+projects by hand you need to define celix_framework_EXPORTS when
+building a DLL on windows.
+*/
+// We are using the Visual Studio Compiler and building Shared libraries
+
+#if defined (_WIN32)
+ #if defined(celix_framework_EXPORTS)
+ #define FRAMEWORK_EXPORT __declspec(dllexport)
+ #else
+ #define FRAMEWORK_EXPORT __declspec(dllimport)
+ #endif /* framework_EXPORTS */
+#else /* defined (_WIN32) */
+#define FRAMEWORK_EXPORT __attribute__((visibility("default")))
+#endif
+
+#endif /* FRAMEWORK_EXPORTS_H_ */
\ No newline at end of file
Modified: incubator/celix/trunk/framework/public/include/module.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/module.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/module.h (original)
+++ incubator/celix/trunk/framework/public/include/module.h Tue Nov 27 11:33:50 2012
@@ -35,36 +35,37 @@ typedef struct module *MODULE;
#include "version.h"
#include "array_list.h"
#include "bundle.h"
+#include "framework_exports.h"
MODULE module_create(MANIFEST headerMap, char * moduleId, BUNDLE bundle);
MODULE module_createFrameworkModule(BUNDLE bundle);
void module_destroy(MODULE module);
-unsigned int module_hash(void * module);
-int module_equals(void * module, void * compare);
+FRAMEWORK_EXPORT unsigned int module_hash(void * module);
+FRAMEWORK_EXPORT int module_equals(void * module, void * compare);
-WIRE module_getWire(MODULE module, char * serviceName);
+FRAMEWORK_EXPORT WIRE module_getWire(MODULE module, char * serviceName);
-VERSION module_getVersion(MODULE module);
-celix_status_t module_getSymbolicName(MODULE module, char **symbolicName);
-char * module_getId(MODULE module);
-LINKED_LIST module_getWires(MODULE module);
-void module_setWires(MODULE module, LINKED_LIST wires);
-bool module_isResolved(MODULE module);
-void module_setResolved(MODULE module);
-BUNDLE module_getBundle(MODULE module);
-
-LINKED_LIST module_getRequirements(MODULE module);
-LINKED_LIST module_getCapabilities(MODULE module);
-
-ARRAY_LIST module_getDependentImporters(MODULE module);
-void module_addDependentImporter(MODULE module, MODULE importer);
-void module_removeDependentImporter(MODULE module, MODULE importer);
-
-ARRAY_LIST module_getDependentRequirers(MODULE module);
-void module_addDependentRequirer(MODULE module, MODULE requirer);
-void module_removeDependentRequirer(MODULE module, MODULE requirer);
+FRAMEWORK_EXPORT VERSION module_getVersion(MODULE module);
+FRAMEWORK_EXPORT celix_status_t module_getSymbolicName(MODULE module, char **symbolicName);
+FRAMEWORK_EXPORT char * module_getId(MODULE module);
+FRAMEWORK_EXPORT LINKED_LIST module_getWires(MODULE module);
+FRAMEWORK_EXPORT void module_setWires(MODULE module, LINKED_LIST wires);
+FRAMEWORK_EXPORT bool module_isResolved(MODULE module);
+FRAMEWORK_EXPORT void module_setResolved(MODULE module);
+FRAMEWORK_EXPORT BUNDLE module_getBundle(MODULE module);
+
+FRAMEWORK_EXPORT LINKED_LIST module_getRequirements(MODULE module);
+FRAMEWORK_EXPORT LINKED_LIST module_getCapabilities(MODULE module);
+
+FRAMEWORK_EXPORT ARRAY_LIST module_getDependentImporters(MODULE module);
+FRAMEWORK_EXPORT void module_addDependentImporter(MODULE module, MODULE importer);
+FRAMEWORK_EXPORT void module_removeDependentImporter(MODULE module, MODULE importer);
+
+FRAMEWORK_EXPORT ARRAY_LIST module_getDependentRequirers(MODULE module);
+FRAMEWORK_EXPORT void module_addDependentRequirer(MODULE module, MODULE requirer);
+FRAMEWORK_EXPORT void module_removeDependentRequirer(MODULE module, MODULE requirer);
-ARRAY_LIST module_getDependents(MODULE module);
+FRAMEWORK_EXPORT ARRAY_LIST module_getDependents(MODULE module);
#endif /* MODULE_H_ */
Modified: incubator/celix/trunk/framework/public/include/properties.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/properties.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/properties.h (original)
+++ incubator/celix/trunk/framework/public/include/properties.h Tue Nov 27 11:33:50 2012
@@ -28,16 +28,17 @@
#define PROPERTIES_H_
#include "hash_map.h"
+#include "framework_exports.h"
typedef HASH_MAP PROPERTIES;
-PROPERTIES properties_create(void);
-void properties_destroy(PROPERTIES properties);
-PROPERTIES properties_load(char * filename);
-void properties_store(PROPERTIES properties, char * file, char * header);
+FRAMEWORK_EXPORT PROPERTIES properties_create(void);
+FRAMEWORK_EXPORT void properties_destroy(PROPERTIES properties);
+FRAMEWORK_EXPORT PROPERTIES properties_load(char * filename);
+FRAMEWORK_EXPORT void properties_store(PROPERTIES properties, char * file, char * header);
-char * properties_get(PROPERTIES properties, char * key);
-char * properties_getWithDefault(PROPERTIES properties, char * key, char * defaultValue);
-char * properties_set(PROPERTIES properties, char * key, char * value);
+FRAMEWORK_EXPORT char * properties_get(PROPERTIES properties, char * key);
+FRAMEWORK_EXPORT char * properties_getWithDefault(PROPERTIES properties, char * key, char * defaultValue);
+FRAMEWORK_EXPORT char * properties_set(PROPERTIES properties, char * key, char * value);
#endif /* PROPERTIES_H_ */
Modified: incubator/celix/trunk/framework/public/include/service_event.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/service_event.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/service_event.h (original)
+++ incubator/celix/trunk/framework/public/include/service_event.h Tue Nov 27 11:33:50 2012
@@ -36,7 +36,7 @@ typedef struct serviceEvent * SERVICE_EV
enum serviceEventType
{
- REGISTERED = 0x00000001,
+ REGISTEREDA = 0x00000001,
MODIFIED = 0x00000002,
UNREGISTERING = 0x00000004,
MODIFIED_ENDMATCH = 0x00000008,
Modified: incubator/celix/trunk/framework/public/include/service_reference.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/service_reference.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/service_reference.h (original)
+++ incubator/celix/trunk/framework/public/include/service_reference.h Tue Nov 27 11:33:50 2012
@@ -33,19 +33,20 @@ typedef struct serviceReference * SERVIC
#include "array_list.h"
#include "service_registration.h"
#include "bundle.h"
+#include "framework_exports.h"
celix_status_t serviceReference_create(apr_pool_t *pool, BUNDLE bundle, SERVICE_REGISTRATION registration, SERVICE_REFERENCE *reference);
-celix_status_t serviceReference_invalidate(SERVICE_REFERENCE reference);
+FRAMEWORK_EXPORT celix_status_t serviceReference_invalidate(SERVICE_REFERENCE reference);
-celix_status_t serviceReference_getServiceRegistration(SERVICE_REFERENCE reference, SERVICE_REGISTRATION *registration);
-celix_status_t serviceReference_getBundle(SERVICE_REFERENCE reference, BUNDLE *bundle);
+FRAMEWORK_EXPORT celix_status_t serviceReference_getServiceRegistration(SERVICE_REFERENCE reference, SERVICE_REGISTRATION *registration);
+FRAMEWORK_EXPORT celix_status_t serviceReference_getBundle(SERVICE_REFERENCE reference, BUNDLE *bundle);
-bool serviceReference_isAssignableTo(SERVICE_REFERENCE reference, BUNDLE requester, char * serviceName);
+FRAMEWORK_EXPORT bool serviceReference_isAssignableTo(SERVICE_REFERENCE reference, BUNDLE requester, char * serviceName);
-celix_status_t serviceReference_getUsingBundles(SERVICE_REFERENCE reference, apr_pool_t *pool, ARRAY_LIST *bundles);
-celix_status_t serviceReference_equals(SERVICE_REFERENCE reference, SERVICE_REFERENCE compareTo, bool *equal);
-unsigned int serviceReference_hashCode(void *referenceP);
-int serviceReference_equals2(void *reference1, void *reference2);
+FRAMEWORK_EXPORT celix_status_t serviceReference_getUsingBundles(SERVICE_REFERENCE reference, apr_pool_t *pool, ARRAY_LIST *bundles);
+FRAMEWORK_EXPORT celix_status_t serviceReference_equals(SERVICE_REFERENCE reference, SERVICE_REFERENCE compareTo, bool *equal);
+FRAMEWORK_EXPORT unsigned int serviceReference_hashCode(void *referenceP);
+FRAMEWORK_EXPORT int serviceReference_equals2(void *reference1, void *reference2);
#endif /* SERVICE_REFERENCE_H_ */
Modified: incubator/celix/trunk/framework/public/include/service_registration.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/service_registration.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/service_registration.h (original)
+++ incubator/celix/trunk/framework/public/include/service_registration.h Tue Nov 27 11:33:50 2012
@@ -34,21 +34,22 @@ typedef struct serviceRegistration * SER
#include "service_registry.h"
#include "array_list.h"
#include "bundle.h"
+#include "framework_exports.h"
SERVICE_REGISTRATION serviceRegistration_create(apr_pool_t *pool, SERVICE_REGISTRY registry, BUNDLE bundle, char * serviceName, long serviceId, void * serviceObject, PROPERTIES dictionary);
SERVICE_REGISTRATION serviceRegistration_createServiceFactory(apr_pool_t *pool, SERVICE_REGISTRY registry, BUNDLE bundle, char * serviceName, long serviceId, void * serviceObject, PROPERTIES dictionary);
void serviceRegistration_destroy(SERVICE_REGISTRATION registration);
-bool serviceRegistration_isValid(SERVICE_REGISTRATION registration);
-void serviceRegistration_invalidate(SERVICE_REGISTRATION registration);
-celix_status_t serviceRegistration_unregister(SERVICE_REGISTRATION registration);
+FRAMEWORK_EXPORT bool serviceRegistration_isValid(SERVICE_REGISTRATION registration);
+FRAMEWORK_EXPORT void serviceRegistration_invalidate(SERVICE_REGISTRATION registration);
+FRAMEWORK_EXPORT celix_status_t serviceRegistration_unregister(SERVICE_REGISTRATION registration);
-celix_status_t serviceRegistration_getService(SERVICE_REGISTRATION registration, BUNDLE bundle, void **service);
+FRAMEWORK_EXPORT celix_status_t serviceRegistration_getService(SERVICE_REGISTRATION registration, BUNDLE bundle, void **service);
-celix_status_t serviceRegistration_getProperties(SERVICE_REGISTRATION registration, PROPERTIES *properties);
-celix_status_t serviceRegistration_getRegistry(SERVICE_REGISTRATION registration, SERVICE_REGISTRY *registry);
-celix_status_t serviceRegistration_getServiceReferences(SERVICE_REGISTRATION registration, ARRAY_LIST *references);
-celix_status_t serviceRegistration_getBundle(SERVICE_REGISTRATION registration, BUNDLE *bundle);
-celix_status_t serviceRegistration_getServiceName(SERVICE_REGISTRATION registration, char **serviceName);
+FRAMEWORK_EXPORT celix_status_t serviceRegistration_getProperties(SERVICE_REGISTRATION registration, PROPERTIES *properties);
+FRAMEWORK_EXPORT celix_status_t serviceRegistration_getRegistry(SERVICE_REGISTRATION registration, SERVICE_REGISTRY *registry);
+FRAMEWORK_EXPORT celix_status_t serviceRegistration_getServiceReferences(SERVICE_REGISTRATION registration, ARRAY_LIST *references);
+FRAMEWORK_EXPORT celix_status_t serviceRegistration_getBundle(SERVICE_REGISTRATION registration, BUNDLE *bundle);
+FRAMEWORK_EXPORT celix_status_t serviceRegistration_getServiceName(SERVICE_REGISTRATION registration, char **serviceName);
#endif /* SERVICE_REGISTRATION_H_ */
Modified: incubator/celix/trunk/framework/public/include/utils.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/public/include/utils.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/framework/public/include/utils.h (original)
+++ incubator/celix/trunk/framework/public/include/utils.h Tue Nov 27 11:33:50 2012
@@ -32,14 +32,15 @@
#include "celix_errno.h"
#include "celixbool.h"
+#include "framework_exports.h"
-unsigned int string_hash(void * string);
-int string_equals(void * string, void * toCompare);
-char * string_ndup(const char *s, size_t n);
-char * string_trim(char * string);
+FRAMEWORK_EXPORT unsigned int string_hash(void * string);
+FRAMEWORK_EXPORT int string_equals(void * string, void * toCompare);
+FRAMEWORK_EXPORT char * string_ndup(const char *s, size_t n);
+FRAMEWORK_EXPORT char * string_trim(char * string);
-celix_status_t thread_equalsSelf(apr_os_thread_t thread, bool *equals);
+FRAMEWORK_EXPORT celix_status_t thread_equalsSelf(apr_os_thread_t thread, bool *equals);
-celix_status_t utils_isNumeric(char *number, bool *ret);
+FRAMEWORK_EXPORT celix_status_t utils_isNumeric(char *number, bool *ret);
#endif /* UTILS_H_ */
Modified: incubator/celix/trunk/launcher/private/src/launcher.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/launcher/private/src/launcher.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/launcher/private/src/launcher.c (original)
+++ incubator/celix/trunk/launcher/private/src/launcher.c Tue Nov 27 11:33:50 2012
@@ -46,20 +46,28 @@ apr_pool_t *memoryPool;
int main(void) {
// Set signal handler
+ apr_status_t rv = APR_SUCCESS;
+ apr_status_t s = APR_SUCCESS;
+ PROPERTIES config = NULL;
+ char *autoStart = NULL;
+
+
+ apr_pool_t *pool = NULL;
+
(void) signal(SIGINT, launcher_shutdown);
- apr_status_t rv = apr_initialize();
+ rv = apr_initialize();
if (rv != APR_SUCCESS) {
return CELIX_START_ERROR;
}
- apr_status_t s = apr_pool_create(&memoryPool, NULL);
+ s = apr_pool_create(&memoryPool, NULL);
if (s != APR_SUCCESS) {
return CELIX_START_ERROR;
}
- PROPERTIES config = properties_load("config.properties");
- char * autoStart = properties_get(config, "cosgi.auto.start.1");
+ config = properties_load("config.properties");
+ autoStart = properties_get(config, "cosgi.auto.start.1");
framework = NULL;
framework_create(&framework, memoryPool, config);
fw_init(framework);
@@ -67,11 +75,16 @@ int main(void) {
// Start the system bundle
framework_start(framework);
- char delims[] = " ";
- char * result;
- apr_pool_t *pool;
if (apr_pool_create(&pool, memoryPool) == APR_SUCCESS) {
+ char delims[] = " ";
+ char *result = NULL;
LINKED_LIST bundles;
+ ARRAY_LIST installed = NULL;
+ BUNDLE bundle = NULL;
+ bundle_context_t context = NULL;
+ LINKED_LIST_ITERATOR iter = NULL;
+ unsigned int i;
+
linkedList_create(pool, &bundles);
result = strtok(autoStart, delims);
while (result != NULL) {
@@ -81,16 +94,13 @@ int main(void) {
}
// First install all bundles
// Afterwards start them
- ARRAY_LIST installed = NULL;
arrayList_create(pool, &installed);
- bundle_context_t context = NULL;
- BUNDLE bundle = NULL;
framework_getFrameworkBundle(framework, &bundle);
bundle_getContext(bundle, &context);
- LINKED_LIST_ITERATOR iter = linkedListIterator_create(bundles, 0);
+ iter = linkedListIterator_create(bundles, 0);
while (linkedListIterator_hasNext(iter)) {
BUNDLE current = NULL;
- char * location = linkedListIterator_next(iter);
+ char * location = (char *) linkedListIterator_next(iter);
if (bundleContext_installBundle(context, location, ¤t) == CELIX_SUCCESS) {
// Only add bundle if it is installed correctly
arrayList_add(installed, current);
@@ -103,7 +113,6 @@ int main(void) {
}
linkedListIterator_destroy(iter);
- int i;
for (i = 0; i < arrayList_size(installed); i++) {
BUNDLE bundle = (BUNDLE) arrayList_get(installed, i);
bundle_start(bundle, 0);
Modified: incubator/celix/trunk/log_service/private/src/log.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/log_service/private/src/log.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/log_service/private/src/log.c (original)
+++ incubator/celix/trunk/log_service/private/src/log.c Tue Nov 27 11:33:50 2012
@@ -232,7 +232,6 @@ celix_status_t log_stopListenerThread(lo
if (apr_status != APR_SUCCESS) {
status = CELIX_INVALID_SYNTAX;
} else {
- apr_status_t stat;
logger->running = false;
apr_thread_cond_signal(logger->entriesToDeliver);
status = apr_thread_mutex_unlock(logger->deliverLock);
Modified: incubator/celix/trunk/log_service/private/src/log_reader_service_impl.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/log_service/private/src/log_reader_service_impl.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/log_service/private/src/log_reader_service_impl.c (original)
+++ incubator/celix/trunk/log_service/private/src/log_reader_service_impl.c Tue Nov 27 11:33:50 2012
@@ -35,9 +35,9 @@ struct log_reader_data {
};
celix_status_t logReaderService_create(log_t log, apr_pool_t *pool, log_reader_data_t *reader) {
- celix_status_t status;
+ celix_status_t status = APR_SUCCESS;
- *reader = apr_palloc(pool, sizeof(**reader));
+ *reader = (log_reader_data_t) apr_palloc(pool, sizeof(**reader));
if (reader == NULL) {
status = CELIX_ENOMEM;
Modified: incubator/celix/trunk/log_service/private/src/log_service_activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/log_service/private/src/log_service_activator.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/log_service/private/src/log_service_activator.c (original)
+++ incubator/celix/trunk/log_service/private/src/log_service_activator.c Tue Nov 27 11:33:50 2012
@@ -44,9 +44,10 @@ struct logActivator {
celix_status_t bundleActivator_create(bundle_context_t context, void **userData) {
celix_status_t status = CELIX_SUCCESS;
apr_pool_t *mp = NULL;
+ struct logActivator * activator = NULL;
bundleContext_getMemoryPool(context, &mp);
- struct logActivator * activator = apr_palloc(mp, sizeof(struct logActivator));
+ activator = (struct logActivator *) apr_palloc(mp, sizeof(struct logActivator));
if (activator == NULL) {
Modified: incubator/celix/trunk/shell/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/CMakeLists.txt?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell/CMakeLists.txt (original)
+++ incubator/celix/trunk/shell/CMakeLists.txt Tue Nov 27 11:33:50 2012
@@ -36,11 +36,12 @@ if (SHELL)
include_directories("private/include")
include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
+ include_directories(${CURL_INCLUDE_DIRS})
target_link_libraries(shell celix_framework ${CURL_LIBRARIES})
- package(shell FILES public/include/shell.h public/include/command.h public/include/command_private.h)
+ #package(shell FILES public/include/shell.h public/include/command.h public/include/command_private.h)
- FILE(GLOB files public/include/shell.h public/include/command.h public/include/command_private.h)
- INSTALL(FILES ${files} DESTINATION include/celix/shell COMPONENT framework)
- INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/shell.zip DESTINATION share/celix/bundles COMPONENT framework)
+ #FILE(GLOB files public/include/shell.h public/include/command.h public/include/command_private.h)
+ #INSTALL(FILES ${files} DESTINATION include/celix/shell COMPONENT framework)
+ #INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/shell.zip DESTINATION share/celix/bundles COMPONENT framework)
endif (SHELL)
\ No newline at end of file
Modified: incubator/celix/trunk/shell/private/src/inspect_command.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/private/src/inspect_command.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell/private/src/inspect_command.c (original)
+++ incubator/celix/trunk/shell/private/src/inspect_command.c Tue Nov 27 11:33:50 2012
@@ -67,10 +67,11 @@ void inspectCommand_execute(COMMAND comm
char *direction = apr_strtok(NULL, " ", &token);
if (direction != NULL) {
apr_pool_t *pool = NULL;
- bundleContext_getMemoryPool(command->bundleContext, &pool);
ARRAY_LIST ids = NULL;
- arrayList_create(pool, &ids);
char *id = apr_strtok(NULL, " ", &token);
+
+ bundleContext_getMemoryPool(command->bundleContext, &pool);
+ arrayList_create(pool, &ids);
while (id != NULL) {
arrayList_add(ids, id);
id = apr_strtok(NULL, " ", &token);
@@ -104,11 +105,12 @@ celix_status_t inspectCommand_printExpor
celix_status_t status = bundleContext_getBundles(command->bundleContext, &bundles);
} else {
apr_pool_t *pool = NULL;
+ unsigned int i;
+
bundleContext_getMemoryPool(command->bundleContext, &pool);
arrayList_create(pool, &bundles);
- int i;
for (i = 0; i < arrayList_size(ids); i++) {
- char *idStr = arrayList_get(ids, i);
+ char *idStr = (char *) arrayList_get(ids, i);
long id = atol(idStr);
BUNDLE b = NULL;
celix_status_t st = bundleContext_getBundleById(command->bundleContext, id, &b);
@@ -123,9 +125,9 @@ celix_status_t inspectCommand_printExpor
}
if (status == CELIX_SUCCESS) {
- int i = 0;
+ unsigned int i = 0;
for (i = 0; i < arrayList_size(bundles); i++) {
- BUNDLE bundle = arrayList_get(bundles, i);
+ BUNDLE bundle = (BUNDLE) arrayList_get(bundles, i);
if (i > 0) {
out("\n");
@@ -133,8 +135,9 @@ celix_status_t inspectCommand_printExpor
if (bundle != NULL) {
apr_pool_t *pool;
- bundleContext_getMemoryPool(command->bundleContext, &pool);
ARRAY_LIST refs = NULL;
+
+ bundleContext_getMemoryPool(command->bundleContext, &pool);
if (bundle_getRegisteredServices(bundle, pool, &refs) == CELIX_SUCCESS) {
char line[256];
MODULE module = NULL;
@@ -150,16 +153,18 @@ celix_status_t inspectCommand_printExpor
if (refs == NULL || arrayList_size(refs) == 0) {
out("Nothing\n");
} else {
- int j = 0;
+ unsigned int j = 0;
for (j = 0; j < arrayList_size(refs); j++) {
- SERVICE_REFERENCE ref = arrayList_get(refs, j);
+ SERVICE_REFERENCE ref = (SERVICE_REFERENCE) arrayList_get(refs, j);
SERVICE_REGISTRATION reg = NULL;
PROPERTIES props = NULL;
- serviceReference_getServiceRegistration(ref, ®);
char line[256];
+ char *objectClass = NULL;
+ serviceReference_getServiceRegistration(ref, ®);
+
serviceRegistration_getProperties(reg, &props);
- char *objectClass = properties_get(props, (char *) OBJECTCLASS);
+ objectClass = properties_get(props, (char *) OBJECTCLASS);
sprintf(line, "ObjectClass = %s\n", objectClass);
out(line);
if ((j + 1) < arrayList_size(refs)) {
Modified: incubator/celix/trunk/shell/private/src/install_command.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/private/src/install_command.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell/private/src/install_command.c (original)
+++ incubator/celix/trunk/shell/private/src/install_command.c Tue Nov 27 11:33:50 2012
@@ -53,23 +53,26 @@ void installCommand_destroy(COMMAND comm
void installCommand_execute(COMMAND command, char * line, void (*out)(char *), void (*err)(char *)) {
char delims[] = " ";
char * sub = NULL;
+ char info[256];
+
// ignore the command
sub = strtok(line, delims);
sub = strtok(NULL, delims);
- char info[256];
+
info[0] = '\0';
while (sub != NULL) {
BUNDLE bundle = NULL;
installCommand_install(command, &bundle, strdup(sub), out, err);
if (bundle != NULL) {
+ long id;
+ bundle_archive_t archive = NULL;
+ char bundleId[sizeof(id) + 1];
+
if (strlen(info) > 0) {
strcat(info, ", ");
}
- long id;
- bundle_archive_t archive = NULL;
bundle_getArchive(bundle, &archive);
bundleArchive_getId(archive, &id);
- char bundleId[sizeof(id) + 1];
sprintf(bundleId, "%ld", id);
strcat(info, bundleId);
}
Modified: incubator/celix/trunk/shell/private/src/ps_command.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/private/src/ps_command.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell/private/src/ps_command.c (original)
+++ incubator/celix/trunk/shell/private/src/ps_command.c Tue Nov 27 11:33:50 2012
@@ -58,6 +58,8 @@ void psCommand_execute(COMMAND command,
bool showSymbolicName = false;
bool showUpdateLocation = false;
char * msg = "Name";
+ char line[256];
+ unsigned int i;
char delims[] = " ";
char * sub = NULL;
@@ -77,22 +79,21 @@ void psCommand_execute(COMMAND command,
sub = strtok(NULL, delims);
}
- char line[256];
sprintf(line, " %-5s %-12s %s\n", "ID", "State", msg);
- int i;
out(line);
for (i = 0; i < arrayList_size(bundles); i++) {
- BUNDLE bundle = arrayList_get(bundles, i);
+ BUNDLE bundle = (BUNDLE) arrayList_get(bundles, i);
bundle_archive_t archive = NULL;
long id;
+ BUNDLE_STATE state;
+ char * stateString = NULL;
+ MODULE module = NULL;
+ char * name = NULL;
bundle_getArchive(bundle, &archive);
bundleArchive_getId(archive, &id);
- BUNDLE_STATE state;
bundle_getState(bundle, &state);
- char * stateString = psCommand_stateString(state);
- MODULE module = NULL;
- char * name = NULL;
+ stateString = psCommand_stateString(state);
bundle_getCurrentModule(bundle, &module);
module_getSymbolicName(module, &name);
if (showLocation) {
Modified: incubator/celix/trunk/shell/private/src/shell.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/private/src/shell.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell/private/src/shell.c (original)
+++ incubator/celix/trunk/shell/private/src/shell.c Tue Nov 27 11:33:50 2012
@@ -31,6 +31,7 @@
#include "command_private.h"
#include "bundle_context.h"
#include "service_registration.h"
+#include "service_listener.h"
#include "ps_command.h"
#include "start_command.h"
@@ -90,8 +91,9 @@ void shell_destroy(SHELL shell) {
ARRAY_LIST shell_getCommands(SHELL shell) {
ARRAY_LIST commands = NULL;
- arrayList_create(shell->pool, &commands);
HASH_MAP_ITERATOR iter = hashMapIterator_create(shell->commandNameMap);
+
+ arrayList_create(shell->pool, &commands);
while (hashMapIterator_hasNext(iter)) {
char * name = hashMapIterator_nextKey(iter);
arrayList_add(commands, name);
@@ -139,9 +141,10 @@ COMMAND shell_getCommand(SHELL shell, ch
}
void shell_addCommand(SHELL shell, SERVICE_REFERENCE reference) {
- void *cmd = NULL;
+ COMMAND command = NULL;
+ void *cmd = NULL;
bundleContext_getService(shell->bundleContext, reference, &cmd);
- COMMAND command = (COMMAND) cmd;
+ command = (COMMAND) cmd;
hashMap_put(shell->commandNameMap, command->name, command);
hashMap_put(shell->commandReferenceMap, reference, command);
}
@@ -155,16 +158,17 @@ void shell_removeCommand(SHELL shell, SE
void shell_serviceChanged(SERVICE_LISTENER listener, SERVICE_EVENT event) {
SHELL shell = (SHELL) listener->handle;
- if (event->type == REGISTERED) {
+ if (event->type == REGISTEREDA) {
shell_addCommand(shell, event->reference);
}
}
celix_status_t bundleActivator_create(bundle_context_t context, void **userData) {
- *userData = malloc(sizeof(struct shellServiceActivator));
apr_pool_t *pool = NULL;
+ SHELL shell = NULL;
+ *userData = malloc(sizeof(struct shellServiceActivator));
bundleContext_getMemoryPool(context, &pool);
- SHELL shell = shell_create(pool);
+ shell = shell_create(pool);
// struct shellServiceActivator * activator = (struct shellServiceActivator *) (*userData);
((struct shellServiceActivator *) (*userData))->shell = shell;
((struct shellServiceActivator *) (*userData))->listener = NULL;
@@ -185,6 +189,7 @@ celix_status_t bundleActivator_create(bu
celix_status_t bundleActivator_start(void * userData, bundle_context_t context) {
celix_status_t status;
+ apr_pool_t *pool = NULL;
struct shellServiceActivator * activator = (struct shellServiceActivator *) userData;
activator->shell->bundleContext = context;
@@ -199,7 +204,6 @@ celix_status_t bundleActivator_start(voi
status = bundleContext_registerService(context, (char *) SHELL_SERVICE_NAME, activator->shellService, NULL, &activator->registration);
- apr_pool_t *pool = NULL;
bundleContext_getMemoryPool(context, &pool);
if (status == CELIX_SUCCESS) {
SERVICE_LISTENER listener = (SERVICE_LISTENER) malloc(sizeof(*listener));
Modified: incubator/celix/trunk/shell/private/src/update_command.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/private/src/update_command.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell/private/src/update_command.c (original)
+++ incubator/celix/trunk/shell/private/src/update_command.c Tue Nov 27 11:33:50 2012
@@ -65,12 +65,12 @@ void updateCommand_execute(COMMAND comma
long id = atol(sub);
bundleContext_getBundleById(command->bundleContext, id, &bundle);
if (bundle != NULL) {
+ char inputFile[256];
sub = strtok(NULL, delims);
- char inputFile[MAXNAMLEN];
inputFile[0] = '\0';
if (sub != NULL) {
- printf("URL: %s\n", sub);
char *test = inputFile;
+ printf("URL: %s\n", sub);
if (updateCommand_download(command, sub, &test) == CELIX_SUCCESS) {
printf("Update bundle with stream\n");
@@ -94,9 +94,10 @@ celix_status_t updateCommand_download(CO
CURLcode res;
curl = curl_easy_init();
if (curl) {
+ FILE *fp = NULL;
tmpnam(*inputFile);
printf("Temp file: %s\n", *inputFile);
- FILE *fp = fopen(*inputFile, "wb+");
+ fp = fopen(*inputFile, "wb+");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, updateCommand_writeData);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
Modified: incubator/celix/trunk/shell_tui/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell_tui/CMakeLists.txt?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell_tui/CMakeLists.txt (original)
+++ incubator/celix/trunk/shell_tui/CMakeLists.txt Tue Nov 27 11:33:50 2012
@@ -25,7 +25,7 @@ if (SHELL_TUI)
include_directories("${PROJECT_SOURCE_DIR}/shell/public/include")
target_link_libraries(shell_tui celix_framework)
- package(shell_tui)
+ #package(shell_tui)
- INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/shell_tui.zip DESTINATION share/celix/bundles COMPONENT framework)
+ #INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/shell_tui.zip DESTINATION share/celix/bundles COMPONENT framework)
endif (SHELL_TUI)
\ No newline at end of file
Modified: incubator/celix/trunk/shell_tui/private/src/shell_tui.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell_tui/private/src/shell_tui.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/shell_tui/private/src/shell_tui.c (original)
+++ incubator/celix/trunk/shell_tui/private/src/shell_tui.c Tue Nov 27 11:33:50 2012
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <pthread.h>
#include "bundle_context.h"
#include "bundle_activator.h"
@@ -39,7 +38,7 @@ struct shellTuiActivator {
SERVICE_REFERENCE reference;
struct serviceListener * listener;
bool running;
- pthread_t runnable;
+ apr_thread_t *runnable;
};
typedef struct shellTuiActivator * SHELL_TUI_ACTIVATOR;
@@ -48,20 +47,22 @@ void shellTui_write(char * line) {
fprintf(stdout, "%s", line);
}
-void * shellTui_runnable(void * data) {
+static void *APR_THREAD_FUNC shellTui_runnable(apr_thread_t *thd, void *data) {
SHELL_TUI_ACTIVATOR act = (SHELL_TUI_ACTIVATOR) data;
char in[256];
bool needPrompt = true;
while (act->running) {
+ char * dline = NULL;
+ char * line = NULL;
if (needPrompt) {
printf("-> ");
needPrompt = false;
}
fgets(in, 256, stdin);
needPrompt = true;
- char * dline = strdup(in);
- char * line = string_trim(dline);
+ dline = strdup(in);
+ line = string_trim(dline);
if (strlen(line) == 0) {
continue;
}
@@ -71,7 +72,7 @@ void * shellTui_runnable(void * data) {
act->shell->executeCommand(act->shell->shell, line, shellTui_write, shellTui_write);
free(dline);
}
- pthread_exit(NULL);
+ apr_thread_exit(thd, APR_SUCCESS);
return NULL;
}
@@ -90,7 +91,7 @@ void shellTui_serviceChanged(SERVICE_LIS
bool result = NULL;
SHELL_TUI_ACTIVATOR act = (SHELL_TUI_ACTIVATOR) listener->handle;
- if ((event->type == REGISTERED) && (act->reference == NULL)) {
+ if ((event->type == REGISTEREDA) && (act->reference == NULL)) {
shellTui_initializeService(act);
} else if ((event->type == UNREGISTERING) && (act->reference == event->reference)) {
bundleContext_ungetService(act->context, act->reference, &result);
@@ -104,7 +105,7 @@ void shellTui_serviceChanged(SERVICE_LIS
celix_status_t bundleActivator_create(bundle_context_t context, void **userData) {
apr_pool_t *pool = NULL;
celix_status_t status = bundleContext_getMemoryPool(context, &pool);
- SHELL_TUI_ACTIVATOR activator = apr_palloc(pool, sizeof(*activator));
+ SHELL_TUI_ACTIVATOR activator = (SHELL_TUI_ACTIVATOR) apr_palloc(pool, sizeof(*activator));
//SHELL_TUI_ACTIVATOR activator = (SHELL_TUI_ACTIVATOR) malloc(sizeof(*activator));
activator->shell = NULL;
(*userData) = activator;
@@ -113,14 +114,16 @@ celix_status_t bundleActivator_create(bu
celix_status_t bundleActivator_start(void * userData, bundle_context_t context) {
celix_status_t status;
+ apr_pool_t *pool = NULL;
+
SHELL_TUI_ACTIVATOR act = (SHELL_TUI_ACTIVATOR) userData;
+ SERVICE_LISTENER listener = (SERVICE_LISTENER) malloc(sizeof(*listener));
+
act->context = context;
act->running = true;
- apr_pool_t *pool = NULL;
+
bundleContext_getMemoryPool(context, &pool);
-
- SERVICE_LISTENER listener = (SERVICE_LISTENER) malloc(sizeof(*listener));
act->listener = listener;
act->listener->pool = pool;
act->listener->handle = act;
@@ -129,7 +132,7 @@ celix_status_t bundleActivator_start(voi
if (status == CELIX_SUCCESS) {
shellTui_initializeService(act);
- pthread_create(&act->runnable, NULL, shellTui_runnable, act);
+ apr_thread_create(&act->runnable, NULL, shellTui_runnable, act, pool);
}
return status;
@@ -145,7 +148,7 @@ celix_status_t bundleActivator_stop(void
act->listener = NULL;
act->context = NULL;
act->running = false;
- pthread_detach(act->runnable);
+ apr_thread_detach(act->runnable);
}
return status;
Modified: incubator/celix/trunk/utils/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/CMakeLists.txt?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/CMakeLists.txt (original)
+++ incubator/celix/trunk/utils/CMakeLists.txt Tue Nov 27 11:33:50 2012
@@ -1,57 +1,73 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-celix_subproject(UTILS "Option to build the utilities library" "ON")
-if (UTILS)
- cmake_minimum_required(VERSION 2.6)
-
- add_definitions(-DUSE_FILE32API)
- aux_source_directory("private/src" SRC)
- include_directories("private/include")
- include_directories("public/include")
- add_library(celix_utils SHARED ${SRC})
-
- IF(UNIX)
- target_link_libraries(celix_utils m)
- ENDIF(UNIX)
- target_link_libraries(celix_utils ${APR_LIBRARY})
-
- install(TARGETS celix_utils DESTINATION lib COMPONENT framework)
- FILE(GLOB files "public/include/*.h")
- INSTALL(FILES ${files} DESTINATION include/celix COMPONENT framework)
-
- include_directories(${CUNIT_INCLUDE_DIRS})
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/utils/private/include")
-
- add_executable(hash_map_test private/test/hash_map_test.c)
- target_link_libraries(hash_map_test celix_utils ${CUNIT_LIBRARIES})
-
- add_executable(hash_map_test_hash private/test/hash_map_test_hash.c)
- target_link_libraries(hash_map_test_hash celix_utils ${CUNIT_LIBRARIES})
-
- add_executable(array_list_test private/test/array_list_test.c)
- target_link_libraries(array_list_test celix_utils ${CUNIT_LIBRARIES})
-
- add_executable(linked_list_test private/test/linked_list_test.c)
- target_link_libraries(linked_list_test celix_utils ${CUNIT_LIBRARIES})
-
- run_test(array_list_test)
- run_test(hash_map_test)
- run_test(hash_map_test_hash)
- run_test(linked_list_test)
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+celix_subproject(UTILS "Option to build the utilities library" "ON")
+if (UTILS)
+ cmake_minimum_required(VERSION 2.6)
+
+ add_definitions(-DUSE_FILE32API)
+ #aux_source_directory("private/src" SRC)
+ include_directories("private/include")
+ include_directories("public/include")
+ add_library(celix_utils SHARED
+ private/src/array_list.c
+ public/include/array_list.h
+ private/include/array_list_private.h
+
+ private/src/hash_map.c
+ public/include/hash_map.h
+ private/include/hash_map_private.h
+
+ private/src/linkedlist.c
+ private/src/linked_list_iterator.c
+ public/include/linkedlist.h
+ public/include/linked_list_iterator.h
+ private/include/linked_list_private.h
+
+ public/include/exports.h
+ )
+
+ IF(UNIX)
+ target_link_libraries(celix_utils m)
+ ENDIF(UNIX)
+ target_link_libraries(celix_utils ${APR_LIBRARY})
+
+ install(TARGETS celix_utils DESTINATION lib COMPONENT framework)
+ FILE(GLOB files "public/include/*.h")
+ INSTALL(FILES ${files} DESTINATION include/celix COMPONENT framework)
+
+ #include_directories(${CUNIT_INCLUDE_DIRS})
+ #include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+ #include_directories("${PROJECT_SOURCE_DIR}/utils/private/include")
+
+ #add_executable(hash_map_test private/test/hash_map_test.c)
+ #target_link_libraries(hash_map_test celix_utils ${CUNIT_LIBRARIES})
+
+ #add_executable(hash_map_test_hash private/test/hash_map_test_hash.c)
+ #target_link_libraries(hash_map_test_hash celix_utils ${CUNIT_LIBRARIES})
+
+ #add_executable(array_list_test private/test/array_list_test.c)
+ #target_link_libraries(array_list_test celix_utils ${CUNIT_LIBRARIES})
+
+ #add_executable(linked_list_test private/test/linked_list_test.c)
+ #target_link_libraries(linked_list_test celix_utils ${CUNIT_LIBRARIES})
+
+ #run_test(array_list_test)
+ #run_test(hash_map_test)
+ #run_test(hash_map_test_hash)
+ #run_test(linked_list_test)
endif (UTILS)
\ No newline at end of file
Modified: incubator/celix/trunk/utils/private/src/array_list.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/src/array_list.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/src/array_list.c (original)
+++ incubator/celix/trunk/utils/private/src/array_list.c Tue Nov 27 11:33:50 2012
@@ -53,7 +53,7 @@ void arrayList_destroy(ARRAY_LIST list)
}
void arrayList_trimToSize(ARRAY_LIST list) {
- int oldCapacity;
+ unsigned int oldCapacity;
list->modCount++;
oldCapacity = list->capacity;
if (list->size < oldCapacity) {
@@ -94,14 +94,14 @@ bool arrayList_contains(ARRAY_LIST list,
int arrayList_indexOf(ARRAY_LIST list, void * element) {
if (element == NULL) {
- int i = 0;
+ unsigned int i = 0;
for (i = 0; i < list->size; i++) {
if (list->elementData[i] == NULL) {
return i;
}
}
} else {
- int i = 0;
+ unsigned int i = 0;
for (i = 0; i < list->size; i++) {
if (list->elementData[i] == element) { //equalsFunction?
return i;
@@ -196,7 +196,7 @@ void arrayList_fastRemove(ARRAY_LIST lis
bool arrayList_removeElement(ARRAY_LIST list, void * element) {
if (element == NULL) {
- int i = 0;
+ unsigned int i = 0;
for (i = 0; i < list->size; i++) {
if (list->elementData[i] == NULL) {
arrayList_fastRemove(list, i);
@@ -204,7 +204,7 @@ bool arrayList_removeElement(ARRAY_LIST
}
}
} else {
- int i = 0;
+ unsigned int i = 0;
for (i = 0; i < list->size; i++) {
if (list->elementData[i] == element) { //equalsFunction?
arrayList_fastRemove(list, i);
@@ -216,7 +216,7 @@ bool arrayList_removeElement(ARRAY_LIST
}
void arrayList_clear(ARRAY_LIST list) {
- int i;
+ unsigned int i;
list->modCount++;
for (i = 0; i < list->size; i++) {
@@ -227,8 +227,8 @@ void arrayList_clear(ARRAY_LIST list) {
}
bool arrayList_addAll(ARRAY_LIST list, ARRAY_LIST toAdd) {
- int i;
- int size = arrayList_size(toAdd);
+ unsigned int i;
+ unsigned int size = arrayList_size(toAdd);
arrayList_ensureCapacity(list, list->size + size);
// memcpy(list->elementData+list->size, *toAdd->elementData, size);
// list->size += size;
@@ -239,7 +239,7 @@ bool arrayList_addAll(ARRAY_LIST list, A
}
ARRAY_LIST arrayList_clone(apr_pool_t *pool, ARRAY_LIST list) {
- int i;
+ unsigned int i;
ARRAY_LIST new = NULL;
arrayList_create(pool, &new);
// arrayList_ensureCapacity(new, list->size);
Modified: incubator/celix/trunk/utils/private/src/hash_map.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/src/hash_map.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/src/hash_map.c (original)
+++ incubator/celix/trunk/utils/private/src/hash_map.c Tue Nov 27 11:33:50 2012
@@ -184,7 +184,7 @@ void * hashMap_put(HASH_MAP map, void *
void hashMap_resize(HASH_MAP map, int newCapacity) {
HASH_MAP_ENTRY * newTable;
- int j;
+ unsigned int j;
if (map->tablelength == MAXIMUM_CAPACITY) {
return;
}
@@ -280,7 +280,7 @@ HASH_MAP_ENTRY hashMap_removeMapping(HAS
}
void hashMap_clear(HASH_MAP map, bool freeKey, bool freeValue) {
- int i;
+ unsigned int i;
HASH_MAP_ENTRY * table;
map->modificationCount++;
table = map->table;
@@ -302,7 +302,7 @@ void hashMap_clear(HASH_MAP map, bool fr
}
bool hashMap_containsValue(HASH_MAP map, void * value) {
- int i;
+ unsigned int i;
if (value == NULL) {
for (i = 0; i < map->tablelength; i++) {
HASH_MAP_ENTRY entry;
Modified: incubator/celix/trunk/utils/private/src/linked_list_iterator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/src/linked_list_iterator.c?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/src/linked_list_iterator.c (original)
+++ incubator/celix/trunk/utils/private/src/linked_list_iterator.c Tue Nov 27 11:33:50 2012
@@ -37,7 +37,7 @@ struct linkedListIterator {
int expectedModificationCount;
};
-LINKED_LIST_ITERATOR linkedListIterator_create(LINKED_LIST list, int index) {
+LINKED_LIST_ITERATOR linkedListIterator_create(LINKED_LIST list, unsigned int index) {
LINKED_LIST_ITERATOR iterator;
if (index < 0 || index > list->size) {
return NULL;
Modified: incubator/celix/trunk/utils/public/include/array_list.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/public/include/array_list.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/public/include/array_list.h (original)
+++ incubator/celix/trunk/utils/public/include/array_list.h Tue Nov 27 11:33:50 2012
@@ -54,7 +54,7 @@ UTILS_EXPORT bool arrayList_addAll(ARRAY
UTILS_EXPORT void * arrayList_remove(ARRAY_LIST list, unsigned int index);
UTILS_EXPORT bool arrayList_removeElement(ARRAY_LIST list, void * element);
UTILS_EXPORT void arrayList_clear(ARRAY_LIST list);
-ARRAY_LIST arrayList_clone(apr_pool_t *pool, ARRAY_LIST list);
+UTILS_EXPORT ARRAY_LIST arrayList_clone(apr_pool_t *pool, ARRAY_LIST list);
UTILS_EXPORT ARRAY_LIST_ITERATOR arrayListIterator_create(ARRAY_LIST list);
UTILS_EXPORT void arrayListIterator_destroy(ARRAY_LIST_ITERATOR iterator);
Modified: incubator/celix/trunk/utils/public/include/exports.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/public/include/exports.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/public/include/exports.h (original)
+++ incubator/celix/trunk/utils/public/include/exports.h Tue Nov 27 11:33:50 2012
@@ -37,11 +37,11 @@ We are using the Visual Studio Compiler
*/
#if defined (_WIN32)
- #if defined(utils_EXPORTS)
+ #if defined(celix_utils_EXPORTS)
#define UTILS_EXPORT __declspec(dllexport)
#else
#define UTILS_EXPORT __declspec(dllimport)
- #endif /* utils_EXPORTS */
+ #endif /* celix_utils_EXPORTS */
#else /* defined (_WIN32) */
#define UTILS_EXPORT __attribute__((visibility("default")))
#endif
Modified: incubator/celix/trunk/utils/public/include/linked_list_iterator.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/public/include/linked_list_iterator.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/public/include/linked_list_iterator.h (original)
+++ incubator/celix/trunk/utils/public/include/linked_list_iterator.h Tue Nov 27 11:33:50 2012
@@ -34,7 +34,7 @@
typedef struct linkedListIterator * LINKED_LIST_ITERATOR;
-UTILS_EXPORT LINKED_LIST_ITERATOR linkedListIterator_create(LINKED_LIST list, int index);
+UTILS_EXPORT LINKED_LIST_ITERATOR linkedListIterator_create(LINKED_LIST list, unsigned int index);
UTILS_EXPORT void linkedListIterator_destroy(LINKED_LIST_ITERATOR iterator);
UTILS_EXPORT bool linkedListIterator_hasNext(LINKED_LIST_ITERATOR iterator);
UTILS_EXPORT void * linkedListIterator_next(LINKED_LIST_ITERATOR iterator);
Modified: incubator/celix/trunk/utils/public/include/linkedlist.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/public/include/linkedlist.h?rev=1414132&r1=1414131&r2=1414132&view=diff
==============================================================================
--- incubator/celix/trunk/utils/public/include/linkedlist.h (original)
+++ incubator/celix/trunk/utils/public/include/linkedlist.h Tue Nov 27 11:33:50 2012
@@ -37,7 +37,7 @@ typedef struct linkedListEntry * LINKED_
typedef struct linkedList * LINKED_LIST;
UTILS_EXPORT celix_status_t linkedList_create(apr_pool_t *pool, LINKED_LIST *list);
-celix_status_t linkedList_clone(LINKED_LIST list, apr_pool_t *pool, LINKED_LIST *clone);
+UTILS_EXPORT celix_status_t linkedList_clone(LINKED_LIST list, apr_pool_t *pool, LINKED_LIST *clone);
UTILS_EXPORT void * linkedList_getFirst(LINKED_LIST list);
UTILS_EXPORT void * linkedList_getLast(LINKED_LIST list);
UTILS_EXPORT void * linkedList_removeFirst(LINKED_LIST list);