gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r3634 - in branches/GNUnet-0.7.0/src: applications/fs/fsui


From: durner
Subject: [GNUnet-SVN] r3634 - in branches/GNUnet-0.7.0/src: applications/fs/fsui applications/fs/tools include
Date: Fri, 3 Nov 2006 12:35:26 -0800 (PST)

Author: durner
Date: 2006-11-03 12:35:18 -0800 (Fri, 03 Nov 2006)
New Revision: 3634

Modified:
   branches/GNUnet-0.7.0/src/applications/fs/fsui/download.c
   branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.c
   branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.h
   branches/GNUnet-0.7.0/src/applications/fs/fsui/search.c
   branches/GNUnet-0.7.0/src/applications/fs/fsui/unindex.c
   branches/GNUnet-0.7.0/src/applications/fs/fsui/upload.c
   branches/GNUnet-0.7.0/src/applications/fs/tools/gnunet-search.c
   branches/GNUnet-0.7.0/src/include/gnunet_fsui_lib.h
Log:
undo incompatible ABI changes from (r3084)

Modified: branches/GNUnet-0.7.0/src/applications/fs/fsui/download.c
===================================================================
--- branches/GNUnet-0.7.0/src/applications/fs/fsui/download.c   2006-11-03 
19:38:34 UTC (rev 3633)
+++ branches/GNUnet-0.7.0/src/applications/fs/fsui/download.c   2006-11-03 
20:35:18 UTC (rev 3634)
@@ -148,8 +148,7 @@
   event.data.DownloadProgress.main_uri = root->uri;
   event.data.DownloadProgress.pos = dl;
   dl->ctx->ecb(dl->ctx->ecbClosure,
-              &event,
-         NULL);
+              &event);
   if ( (lastBlockOffset == 0) &&
        (dl->is_directory == SYSERR) ) {
     /* check if this is a directory */
@@ -306,8 +305,7 @@
     }
     event.data.DownloadError.pos = dl;
     dl->ctx->ecb(dl->ctx->ecbClosure,
-                &event,
-     NULL);
+                &event);
   } else {
     GNUNET_ASSERT(dl != &dl->ctx->activeDownloads);
     while ( (dl != NULL) &&
@@ -328,8 +326,7 @@
       event.data.DownloadProgress.main_uri = root->uri;
       event.data.DownloadProgress.pos = dl;
       dl->ctx->ecb(dl->ctx->ecbClosure,
-                  &event,
-       NULL);
+                  &event);
       dl = dl->parent;
     }
   }

Modified: branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.c
===================================================================
--- branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.c       2006-11-03 
19:38:34 UTC (rev 3633)
+++ branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.c       2006-11-03 
20:35:18 UTC (rev 3634)
@@ -371,7 +371,6 @@
   char * gh;
   int fd;
   int i;
-  FSUI_Event event;
 
   ret = MALLOC(sizeof(FSUI_Context));
   memset(ret, 0, sizeof(FSUI_Context));
@@ -585,15 +584,6 @@
          = NO;
        list->ctx
          = ret;
-  
-  /* Get the client application's per-search data */
-  memset(&event, 0, sizeof(FSUI_Event));
-  event.type = FSUI_resuming_search;
-  event.data.SearchResumed.searchURI = list->uri;
-  list->closure = cb(closure,
-                      &event,
-                      NULL);
-    
        /* start search thread! */
 #if DEBUG_PERSISTENCE
        LOG(LOG_DEBUG,

Modified: branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.h
===================================================================
--- branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.h       2006-11-03 
19:38:34 UTC (rev 3633)
+++ branches/GNUnet-0.7.0/src/applications/fs/fsui/fsui.h       2006-11-03 
20:35:18 UTC (rev 3634)
@@ -137,10 +137,6 @@
 
   ResultPending * unmatchedResultsReceived;
 
-  /**
-   * used by client application
-   */
-  void * closure;
 } FSUI_SearchList;
 
 /**

Modified: branches/GNUnet-0.7.0/src/applications/fs/fsui/search.c
===================================================================
--- branches/GNUnet-0.7.0/src/applications/fs/fsui/search.c     2006-11-03 
19:38:34 UTC (rev 3633)
+++ branches/GNUnet-0.7.0/src/applications/fs/fsui/search.c     2006-11-03 
20:35:18 UTC (rev 3634)
@@ -55,8 +55,7 @@
   event.data.SearchResult.fi = *fi;
   event.data.SearchResult.searchURI = pos->uri;
   pos->ctx->ecb(pos->ctx->ecbClosure,
-               &event,
-    pos->closure);
+               &event);
 }
 
 static void setNamespaceRoot(const ECRS_FileInfo * fi) {
@@ -234,8 +233,7 @@
  */
 int FSUI_startSearch(struct FSUI_Context * ctx,
                     unsigned int anonymityLevel,
-                    const struct ECRS_URI * uri,
-         void * closure) {
+                    const struct ECRS_URI * uri) {
   FSUI_SearchList * pos;
 
   MUTEX_LOCK(&ctx->lock);
@@ -261,7 +259,6 @@
   pos->unmatchedResultsReceived = 0;
   pos->anonymityLevel = anonymityLevel;
   pos->ctx = ctx;
-  pos->closure = closure;
   if (0 != PTHREAD_CREATE(&pos->handle,
                          &searchThread,
                          pos,

Modified: branches/GNUnet-0.7.0/src/applications/fs/fsui/unindex.c
===================================================================
--- branches/GNUnet-0.7.0/src/applications/fs/fsui/unindex.c    2006-11-03 
19:38:34 UTC (rev 3633)
+++ branches/GNUnet-0.7.0/src/applications/fs/fsui/unindex.c    2006-11-03 
20:35:18 UTC (rev 3634)
@@ -56,8 +56,7 @@
   event.data.UnindexProgress.start_time = utc->start_time;
   event.data.UnindexProgress.eta = eta;
   utc->ctx->ecb(utc->ctx->ecbClosure,
-               &event,
-    NULL);
+               &event);
 }
 
 /**
@@ -86,8 +85,7 @@
     event.data.message = _("Unindex failed.");
   }
   utc->ctx->ecb(utc->ctx->ecbClosure,
-               &event,
-    NULL);
+               &event);
   FREE(utc->filename);
   utc->tl->isDone = YES;
   FREE(utc);

Modified: branches/GNUnet-0.7.0/src/applications/fs/fsui/upload.c
===================================================================
--- branches/GNUnet-0.7.0/src/applications/fs/fsui/upload.c     2006-11-03 
19:38:34 UTC (rev 3633)
+++ branches/GNUnet-0.7.0/src/applications/fs/fsui/upload.c     2006-11-03 
20:35:18 UTC (rev 3634)
@@ -108,8 +108,7 @@
     event.data.UploadProgress.main_eta = eta; /* huh? */
   }
   utc->ctx->ecb(utc->ctx->ecbClosure,
-               &event,
-    NULL);
+               &event);
 }
 
 /**
@@ -200,8 +199,7 @@
        event.data.UploadComplete.is_recursive = YES;
        event.data.UploadComplete.main_filename = utc->main_filename;
        utc->ctx->ecb(utc->ctx->ecbClosure,
-                     &event,
-          NULL);       
+                     &event);  
        FREE(event.data.UploadComplete.filename);
        utc->main_completed += len;
       }
@@ -268,8 +266,7 @@
       event.data.UploadComplete.is_recursive = YES;
       event.data.UploadComplete.main_filename = utc->main_filename;
       utc->ctx->ecb(utc->ctx->ecbClosure,
-                   &event,
-        NULL); 
+                   &event);    
       meta = ECRS_createMetaData();
       ECRS_extractMetaData(meta,
                           fn,
@@ -278,8 +275,7 @@
       event.type = FSUI_upload_error;
       event.data.message = _("Upload failed.");
       utc->ctx->ecb(utc->ctx->ecbClosure,
-                   &event,
-        NULL); 
+                   &event);    
       meta = NULL;
     }
   } else {
@@ -508,8 +504,7 @@
                           &fi);
   if (sendEvent)
     utc->ctx->ecb(utc->ctx->ecbClosure,
-                 &event,
-      NULL);
+                 &event);
   if (uri != NULL)
     ECRS_freeUri(uri);
 

Modified: branches/GNUnet-0.7.0/src/applications/fs/tools/gnunet-search.c
===================================================================
--- branches/GNUnet-0.7.0/src/applications/fs/tools/gnunet-search.c     
2006-11-03 19:38:34 UTC (rev 3633)
+++ branches/GNUnet-0.7.0/src/applications/fs/tools/gnunet-search.c     
2006-11-03 20:35:18 UTC (rev 3634)
@@ -54,8 +54,7 @@
  * Handle the search result.
  */
 static void eventCallback(SearchClosure * sc,
-                         const FSUI_Event * event,
-        void * closure) {
+                         const FSUI_Event * event) {
   char * uri;
   char * filename;
 
@@ -275,8 +274,7 @@
       FSUI_startSearch(ctx,
                       getConfigurationInt("FS",
                                           "ANONYMITY-RECEIVE"),
-                      uri,
-           NULL)) {
+                      uri)) {
     printf(_("Starting search failed. Consult logs.\n"));
   } else {
     wait_for_shutdown();

Modified: branches/GNUnet-0.7.0/src/include/gnunet_fsui_lib.h
===================================================================
--- branches/GNUnet-0.7.0/src/include/gnunet_fsui_lib.h 2006-11-03 19:38:34 UTC 
(rev 3633)
+++ branches/GNUnet-0.7.0/src/include/gnunet_fsui_lib.h 2006-11-03 20:35:18 UTC 
(rev 3634)
@@ -112,10 +112,6 @@
    */
   FSUI_gnunetd_disconnected,
   FSUI_download_suspending,
-  /**
-   * Resume
-   */
-  FSUI_resuming_search
 };
 
 /**
@@ -135,12 +131,6 @@
        */
       struct ECRS_URI * searchURI;
     } SearchResult;
-    struct {
-      /**
-       * The URI of the search we're resuming
-       */
-      struct ECRS_URI * searchURI;
-    } SearchResumed;
     /**
      * Download Progress information.  Also used
      * for download_completed event.
@@ -332,9 +322,8 @@
  * FSUI guarantees is that only one thread at a time will call the
  * callback (so it need not be re-entrant).
  */
-typedef void *(*FSUI_EventCallback)(void * cls,
-                                  const FSUI_Event * event,
-           void * closure);
+typedef void (*FSUI_EventCallback)(void * cls,
+                                  const FSUI_Event * event);
 
 /**
  * Iterator over all namespaces.
@@ -478,8 +467,7 @@
  */
 int FSUI_startSearch(struct FSUI_Context * ctx,
                     unsigned int anonymityLevel,
-                    const struct ECRS_URI * uri,
-         void * closure); /* search.c */
+                    const struct ECRS_URI * uri); /* search.c */
 
 /**
  * Stop a search.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]