Skip to content

Commit

Permalink
Merge pull request mozilla#22 from docfaraday/multistream_unit_tests
Browse files Browse the repository at this point in the history
More compile fixes.
  • Loading branch information
ekr committed Sep 18, 2014
2 parents 5c69ee0 + d84b64a commit bbfc255
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 7 deletions.
68 changes: 62 additions & 6 deletions media/webrtc/signaling/src/sdp/Sdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,68 @@ class Sdp
class SdpOrigin
{
public:
virtual std::string GetUsername() const = 0;
virtual uint64_t GetSessionId() const = 0;
virtual uint64_t GetSessionVersion() const = 0;
virtual sdp::NetType GetNetType() const = 0;
virtual sdp::AddrType GetAddrType() const = 0;
virtual std::string GetAddress() const = 0;
SdpOrigin() :
mSessionId(0),
mSessionVersion(0),
mNetType(sdp::kInternet),
mAddrType(sdp::kIPv4)
{}

const std::string& GetUsername() const {
return mUsername;
}

void SetUsername(const std::string& username) {
mUsername = username;
}

uint64_t GetSessionId() const {
return mSessionId;
}

void SetSessionId(uint64_t sessionId) {
mSessionId = sessionId;
}

uint64_t GetSessionVersion() const {
return mSessionVersion;
}

void SetSessionVersion(uint64_t sessionVersion) {
mSessionVersion = sessionVersion;
}

const sdp::NetType& GetNetType() const {
return mNetType;
}

void SetNetType(const sdp::NetType& netType) {
mNetType = netType;
}

const sdp::AddrType& GetAddrType() const {
return mAddrType;
}

void SetAddrType(const sdp::AddrType& addrType) {
mAddrType = addrType;
}

const std::string& GetAddress() const {
return mAddress;
}

void SetAddress(const std::string& address) {
mAddress = address;
}

private:
std::string mUsername;
uint64_t mSessionId;
uint64_t mSessionVersion;
sdp::NetType mNetType;
sdp::AddrType mAddrType;
std::string mAddress;
};

} // namespace mozilla
Expand Down
3 changes: 2 additions & 1 deletion media/webrtc/signaling/src/sdp/SipccSdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class SipccSdp MOZ_FINAL : public Sdp
virtual SdpOrigin GetOrigin() const MOZ_OVERRIDE;
virtual std::string GetSessionName() const MOZ_OVERRIDE;
// Note: connection information is always retrieved from media sections
virtual Maybe<std::string> GetBandwidth(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 Down

0 comments on commit bbfc255

Please sign in to comment.