Codename Pineapple

Home page | Mailing list | Docs

Last updated: Sat Feb 3 05:01:59 2007

Asterisk developer's documentation :: Codename Pineapple


ast_cli_entry Struct Reference

#include <cli.h>

Collaboration diagram for ast_cli_entry:

Collaboration graph
[legend]

Detailed Description

descriptor for a cli entry See CLI_command_API

Definition at line 153 of file cli.h.

Public Member Functions

 AST_LIST_ENTRY (ast_cli_entry) list

Data Fields

char * _deprecated_by
char * _full_cmd
int args
 This gets set in ast_cli_register() It then gets set to something different when the deprecated command is run for the first time (ie; after we warn the user that it's deprecated).
char *const cmda [AST_MAX_CMD_LEN]
int cmdlen
char * command
ast_cli_entrydeprecate_cmd
int deprecated
char *(* generator )(const char *line, const char *word, int pos, int n)
old_cli_fn handler
int inuse
modulemodule
new_cli_fn new_handler
const char * summary
const char * usage


Member Function Documentation

AST_LIST_ENTRY ast_cli_entry   ) 
 

For linking


Field Documentation

char* _deprecated_by
 

copied from the "parent" _full_cmd, on deprecated commands

Definition at line 193 of file cli.h.

Referenced by ast_cli_command().

char* _full_cmd
 

built at load time from cmda[]

Definition at line 183 of file cli.h.

Referenced by __ast_cli_unregister(), ast_cli_command(), cli_next(), help1(), and set_full_cmd().

int args
 

This gets set in ast_cli_register() It then gets set to something different when the deprecated command is run for the first time (ie; after we warn the user that it's deprecated).

number of non-null entries in cmda

Definition at line 189 of file cli.h.

Referenced by console_answer(), console_autoanswer(), console_dial(), console_flash(), console_hangup(), console_mute(), console_sendtext(), handle_chanlist(), handle_core_set_debug_channel(), handle_debugchan_deprecated(), handle_load(), handle_modlist(), handle_nodebugchan_deprecated(), handle_reload(), handle_showuptime(), handle_unload(), handle_verbose(), and set_full_cmd().

char* const cmda[AST_MAX_CMD_LEN]
 

words making up the command. set the first entry to NULL for a new-style entry.

Definition at line 154 of file cli.h.

Referenced by __ast_cli_generator(), __ast_cli_register(), __ast_cli_unregister(), ast_builtins_init(), cli_next(), and set_full_cmd().

int cmdlen
 

len up to the first invalid char [<{%

Definition at line 184 of file cli.h.

Referenced by set_full_cmd().

char* command
 

command, non-null for new-style entries

Definition at line 190 of file cli.h.

Referenced by __ast_cli_register(), __ast_cli_unregister(), console_answer(), console_autoanswer(), console_dial(), console_flash(), console_hangup(), console_mute(), console_sendtext(), handle_chanlist(), handle_core_set_debug_channel(), handle_debugchan_deprecated(), handle_help(), handle_load(), handle_load_deprecated(), handle_modlist(), handle_nodebugchan_deprecated(), handle_reload(), handle_reload_deprecated(), handle_showuptime(), handle_unload(), handle_unload_deprecated(), and handle_verbose().

struct ast_cli_entry* deprecate_cmd
 

Definition at line 179 of file cli.h.

Referenced by __ast_cli_unregister().

int deprecated
 

Definition at line 191 of file cli.h.

Referenced by ast_cli_command(), and help1().

char*(* generator)(const char *line, const char *word, int pos, int n)
 

Generate the n-th (starting from 0) possible completion for a given 'word' following 'line' in position 'pos'. 'line' and 'word' must not be modified. Must return a malloc'ed string with the n-th value when available, or NULL if the n-th completion does not exist. Typically, the function is called with increasing values for n until a NULL is returned.

old_cli_fn handler
 

Handler for the command (fd for output, # of args, argument list). Returns RESULT_SHOWUSAGE for improper arguments. argv[] has argc 'useful' entries, and an additional NULL entry at the end so that clients requiring NULL terminated arrays can use it without need for copies. You can overwrite argv or the strings it points to, but remember that this memory is deallocated after the handler returns.

Definition at line 165 of file cli.h.

Referenced by __ast_cli_register(), and ast_cli_command().

int inuse
 

For keeping track of usage

Definition at line 181 of file cli.h.

Referenced by __ast_cli_unregister(), and ast_cli_command().

struct module* module
 

module this belongs to

Definition at line 182 of file cli.h.

new_cli_fn new_handler
 

Definition at line 192 of file cli.h.

Referenced by __ast_cli_register(), __ast_cli_unregister(), and ast_cli_command().

const char* summary
 

Summary of the command (< 60 characters)

Definition at line 167 of file cli.h.

Referenced by help1().

const char* usage
 

Detailed usage information

Definition at line 168 of file cli.h.

Referenced by __ast_cli_unregister(), ast_cli_command(), console_answer(), console_autoanswer(), console_dial(), console_flash(), console_hangup(), console_mute(), console_sendtext(), handle_chanlist(), handle_core_set_debug_channel(), handle_help(), handle_load(), handle_modlist(), handle_reload(), handle_showuptime(), handle_unload(), and handle_verbose().


The documentation for this struct was generated from the following file:

Asterisk is a trademark for Digium, inc.. | Edvina.net | Asterisk.org | This documentation was generated with Doxygen