Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: webrtc/api/objc/RTCDataChannel.h

Issue 1696673003: Tweaks for new Objective-C API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Couple more tweaks after updating against master Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #import <Foundation/Foundation.h> 11 #import <Foundation/Foundation.h>
12 12
13 NS_ASSUME_NONNULL_BEGIN 13 NS_ASSUME_NONNULL_BEGIN
14 14
15 @interface RTCDataBuffer : NSObject 15 @interface RTCDataBuffer : NSObject
16 16
17 /** NSData representation of the underlying buffer. */ 17 /** NSData representation of the underlying buffer. */
18 @property(nonatomic, readonly) NSData *data; 18 @property(nonatomic, readonly) NSData *data;
19 19
20 /** Indicates whether |data| contains UTF-8 or binary data. */ 20 /** Indicates whether |data| contains UTF-8 or binary data. */
21 @property(nonatomic, readonly) BOOL isBinary; 21 @property(nonatomic, assign, readonly) BOOL isBinary;
22 22
23 - (instancetype)init NS_UNAVAILABLE; 23 - (instancetype)init NS_UNAVAILABLE;
24 24
25 /** 25 /**
26 * Initialize an RTCDataBuffer from NSData. |isBinary| indicates whether |data| 26 * Initialize an RTCDataBuffer from NSData. |isBinary| indicates whether |data|
27 * contains UTF-8 or binary data. 27 * contains UTF-8 or binary data.
28 */ 28 */
29 - (instancetype)initWithData:(NSData *)data isBinary:(BOOL)isBinary; 29 - (instancetype)initWithData:(NSData *)data isBinary:(BOOL)isBinary;
30 30
31 @end 31 @end
(...skipping 29 matching lines...) Expand all
61 61
62 @interface RTCDataChannel : NSObject 62 @interface RTCDataChannel : NSObject
63 63
64 /** 64 /**
65 * A label that can be used to distinguish this data channel from other data 65 * A label that can be used to distinguish this data channel from other data
66 * channel objects. 66 * channel objects.
67 */ 67 */
68 @property(nonatomic, readonly) NSString *label; 68 @property(nonatomic, readonly) NSString *label;
69 69
70 /** Returns whether this data channel is ordered or not. */ 70 /** Returns whether this data channel is ordered or not. */
71 @property(nonatomic, readonly) BOOL isOrdered; 71 @property(nonatomic, assign, readonly) BOOL isOrdered;
tkchin_webrtc 2016/02/26 00:45:24 don't need assign for readonly stuff since assign
72 72
73 /** 73 /**
74 * The length of the time window (in milliseconds) during which transmissions 74 * The length of the time window (in milliseconds) during which transmissions
75 * and retransmissions may occur in unreliable mode. 75 * and retransmissions may occur in unreliable mode.
76 */ 76 */
77 @property(nonatomic, readonly) uint16_t maxPacketLifeTime; 77 @property(nonatomic, assign, readonly) uint16_t maxPacketLifeTime;
78 78
79 /** 79 /**
80 * The maximum number of retransmissions that are attempted in unreliable mode. 80 * The maximum number of retransmissions that are attempted in unreliable mode.
81 */ 81 */
82 @property(nonatomic, readonly) uint16_t maxRetransmits; 82 @property(nonatomic, assign, readonly) uint16_t maxRetransmits;
83 83
84 /** 84 /**
85 * The name of the sub-protocol used with this data channel, if any. Otherwise 85 * The name of the sub-protocol used with this data channel, if any. Otherwise
86 * this returns an empty string. 86 * this returns an empty string.
87 */ 87 */
88 @property(nonatomic, readonly) NSString *protocol; 88 @property(nonatomic, readonly) NSString *protocol;
89 89
90 /** 90 /**
91 * Returns whether this data channel was negotiated by the application or not. 91 * Returns whether this data channel was negotiated by the application or not.
92 */ 92 */
93 @property(nonatomic, readonly) BOOL isNegotiated; 93 @property(nonatomic, assign, readonly) BOOL isNegotiated;
94 94
95 /** The identifier for this data channel. */ 95 /** The identifier for this data channel. */
96 @property(nonatomic, readonly) int id; 96 @property(nonatomic, assign, readonly) int channelId;
97 97
98 /** The state of the data channel. */ 98 /** The state of the data channel. */
99 @property(nonatomic, readonly) RTCDataChannelState readyState; 99 @property(nonatomic, assign, readonly) RTCDataChannelState readyState;
100 100
101 /** 101 /**
102 * The number of bytes of application data that have been queued using 102 * The number of bytes of application data that have been queued using
103 * |sendData:| but that have not yet been transmitted to the network. 103 * |sendData:| but that have not yet been transmitted to the network.
104 */ 104 */
105 @property(nonatomic, readonly) uint64_t bufferedAmount; 105 @property(nonatomic, assign, readonly) uint64_t bufferedAmount;
106 106
107 /** The delegate for this data channel. */ 107 /** The delegate for this data channel. */
108 @property(nonatomic, weak) id<RTCDataChannelDelegate> delegate; 108 @property(nonatomic, weak) id<RTCDataChannelDelegate> delegate;
109 109
110 - (instancetype)init NS_UNAVAILABLE; 110 - (instancetype)init NS_UNAVAILABLE;
111 111
112 /** Closes the data channel. */ 112 /** Closes the data channel. */
113 - (void)close; 113 - (void)close;
114 114
115 /** Attempt to send |data| on this data channel's underlying data transport. */ 115 /** Attempt to send |data| on this data channel's underlying data transport. */
116 - (BOOL)sendData:(RTCDataBuffer *)data; 116 - (BOOL)sendData:(RTCDataBuffer *)data;
117 117
118 @end 118 @end
119 119
120 NS_ASSUME_NONNULL_END 120 NS_ASSUME_NONNULL_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698