helper functions for command-line argument processing More...
Go to the source code of this file.
Functions | |
static int | getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, void *scls, const char *option, const char *value) |
Command-line option parser function that allows the user to specify one or more '-k' options with keywords. More... | |
struct GNUNET_GETOPT_CommandLineOption | GNUNET_FS_GETOPT_KEYWORDS (char shortName, const char *name, const char *argumentHelp, const char *description, struct GNUNET_FS_Uri **topKeywords) |
Allow user to specify keywords. More... | |
static int | getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, void *scls, const char *option, const char *value) |
Command-line option parser function that allows the user to specify one or more '-m' options with metadata. More... | |
struct GNUNET_GETOPT_CommandLineOption | GNUNET_FS_GETOPT_METADATA (char shortName, const char *name, const char *argumentHelp, const char *description, struct GNUNET_FS_MetaData **meta) |
Allow user to specify metadata. More... | |
helper functions for command-line argument processing
Definition in file fs_getopt.c.
|
static |
Command-line option parser function that allows the user to specify one or more '-k' options with keywords.
Each specified keyword will be added to the URI. A pointer to the URI must be passed as the "scls" argument.
ctx | command line processor context |
scls | must be of type "struct GNUNET_FS_Uri **" |
option | name of the option (typically 'k') |
value | command line argument given |
Definition at line 46 of file fs_getopt.c.
References GNUNET_array_append, GNUNET_assert, GNUNET_FS_URI_KSK, GNUNET_malloc, GNUNET_memcpy, GNUNET_new, GNUNET_OK, GNUNET_strdup, GNUNET_SYSERR, u, uri, and value.
Referenced by GNUNET_FS_GETOPT_KEYWORDS().
|
static |
Command-line option parser function that allows the user to specify one or more '-m' options with metadata.
Each specified entry of the form "type=value" will be added to the metadata. A pointer to the metadata must be passed as the "scls" argument.
ctx | command line processor context |
scls | must be of type "struct GNUNET_MetaData **" |
option | name of the option (typically 'k') |
value | command line argument given |
Definition at line 162 of file fs_getopt.c.
References _, dgettext, GNUNET_free, GNUNET_FS_meta_data_create(), GNUNET_FS_meta_data_insert(), GNUNET_OK, GNUNET_strdup, LIBEXTRACTOR_GETTEXT_DOMAIN, meta, type, and value.
Referenced by GNUNET_FS_GETOPT_METADATA().