Fri Jul 3 20:35:53 2009

Asterisk developer's documentation


app_conference.c File Reference

#include "asterisk.h"
#include "app_conference.h"
#include "common.h"

Include dependency graph for app_conference.c:

Go to the source code of this file.

Defines

#define AST_MODULE   "Conference"
#define REVISION   "unknown"

Functions

void add_milliseconds (struct timeval *tv, long ms)
static int app_conference_main (struct ast_channel *chan, void *data)
 AST_MODULE_INFO_STANDARD (ASTERISK_GPL_KEY,"Channel Independent Conference Application")
static int load_module (void)
static int unload_module (void)

Variables

static char * app = "Conference"
static char * descrip = "Channel Independent Conference Application"
static char * revision = REVISION
static char * synopsis = "Channel Independent Conference"


Define Documentation

#define AST_MODULE   "Conference"

Definition at line 112 of file app_conference.c.

#define REVISION   "unknown"

Definition at line 32 of file app_conference.c.


Function Documentation

void add_milliseconds ( struct timeval *  tv,
long  ms 
)

Definition at line 97 of file app_conference.c.

References s.

00098 {
00099    // add the microseconds to the microseconds field
00100    tv->tv_usec += ( ms * 1000 ) ;
00101 
00102    // calculate the number of seconds to increment
00103    long s = ( tv->tv_usec / 1000000 ) ;
00104 
00105    // adjust the microsends field
00106    if ( s > 0 ) tv->tv_usec -= ( s * 1000000 ) ;
00107 
00108    // increment the seconds field
00109    tv->tv_sec += s ;
00110 }

static int app_conference_main ( struct ast_channel *  chan,
void *  data 
) [static]

Definition at line 59 of file app_conference.c.

References ast_module_user_add, and ast_module_user_remove.

Referenced by load_module().

00060 {
00061    int res ;
00062    struct ast_module_user *u ;
00063 
00064    u = ast_module_user_add(chan);
00065 
00066    // call member thread function
00067    res = member_exec( chan, data ) ;
00068 
00069    ast_module_user_remove(u);
00070 
00071    return res ;
00072 }

AST_MODULE_INFO_STANDARD ( ASTERISK_GPL_KEY  ,
"Channel Independent Conference Application"   
)

static int load_module ( void   )  [static]

Definition at line 85 of file app_conference.c.

References app_conference_main(), ast_log(), ast_register_application(), LOG_NOTICE, and revision.

00086 {
00087    ast_log( LOG_NOTICE, "Loading app_conference module, revision=%s\n", revision) ;
00088 
00089    init_conference() ;
00090 
00091    register_conference_cli() ;
00092 
00093    return ast_register_application( app, app_conference_main, synopsis, descrip ) ;
00094 }

static int unload_module ( void   )  [static]

Definition at line 74 of file app_conference.c.

References ast_log(), ast_module_user_hangup_all, ast_unregister_application(), and LOG_NOTICE.

00075 {
00076    ast_log( LOG_NOTICE, "unloading app_conference module\n" ) ;
00077 
00078    ast_module_user_hangup_all();
00079 
00080    unregister_conference_cli() ;
00081 
00082    return ast_unregister_application( app ) ;
00083 }


Variable Documentation

char* app = "Conference" [static]

Definition at line 55 of file app_conference.c.

char* descrip = "Channel Independent Conference Application" [static]

Definition at line 57 of file app_conference.c.

char* revision = REVISION [static]

Definition at line 35 of file app_conference.c.

Referenced by load_module().

char* synopsis = "Channel Independent Conference" [static]

Definition at line 56 of file app_conference.c.


Generated on Fri Jul 3 20:35:53 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.9