Sun Aug 6 15:02:53 2006

Asterisk developer's documentation


Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

agi.h File Reference

AGI Extension interfaces - Asterisk Gateway Interface. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef agi_state AGI
typedef agi_command agi_command

Functions

int agi_register (agi_command *cmd)
void agi_unregister (agi_command *cmd)


Detailed Description

AGI Extension interfaces - Asterisk Gateway Interface.

Definition in file agi.h.


Typedef Documentation

typedef struct agi_state AGI
 

typedef struct agi_command agi_command
 


Function Documentation

int agi_register agi_command cmd  ) 
 

Definition at line 1688 of file res_agi.c.

References ast_log(), agi_command::cmda, LOG_WARNING, and MAX_COMMANDS.

01689 {
01690    int x;
01691    for (x=0; x<MAX_COMMANDS - 1; x++) {
01692       if (commands[x].cmda[0] == agi->cmda[0]) {
01693          ast_log(LOG_WARNING, "Command already registered!\n");
01694          return -1;
01695       }
01696    }
01697    for (x=0; x<MAX_COMMANDS - 1; x++) {
01698       if (!commands[x].cmda[0]) {
01699          commands[x] = *agi;
01700          return 0;
01701       }
01702    }
01703    ast_log(LOG_WARNING, "No more room for new commands!\n");
01704    return -1;
01705 }

void agi_unregister agi_command cmd  ) 
 

Definition at line 1707 of file res_agi.c.

References agi_command::cmda, and MAX_COMMANDS.

01708 {
01709    int x;
01710    for (x=0; x<MAX_COMMANDS - 1; x++) {
01711       if (commands[x].cmda[0] == agi->cmda[0]) {
01712          memset(&commands[x], 0, sizeof(agi_command));
01713       }
01714    }
01715 }


Generated on Sun Aug 6 15:02:53 2006 for Asterisk - the Open Source PBX by  doxygen 1.4.2