Doxygen Documentation |
||||||
Package: |
CLI |
|||||
Version: |
V0-0-5 |
Marked: |
(not marked) |
|||
Constituent: |
cli |
Tag: |
sun-gcc |
Defines | |
#define | CLI_O_NEGATE 0x0001 |
Can be negated (qualifier only). | |
#define | CLI_O_VALUE 0x0002 |
Must be valued (qualifier only). | |
#define | CLI_O_NOVALUE 0x0004 |
Must not be valued (qualifier only). | |
#define | CLI_O_REQUIRED 0x0008 |
Must be present. | |
#define | CLI_T_LIST 0x0100 |
Value may be a list of values. | |
#define | CLI_T_INTEGER 0x0200 |
Value must be integer. | |
#define | CLI_T_FLOAT 0x0400 |
Value must be floating point. | |
#define | CLI_T_KEYWORD 0x0800 |
Value is drawn from keyword list. | |
#define | CLI_T_RESTOFLINE 0x1000 |
Value is rest of line (parameter only). | |
#define | CLI_T_NEWSNTX 0x2000 |
Value starts a new syntax (parameter only). | |
#define | CLI_SUCCESS 0x00000001 |
Success. | |
#define | CLI_PRESENT 0x00000003 |
Qualifier present. | |
#define | CLI_NEGATED 0x00000005 |
Qualifier present in negated form. | |
#define | CLI_COMMA 0x00000007 |
Another parameter/qualifier value follows. | |
#define | CLI_BADSNTX 0x00000002 |
Bad syntax (discovered in user callback). | |
#define | CLI_ABSENT 0x00000004 |
Qualifier absent. | |
#define | CLI_NOTCTL 0x00000006 |
(Opaque) control structure pointer isn't | |
#define | CLI_NOTSNTX 0x00000008 |
(Opaque) syntax structure pointer isn't | |
#define | CLI_ENDOFCMD 0xffffffff |
Request exit from command processing. | |
Typedefs | |
typedef _CLI_KeyDef | CLI_KeyDef |
Typedef for struct _CLI_KeyDef. | |
typedef _CLI_KeyList | CLI_KeyList |
Typedef for struct _CLI_KeyList. | |
typedef _CLI_ParmDef | CLI_ParmDef |
Typedef for struct _CLI_ParmDef. | |
typedef _CLI_QualDef | CLI_QualDef |
Typedef for struct _CLI_QualDef. | |
typedef _CLI_VerbDef | CLI_VerbDef |
Typedef for struct _CLI_VerbDef. | |
typedef _CLI_Syntax | CLI_Syntax |
Typedef for struct _CLI_Syntax. | |
typedef _CLI_Control | CLI_Control |
Typedef for struct _CLI_Control. | |
typedef unsigned int | CLI_CB_Func (CLI_Control *, void *) |
Typedef for a CLI verb callback routine. | |
Functions | |
CLI_Syntax * | CLI_createSyntax (const char *) |
Create a new CLI syntax. | |
CLI_KeyList * | CLI_createKeyList (const char *) |
Create a new CLI keyword list. | |
CLI_KeyDef * | CLI_addKey (const CLI_KeyList *, const char *) |
Add a key to a CLI keyword list. | |
CLI_VerbDef * | CLI_addVerb (const CLI_Syntax *, const char *, const char *, CLI_CB_Func *) |
Add a verb to a CLI syntax. | |
CLI_ParmDef * | CLI_addParm (CLI_VerbDef *, unsigned short, unsigned short, void *) |
Add a parameter to a CLI verb. | |
CLI_QualDef * | CLI_addQual (CLI_VerbDef *, const char *, unsigned short, unsigned short, CLI_KeyList *) |
Add a qualifier to a CLI verb. | |
unsigned int | CLI_command (const char *, const char *, const CLI_Syntax *, void *) |
Process commands. | |
unsigned int | CLI_present (CLI_Control *, const char *) |
Test for the presence of a qualifier. | |
unsigned int | CLI_getValue (const CLI_Control *, const char *, const char **) |
Return the value of some object. |
CVS $Id: CLI_pubdefs.h,v 1.4 2003/12/12 06:13:49 apw Exp $
The other public interface file CLI_dmpdefs.h should only be included in cases where access to the debugging/dumping routines is also required (in which case the shareable clidmp.so must be added to the calling program's link step ... see "TV" for an example of how to do this).
|
Typedef for a CLI verb callback routine. This defines the signature of a CLI callback function. The first argument is an opaque pointer to a CLI control structure. It should be passed through unaltered as the first argument to the CLI_getValue() and CLI_present() routines. The second argument is simply the user argument which was given in the call to CLI_command(). It's provided for the user to pass context through to the callback routines. |
|
Add a key to a CLI keyword list.
|
|
Add a parameter to a CLI verb.
The opts and type arguments should be supplied as an OR of the provided C macros. There are occasions where options and types interact such that one excludes another (e.g. for a qualifier it makes no sense to define it as both requiring a value ( Parameter options:
Parameter types:
|
|
Add a qualifier to a CLI verb.
The opts and type arguments should be supplied as an OR of the provided C macros. There are occasions where options and types interact such that one excludes another (e.g. for a qualifier it makes no sense to define it as both requiring a value ( Qualifier options:
Qualifier types:
|
|
Add a verb to a CLI syntax.
Naming the callback function (argument name) is implemented for future expansion (it has no current use). |
|
Process commands.
|
|
Create a new CLI keyword list.
|
|
Create a new CLI syntax.
|
|
Return the value of some object.
|
|
Test for the presence of a qualifier.
|