CLISH  0.7.3
pargv.h
1 /*
2  * pargv.h
3  */
13 #ifndef _clish_pargv_h
14 #define _clish_pargv_h
15 
16 typedef enum
17 {
18  clish_LINE_OK,
19  clish_BAD_CMD,
20  clish_BAD_PARAM,
21  clish_BAD_HISTORY
22 } clish_pargv_status_t;
23 
24 typedef struct clish_pargv_s clish_pargv_t;
25 typedef struct clish_parg_s clish_parg_t;
26 
27 #include "clish/ptype.h"
28 #include "clish/command.h"
29 
30 /*=====================================
31  * PARGV INTERFACE
32  *===================================== */
33 /*-----------------
34  * meta functions
35  *----------------- */
36 clish_pargv_t *
37  clish_pargv_new(const clish_command_t *cmd,
38  const char *line,
39  size_t offset,
40  clish_pargv_status_t *status);
41 /*-----------------
42  * methods
43  *----------------- */
44 void
45  clish_pargv_delete(clish_pargv_t *instance);
46 const clish_parg_t *
47  clish_pargv_find_arg(clish_pargv_t *instance,
48  const char *name);
49 void
50  clish_pargv_dump(const clish_pargv_t *instance);
51 /*-----------------
52  * attributes
53  *----------------- */
54 
55 /*=====================================
56  * PARG INTERFACE
57  *===================================== */
58 /*-----------------
59  * meta functions
60  *----------------- */
61 /*-----------------
62  * methods
63  *----------------- */
64 void
65  clish_parg_dump(const clish_parg_t *instance);
66 /*-----------------
67  * attributes
68  *----------------- */
69 const char *
70  clish_parg__get_name(const clish_parg_t *instance);
71 const char *
72  clish_parg__get_value(const clish_parg_t *instance);
73 const clish_ptype_t *
74  clish_parg__get_ptype(const clish_parg_t *instance);
75 
76 
77 #endif /* _clish_pargv_h */
78