blob: ebbaa27d6ffc0011450326e51c17c8b17df9f952 [file] [log] [blame]
zhihuang55adc0e2017-03-10 18:33:45 -08001/*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef API_ORTC_SESSIONDESCRIPTION_H_
12#define API_ORTC_SESSIONDESCRIPTION_H_
zhihuang55adc0e2017-03-10 18:33:45 -080013
14#include <string>
15#include <utility>
16
17namespace webrtc {
18
19// A structured representation of an SDP session description.
20class SessionDescription {
21 public:
zhihuang30e0da42017-03-13 11:00:54 -070022 SessionDescription(int64_t session_id, std::string session_version)
23 : session_id_(session_id), session_version_(std::move(session_version)) {}
zhihuang55adc0e2017-03-10 18:33:45 -080024
25 // https://tools.ietf.org/html/rfc4566#section-5.2
26 // o=<username> <sess-id> <sess-version> <nettype> <addrtype>
27 // <unicast-address>
28 // session_id_ is the "sess-id" field.
29 // session_version_ is the "sess-version" field.
zhihuang30e0da42017-03-13 11:00:54 -070030 int64_t session_id() { return session_id_; }
31 void set_session_id(int64_t session_id) { session_id_ = session_id; }
zhihuang55adc0e2017-03-10 18:33:45 -080032
33 const std::string& session_version() const { return session_version_; }
34 void set_session_version(std::string session_version) {
35 session_version_ = std::move(session_version);
36 }
37
38 private:
zhihuang30e0da42017-03-13 11:00:54 -070039 int64_t session_id_;
zhihuang55adc0e2017-03-10 18:33:45 -080040 std::string session_version_;
41};
42
43} // namespace webrtc
44
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020045#endif // API_ORTC_SESSIONDESCRIPTION_H_