Merge branch 'master' of ssh://gnunet.org/gnunet
[oweals/gnunet.git] / src / fs / fs_test_lib.h
index d00c21b1ea4ac921131c3e12ec81c65a6113d97e..8f57aa5c87a7be57baa28318527705528193226a 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2010, 2012 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2010, 2012 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 
 /**
  *
  * @param cls closure (user defined)
  * @param uri a URI, NULL for errors
+ * @param fn name of the file on disk to be removed upon
+ *           completion, or NULL for inserted files (also NULL on error)
  */
-typedef void (*GNUNET_FS_TEST_UriContinuation) (void *cls,
-                                                const struct GNUNET_FS_Uri *
-                                                uri);
+typedef void
+(*GNUNET_FS_TEST_UriContinuation) (void *cls,
+                                   const struct GNUNET_FS_Uri *uri,
+                                   const char *fn);
 
 
 /**
@@ -52,20 +55,24 @@ typedef void (*GNUNET_FS_TEST_UriContinuation) (void *cls,
  * @param timeout if this operation cannot be completed within the
  *                given period, call the continuation with an error code
  * @param anonymity option for publication
- * @param do_index GNUNET_YES for index, GNUNET_NO for insertion,
- *                GNUNET_SYSERR for simulation
+ * @param do_index #GNUNET_YES for index, #GNUNET_NO for insertion,
+ *                #GNUNET_SYSERR for simulation
  * @param size size of the file to publish
  * @param seed seed to use for file generation
  * @param verbose how verbose to be in reporting
  * @param cont function to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
  */
 void
 GNUNET_FS_TEST_publish (struct GNUNET_TESTBED_Peer *peer,
-                        struct GNUNET_TIME_Relative timeout, uint32_t anonymity,
-                        int do_index, uint64_t size, uint32_t seed,
+                        struct GNUNET_TIME_Relative timeout,
+                        uint32_t anonymity,
+                        int do_index,
+                        uint64_t size,
+                        uint32_t seed,
                         unsigned int verbose,
-                        GNUNET_FS_TEST_UriContinuation cont, void *cont_cls);
+                        GNUNET_FS_TEST_UriContinuation cont,
+                        void *cont_cls);
 
 
 /**
@@ -79,14 +86,17 @@ GNUNET_FS_TEST_publish (struct GNUNET_TESTBED_Peer *peer,
  * @param uri URI of file to download (CHK/LOC only)
  * @param verbose how verbose to be in reporting
  * @param cont function to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
  */
 void
 GNUNET_FS_TEST_download (struct GNUNET_TESTBED_Peer *peer,
                          struct GNUNET_TIME_Relative timeout,
-                         uint32_t anonymity, uint32_t seed,
-                         const struct GNUNET_FS_Uri *uri, unsigned int verbose,
-                         GNUNET_SCHEDULER_Task cont, void *cont_cls);
+                         uint32_t anonymity,
+                         uint32_t seed,
+                         const struct GNUNET_FS_Uri *uri,
+                         unsigned int verbose,
+                         GNUNET_SCHEDULER_TaskCallback cont,
+                         void *cont_cls);