diff --git a/media/webrtc/signaling/src/sdp/SipccSdp.cpp b/media/webrtc/signaling/src/sdp/SipccSdp.cpp index eb5736617a8b4..9523fc4ad4a91 100644 --- a/media/webrtc/signaling/src/sdp/SipccSdp.cpp +++ b/media/webrtc/signaling/src/sdp/SipccSdp.cpp @@ -8,14 +8,36 @@ namespace mozilla { +SdpOrigin +SipccSdp::GetOrigin() const { + return SdpOrigin(); +} + +std::string +SipccSdp::GetSessionName() const { + return "TODO"; +} + +std::string +SipccSdp::GetBandwidth(std::string type) const { + return "TODO"; +} + const SdpMediaSection & SipccSdp::GetMediaSection(uint16_t level) const { + if (level >= mMediaSections.size()) { + MOZ_CRASH(); + } return mMediaSections[level]; } + SdpMediaSection & SipccSdp::GetMediaSection(uint16_t level) { + if (level >= mMediaSections.size()) { + MOZ_CRASH(); + } return mMediaSections[level]; } diff --git a/media/webrtc/signaling/src/sdp/SipccSdp.h b/media/webrtc/signaling/src/sdp/SipccSdp.h index d4bb7289fade0..a6fd79a516fe6 100644 --- a/media/webrtc/signaling/src/sdp/SipccSdp.h +++ b/media/webrtc/signaling/src/sdp/SipccSdp.h @@ -30,26 +30,28 @@ class SipccSdp MOZ_FINAL : public Sdp sdp_free_description(mSdp); } - const SdpAttributeList& GetAttributeList() const { - return mAttributeList; + virtual SdpOrigin GetOrigin() const MOZ_OVERRIDE; + virtual std::string GetSessionName() const MOZ_OVERRIDE; + // Note: connection information is always retrieved from media sections + virtual std::string GetBandwidth(std::string type) const MOZ_OVERRIDE; + + virtual uint16_t GetMediaSectionCount() const MOZ_OVERRIDE { + return static_cast(mMediaSections.size()); } - SdpAttributeList& GetAttributeList() { + + virtual const SdpAttributeList &GetAttributeList() const MOZ_OVERRIDE { return mAttributeList; } - const SdpMediaSection &GetMediaSection(uint16_t level) const { - if (level >= mMediaSections.length()) { - MOZ_CRASH(); - } - return mMediaSections[level]; - } - SdpMediaSection &GetMediaSection(uint16_t level) { - if (level >= mMediaSections.length()) { - MOZ_CRASH(); - } - return mMediaSections[level]; + virtual SdpAttributeList &GetAttributeList() MOZ_OVERRIDE { + return mAttributeList; } + virtual const SdpMediaSection &GetMediaSection( + uint16_t level) const MOZ_OVERRIDE; + + virtual SdpMediaSection &GetMediaSection(uint16_t level) MOZ_OVERRIDE; + private: SipccSdp(sdp_t* sdp) : mSdp(sdp) {}