[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Sep 14 18:52:51 CDT 2010


branch "master" has been updated
       via  4cba60c52ea9e6bc7e37842cc4b0648b14e1553c (commit)
      from  40408d535a5cc2797127bb0df0f96071c5a6783a (commit)

Summary of changes:
 src/PJSipSessionModule.cpp |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 4cba60c52ea9e6bc7e37842cc4b0648b14e1553c
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Sep 14 18:53:38 2010 -0500

    Add new SessionModInfo class.
    
    First thing tomorrow morning is to make use of it.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index ca8bfce..e5e0d5b 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -129,6 +129,7 @@ class PJSipTransactionModInfo
       mTransactionState->mBranch = std::string(pj_strbuf(&transaction->branch), pj_strlen(&transaction->branch));
 	  mTransactionState->mIsClient = (transaction->role == PJSIP_ROLE_UAC || transaction->role == PJSIP_UAC_ROLE) ? true : false;
 	  mTransactionState->mCurrentState = transactionStateTranslate(transaction->state);
+	  mNeedsUpdate = true;
    }
 private:
    TransactionState transactionStateTranslate(pjsip_tsx_state_e state)
@@ -171,6 +172,35 @@ private:
    bool mNeedsUpdate;
 };
 
+class PJSipSessionModInfo
+{
+   PJSipSessionModInfo(pjsip_inv_session *inv_session) : mSessionState(new SipSessionStateItem), mNeedsUpdate(true)
+   {
+      mSessionState->mId = IceUtil::generateUUID();
+   }
+   /* In keeping with the other ModInfo classes, there
+	* is an update function. Unlike the other items, this
+	* involves Asterisk SCF data and not PJSIP data, so I'm
+	* leaving this a stub for the time being.
+	*/
+   void updateSessionState()
+   {
+      //stub;
+   }
+   SipSessionPtr getSessionPtr()
+   {
+      return mSession;
+   }
+   void setSessionPtr(SipSessionPtr sessionPtr)
+   {
+      mSession = sessionPtr;
+   }
+private:
+   SipSessionStateItemPtr mSessionState;
+   SipSessionPtr mSession;
+   bool mNeedsUpdate;
+};
+
 static pj_status_t sessionLoad(pjsip_endpoint *endpt)
 {
 	//stub

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list