Skip to content

Commit

Permalink
Fix merge conflicts (hopefully)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekr committed Sep 18, 2014
2 parents 7d4ffe1 + 1f9dd80 commit a4bd2bb
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 16 deletions.
3 changes: 1 addition & 2 deletions media/webrtc/signaling/src/sdp/Sdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SdpMediaSection;
class Sdp
{
public:
Sdp();
Sdp() {};

virtual const SdpOrigin& GetOrigin() const = 0;
virtual const std::string& GetSessionName() const = 0;
Expand All @@ -40,7 +40,6 @@ class Sdp
virtual const SdpMediaSection &GetMediaSection(uint16_t level) const = 0;
virtual SdpMediaSection &GetMediaSection(uint16_t level) = 0;

protected:
virtual ~Sdp() {};
};

Expand Down
4 changes: 1 addition & 3 deletions media/webrtc/signaling/src/sdp/SdpAttribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class SdpAttribute

SdpAttribute(AttributeType type, std::string typeName) :
mType(type), mTypeName(typeName) {}
virtual ~SdpAttribute() {}

virtual AttributeType GetType()
{
Expand All @@ -69,9 +70,6 @@ class SdpAttribute
return mTypeName;
}

protected:
virtual ~SdpAttribute() {}

private:
AttributeType mType;
std::string mTypeName;
Expand Down
8 changes: 5 additions & 3 deletions media/webrtc/signaling/src/sdp/SipccSdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class SipccSdp MOZ_FINAL : public Sdp
return mSessionName;
}
// Note: connection information is always retrieved from media sections
virtual const Maybe<std::string>&
GetBandwidth(const std::string& type) const MOZ_OVERRIDE;
virtual Maybe<std::string> GetBandwidth(
const std::string& type) const MOZ_OVERRIDE;

virtual uint16_t GetMediaSectionCount() const MOZ_OVERRIDE {
return static_cast<uint16_t>(mMediaSections.size());
Expand All @@ -58,7 +58,9 @@ class SipccSdp MOZ_FINAL : public Sdp
virtual SdpMediaSection &GetMediaSection(uint16_t level) MOZ_OVERRIDE;

private:
SipccSdp() {}
explicit SipccSdp(sdp_t* sdp) :
mSdp(sdp),
mAttributeList(sdp, 0) {}

void Load(sdp_t* sdp);

Expand Down
1 change: 1 addition & 0 deletions media/webrtc/signaling/src/sdp/SipccSdpAttributeList.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class SipccSdpMediaSection;
class SipccSdpAttributeList : public SdpAttributeList
{
friend class SipccSdpMediaSection;
friend class SipccSdp;
public:
virtual unsigned int CountAttributes(sdp::AttributeType type) const MOZ_OVERRIDE;
virtual bool HasAttribute(sdp::AttributeType type) const MOZ_OVERRIDE;
Expand Down
9 changes: 7 additions & 2 deletions media/webrtc/signaling/src/sdp/SipccSdpMediaSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class SipccSdpMediaSection MOZ_FINAL : public SdpMediaSection
{
friend class SipccSdp;
public:
~SipccSdpMediaSection() {}

virtual MediaType
GetMediaType() const MOZ_OVERRIDE
{
Expand All @@ -42,8 +44,11 @@ class SipccSdpMediaSection MOZ_FINAL : public SdpMediaSection
virtual SdpAttributeList &GetAttributeList() MOZ_OVERRIDE;

private:
SipccSdpMediaSection() {}
~SipccSdpMediaSection() {}
SipccSdpMediaSection(sdp_t* sdp, uint16_t level)
: mSdp(sdp),
mLevel(level),
mAttributes(sdp, level),
mConnection(sdp::kInternet, sdp::kIPv4, "0.0.0.0") {}

void Load(sdp_t* sdp, uint16_t level);
void LoadConnection(sdp_t* sdp, uint16_t level);
Expand Down
4 changes: 2 additions & 2 deletions media/webrtc/signaling/src/sdp/SipccSdpParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class SipccSdpParser
* Returns a reference to the list of parse errors.
* This gets cleared out when you call Parse.
*/
const std::vector<std::pair<uint32_t, const std::string> >&
const std::vector<std::pair<uint32_t, std::string> >&
GetParseErrors() const { return mErrors; }

private:
std::vector<std::pair<uint32_t, const std::string> > mErrors;
std::vector<std::pair<uint32_t, std::string> > mErrors;
};

} // namespace mozilla
Expand Down
8 changes: 4 additions & 4 deletions media/webrtc/signaling/test/sdp_unittests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ class SdpTest : public ::testing::Test {
if (!sdp_ptr_) {
sdp_free_description(sdp_ptr_);
}
sdp_ptr_ = sdp_init_description("BogusPeerConnectionId", config_p_);
sdp_ptr_ = sdp_init_description(config_p_);
}

void ParseSdp(const std::string &sdp_str) {
char *bufp = const_cast<char *>(sdp_str.data());
const char *buf = sdp_str.data();
ResetSdp();
ASSERT_EQ(sdp_parse(sdp_ptr_, &bufp, sdp_str.size()), SDP_SUCCESS);
ASSERT_EQ(sdp_parse(sdp_ptr_, buf, sdp_str.size()), SDP_SUCCESS);
}

void InitLocalSdp() {
Expand Down Expand Up @@ -246,7 +246,7 @@ class SdpTest : public ::testing::Test {

protected:
int final_level_;
void *config_p_;
sdp_conf_options_t *config_p_;
sdp_t *sdp_ptr_;
};

Expand Down

0 comments on commit a4bd2bb

Please sign in to comment.