[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 Aug 24 21:02:30 CDT 2010


branch "master" has been updated
       via  01548febc8558a51e770af8c9ba265dcdf203230 (commit)
       via  d2959ab1d6d27d4595c8d8f14aa05a176a744553 (commit)
      from  b7636edd7ebbe27407c947b7b1655dea0f6b8de8 (commit)

Summary of changes:
 src/SipEndpoint.cpp |   17 ++++++-----------
 src/SipEndpoint.h   |   20 ++++++++++++++++++++
 2 files changed, 26 insertions(+), 11 deletions(-)


- Log -----------------------------------------------------------------
commit 01548febc8558a51e770af8c9ba265dcdf203230
Merge: d2959ab b7636ed
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Aug 24 23:14:39 2010 -0300

    Merge branch 'master' of git.asterisk.org:asterisk-scf/integration/sip


commit d2959ab1d6d27d4595c8d8f14aa05a176a744553
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Aug 24 23:02:20 2010 -0300

    Move the location for storage of sources and sinks to the SipEndpoint.

diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 4219447..ba53289 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -166,16 +166,16 @@ private:
 class SipMediaSession : public Media::V1::Session
 {
 public:
-SipMediaSession() : mId(IceUtil::generateUUID()) { };
+SipMediaSession(SipEndpoint *endpoint) : mId(IceUtil::generateUUID()), mEndpoint(endpoint) { };
 
    Hydra::Media::V1::StreamSourceSeq getSources(const Ice::Current&)
    {
-      return mSources;
+      return mEndpoint->getSources();
    }
 
    Hydra::Media::V1::StreamSinkSeq getSinks(const Ice::Current&)
    {
-      return mSinks;
+      return mEndpoint->getSinks();
    }
 
    virtual std::string getId(const Ice::Current&)
@@ -190,14 +190,9 @@ private:
    std::string mId;
 
    /**
-    * Vector containing sources.
+    * A pointer to the endpoint that created us.
     */
-   Hydra::Media::V1::StreamSourceSeq mSources;
-
-   /**
-    * Vector containing sinks.
-    */
-   Hydra::Media::V1::StreamSinkSeq mSinks;
+   SipEndpoint *mEndpoint;
 };
 
 /**
@@ -209,7 +204,7 @@ SipEndpoint::SipEndpoint(Ice::ObjectAdapterPtr adapter, boost::shared_ptr<SipEnd
    command = Hydra::Session::V1::SignalCommandsPrx::uncheckedCast(adapter->addWithUUID(mSignalCommands));
    mSignalCallbacks = new SipSignalCallback(this);
    callback = Hydra::Session::V1::SignalCallbackPrx::uncheckedCast(adapter->addWithUUID(mSignalCallbacks));
-   mMediaSession = new SipMediaSession();
+   mMediaSession = new SipMediaSession(this);
    mediaSession = Hydra::Media::V1::SessionPrx::uncheckedCast(adapter->addWithUUID(mMediaSession));
 }
 
diff --git a/src/SipEndpoint.h b/src/SipEndpoint.h
index 48f0ddc..268b60a 100644
--- a/src/SipEndpoint.h
+++ b/src/SipEndpoint.h
@@ -65,6 +65,16 @@ public:
     */
    Hydra::Session::V1::SignalCallbackPrx getSignalCallback() { return mSignalCallback; };
 
+   /**
+    * Internal function which gets the media sources on the endpoint.
+    */
+   Hydra::Media::V1::StreamSourceSeq getSources() { return mSources; };
+
+   /**
+    * Internal function which gets the media sinks on the endpoint.
+    */
+   Hydra::Media::V1::StreamSinkSeq getSinks() { return mSinks; };
+
 private:
    /**
     * An instance of signal commands.
@@ -110,6 +120,16 @@ private:
     * A vector of RTP media sessions belonging to this endpoint.
     */
    std::vector<Hydra::Media::RTP::V1::RTPSessionPrx> mRTPSessions;
+
+   /**
+    * A vector of media sources associated with this endpoint.
+    */
+   Hydra::Media::V1::StreamSourceSeq mSources;
+
+   /**
+    * A vector of media sinks associated with this endpoint.
+    */
+   Hydra::Media::V1::StreamSinkSeq mSinks;
 };
 
 }; //End namespace SipChannelService

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list