blob: 89c56de786316d3ebbc2f4bfc353b74ef38ed1df [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
tkchin9eeb6242016-04-27 01:54:20 -070011#import "RTCDataChannelConfiguration+Private.h"
hjonda2183c2016-01-27 13:42:28 -080012
tkchin9eeb6242016-04-27 01:54:20 -070013#import "NSString+StdString.h"
hjonda2183c2016-01-27 13:42:28 -080014
15@implementation RTCDataChannelConfiguration
16
17@synthesize nativeDataChannelInit = _nativeDataChannelInit;
18
19- (BOOL)isOrdered {
20 return _nativeDataChannelInit.ordered;
21}
22
23- (void)setIsOrdered:(BOOL)isOrdered {
24 _nativeDataChannelInit.ordered = isOrdered;
25}
26
tkchin8b9ca952016-03-31 12:08:03 -070027- (NSInteger)maxRetransmitTimeMs {
28 return self.maxPacketLifeTime;
29}
30
31- (void)setMaxRetransmitTimeMs:(NSInteger)maxRetransmitTimeMs {
32 self.maxPacketLifeTime = maxRetransmitTimeMs;
33}
34
hjonda2183c2016-01-27 13:42:28 -080035- (int)maxPacketLifeTime {
36 return _nativeDataChannelInit.maxRetransmitTime;
37}
38
39- (void)setMaxPacketLifeTime:(int)maxPacketLifeTime {
40 _nativeDataChannelInit.maxRetransmitTime = maxPacketLifeTime;
41}
42
43- (int)maxRetransmits {
44 return _nativeDataChannelInit.maxRetransmits;
45}
46
47- (void)setMaxRetransmits:(int)maxRetransmits {
48 _nativeDataChannelInit.maxRetransmits = maxRetransmits;
49}
50
51- (NSString *)protocol {
52 return [NSString stringForStdString:_nativeDataChannelInit.protocol];
53}
54
55- (void)setProtocol:(NSString *)protocol {
56 _nativeDataChannelInit.protocol = [NSString stdStringForString:protocol];
57}
58
59- (BOOL)isNegotiated {
60 return _nativeDataChannelInit.negotiated;
61}
62
63- (void)setIsNegotiated:(BOOL)isNegotiated {
64 _nativeDataChannelInit.negotiated = isNegotiated;
65}
66
67- (int)streamId {
tkchin8b9ca952016-03-31 12:08:03 -070068 return self.channelId;
hjonda2183c2016-01-27 13:42:28 -080069}
70
71- (void)setStreamId:(int)streamId {
tkchin8b9ca952016-03-31 12:08:03 -070072 self.channelId = streamId;
hjonda2183c2016-01-27 13:42:28 -080073}
74
tkchin8b9ca952016-03-31 12:08:03 -070075- (int)channelId {
76 return _nativeDataChannelInit.id;
77}
78
79- (void)setChannelId:(int)channelId {
80 _nativeDataChannelInit.id = channelId;
81}
82
83@end