From: Christian Grothoff Date: Wed, 16 Jun 2010 20:10:55 +0000 (+0000) Subject: need clear api X-Git-Tag: initial-import-from-subversion-38251~21364 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0296fe30f002512dbde10f73ce7c57bf0085db7d;p=oweals%2Fgnunet.git need clear api --- diff --git a/TODO b/TODO index 3f016c50f..c66aa64c5 100644 --- a/TODO +++ b/TODO @@ -1,12 +1,7 @@ 0.9.0pre1: * FS: [CG] - - Migration test error scenarios: - * client fails to connect to FS service for download (requests never make it to FS) - FS was running initially, but is shut down around the time the source peer (!) - is supposed to die; the OTHER FS service (the one that was supposed to die) is still up! - TTL/priority calculations - - hot-path routing, load considerations - - active reply route caching design & implementation of service; gap extension! + - hot-path routing * TRANSPORT: - HTTP backend [MW] * DV: [Nate] @@ -23,33 +18,17 @@ [On W32, we need to select after calling socket before doing connect etc.] * GNUNET-GTK: - implement publish dialog - + edit (meta data add, meta data del, meta data type population, keyword add (button, activate entry line), - keyword remove, anonymity level, priority, index/insert, normalize keywords, - previews, preview widget for file chooser!?) - + mark 'insert file' button inconsistent for directories + + edit: extract metadata / ksk uri (!) + up + down + left + right - + delete - + open (import directory structure) - + cancel + execute (publish) - - right-clicking on search result should open menu that allows: - + starting recursive download - + aborting active download - + copy URI to clipboard - + save-as gnunet-directory - directory support: + download start: recursive/directory (!) & from-URI only - + download lost-parent (move to 'from-URI only' tab + + handle download lost-parent (move to 'from-URI only' tab) + display content of directory + open directory - - events: - + search resume - + search error - + download error - + download resume 0.9.0pre2: * CORE: @@ -59,6 +38,8 @@ (i.e. rapid reduction in timeout on transport-level disconnect) - encrypted P2P transmission (loopback) tops at 2 MB/s on my quad-core; why is it so slow? Fix! (see core_api_reliability test) + - implement API to get notifications about bandwidth assignments to individual peers + - implement API to get notifications about updates to liveness of individual peers (before disconnect) * TBENCH: [MW] - good to have for transport/DV evaluation! * DHT: [Nate] @@ -72,6 +53,8 @@ - handle gnunet-arm -k in combination with auto-start magic (what is the right thing here?) - add listen socket forwarding to child processes on supported platforms * FS: [CG] + - load considerations (migration, routing) + - active reply route caching design & implementation of service; gap extension! - datastore reservation (publishing) - location URIs (publish, search, download) - unindex on index failure @@ -90,7 +73,24 @@ + download + search + unindex +* STATISTICS: + - implement notification-based statistics API * GNUNET-GTK: + - implement publish dialog details: + + open (import directory structure) + + normalize keywords (edit subdialog) + + set/view previews (edit subdialog) + + mark 'insert file' button inconsistent for directories (edit subdialog) + - right-clicking on search result should open menu that allows: + + starting recursive download + + aborting active download + + copy URI to clipboard + + save-as gnunet-directory + - events: + + search resume + + search error + + download error + + download resume - implement open directory dialog - implement new-pseudonym dialog - namespace search @@ -99,8 +99,6 @@ - right-clicking on NS list in search dialog should open menu that allows + viewing full meta data + deletion of namespace info - - implement API to get notifications about bandwidth assignments to individual peers - - implement API to get notifications about updates to liveness of individual peers (before disconnect) - extend peer dialog with green-yellow-red connectivity status lights - extend peer dialog with country flags and names - implement statistics tabs @@ -108,8 +106,6 @@ - implement unindex operation (use dialog with all indexed files for selection) - implement download by URI dialog; figure out where to display those downloads! - figure out where in the GUI we should show active uploads/unindex operations and allow aborts -* SETUP: - - design & implement new setup tool 0.9.0pre3: * TRACEKIT: [MW] @@ -141,6 +137,8 @@ - use different 'priority' for probe downloads vs. normal downloads * ARM: - better tracking of which config changes actually need to cause process restarts by ARM. +* SETUP: + - design & implement new setup tool 0.9.0: * new webpage: diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index 1ac6cd4ed..e35ad1b74 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h @@ -294,6 +294,15 @@ GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md, size_t data_len); +/** + * Remove all items in the container. + * + * @param md metadata to manipulate + */ +void +GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md); + + /** * Add the current time as the publication date * to the meta-data. diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index f39b15930..dd7165ba9 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c @@ -169,6 +169,29 @@ GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md) } +/** + * Remove all items in the container. + * + * @param md metadata to manipulate + */ +void +GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md) +{ + struct MetaItem *item; + + if (md == NULL) + return; + while (NULL != (item = md->items)) + { + md->items = item->next; + meta_item_free (item); + } + GNUNET_free_non_null (md->sbuf); + memset (md, 0, sizeof (struct GNUNET_CONTAINER_MetaData)); +} + + + /** * Test if two MDs are equal. We consider them equal if * the meta types, formats and content match (we do not