Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / public / platform / WebRTCOfferOptions.h
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
12 namespace blink {
13
14 class RTCOfferOptions;
15
16 class WebRTCOfferOptions {
17 public:
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(const WTF::PassRefPtr<RTCOfferOptions>&);
40 #endif
41
42 private:
43     WebPrivatePtr<RTCOfferOptions> m_private;
44 };
45
46 } // namespace blink
47
48 #endif // WebRTCOfferOptions_h