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.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 - (NSInteger)maxRetransmitTimeMs { | |
29 return self.maxPacketLifeTime; | |
30 } | |
31 | |
32 - (void)setMaxRetransmitTimeMs:(NSInteger)maxRetransmitTimeMs { | |
33 self.maxPacketLifeTime = maxRetransmitTimeMs; | |
34 } | |
35 | |
36 - (int)maxPacketLifeTime { | |
37 return _nativeDataChannelInit.maxRetransmitTime; | |
38 } | |
39 | |
40 - (void)setMaxPacketLifeTime:(int)maxPacketLifeTime { | |
41 _nativeDataChannelInit.maxRetransmitTime = maxPacketLifeTime; | |
42 } | |
43 | |
44 - (int)maxRetransmits { | |
45 return _nativeDataChannelInit.maxRetransmits; | |
46 } | |
47 | |
48 - (void)setMaxRetransmits:(int)maxRetransmits { | |
49 _nativeDataChannelInit.maxRetransmits = maxRetransmits; | |
50 } | |
51 | |
52 - (NSString *)protocol { | |
53 return [NSString stringForStdString:_nativeDataChannelInit.protocol]; | |
54 } | |
55 | |
56 - (void)setProtocol:(NSString *)protocol { | |
57 _nativeDataChannelInit.protocol = [NSString stdStringForString:protocol]; | |
58 } | |
59 | |
60 - (BOOL)isNegotiated { | |
61 return _nativeDataChannelInit.negotiated; | |
62 } | |
63 | |
64 - (void)setIsNegotiated:(BOOL)isNegotiated { | |
65 _nativeDataChannelInit.negotiated = isNegotiated; | |
66 } | |
67 | |
68 - (int)streamId { | |
69 return self.channelId; | |
70 } | |
71 | |
72 - (void)setStreamId:(int)streamId { | |
73 self.channelId = streamId; | |
74 } | |
75 | |
76 - (int)channelId { | |
77 return _nativeDataChannelInit.id; | |
78 } | |
79 | |
80 - (void)setChannelId:(int)channelId { | |
81 _nativeDataChannelInit.id = channelId; | |
82 } | |
83 | |
84 @end | |
OLD | NEW |