blob: 84966d137a0337662788fe05c9005fe43b15d7b3 [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
Henrik Kjellander15583c12016-02-10 10:53:12 +010013#include "webrtc/api/mediaconstraintsinterface.h"
hjon6f5ca082016-01-07 09:29:29 -080014#include "webrtc/base/scoped_ptr.h"
15
hjon6b039952016-02-25 12:32:58 -080016// TODO(hjon): Update nullability types. See http://crbug/webrtc/5592
17
hjon6f5ca082016-01-07 09:29:29 -080018namespace webrtc {
19
20class MediaConstraints : public MediaConstraintsInterface {
21 public:
22 virtual ~MediaConstraints();
23 MediaConstraints();
24 MediaConstraints(
25 const MediaConstraintsInterface::Constraints& mandatory,
26 const MediaConstraintsInterface::Constraints& optional);
27 virtual const Constraints& GetMandatory() const;
28 virtual const Constraints& GetOptional() const;
29
30 private:
31 MediaConstraintsInterface::Constraints mandatory_;
32 MediaConstraintsInterface::Constraints optional_;
33};
34
35} // namespace webrtc
36
37
38NS_ASSUME_NONNULL_BEGIN
39
40@interface RTCMediaConstraints ()
41
42/**
43 * A MediaConstraints representation of this RTCMediaConstraints object. This is
44 * needed to pass to the underlying C++ APIs.
45 */
46- (rtc::scoped_ptr<webrtc::MediaConstraints>)nativeConstraints;
47
48/** Return a native Constraints object representing these constraints */
49+ (webrtc::MediaConstraintsInterface::Constraints)
50 nativeConstraintsForConstraints:
hjon6b039952016-02-25 12:32:58 -080051 (NSDictionary *)constraints;
52 // (NSDictionary<NSString *, NSString *> *)constraints;
hjon6f5ca082016-01-07 09:29:29 -080053
54@end
55
56NS_ASSUME_NONNULL_END