new event handler onBeforeDestroy(): called in the session thread before the session is destroyed, i.e. after the main event loop has finished

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1162 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 18 years ago
parent 37673396fe
commit 669570bfd3

@ -369,6 +369,7 @@ void AmSession::run()
ERROR("%i %s\n",e.code,e.reason.c_str());
}
onBeforeDestroy();
destroy();
session_num_mut.lock();

@ -416,7 +416,9 @@ public:
* Entry point for SIP events
*/
virtual void onSipEvent(AmSipEvent* sip_ev);
/** Entry point for SIP Requests */
virtual void onSipRequest(const AmSipRequest& req);
/** Entry point for SIP Replies */
virtual void onSipReply(const AmSipReply& reply);
@ -435,7 +437,7 @@ public:
/** This callback is called if RTP timeout encountered */
virtual void onRtpTimeout();
/* only called by AmSipDialog */
/* Called by AmSipDialog when a request is sent */
virtual void onSendRequest(const string& method,
const string& content_type,
const string& body,
@ -443,6 +445,7 @@ public:
int flags,
unsigned int cseq);
/* Called by AmSipDialog when a reply is sent */
virtual void onSendReply(const AmSipRequest& req,
unsigned int code,
const string& reason,
@ -451,6 +454,12 @@ public:
string& hdrs,
int flags);
/**
* called in the session thread before the session is destroyed,
* i.e. after the main event loop has finished
*/
virtual void onBeforeDestroy() { }
// The IP address to put as c= in SDP bodies and to use for Contact:.
string advertisedIP();
};

Loading…
Cancel
Save