Thu Oct 11 06:44:39 2012

Asterisk developer's documentation


ast_cli_entry Struct Reference

A command line entry. More...

#include <cli.h>

Collaboration diagram for ast_cli_entry:

Collaboration graph
[legend]

Data Fields

char * _deprecated_by
char * _full_cmd
char *const cmda [AST_MAX_CMD_LEN]
struct ast_cli_entrydeprecate_cmd
int deprecated
char *(* generator )(const char *line, const char *word, int pos, int n)
int(* handler )(int fd, int argc, char *argv[])
int inuse
struct {
   struct ast_cli_entry *   next
list
struct modulemodule
const char * summary
const char * usage

Detailed Description

A command line entry.

Definition at line 48 of file cli.h.


Field Documentation

Definition at line 82 of file cli.h.

Referenced by __ast_cli_register(), and ast_cli_command().

char* _full_cmd

module this belongs to

Definition at line 76 of file cli.h.

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

char* const cmda[AST_MAX_CMD_LEN]

Definition at line 49 of file cli.h.

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

struct ast_cli_entry* deprecate_cmd [read]

Definition at line 72 of file cli.h.

Referenced by __ast_cli_register(), and __ast_cli_unregister().

Definition at line 81 of file cli.h.

Referenced by __ast_cli_register(), 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.

Referenced by __ast_cli_generator().

int(* handler)(int fd, int argc, char *argv[])

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.

Referenced by ast_cli_command().

int inuse

For keeping track of usage

Definition at line 74 of file cli.h.

Referenced by __ast_cli_unregister(), and ast_cli_command().

struct { ... } list

For linking

Referenced by __ast_cli_register(), and cli_next().

struct module* module [read]

Definition at line 75 of file cli.h.

struct ast_cli_entry* next [read]

Definition at line 84 of file cli.h.

const char* summary

Summary of the command (< 60 characters)

Definition at line 60 of file cli.h.

Referenced by __ast_cli_register(), and help1().

const char* usage

Detailed usage information

Definition at line 62 of file cli.h.

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


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

Generated on Thu Oct 11 06:44:39 2012 for Asterisk - the Open Source PBX by  doxygen 1.5.6