blob: 2c4b7221048d70f79ae9f27128d3c6b8cb15a615 [file] [log] [blame]
hjon6f5ca082016-01-07 09:29:29 -08001/*
2 * Copyright 2015 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
11#import "RTCMediaConstraints.h"
12
13#include "talk/app/webrtc/mediaconstraintsinterface.h"
14#include "webrtc/base/scoped_ptr.h"
15
16namespace webrtc {
17
18class MediaConstraints : public MediaConstraintsInterface {
19 public:
20 virtual ~MediaConstraints();
21 MediaConstraints();
22 MediaConstraints(
23 const MediaConstraintsInterface::Constraints& mandatory,
24 const MediaConstraintsInterface::Constraints& optional);
25 virtual const Constraints& GetMandatory() const;
26 virtual const Constraints& GetOptional() const;
27
28 private:
29 MediaConstraintsInterface::Constraints mandatory_;
30 MediaConstraintsInterface::Constraints optional_;
31};
32
33} // namespace webrtc
34
35
36NS_ASSUME_NONNULL_BEGIN
37
38@interface RTCMediaConstraints ()
39
40/**
41 * A MediaConstraints representation of this RTCMediaConstraints object. This is
42 * needed to pass to the underlying C++ APIs.
43 */
44- (rtc::scoped_ptr<webrtc::MediaConstraints>)nativeConstraints;
45
46/** Return a native Constraints object representing these constraints */
47+ (webrtc::MediaConstraintsInterface::Constraints)
48 nativeConstraintsForConstraints:
49 (NSDictionary<NSString *, NSString *> *)constraints;
50
51@end
52
53NS_ASSUME_NONNULL_END