#include "asterisk/autoconfig.h"
#include "app_conference.h"
#include "common.h"
#include "asterisk/module.h"
Include dependency graph for app_conference.c:
Go to the source code of this file.
Functions | |
void | add_milliseconds (struct timeval *tv, long ms) |
int | app_conference_main (struct ast_channel *chan, void *data) |
AST_MODULE_INFO_STANDARD (ASTERISK_GPL_KEY,"Conference") | |
static int | load_module (void *mod) |
static int | unload_module (void *mod) |
long | usecdiff (struct timeval *timeA, struct timeval *timeB) |
Variables | |
static char * | app = "Conference" |
static char * | descrip |
static char * | synopsis = "Channel Independent Conference" |
void add_milliseconds | ( | struct timeval * | tv, | |
long | ms | |||
) |
Definition at line 123 of file app_conference.c.
References s.
00124 { 00125 // add the microseconds to the microseconds field 00126 tv->tv_usec += ( ms * 1000 ) ; 00127 00128 // calculate the number of seconds to increment 00129 long s = ( tv->tv_usec / 1000000 ) ; 00130 00131 // adjust the microsends field 00132 if ( s > 0 ) tv->tv_usec -= ( s * 1000000 ) ; 00133 00134 // increment the seconds field 00135 tv->tv_sec += s ; 00136 00137 return ; 00138 }
int app_conference_main | ( | struct ast_channel * | chan, | |
void * | data | |||
) |
Definition at line 90 of file app_conference.c.
References ast_module_user_add, ast_module_user_remove, and ast_module_user::chan.
Referenced by load_module().
00091 { 00092 int res = 0 ; 00093 struct ast_module_user *u ; 00094 00095 // defined in asterisk/module.h 00096 //LOCAL_USER_ADD( u ) ; 00097 u = ast_module_user_add(chan); 00098 00099 // call member thread function 00100 res = member_exec( chan, data ) ; 00101 00102 // defined in asterisk/module.h 00103 //LOCAL_USER_REMOVE( u ) ; 00104 ast_module_user_remove (u); 00105 00106 return res ; 00107 }
AST_MODULE_INFO_STANDARD | ( | ASTERISK_GPL_KEY | , | |
"Conference" | ||||
) |
static int load_module | ( | void * | mod | ) | [static] |
Definition at line 73 of file app_conference.c.
References app, app_conference_main(), ast_log(), ast_register_application(), descrip, LOG_NOTICE, and synopsis.
00074 { 00075 ast_log( LOG_NOTICE, "loading app_conference module [ $Revision: 693 $ ]\n" ) ; 00076 00077 // intialize conference 00078 init_conference() ; 00079 00080 // register conference cli functions 00081 register_conference_cli() ; 00082 00083 return ast_register_application( app, app_conference_main, synopsis, descrip ) ; 00084 }
static int unload_module | ( | void * | mod | ) | [static] |
Definition at line 60 of file app_conference.c.
References app, ast_log(), ast_module_user_hangup_all, ast_unregister_application(), and LOG_NOTICE.
00061 { 00062 ast_log( LOG_NOTICE, "unloading app_conference module\n" ) ; 00063 00064 ast_module_user_hangup_all(); 00065 //STANDARD_HANGUP_LOCALUSERS ; // defined in asterisk/module.h 00066 00067 // register conference cli functions 00068 unregister_conference_cli() ; 00069 00070 return ast_unregister_application( app ) ; 00071 }
long usecdiff | ( | struct timeval * | timeA, | |
struct timeval * | timeB | |||
) |
Definition at line 114 of file app_conference.c.
00115 { 00116 long a_secs = timeA->tv_sec - timeB->tv_sec ; 00117 long b_secs = (long)( timeA->tv_usec / 1000 ) - (long)( timeB->tv_usec / 1000 ) ; 00118 long u_secs = ( a_secs * 1000 ) + b_secs ; 00119 return u_secs ; 00120 }
char* app = "Conference" [static] |
Definition at line 50 of file app_conference.c.
char* descrip [static] |
Initial value:
" Conference(): returns 0\n" "if the user exits with the '#' key, or -1 if the user hangs up.\n"
Definition at line 52 of file app_conference.c.
char* synopsis = "Channel Independent Conference" [static] |
Definition at line 51 of file app_conference.c.