blob: 77de4eeb6790741bdda5a675e40fadc8e0712bb2 [file] [log] [blame]
hjonda2183c2016-01-27 13:42:28 -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 "RTCDataChannelConfiguration.h"
12
13#import "webrtc/api/objc/RTCDataChannelConfiguration+Private.h"
14#import "webrtc/base/objc/NSString+StdString.h"
15
16@implementation RTCDataChannelConfiguration
17
18@synthesize nativeDataChannelInit = _nativeDataChannelInit;
19
20- (BOOL)isOrdered {
21 return _nativeDataChannelInit.ordered;
22}
23
24- (void)setIsOrdered:(BOOL)isOrdered {
25 _nativeDataChannelInit.ordered = isOrdered;
26}
27
28- (int)maxPacketLifeTime {
29 return _nativeDataChannelInit.maxRetransmitTime;
30}
31
32- (void)setMaxPacketLifeTime:(int)maxPacketLifeTime {
33 _nativeDataChannelInit.maxRetransmitTime = maxPacketLifeTime;
34}
35
36- (int)maxRetransmits {
37 return _nativeDataChannelInit.maxRetransmits;
38}
39
40- (void)setMaxRetransmits:(int)maxRetransmits {
41 _nativeDataChannelInit.maxRetransmits = maxRetransmits;
42}
43
44- (NSString *)protocol {
45 return [NSString stringForStdString:_nativeDataChannelInit.protocol];
46}
47
48- (void)setProtocol:(NSString *)protocol {
49 _nativeDataChannelInit.protocol = [NSString stdStringForString:protocol];
50}
51
52- (BOOL)isNegotiated {
53 return _nativeDataChannelInit.negotiated;
54}
55
56- (void)setIsNegotiated:(BOOL)isNegotiated {
57 _nativeDataChannelInit.negotiated = isNegotiated;
58}
59
60- (int)streamId {
61 return _nativeDataChannelInit.id;
62}
63
64- (void)setStreamId:(int)streamId {
65 _nativeDataChannelInit.id = streamId;
66}
67
68@end