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

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

Issue 1899573002: Mark public ObjC APIs as explicitly visible. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « webrtc/api/objc/RTCConfiguration.h ('k') | webrtc/api/objc/RTCDataChannelConfiguration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <AvailabilityMacros.h> 11 #import <AvailabilityMacros.h>
12 #import <Foundation/Foundation.h> 12 #import <Foundation/Foundation.h>
13 13
14 #import "webrtc/base/objc/RTCMacros.h"
15
14 NS_ASSUME_NONNULL_BEGIN 16 NS_ASSUME_NONNULL_BEGIN
15 17
16 @interface RTCDataBuffer : NSObject 18 @interface RTCDataBuffer : NSObject
Chuck 2016/04/18 23:24:06 Does this one need RTC_EXPORT?
tkchin_webrtc 2016/04/18 23:36:40 Yes, thanks.
17 19
18 /** NSData representation of the underlying buffer. */ 20 /** NSData representation of the underlying buffer. */
19 @property(nonatomic, readonly) NSData *data; 21 @property(nonatomic, readonly) NSData *data;
20 22
21 /** Indicates whether |data| contains UTF-8 or binary data. */ 23 /** Indicates whether |data| contains UTF-8 or binary data. */
22 @property(nonatomic, readonly) BOOL isBinary; 24 @property(nonatomic, readonly) BOOL isBinary;
23 25
24 - (instancetype)init NS_UNAVAILABLE; 26 - (instancetype)init NS_UNAVAILABLE;
25 27
26 /** 28 /**
27 * Initialize an RTCDataBuffer from NSData. |isBinary| indicates whether |data| 29 * Initialize an RTCDataBuffer from NSData. |isBinary| indicates whether |data|
28 * contains UTF-8 or binary data. 30 * contains UTF-8 or binary data.
29 */ 31 */
30 - (instancetype)initWithData:(NSData *)data isBinary:(BOOL)isBinary; 32 - (instancetype)initWithData:(NSData *)data isBinary:(BOOL)isBinary;
31 33
32 @end 34 @end
33 35
34 36
35 @class RTCDataChannel; 37 @class RTCDataChannel;
38 RTC_EXPORT
36 @protocol RTCDataChannelDelegate <NSObject> 39 @protocol RTCDataChannelDelegate <NSObject>
37 40
38 /** The data channel state changed. */ 41 /** The data channel state changed. */
39 - (void)dataChannelDidChangeState:(RTCDataChannel *)dataChannel; 42 - (void)dataChannelDidChangeState:(RTCDataChannel *)dataChannel;
40 43
41 /** The data channel successfully received a data buffer. */ 44 /** The data channel successfully received a data buffer. */
42 - (void)dataChannel:(RTCDataChannel *)dataChannel 45 - (void)dataChannel:(RTCDataChannel *)dataChannel
43 didReceiveMessageWithBuffer:(RTCDataBuffer *)buffer; 46 didReceiveMessageWithBuffer:(RTCDataBuffer *)buffer;
44 47
45 @optional 48 @optional
46 /** The data channel's |bufferedAmount| changed. */ 49 /** The data channel's |bufferedAmount| changed. */
47 - (void)dataChannel:(RTCDataChannel *)dataChannel 50 - (void)dataChannel:(RTCDataChannel *)dataChannel
48 didChangeBufferedAmount:(uint64_t)amount; 51 didChangeBufferedAmount:(uint64_t)amount;
49 52
50 @end 53 @end
51 54
52 55
53 /** Represents the state of the data channel. */ 56 /** Represents the state of the data channel. */
54 typedef NS_ENUM(NSInteger, RTCDataChannelState) { 57 typedef NS_ENUM(NSInteger, RTCDataChannelState) {
55 RTCDataChannelStateConnecting, 58 RTCDataChannelStateConnecting,
56 RTCDataChannelStateOpen, 59 RTCDataChannelStateOpen,
57 RTCDataChannelStateClosing, 60 RTCDataChannelStateClosing,
58 RTCDataChannelStateClosed, 61 RTCDataChannelStateClosed,
59 }; 62 };
60 63
61 64 RTC_EXPORT
62 @interface RTCDataChannel : NSObject 65 @interface RTCDataChannel : NSObject
63 66
64 /** 67 /**
65 * A label that can be used to distinguish this data channel from other data 68 * A label that can be used to distinguish this data channel from other data
66 * channel objects. 69 * channel objects.
67 */ 70 */
68 @property(nonatomic, readonly) NSString *label; 71 @property(nonatomic, readonly) NSString *label;
69 72
70 /** Whether the data channel can send messages in unreliable mode. */ 73 /** Whether the data channel can send messages in unreliable mode. */
71 @property(nonatomic, readonly) BOOL isReliable DEPRECATED_ATTRIBUTE; 74 @property(nonatomic, readonly) BOOL isReliable DEPRECATED_ATTRIBUTE;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 124
122 /** Closes the data channel. */ 125 /** Closes the data channel. */
123 - (void)close; 126 - (void)close;
124 127
125 /** Attempt to send |data| on this data channel's underlying data transport. */ 128 /** Attempt to send |data| on this data channel's underlying data transport. */
126 - (BOOL)sendData:(RTCDataBuffer *)data; 129 - (BOOL)sendData:(RTCDataBuffer *)data;
127 130
128 @end 131 @end
129 132
130 NS_ASSUME_NONNULL_END 133 NS_ASSUME_NONNULL_END
OLDNEW
« no previous file with comments | « webrtc/api/objc/RTCConfiguration.h ('k') | webrtc/api/objc/RTCDataChannelConfiguration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698