command.h

00001 /*
00002  * command.h
00003  */
00004 #ifndef _clish_command_h
00005 #define _clish_command_h
00006 
00007 typedef struct clish_command_s clish_command_t;
00008 
00009 #include "lub/bintree.h"
00010 #include "clish/pargv.h"
00011 #include "clish/view.h"
00012 #include "clish/param.h"
00013 
00014 /*=====================================
00015  * COMMAND INTERFACE
00016  *===================================== */
00017 /*-----------------
00018  * meta functions
00019  *----------------- */
00020 clish_command_t *
00021     clish_command_new(const char *name,
00022                       const char *text);
00023 int
00024     clish_command_bt_compare(const void *clientnode,
00025                              const void *clientkey);
00026 void
00027     clish_command_bt_getkey(const void        *clientnode,
00028                             lub_bintree_key_t *key);
00029 size_t
00030     clish_command_bt_offset(void);
00031 clish_command_t *
00032     clish_command_choose_longest(clish_command_t *cmd1,
00033                                  clish_command_t *cmd2);
00034 int
00035     clish_command_diff(const clish_command_t *cmd1,
00036                        const clish_command_t *cmd2);
00037 /*-----------------
00038  * methods
00039  *----------------- */
00040 void
00041     clish_command_delete(clish_command_t *instance);
00042 void
00043     clish_command_insert_param(clish_command_t *instance,
00044                                clish_param_t   *param);
00045 void
00046     clish_command_help(const clish_command_t *instance);
00047 const clish_param_t *
00048     clish_command_find_option(const clish_command_t *instance,
00049                               const char            *name);
00050 void
00051     clish_command_dump(const clish_command_t *instance);
00052 const clish_param_t *
00053     clish_command_next_non_option(const clish_command_t *cmd,
00054                                   unsigned              *index);
00055 /*-----------------
00056  * attributes 
00057  *----------------- */
00058 const char *
00059     clish_command__get_name(const clish_command_t *instance);
00060 const char *
00061     clish_command__get_suffix(const clish_command_t *instance);
00062 const char *
00063     clish_command__get_text(const clish_command_t *instance);
00064 const char *
00065     clish_command__get_detail(const clish_command_t *instance);
00066 const char *
00067     clish_command__get_builtin(const clish_command_t *instance);
00068 const char *
00069     clish_command__get_escape_chars(const clish_command_t *instance);
00070 const clish_param_t *
00071     clish_command__get_args(const clish_command_t *instance);
00072 char *
00073     clish_command__get_action(const clish_command_t *instance,
00074                               const char            *viewid,
00075                               clish_pargv_t         *pargv);
00076 clish_view_t *
00077     clish_command__get_view(const clish_command_t *instance);
00078 char *
00079     clish_command__get_viewid(const clish_command_t *instance,
00080                               const char            *viewid,
00081                               clish_pargv_t         *pargv);
00082 const unsigned
00083 clish_command__get_param_count(const clish_command_t *instance);
00084 const clish_param_t *
00085     clish_command__get_param(const clish_command_t *instance,
00086                              unsigned               index);
00087 void
00088     clish_command__set_action(clish_command_t *instance,
00089                               const char      *action);
00090 void
00091     clish_command__set_builtin(clish_command_t *instance,
00092                                const char      *builtin);
00093 void
00094     clish_command__set_escape_chars(clish_command_t *instance,
00095                                     const char      *escape_chars);
00096 void
00097     clish_command__set_args(clish_command_t *instance,
00098                             clish_param_t   *args);
00099 void
00100     clish_command__set_detail(clish_command_t *instance,
00101                               const char      *detail);
00102 void
00103     clish_command__set_view(clish_command_t *instance,
00104                             clish_view_t      *view);
00105 void
00106     clish_command__set_viewid(clish_command_t *instance,
00107                               const char      *viewid);
00108 #endif /* _clish_command_h */

Generated on Tue Apr 29 13:41:07 2008 for CLISH by  doxygen 1.5.1