Samond Classes Library 1.2.0-RELEASE build 166
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 
23 #import <scl/SCDelegate.h>
24 #import <scl/SCStreamDelegateProtocol.h>
25 #import <scl/SCStream.h>
26 #import <scl/SCFileStream.h>
27 
28 #pragma mark -
29 #pragma mark Константы класса
30 
34 #define SCtreamDelegateClass @"SCStreamDelegate"
35 
52 
53 #pragma mark -
54 #pragma mark Обработка ошибок потоков
55 - (void)stream:(SCStream *)stream didDetectError:(SCStreamStatus)error;
56 
57 #pragma mark -
58 #pragma mark События чтения данных из потока
59 - (void)willReadObjectFromStream:(SCStream *)stream;
60 - (void)stream:(SCStream *)stream willReadBytes:(SCUSize)bytes toBuffer:(void *)buffer;
61 - (void)stream:(SCStream *)stream didFinishReadingObject:(id<SCStreaming>)object;
62 - (void)stream:(SCStream *)stream didFinishReadingBytes:(SCUSize)bytes toBuffer:(void *)buffer;
63 
64 #pragma mark -
65 #pragma mark События записи данных в поток
66 - (void)stream:(SCStream *)stream willWriteObject:(id<SCStreaming>)object;
67 - (void)stream:(SCStream *)stream willWriteBytes:(SCUSize)bytes fromBuffer:(const void *)buffer;
68 - (void)stream:(SCStream *)stream didFinishWritingObject:(id<SCStreaming>)object;
69 - (void)stream:(SCStream *)stream didFinishWritingBytes:(SCUSize)bytes fromBuffer:(const void *)buffer;
70 
71 #pragma mark -
72 #pragma mark События открытия и закрытия файловых потоков
73 - (void)stream:(SCStream *)stream willOpenWithPath:(NSString *)path mode:(SCFileStreamOpenMode)mode;
74 - (void)willCloseStream:(SCStream *)stream;
75 - (void)stream:(SCStream *)stream didFinishOpeningWithPath:(NSString *)path mode:(SCFileStreamOpenMode)mode
76  successfully:(BOOL)successfully;
77 - (void)didFinishClosingStream:(SCStream *)stream;
78 
79 @end
Streams events handling class.
Definition: SCStreamDelegate.h:51
SCInteger SCStreamStatus
Stream status type.
Definition: SCStream.h:181
enum _SCFileStreamOpenMode SCFileStreamOpenMode
File stream opening modes type.
Definition: SCFileStream.h:187
size_t SCUSize
Definition: SCTypes.h:221
Parent class of all library delegate classes.
Definition: SCDelegate.h:46
Streams communications protocol.
Definition: SCStreaming.h:40
Streams delegate class.
Definition: SCStreamDelegateProtocol.h:39
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:242