GNUnet  0.20.0
fs_test_lib.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010, 2012 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
29 #ifndef FS_TEST_LIB_H
30 #define FS_TEST_LIB_H
31 
32 #include "gnunet_util_lib.h"
33 #include "gnunet_fs_service.h"
34 #include "gnunet_testbed_service.h"
35 
36 
45 typedef void
46 (*GNUNET_FS_TEST_UriContinuation) (void *cls,
47  const struct GNUNET_FS_Uri *uri,
48  const char *fn);
49 
50 
66 void
69  uint32_t anonymity,
70  int do_index,
71  uint64_t size,
72  uint32_t seed,
73  unsigned int verbose,
75  void *cont_cls);
76 
77 
91 void
94  uint32_t anonymity,
95  uint32_t seed,
96  const struct GNUNET_FS_Uri *uri,
97  unsigned int verbose,
99  void *cont_cls);
100 
101 
102 #endif
void(* GNUNET_FS_TEST_UriContinuation)(void *cls, const struct GNUNET_FS_Uri *uri, const char *fn)
Function signature.
Definition: fs_test_lib.h:46
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_TaskCallback cont, void *cont_cls)
Perform test download.
Definition: fs_test_lib.c:600
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, unsigned int verbose, GNUNET_FS_TEST_UriContinuation cont, void *cont_cls)
Publish a file at the given daemon.
Definition: fs_test_lib.c:433
static struct GNUNET_TIME_Relative timeout
Desired timeout for the lookup (default is no timeout).
Definition: gnunet-abd.c:61
static int verbose
static unsigned int anonymity
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
API for file sharing via GNUnet.
API for writing tests and creating large-scale emulation testbeds for GNUnet.
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
static unsigned int size
Size of the "table".
Definition: peer.c:68
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:167
A peer controlled by the testing framework.
Time for relative time used by GNUnet, in microseconds.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.