diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-02 20:08:08 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-02 20:08:08 +0000 |
commit | 4d278f5a3813862296397db2d11b5759cd177320 (patch) | |
tree | ff6761becbe4ea972ace79ad68b99867207e4ce1 /include | |
parent | 32b085da104290d60bbf4ae98ae9ad7a08abe57b (diff) |
Add description to manager_action structure, and add some comments.
Add ast_manager_register2 which adds description as an additional arg
Rework how events are added so they get ordered alphabetically
Add 'show manager command <commandname>' (with tab completion) to
view info on each command
Added descriptions to 'Ping' and 'Originate' but they kinda suck, so we
need other people to come up with good descriptions for each of the
manager commands.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3132 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/manager.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h index 26abd9d22..d25e150d8 100755 --- a/include/asterisk/manager.h +++ b/include/asterisk/manager.h @@ -49,7 +49,7 @@ #define EVENT_FLAG_AGENT (1 << 5) /* Ability to read/set agent info */ #define EVENT_FLAG_USER (1 << 6) /* Ability to read/set user info */ -/* JDG: export manager structures */ +/* Export manager structures */ #define MAX_HEADERS 80 #define MAX_LEN 256 @@ -77,20 +77,27 @@ struct message { }; struct manager_action { - char action[256]; + /*! Name of the action */ + char *action; + /*! Short description of the action */ char *synopsis; + /*! Detailed description of the action */ + char *description; + /*! Permission required for action. EVENT_FLAG_* */ int authority; + /*! Function to be called */ int (*func)(struct mansession *s, struct message *m); + /*! For easy linking */ struct manager_action *next; }; int ast_carefulwrite(int fd, char *s, int len, int timeoutms); /* External routines may register/unregister manager callbacks this way */ -int ast_manager_register( char *action, int authority, - int (*func)(struct mansession *s, struct message *m), char *synopsis); +#define ast_manager_register(a, b, c, d) ast_manager_register2(a, b, c, d, NULL) +int ast_manager_register2( char *action, int authority, + int (*func)(struct mansession *s, struct message *m), char *synopsis, char *description); int ast_manager_unregister( char *action ); -/* /JDG */ /* External routines may send asterisk manager events this way */ extern int manager_event(int category, char *event, char *contents, ...) |