From ff31372705c2df1194697b25e9b09b9f83dca5c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?=
 <rafael.carre@savoirfairelinux.com>
Date: Tue, 16 Aug 2011 16:50:05 -0400
Subject: [PATCH] AudioRtpSession : privatize members

---
 daemon/src/audio/audiortp/AudioRtpSession.cpp |  4 +-
 daemon/src/audio/audiortp/AudioRtpSession.h   | 46 +++++++++----------
 2 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/daemon/src/audio/audiortp/AudioRtpSession.cpp b/daemon/src/audio/audiortp/AudioRtpSession.cpp
index 38941cc203..5a6c6d82f6 100644
--- a/daemon/src/audio/audiortp/AudioRtpSession.cpp
+++ b/daemon/src/audio/audiortp/AudioRtpSession.cpp
@@ -45,11 +45,11 @@ namespace sfl
 AudioRtpSession::AudioRtpSession (SIPCall * sipcall, RtpMethod type, ost::RTPDataQueue *queue, ost::Thread *thread) :
 					AudioRtpRecordHandler (sipcall)
 					, _ca (sipcall)
+					, _type(type)
 					, _timestamp (0)
 					, _timestampIncrement (0)
 					, _timestampCount (0)
-                    , _isStarted (false)
-					, _type(type)
+					, _isStarted (false)
 					, _queue(queue)
 					, _thread(thread)
 {
diff --git a/daemon/src/audio/audiortp/AudioRtpSession.h b/daemon/src/audio/audiortp/AudioRtpSession.h
index d5f14c662c..1e737196d3 100644
--- a/daemon/src/audio/audiortp/AudioRtpSession.h
+++ b/daemon/src/audio/audiortp/AudioRtpSession.h
@@ -67,6 +67,17 @@ class AudioRtpSession : public AudioRtpRecordHandler
         RtpMethod getAudioRtpType() { return _type; }
         void updateSessionMedia (AudioCodec *audioCodec);
 
+        int startRtpThread (AudioCodec*);
+
+        /**
+         * Used mostly when receiving a reinvite
+         */
+        void updateDestinationIpAddress (void);
+
+    protected:
+
+        bool onRTPPacketRecv (ost::IncomingRTPPkt&);
+
         /**
          * Send DTMF over RTP (RFC2833). The timestamp and sequence number must be
          * incremented as if it was microphone audio. This function change the payload type of the rtp session,
@@ -76,19 +87,20 @@ class AudioRtpSession : public AudioRtpRecordHandler
         void sendDtmfEvent (sfl::DtmfEvent *dtmf);
 
         /**
-         * Used mostly when receiving a reinvite
+         * Send encoded data to peer
          */
-        void updateDestinationIpAddress (void);
-
-
-        int startRtpThread (AudioCodec*);
+        void sendMicData();
 
-        void stopRtpThread (void);
+        SIPCall *_ca;
 
-        bool onRTPPacketRecv (ost::IncomingRTPPkt&);
+        RtpMethod _type;
 
+    private:
 
-    protected:
+        /**
+         * Set the audio codec for this RTP session
+         */
+        void setSessionMedia (AudioCodec*);
 
         /**
          * Set RTP Sockets send/receive timeouts
@@ -106,25 +118,11 @@ class AudioRtpSession : public AudioRtpRecordHandler
          */
         void receiveSpeakerData ();
 
-        /**
-         * Send encoded data to peer
-         */
-        void sendMicData();
-
-        /**
-         * Set the audio codec for this RTP session
-         */
-        void setSessionMedia (AudioCodec*);
-
-
-        SIPCall *_ca;
-
         // Main destination address for this rtp session.
         // Stored in case or reINVITE, which may require to forget
         // this destination and update a new one.
         ost::InetHostAddress _remote_ip;
 
-
         // Main destination port for this rtp session.
         // Stored in case reINVITE, which may require to forget
         // this destination and update a new one
@@ -142,15 +140,13 @@ class AudioRtpSession : public AudioRtpRecordHandler
         int _timestampIncrement;
 
         /**
-         * Timestamp reset freqeuncy specified in number of packet sent
+         * Timestamp reset frequency specified in number of packet sent
          */
         short _timestampCount;
 
 
         bool _isStarted;
 
-        RtpMethod _type;
-
         ost::RTPDataQueue *_queue;
 
         ost::Thread *_thread;
-- 
GitLab