#include <AmSessionContainer.h>
Inheritance diagram for AmSessionContainer:

Public Member Functions | |
| AmSession * | createSession (AmSipRequest &req) |
| bool | addSession (const string &callid, const string &remote_tag, const string &local_tag, AmSession *session) |
| bool | addSession (const string &local_tag, AmSession *session) |
| void | startSessionUAS (AmSipRequest &req) |
| AmSession * | startSessionUAC (AmSipRequest &req) |
| void | destroySession (AmSession *s) |
| void | destroySession (const string &local_tag) |
| int | getSize () |
| bool | postEvent (const string &callid, const string &remote_tag, AmEvent *event) |
| bool | postEvent (const string &local_tag, AmEvent *event) |
Static Public Member Functions | |
| static AmSessionContainer * | instance () |
This is the register for all active and dead sessions. If has a deamon which wakes up only if it has work. Then, it kills all dead sessions and try to go to bed (it cannot sleep if one or more sessions are still alive).
| bool AmSessionContainer::addSession | ( | const string & | local_tag, | |
| AmSession * | session | |||
| ) |
Adds a session to the container.
| bool AmSessionContainer::addSession | ( | const string & | callid, | |
| const string & | remote_tag, | |||
| const string & | local_tag, | |||
| AmSession * | session | |||
| ) |
Adds a session to the container (UAS only).
| AmSession * AmSessionContainer::createSession | ( | AmSipRequest & | req | ) |
Creates a new session.
| req | local request |
| void AmSessionContainer::destroySession | ( | AmSession * | s | ) |
Detroys a session.
| int AmSessionContainer::getSize | ( | ) |
Query the number of active sessions
| bool AmSessionContainer::postEvent | ( | const string & | local_tag, | |
| AmEvent * | event | |||
| ) |
post a generic event into the event queue of the identified dialog. sess_key is local_tag (to_tag) note: if hash_str is known, use postGenericEvent(hash_str,sess_key,event); for better performance.
| bool AmSessionContainer::postEvent | ( | const string & | callid, | |
| const string & | remote_tag, | |||
| AmEvent * | event | |||
| ) |
post an event into the event queue of the identified dialog.
| AmSession * AmSessionContainer::startSessionUAC | ( | AmSipRequest & | req | ) |
Constructs a new session and adds it to the active session container.
| req | client's request |
| void AmSessionContainer::startSessionUAS | ( | AmSipRequest & | req | ) |
Constructs a new session and adds it to the active session container.
| req | client's request |
1.4.7