Style fixes in rtcp_packet/

1. To make the files conform to chromium-style guidelines, and stop the compiler from complaing:
1.1. Move constructors out of .h file.
1.2. Move destructors out of .h file.
1.3. Move virtual functions out of .h file.
2. BlockLength() and Create() did not have consistent access modifiers in the various subclasses of RtcpPacket. Change the access level to public throughout.
3. Reorder BlockLength() and Create() where necessary, to reflect the order defined in the parent class (RtcpPacket).

BUG=None

Review-Url: https://codereview.webrtc.org/2937403002
Cr-Commit-Position: refs/heads/master@{#18633}
This commit is contained in:
eladalon
2017-06-16 07:07:47 -07:00
committed by Commit Bot
parent 6b826ef66d
commit 8fa21c49ef
36 changed files with 179 additions and 119 deletions

View File

@ -26,7 +26,7 @@ class Bye : public RtcpPacket {
static constexpr uint8_t kPacketType = 203;
Bye();
~Bye() override {}
~Bye() override;
// Parse assumes header is already parsed and validated.
bool Parse(const CommonHeader& packet);
@ -39,7 +39,8 @@ class Bye : public RtcpPacket {
const std::vector<uint32_t>& csrcs() const { return csrcs_; }
const std::string& reason() const { return reason_; }
protected:
size_t BlockLength() const override;
bool Create(uint8_t* packet,
size_t* index,
size_t max_length,
@ -48,8 +49,6 @@ class Bye : public RtcpPacket {
private:
static const int kMaxNumberOfCsrcs = 0x1f - 1; // First item is sender SSRC.
size_t BlockLength() const override;
uint32_t sender_ssrc_;
std::vector<uint32_t> csrcs_;
std::string reason_;