1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef WebRTCOfferOptions_h
6#define WebRTCOfferOptions_h
7
8#include "WebCommon.h"
9#include "WebNonCopyable.h"
10#include "WebPrivatePtr.h"
11
12namespace blink {
13
14class RTCOfferOptions;
15
16class WebRTCOfferOptions {
17public:
18    WebRTCOfferOptions() { }
19    WebRTCOfferOptions(const WebRTCOfferOptions& other) { assign(other); }
20    ~WebRTCOfferOptions() { reset(); }
21
22    WebRTCOfferOptions& operator=(const WebRTCOfferOptions& other)
23    {
24        assign(other);
25        return *this;
26    }
27
28    BLINK_PLATFORM_EXPORT void assign(const WebRTCOfferOptions&);
29
30    BLINK_PLATFORM_EXPORT void reset();
31    bool isNull() const { return m_private.isNull(); }
32
33    BLINK_PLATFORM_EXPORT int32_t offerToReceiveVideo() const;
34    BLINK_PLATFORM_EXPORT int32_t offerToReceiveAudio() const;
35    BLINK_PLATFORM_EXPORT bool voiceActivityDetection() const;
36    BLINK_PLATFORM_EXPORT bool iceRestart() const;
37
38#if INSIDE_BLINK
39    BLINK_PLATFORM_EXPORT WebRTCOfferOptions(RTCOfferOptions*);
40#endif
41
42private:
43    WebPrivatePtr<RTCOfferOptions> m_private;
44};
45
46} // namespace blink
47
48#endif // WebRTCOfferOptions_h
49