incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1137865 - in /incubator/celix/trunk: framework/private/include/ framework/private/src/ mongoose/ shell/ utils/public/include/
Date Tue, 21 Jun 2011 05:50:30 GMT
Author: abroekhuis
Date: Tue Jun 21 05:50:30 2011
New Revision: 1137865

URL: http://svn.apache.org/viewvc?rev=1137865&view=rev
Log:
Fixed warnings.

Modified:
    incubator/celix/trunk/framework/private/include/bundle.h
    incubator/celix/trunk/framework/private/include/bundle_activator.h
    incubator/celix/trunk/framework/private/include/bundle_archive.h
    incubator/celix/trunk/framework/private/include/capability.h
    incubator/celix/trunk/framework/private/include/framework.h
    incubator/celix/trunk/framework/private/include/manifest.h
    incubator/celix/trunk/framework/private/include/manifest_parser.h
    incubator/celix/trunk/framework/private/include/module.h
    incubator/celix/trunk/framework/private/include/service_registration.h
    incubator/celix/trunk/framework/private/include/version.h
    incubator/celix/trunk/framework/private/src/bundle.c
    incubator/celix/trunk/framework/private/src/bundle_revision.c
    incubator/celix/trunk/framework/private/src/filter.c
    incubator/celix/trunk/framework/private/src/framework.c
    incubator/celix/trunk/framework/private/src/miniunz.c
    incubator/celix/trunk/mongoose/activator.c
    incubator/celix/trunk/shell/update_command.c
    incubator/celix/trunk/utils/public/include/linkedlist.h

Modified: incubator/celix/trunk/framework/private/include/bundle.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle.h Tue Jun 21 05:50:30 2011
@@ -54,11 +54,15 @@ celix_status_t bundle_update(BUNDLE bund
 void stopBundle(BUNDLE bundle, int options);
 celix_status_t bundle_uninstall(BUNDLE bundle);
 
+void bundle_setState(BUNDLE bundle, BUNDLE_STATE state);
 celix_status_t bundle_setPersistentStateInactive(BUNDLE bundle);
+celix_status_t bundle_setPersistentStateUninstalled(BUNDLE bundle);
 
 void uninstallBundle(BUNDLE bundle);
 
 celix_status_t bundle_revise(BUNDLE bundle, char * location, char *inputFile);
+celix_status_t bundle_addModule(BUNDLE bundle, MODULE module);
+celix_status_t bundle_closeModules(BUNDLE bundle);
 
 // Service Reference Functions
 ARRAY_LIST getUsingBundles(SERVICE_REFERENCE reference);

Modified: incubator/celix/trunk/framework/private/include/bundle_activator.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle_activator.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_activator.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle_activator.h Tue Jun 21 05:50:30
2011
@@ -27,6 +27,7 @@
 #define BUNDLE_ACTIVATOR_H_
 
 #include "headers.h"
+#include "bundle_context.h"
 
 celix_status_t bundleActivator_create(BUNDLE_CONTEXT context, void **userData);
 celix_status_t bundleActivator_start(void * userData, BUNDLE_CONTEXT context);

Modified: incubator/celix/trunk/framework/private/include/bundle_archive.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/bundle_archive.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/bundle_archive.h (original)
+++ incubator/celix/trunk/framework/private/include/bundle_archive.h Tue Jun 21 05:50:30 2011
@@ -31,6 +31,7 @@
 #include "bundle_revision.h"
 #include "bundle_state.h"
 #include "celix_errno.h"
+#include "celixbool.h"
 
 typedef struct bundleArchive * BUNDLE_ARCHIVE;
 
@@ -41,14 +42,21 @@ celix_status_t bundleArchive_recreate(ch
 long bundleArchive_getId(BUNDLE_ARCHIVE archive);
 char * bundleArchive_getLocation(BUNDLE_ARCHIVE archive);
 char * bundleArchive_getArchiveRoot(BUNDLE_ARCHIVE archive);
-BUNDLE_REVISION bundleArchive_getCurrentRevision(BUNDLE_ARCHIVE archive);
+
+void bundleArchive_revise(BUNDLE_ARCHIVE archive, char * location, char *inputFile);
+bool bundleArchive_rollbackRevise(BUNDLE_ARCHIVE archive);
 BUNDLE_REVISION bundleArchive_getRevision(BUNDLE_ARCHIVE archive, long revNr);
-BUNDLE_STATE bundleArchive_getPersistentState(BUNDLE_ARCHIVE archive);
-long bundleArchive_getRefreshCount(BUNDLE_ARCHIVE archive);
+BUNDLE_REVISION bundleArchive_getCurrentRevision(BUNDLE_ARCHIVE archive);
 long bundleArchive_getCurrentRevisionNumber(BUNDLE_ARCHIVE archive);
-void bundleArchive_revise(BUNDLE_ARCHIVE archive, char * location, char *inputFile);
+
+long bundleArchive_getRefreshCount(BUNDLE_ARCHIVE archive);
+
 void bundleArchive_close(BUNDLE_ARCHIVE archive);
 void bundleArchive_closeAndDelete(BUNDLE_ARCHIVE archive);
+
+void bundleArchive_setLastModified(BUNDLE_ARCHIVE archive, time_t lastModifiedTime);
 time_t bundleArchive_getLastModified(BUNDLE_ARCHIVE archive);
+void bundleArchive_setPersistentState(BUNDLE_ARCHIVE archive, BUNDLE_STATE state);
+BUNDLE_STATE bundleArchive_getPersistentState(BUNDLE_ARCHIVE archive);
 
 #endif /* BUNDLE_ARCHIVE_H_ */

Modified: incubator/celix/trunk/framework/private/include/capability.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/capability.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/capability.h (original)
+++ incubator/celix/trunk/framework/private/include/capability.h Tue Jun 21 05:50:30 2011
@@ -31,6 +31,7 @@
 
 
 CAPABILITY capability_create(MODULE module, HASH_MAP directives, HASH_MAP attributes);
+void capability_destroy(CAPABILITY capability);
 char * capability_getServiceName(CAPABILITY capability);
 VERSION capability_getVersion(CAPABILITY capability);
 MODULE capability_getModule(CAPABILITY capability);

Modified: incubator/celix/trunk/framework/private/include/framework.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/framework.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/framework.h (original)
+++ incubator/celix/trunk/framework/private/include/framework.h Tue Jun 21 05:50:30 2011
@@ -37,8 +37,11 @@ celix_status_t framework_create(FRAMEWOR
 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);
 
 celix_status_t fw_installBundle(FRAMEWORK framework, BUNDLE * bundle, char * location);
+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);
 

Modified: incubator/celix/trunk/framework/private/include/manifest.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/manifest.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/manifest.h (original)
+++ incubator/celix/trunk/framework/private/include/manifest.h Tue Jun 21 05:50:30 2011
@@ -35,6 +35,8 @@ struct manifest {
 
 typedef struct manifest * MANIFEST;
 
+void manifest_destroy(MANIFEST manifest);
+
 void manifest_clear(MANIFEST manifest);
 PROPERTIES manifest_getMainAttributes(MANIFEST manifest);
 

Modified: incubator/celix/trunk/framework/private/include/manifest_parser.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/manifest_parser.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/manifest_parser.h (original)
+++ incubator/celix/trunk/framework/private/include/manifest_parser.h Tue Jun 21 05:50:30
2011
@@ -44,6 +44,7 @@ struct manifestParser {
 typedef struct manifestParser * MANIFEST_PARSER;
 
 MANIFEST_PARSER manifestParser_createManifestParser(MODULE owner, MANIFEST manifest);
+celix_status_t manifestParser_destroy(MANIFEST_PARSER parser);
 
 LINKED_LIST manifestParser_parseImportHeader(char * header);
 LINKED_LIST manifestParser_parseExportHeader(MODULE module, char * header);

Modified: incubator/celix/trunk/framework/private/include/module.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/module.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/module.h (original)
+++ incubator/celix/trunk/framework/private/include/module.h Tue Jun 21 05:50:30 2011
@@ -34,6 +34,7 @@
 
 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);

Modified: incubator/celix/trunk/framework/private/include/service_registration.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/service_registration.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/service_registration.h (original)
+++ incubator/celix/trunk/framework/private/include/service_registration.h Tue Jun 21 05:50:30
2011
@@ -32,6 +32,8 @@
 #include "service_registry.h"
 
 SERVICE_REGISTRATION serviceRegistration_create(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);
 void serviceRegistration_unregister(SERVICE_REGISTRATION registration);

Modified: incubator/celix/trunk/framework/private/include/version.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/include/version.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/include/version.h (original)
+++ incubator/celix/trunk/framework/private/include/version.h Tue Jun 21 05:50:30 2011
@@ -26,11 +26,14 @@
 #ifndef VERSION_H_
 #define VERSION_H_
 
+#include "celix_errno.h"
+
 typedef struct version * VERSION;
 
 VERSION version_createVersion(int major, int minor, int micro, char * qualifier);
 VERSION version_createVersionFromString(char * version);
 VERSION version_createEmptyVersion();
+celix_status_t version_destroy(VERSION version);
 
 int version_compareTo(VERSION version, VERSION compare);
 

Modified: incubator/celix/trunk/framework/private/src/bundle.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/bundle.c?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle.c Tue Jun 21 05:50:30 2011
@@ -34,6 +34,7 @@
 #include "version.h"
 #include "array_list.h"
 #include "bundle_archive.h"
+#include "resolver.h"
 
 MODULE bundle_createModule(BUNDLE bundle);
 celix_status_t bundle_closeRevisions(BUNDLE bundle);

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=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/bundle_revision.c (original)
+++ incubator/celix/trunk/framework/private/src/bundle_revision.c Tue Jun 21 05:50:30 2011
@@ -6,9 +6,12 @@
  */
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 #include <apr_strings.h>
+#include <apr_file_io.h>
 
 #include "bundle_revision.h"
+#include "archive.h"
 
 struct bundleRevision {
 	long revisionNr;
@@ -22,20 +25,25 @@ celix_status_t bundleRevision_create(cha
 
 	revision = (BUNDLE_REVISION) apr_pcalloc(pool, sizeof(*revision));
     if (revision != NULL) {
-        mkdir(root, 0755);
-
-        if (inputFile != NULL) {
-            status = extractBundle(inputFile, root);
-        } else {
-            status = extractBundle(location, root);
-        }
-
-        if (status == CELIX_SUCCESS) {
-            revision->revisionNr = revisionNr;
-            revision->root = apr_pstrdup(pool, root);
-            revision->location = apr_pstrdup(pool, location);
-            *bundle_revision = revision;
-        }
+        // if (
+        apr_dir_make(root, APR_UREAD|APR_UWRITE|APR_UEXECUTE, pool);
+        //!= APR_SUCCESS);
+        //{
+        //    status = CELIX_FILE_IO_EXCEPTION;
+        //} else {
+            if (inputFile != NULL) {
+                status = extractBundle(inputFile, root);
+            } else {
+                status = extractBundle(location, root);
+            }
+
+            if (status == CELIX_SUCCESS) {
+                revision->revisionNr = revisionNr;
+                revision->root = apr_pstrdup(pool, root);
+                revision->location = apr_pstrdup(pool, location);
+                *bundle_revision = revision;
+            }
+        //}
     }
 
 	return status;

Modified: incubator/celix/trunk/framework/private/src/filter.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/filter.c?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/filter.c (original)
+++ incubator/celix/trunk/framework/private/src/filter.c Tue Jun 21 05:50:30 2011
@@ -335,7 +335,7 @@ char * filter_parseValue(char * filterSt
 			case '\\': {
 				(*pos)++;
 				c = filterString[*pos];
-				// no break
+				// nb
 			}
 			default: {
 				char ch[2];

Modified: incubator/celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/framework.c?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/framework.c (original)
+++ incubator/celix/trunk/framework/private/src/framework.c Tue Jun 21 05:50:30 2011
@@ -51,6 +51,7 @@
 #include "bundle_archive.h"
 #include "bundle_context.h"
 #include "linked_list_iterator.h"
+#include "service_reference.h"
 
 struct activator {
 	void * userData;
@@ -68,6 +69,9 @@ bool framework_releaseBundleLock(FRAMEWO
 bool framework_acquireGlobalLock(FRAMEWORK framework);
 celix_status_t framework_releaseGlobalLock(FRAMEWORK framework);
 
+celix_status_t framework_acquireInstallLock(FRAMEWORK framework, char * location);
+celix_status_t framework_releaseInstallLock(FRAMEWORK framework, char * location);
+
 long framework_getNextBundleId(FRAMEWORK framework);
 
 celix_status_t fw_installBundle2(FRAMEWORK framework, BUNDLE * bundle, long id, char * location,
BUNDLE_ARCHIVE archive);
@@ -75,6 +79,18 @@ celix_status_t fw_installBundle2(FRAMEWO
 celix_status_t fw_refreshBundles(FRAMEWORK framework, BUNDLE bundles[], int size);
 celix_status_t fw_refreshBundle(FRAMEWORK framework, BUNDLE bundle);
 
+celix_status_t fw_populateDependentGraph(FRAMEWORK framework, BUNDLE exporter, HASH_MAP *map);
+
+struct fw_refreshHelper {
+    FRAMEWORK framework;
+    BUNDLE bundle;
+    BUNDLE_STATE oldState;
+};
+
+celix_status_t fw_refreshHelper_refreshOrRemove(struct fw_refreshHelper * refreshHelper);
+celix_status_t fw_refreshHelper_restart(struct fw_refreshHelper * refreshHelper);
+celix_status_t fw_refreshHelper_stop(struct fw_refreshHelper * refreshHelper);
+
 struct fw_serviceListener {
 	BUNDLE bundle;
 	SERVICE_LISTENER listener;
@@ -83,11 +99,6 @@ struct fw_serviceListener {
 
 typedef struct fw_serviceListener * FW_SERVICE_LISTENER;
 
-struct fw_refreshHelper {
-    FRAMEWORK framework;
-    BUNDLE bundle;
-    BUNDLE_STATE oldState;
-};
 
 celix_status_t framework_create(FRAMEWORK *framework, apr_pool_t *memoryPool) {
     celix_status_t status = CELIX_SUCCESS;

Modified: incubator/celix/trunk/framework/private/src/miniunz.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/src/miniunz.c?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/src/miniunz.c (original)
+++ incubator/celix/trunk/framework/private/src/miniunz.c Tue Jun 21 05:50:30 2011
@@ -27,8 +27,8 @@
         #endif
 #endif
 
-#include <stdio.h>
 #include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
 #include <time.h>
 #include <errno.h>
@@ -36,6 +36,7 @@
 
 #include <unistd.h>
 #include <utime.h>
+#include <sys/stat.h>
 
 #include "unzip.h"
 #include "archive.h"
@@ -112,7 +113,7 @@ int mymkdir(dirname)
     ret = _mkdir(dirname);
 #else
 #if defined unix || defined __APPLE__
-    ret = mkdir (dirname,0775);
+    ret = mkdir(dirname,0775);
 #endif
 #endif
     return ret;

Modified: incubator/celix/trunk/mongoose/activator.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/mongoose/activator.c?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/mongoose/activator.c (original)
+++ incubator/celix/trunk/mongoose/activator.c Tue Jun 21 05:50:30 2011
@@ -29,6 +29,7 @@
 #include "bundle_activator.h"
 #include "bundle_context.h"
 #include "mongoose.h"
+#include "bundle.h"
 
 struct userData {
 	struct mg_context *ctx;

Modified: incubator/celix/trunk/shell/update_command.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/update_command.c?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/shell/update_command.c (original)
+++ incubator/celix/trunk/shell/update_command.c Tue Jun 21 05:50:30 2011
@@ -38,7 +38,6 @@
 void updateCommand_execute(COMMAND command, char * line, void (*out)(char *), void (*err)(char
*));
 celix_status_t updateCommand_download(COMMAND command, char * url, char **inputFile);
 size_t updateCommand_writeData(void *ptr, size_t size, size_t nmemb, FILE *stream);
-int updateCommand_downloadProgress(void *ptr, double dltotal, double dlnow, double ultotal,
double ulnow);
 
 COMMAND updateCommand_create(BUNDLE_CONTEXT context) {
 	COMMAND command = (COMMAND) malloc(sizeof(*command));
@@ -121,12 +120,3 @@ size_t updateCommand_writeData(void *ptr
     size_t written = fwrite(ptr, size, nmemb, stream);
     return written;
 }
-
-//int updateCommand_downloadProgress(void *ptr,
-//                     double t, /* dltotal */
-//                     double d, /* dlnow */
-//                     double ultotal,
-//                     double ulnow) {
-//	printf("\r%f / %f (%g %%)", d, t, d*100.0/t);
-//	return 0;
-//}

Modified: incubator/celix/trunk/utils/public/include/linkedlist.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/public/include/linkedlist.h?rev=1137865&r1=1137864&r2=1137865&view=diff
==============================================================================
--- incubator/celix/trunk/utils/public/include/linkedlist.h (original)
+++ incubator/celix/trunk/utils/public/include/linkedlist.h Tue Jun 21 05:50:30 2011
@@ -33,6 +33,7 @@ typedef struct linkedListEntry * LINKED_
 typedef struct linkedList * LINKED_LIST;
 
 UTILS_EXPORT LINKED_LIST linkedList_create(void);
+void linkedList_destroy(LINKED_LIST list);
 UTILS_EXPORT void * linkedList_getFirst(LINKED_LIST list);
 UTILS_EXPORT void * linkedList_getLast(LINKED_LIST list);
 UTILS_EXPORT void * linkedList_removeFirst(LINKED_LIST list);



Mime
View raw message