2017-03-10 18:33:45 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef API_ORTC_SESSIONDESCRIPTION_H_
|
|
|
|
|
#define API_ORTC_SESSIONDESCRIPTION_H_
|
2017-03-10 18:33:45 -08:00
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
// A structured representation of an SDP session description.
|
|
|
|
|
class SessionDescription {
|
|
|
|
|
public:
|
2017-03-13 11:00:54 -07:00
|
|
|
SessionDescription(int64_t session_id, std::string session_version)
|
|
|
|
|
: session_id_(session_id), session_version_(std::move(session_version)) {}
|
2017-03-10 18:33:45 -08:00
|
|
|
|
|
|
|
|
// https://tools.ietf.org/html/rfc4566#section-5.2
|
|
|
|
|
// o=<username> <sess-id> <sess-version> <nettype> <addrtype>
|
|
|
|
|
// <unicast-address>
|
|
|
|
|
// session_id_ is the "sess-id" field.
|
|
|
|
|
// session_version_ is the "sess-version" field.
|
2017-03-13 11:00:54 -07:00
|
|
|
int64_t session_id() { return session_id_; }
|
|
|
|
|
void set_session_id(int64_t session_id) { session_id_ = session_id; }
|
2017-03-10 18:33:45 -08:00
|
|
|
|
|
|
|
|
const std::string& session_version() const { return session_version_; }
|
|
|
|
|
void set_session_version(std::string session_version) {
|
|
|
|
|
session_version_ = std::move(session_version);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
2017-03-13 11:00:54 -07:00
|
|
|
int64_t session_id_;
|
2017-03-10 18:33:45 -08:00
|
|
|
std::string session_version_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // API_ORTC_SESSIONDESCRIPTION_H_
|