special file-sharing functions More...
#include "gnunet_fs_service.h"
Go to the source code of this file.
Functions | |
static enum GNUNET_GenericReturnValue | print_indexed (void *cls, const char *filename, const struct GNUNET_HashCode *file_id) |
Print indexed filenames to stdout. More... | |
static void | do_shutdown (void *cls) |
Function run on shutdown. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Main function that will be run by the scheduler. More... | |
int | main (int argc, char *const *argv) |
The main function to access special file-sharing functions. More... | |
Variables | |
static int | ret |
Return value. More... | |
static struct GNUNET_FS_Handle * | fs |
Handle to FS service. More... | |
static struct GNUNET_FS_GetIndexedContext * | gic |
Handle for the index listing operation. More... | |
static int | list_indexed_files |
Option -i given? More... | |
static unsigned int | verbose |
Option -v given? More... | |
special file-sharing functions
Definition in file gnunet-fs.c.
|
static |
Print indexed filenames to stdout.
cls | closure |
filename | the name of the file |
file_id | hash of the contents of the indexed file |
Definition at line 62 of file gnunet-fs.c.
References filename, gic, GNUNET_h2s(), GNUNET_OK, GNUNET_SCHEDULER_shutdown(), and verbose.
Referenced by run().
|
static |
Function run on shutdown.
cls | NULL |
Definition at line 91 of file gnunet-fs.c.
References fs, gic, GNUNET_FS_get_indexed_files_cancel(), and GNUNET_FS_stop().
Referenced by run().
|
static |
Main function that will be run by the scheduler.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 116 of file gnunet-fs.c.
References cfg, do_shutdown(), fs, gic, GNUNET_FS_FLAGS_NONE, GNUNET_FS_get_indexed_files(), GNUNET_FS_OPTIONS_END, GNUNET_FS_start(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), list_indexed_files, print_indexed(), and ret.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function to access special file-sharing functions.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 156 of file gnunet-fs.c.
References gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_verbose(), GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), list_indexed_files, options, ret, run(), and verbose.
|
static |
|
static |
Handle to FS service.
Definition at line 35 of file gnunet-fs.c.
Referenced by do_shutdown(), get_topo_string_from_file(), GNUNET_CONFIGURATION_parse(), print_key(), publish_inspector(), and run().
|
static |
Handle for the index listing operation.
Definition at line 40 of file gnunet-fs.c.
Referenced by do_shutdown(), GNUNET_FS_get_indexed_files(), GNUNET_FS_get_indexed_files_cancel(), handle_index_info(), handle_index_info_end(), mq_error_handler(), print_indexed(), and run().
|
static |
|
static |
Option -v given?
Definition at line 50 of file gnunet-fs.c.
Referenced by main(), and print_indexed().