00001
00002
00003
00013 #ifndef _clish_pargv_h
00014 #define _clish_pargv_h
00015
00016 typedef enum
00017 {
00018 clish_LINE_OK,
00019 clish_BAD_CMD,
00020 clish_BAD_PARAM,
00021 clish_BAD_HISTORY
00022 } clish_pargv_status_t;
00023
00024 typedef struct clish_pargv_s clish_pargv_t;
00025 typedef struct clish_parg_s clish_parg_t;
00026
00027 #include "clish/ptype.h"
00028 #include "clish/command.h"
00029
00030
00031
00032
00033
00034
00035
00036 clish_pargv_t *
00037 clish_pargv_new(const clish_command_t *cmd,
00038 const char *line,
00039 size_t offset,
00040 clish_pargv_status_t *status);
00041
00042
00043
00044 void
00045 clish_pargv_delete(clish_pargv_t *instance);
00046 const clish_parg_t *
00047 clish_pargv_find_arg(clish_pargv_t *instance,
00048 const char *name);
00049 void
00050 clish_pargv_dump(const clish_pargv_t *instance);
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 void
00065 clish_parg_dump(const clish_parg_t *instance);
00066
00067
00068
00069 const char *
00070 clish_parg__get_name(const clish_parg_t *instance);
00071 const char *
00072 clish_parg__get_value(const clish_parg_t *instance);
00073 const clish_ptype_t *
00074 clish_parg__get_ptype(const clish_parg_t *instance);
00075
00076
00077 #endif
00078