OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // Protocol for receving data channel state and message events. | 75 // Protocol for receving data channel state and message events. |
76 @protocol RTCDataChannelDelegate<NSObject> | 76 @protocol RTCDataChannelDelegate<NSObject> |
77 | 77 |
78 // Called when the data channel state has changed. | 78 // Called when the data channel state has changed. |
79 - (void)channelDidChangeState:(RTCDataChannel*)channel; | 79 - (void)channelDidChangeState:(RTCDataChannel*)channel; |
80 | 80 |
81 // Called when a data buffer was successfully received. | 81 // Called when a data buffer was successfully received. |
82 - (void)channel:(RTCDataChannel*)channel | 82 - (void)channel:(RTCDataChannel*)channel |
83 didReceiveMessageWithBuffer:(RTCDataBuffer*)buffer; | 83 didReceiveMessageWithBuffer:(RTCDataBuffer*)buffer; |
84 | 84 |
| 85 @optional |
| 86 |
| 87 // Called when the buffered amount has changed. |
| 88 - (void)channel:(RTCDataChannel*)channel |
| 89 didChangeBufferedAmount:(NSUInteger)amount; |
| 90 |
85 @end | 91 @end |
86 | 92 |
87 // ObjectiveC wrapper for a DataChannel object. | 93 // ObjectiveC wrapper for a DataChannel object. |
88 // See talk/app/webrtc/datachannelinterface.h | 94 // See talk/app/webrtc/datachannelinterface.h |
89 @interface RTCDataChannel : NSObject | 95 @interface RTCDataChannel : NSObject |
90 | 96 |
91 @property(nonatomic, readonly) NSString* label; | 97 @property(nonatomic, readonly) NSString* label; |
92 @property(nonatomic, readonly) BOOL isReliable; | 98 @property(nonatomic, readonly) BOOL isReliable; |
93 @property(nonatomic, readonly) BOOL isOrdered; | 99 @property(nonatomic, readonly) BOOL isOrdered; |
94 @property(nonatomic, readonly) NSUInteger maxRetransmitTime; | 100 @property(nonatomic, readonly) NSUInteger maxRetransmitTime; |
95 @property(nonatomic, readonly) NSUInteger maxRetransmits; | 101 @property(nonatomic, readonly) NSUInteger maxRetransmits; |
96 @property(nonatomic, readonly) NSString* protocol; | 102 @property(nonatomic, readonly) NSString* protocol; |
97 @property(nonatomic, readonly) BOOL isNegotiated; | 103 @property(nonatomic, readonly) BOOL isNegotiated; |
98 @property(nonatomic, readonly) NSInteger streamId; | 104 @property(nonatomic, readonly) NSInteger streamId; |
99 @property(nonatomic, readonly) RTCDataChannelState state; | 105 @property(nonatomic, readonly) RTCDataChannelState state; |
100 @property(nonatomic, readonly) NSUInteger bufferedAmount; | 106 @property(nonatomic, readonly) NSUInteger bufferedAmount; |
101 @property(nonatomic, weak) id<RTCDataChannelDelegate> delegate; | 107 @property(nonatomic, weak) id<RTCDataChannelDelegate> delegate; |
102 | 108 |
103 - (void)close; | 109 - (void)close; |
104 - (BOOL)sendData:(RTCDataBuffer*)data; | 110 - (BOOL)sendData:(RTCDataBuffer*)data; |
105 | 111 |
106 #ifndef DOXYGEN_SHOULD_SKIP_THIS | 112 #ifndef DOXYGEN_SHOULD_SKIP_THIS |
107 // Disallow init and don't add to documentation | 113 // Disallow init and don't add to documentation |
108 - (id)init __attribute__(( | 114 - (id)init __attribute__(( |
109 unavailable("init is not a supported initializer for this class."))); | 115 unavailable("init is not a supported initializer for this class."))); |
110 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ | 116 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
111 | 117 |
112 @end | 118 @end |
OLD | NEW |