Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: webrtc/api/ortc/sessiondescription.h

Issue 2749493002: Change the type of session_id() from string to int64_t. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/ortc/sessiondescription_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_ 11 #ifndef WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_
12 #define WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_ 12 #define WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_
13 13
14 #include <string> 14 #include <string>
15 #include <utility> 15 #include <utility>
16 16
17 namespace webrtc { 17 namespace webrtc {
18 18
19 // A structured representation of an SDP session description. 19 // A structured representation of an SDP session description.
20 class SessionDescription { 20 class SessionDescription {
21 public: 21 public:
22 SessionDescription(std::string session_id, std::string session_version) 22 SessionDescription(int64_t session_id, std::string session_version)
23 : session_id_(std::move(session_id)), 23 : session_id_(session_id), session_version_(std::move(session_version)) {}
24 session_version_(std::move(session_version)) {}
25 24
26 // https://tools.ietf.org/html/rfc4566#section-5.2 25 // https://tools.ietf.org/html/rfc4566#section-5.2
27 // o=<username> <sess-id> <sess-version> <nettype> <addrtype> 26 // o=<username> <sess-id> <sess-version> <nettype> <addrtype>
28 // <unicast-address> 27 // <unicast-address>
29 // session_id_ is the "sess-id" field. 28 // session_id_ is the "sess-id" field.
30 // session_version_ is the "sess-version" field. 29 // session_version_ is the "sess-version" field.
31 const std::string& session_id() const { return session_id_; } 30 int64_t session_id() { return session_id_; }
32 void set_session_id(std::string session_id) { 31 void set_session_id(int64_t session_id) { session_id_ = session_id; }
33 session_id_ = std::move(session_id);
34 }
35 32
36 const std::string& session_version() const { return session_version_; } 33 const std::string& session_version() const { return session_version_; }
37 void set_session_version(std::string session_version) { 34 void set_session_version(std::string session_version) {
38 session_version_ = std::move(session_version); 35 session_version_ = std::move(session_version);
39 } 36 }
40 37
41 private: 38 private:
42 std::string session_id_; 39 int64_t session_id_;
43 std::string session_version_; 40 std::string session_version_;
44 }; 41 };
45 42
46 } // namespace webrtc 43 } // namespace webrtc
47 44
48 #endif // WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_ 45 #endif // WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/ortc/sessiondescription_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698