Codename Pineapple

Home page | Mailing list | Docs

Last updated: Sat Feb 3 05:02:02 2007

Asterisk developer's documentation :: Codename Pineapple


mansession Struct Reference
[AMI functions]

Collaboration diagram for mansession:

Collaboration graph
[legend]

Detailed Description

Descriptor for a manager session, either on the AMI socket or over HTTP. AMI session have managerid == 0; the entry is created upon a connect, and destroyed with the socket. HTTP sessions have managerid != 0, the value is used as a search key to lookup sessions (using the mansession_id cookie).

Definition at line 125 of file manager.c.

Data Fields

ast_mutex_t __lock
int authenticated
char challenge [10]
FILE * f
int fd
char inbuf [1025]
int inlen
int inuse
eventqentlast_ev
unsigned long managerid
pthread_t ms_t
int needdestroy
int readperm
int send_events
time_t sessiontimeout
sockaddr_in sin
char username [80]
pthread_t waiting_thread
int writeperm
int writetimeout


Field Documentation

ast_mutex_t __lock
 

Thread lock -- don't use in action callbacks, it's already taken care of

Definition at line 127 of file manager.c.

int authenticated
 

Authentication status

Definition at line 139 of file manager.c.

char challenge[10]
 

Authentication challenge

Definition at line 138 of file manager.c.

FILE* f
 

fdopen() on the underlying fd

Definition at line 130 of file manager.c.

int fd
 

descriptor used for output. Either the socket (AMI) or a temporary file (HTTP)

Definition at line 131 of file manager.c.

char inbuf[1025]
 

Buffer

Definition at line 142 of file manager.c.

int inlen
 

number of buffered bytes

Definition at line 144 of file manager.c.

int inuse
 

number of HTTP sessions using this entry

Definition at line 132 of file manager.c.

struct eventqent* last_ev
 

last event processed.

Definition at line 146 of file manager.c.

unsigned long managerid
 

Unique manager identifier, 0 for AMI sessions

Definition at line 135 of file manager.c.

pthread_t ms_t
 

Execution thread, basically useless

Definition at line 126 of file manager.c.

int needdestroy
 

Whether an HTTP session should be destroyed

Definition at line 133 of file manager.c.

int readperm
 

Authorization for reading

Definition at line 140 of file manager.c.

int send_events
 

XXX what ?

Definition at line 145 of file manager.c.

time_t sessiontimeout
 

Session timeout if HTTP

Definition at line 136 of file manager.c.

struct sockaddr_in sin
 

address we are connecting from

Definition at line 129 of file manager.c.

char username[80]
 

Logged in username

Definition at line 137 of file manager.c.

pthread_t waiting_thread
 

Sleeping thread using this descriptor

Definition at line 134 of file manager.c.

int writeperm
 

Authorization for writing

Definition at line 141 of file manager.c.

int writetimeout
 

Timeout for ast_carefulwrite()

Definition at line 147 of file manager.c.


The documentation for this struct was generated from the following file:

Asterisk is a trademark for Digium, inc.. | Edvina.net | Asterisk.org | This documentation was generated with Doxygen