Samond Classes Library 1.2.2-RELEASE build 188
SCStreamDelegate.h
Go to the documentation of this file.
1 //
2 // SCStreamDelegate.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 05.05.12.
6 // Copyright (c) 2007 - 2017 by Samond Development Corporation. All rights reserved.
7 //
8 
24 #import <scl/SCFileStream.h>
25 #import <scl/SCDelegate.h>
26 
27 #pragma mark -
28 #pragma mark Class Constants
29 
38 #define SCStreamDelegateClass @"SCStreamDelegate"
39 
40 
41 #pragma mark -
42 #pragma mark Protocol SCStreamDelegate Declaration
43 
58 @optional
59 
60 #pragma mark -
61 #pragma mark Handling Stream Errors
62 
77 - (void)stream:(SCStream *)stream didDetectError:(SCStreamStatus)error;
78 
79 #pragma mark -
80 #pragma mark Data Reading Events Handlers
81 
94 - (void)willReadObjectFromStream:(SCStream *)stream;
95 
108 - (void)stream:(SCStream *)stream willReadBytes:(SCSize)bytes toBuffer:(void *)buffer;
109 
120 - (void)stream:(SCStream *)stream didFinishReadingObject:(id<SCStreaming>)object;
121 
134 - (void)stream:(SCStream *)stream didFinishReadingBytes:(SCSize)bytes toBuffer:(void *)buffer;
135 
136 #pragma mark -
137 #pragma mark Data Writing Events Handlers
138 
153 - (void)stream:(SCStream *)stream willWriteObject:(id<SCStreaming>)object;
154 
167 - (void)stream:(SCStream *)stream willWriteBytes:(SCSize)bytes fromBuffer:(const void *)buffer;
168 
179 - (void)stream:(SCStream *)stream didFinishWritingObject:(id<SCStreaming>)object;
180 
193 - (void)stream:(SCStream *)stream didFinishWritingBytes:(SCSize)bytes fromBuffer:(const void *)buffer;
194 
195 #pragma mark -
196 #pragma mark File Stream Opening and Closing Events Handlers
197 
214 - (void)stream:(SCStream *)stream willOpenWithPath:(NSString *)path mode:(SCFileStreamOpenMode)mode;
215 
224 - (void)willCloseStream:(SCStream *)stream;
225 
240 - (void)stream:(SCStream *)stream didFinishOpeningWithPath:(NSString *)path mode:(SCFileStreamOpenMode)mode
241  successfully:(BOOL)successfully;
242 
251 - (void)didFinishClosingStream:(SCStream *)stream;
252 
253 @end
254 
255 #pragma mark -
256 #pragma mark Class SCStreamDelegate Declaration
257 
273 
274 #pragma mark -
275 #pragma mark Handling Stream Errors
276 - (void)stream:(SCStream *)stream didDetectError:(SCStreamStatus)error;
277 
278 #pragma mark -
279 #pragma mark Data Reading Events Handlers
280 - (void)willReadObjectFromStream:(SCStream *)stream;
281 - (void)stream:(SCStream *)stream willReadBytes:(SCSize)bytes toBuffer:(void *)buffer;
282 - (void)stream:(SCStream *)stream didFinishReadingObject:(id<SCStreaming>)object;
283 - (void)stream:(SCStream *)stream didFinishReadingBytes:(SCSize)bytes toBuffer:(void *)buffer;
284 
285 #pragma mark -
286 #pragma mark Data Writing Events Handlers
287 - (void)stream:(SCStream *)stream willWriteObject:(id<SCStreaming>)object;
288 - (void)stream:(SCStream *)stream willWriteBytes:(SCSize)bytes fromBuffer:(const void *)buffer;
289 - (void)stream:(SCStream *)stream didFinishWritingObject:(id<SCStreaming>)object;
290 - (void)stream:(SCStream *)stream didFinishWritingBytes:(SCSize)bytes fromBuffer:(const void *)buffer;
291 
292 #pragma mark -
293 #pragma mark File Stream Opening and Closing Events Handlers
294 - (void)stream:(SCStream *)stream willOpenWithPath:(NSString *)path mode:(SCFileStreamOpenMode)mode;
295 - (void)willCloseStream:(SCStream *)stream;
296 - (void)stream:(SCStream *)stream didFinishOpeningWithPath:(NSString *)path mode:(SCFileStreamOpenMode)mode
297  successfully:(BOOL)successfully;
298 - (void)didFinishClosingStream:(SCStream *)stream;
299 
300 @end
Class SCFileStream header file.
Streams events handling class.
Definition: SCStreamDelegate.h:272
Class SCDelegate header file.
SCFileStreamOpenMode
Definition: SCFileStream.h:96
Parent class of all library delegate classes.
Definition: SCDelegate.h:53
Streams communications protocol.
Definition: SCStreaming.h:42
SCInteger SCStreamStatus
Definition: SCStream.h:163
Streams delegate class.
Definition: SCStreamDelegate.h:57
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:226
size_t SCSize
Definition: SCTypes.h:209