Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -56,7 +56,8 @@ class PeerConnectionClient : public sigslot::has_slots<>,
|
||||
|
||||
void RegisterObserver(PeerConnectionClientObserver* callback);
|
||||
|
||||
void Connect(const std::string& server, int port,
|
||||
void Connect(const std::string& server,
|
||||
int port,
|
||||
const std::string& client_name);
|
||||
|
||||
bool SendToPeer(int peer_id, const std::string& message);
|
||||
@ -78,14 +79,19 @@ class PeerConnectionClient : public sigslot::has_slots<>,
|
||||
void OnMessageFromPeer(int peer_id, const std::string& message);
|
||||
|
||||
// Quick and dirty support for parsing HTTP header values.
|
||||
bool GetHeaderValue(const std::string& data, size_t eoh,
|
||||
const char* header_pattern, size_t* value);
|
||||
bool GetHeaderValue(const std::string& data,
|
||||
size_t eoh,
|
||||
const char* header_pattern,
|
||||
size_t* value);
|
||||
|
||||
bool GetHeaderValue(const std::string& data, size_t eoh,
|
||||
const char* header_pattern, std::string* value);
|
||||
bool GetHeaderValue(const std::string& data,
|
||||
size_t eoh,
|
||||
const char* header_pattern,
|
||||
std::string* value);
|
||||
|
||||
// Returns true if the whole response has been read.
|
||||
bool ReadIntoBuffer(rtc::AsyncSocket* socket, std::string* data,
|
||||
bool ReadIntoBuffer(rtc::AsyncSocket* socket,
|
||||
std::string* data,
|
||||
size_t* content_length);
|
||||
|
||||
void OnRead(rtc::AsyncSocket* socket);
|
||||
@ -93,13 +99,17 @@ class PeerConnectionClient : public sigslot::has_slots<>,
|
||||
void OnHangingGetRead(rtc::AsyncSocket* socket);
|
||||
|
||||
// Parses a single line entry in the form "<name>,<id>,<connected>"
|
||||
bool ParseEntry(const std::string& entry, std::string* name, int* id,
|
||||
bool ParseEntry(const std::string& entry,
|
||||
std::string* name,
|
||||
int* id,
|
||||
bool* connected);
|
||||
|
||||
int GetResponseStatus(const std::string& response);
|
||||
|
||||
bool ParseServerResponse(const std::string& response, size_t content_length,
|
||||
size_t* peer_id, size_t* eoh);
|
||||
bool ParseServerResponse(const std::string& response,
|
||||
size_t content_length,
|
||||
size_t* peer_id,
|
||||
size_t* eoh);
|
||||
|
||||
void OnClose(rtc::AsyncSocket* socket, int err);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user