c-ipfs/include/ipfs/commands/argument.h

23 lines
651 B
C
Raw Normal View History

2016-10-27 01:14:07 +00:00
#ifndef __COMMANDS_ARGUMENT_H__
#define __COMMANDS_ARGUMENT_H__
2016-10-27 18:11:34 +00:00
enum ArgumentType { string, file };
2016-10-27 01:14:07 +00:00
2016-10-27 18:11:34 +00:00
struct Argument {
2016-10-27 01:14:07 +00:00
char* name;
2016-10-27 18:11:34 +00:00
enum ArgumentType type;
2016-10-27 01:14:07 +00:00
int required;
int variadic;
int supports_stdin;
int recursive;
char* description;
int enable_stdin;
};
2016-10-27 18:11:34 +00:00
int init_argument(struct Argument* argument, char* name, int required, int variadic, char* description);
int uninit_argument(struct Argument* argument);
int init_string_argument(struct Argument* argument, char* name, int required, int variadic, char* description);
int init_file_argument(struct Argument* argument, char* name, int required, int variadic, char* description);
2016-10-27 01:14:07 +00:00
#endif