00001 /*
00002 * Asterisk -- A telephony toolkit for Linux.
00003 *
00004 * AGI Extension interfaces
00005 *
00006 * Copyright (C) 1999, Mark Spencer
00007 *
00008 * Mark Spencer <markster@linux-support.net>
00009 *
00010 * This program is free software, distributed under the terms of
00011 * the GNU General Public License
00012 */
00013
00014 #ifndef _ASTERISK_AGI_H
00015 #define _ASTERISK_AGI_H
00016
00017 #if defined(__cplusplus) || defined(c_plusplus)
00018 extern "C" {
00019 #endif
00020
00021 typedef struct agi_state {
00022 int fd; /* FD for general output */
00023 int audio; /* FD for audio output */
00024 int ctrl; /* FD for input control */
00025 } AGI;
00026
00027 typedef struct agi_command {
00028 /* Null terminated list of the words of the command */
00029 char *cmda[AST_MAX_CMD_LEN];
00030 /* Handler for the command (channel, AGI state, # of arguments, argument list).
00031 Returns RESULT_SHOWUSAGE for improper arguments */
00032 int (*handler)(struct ast_channel *chan, AGI *agi, int argc, char *argv[]);
00033 /* Summary of the command (< 60 characters) */
00034 char *summary;
00035 /* Detailed usage information */
00036 char *usage;
00037 struct agi_command *next;
00038 } agi_command;
00039
00040 int agi_register(agi_command *cmd);
00041 void agi_unregister(agi_command *cmd);
00042
00043 #if defined(__cplusplus) || defined(c_plusplus)
00044 }
00045 #endif
00046
00047
00048
00049 #endif
1.2.15