OLD | NEW |
| (Empty) |
1 /* | |
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+Private.h" | |
12 | |
13 #import "NSString+StdString.h" | |
14 | |
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 | |
27 - (NSInteger)maxRetransmitTimeMs { | |
28 return self.maxPacketLifeTime; | |
29 } | |
30 | |
31 - (void)setMaxRetransmitTimeMs:(NSInteger)maxRetransmitTimeMs { | |
32 self.maxPacketLifeTime = maxRetransmitTimeMs; | |
33 } | |
34 | |
35 - (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 { | |
68 return self.channelId; | |
69 } | |
70 | |
71 - (void)setStreamId:(int)streamId { | |
72 self.channelId = streamId; | |
73 } | |
74 | |
75 - (int)channelId { | |
76 return _nativeDataChannelInit.id; | |
77 } | |
78 | |
79 - (void)setChannelId:(int)channelId { | |
80 _nativeDataChannelInit.id = channelId; | |
81 } | |
82 | |
83 @end | |
OLD | NEW |