X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/f7db9c0e898822c50164af5abda849c16410e035..14a301f7aa7b244c4831006cfc4cfa42185517a4:/ITByteStream.h diff --git a/ITByteStream.h b/ITByteStream.h index 027e326..52297c5 100755 --- a/ITByteStream.h +++ b/ITByteStream.h @@ -7,19 +7,26 @@ // #import -/*! @class ITByteStream - * @abstract A FIFO bytestream - */ + +@class ITByteStream; + +@protocol ITByteStreamDelegate +-(void)newDataAdded:(ITByteStream *)sender; +@end @interface ITByteStream : NSObject { @public NSMutableData *data; @private NSLock *lock; + id delegate; } --(id) initWithStream:(ITByteStream*)stream; +-(id) initWithStream:(ITByteStream*)stream delegate:(id )d; +-(id) initWithDelegate:(id )d; +-(void) setDelegate:(id )d; -(int) availableDataLength; -(NSData*) readDataOfLength:(int)length; -(NSData*) readAllData; -(void) writeData:(in NSData*)data; +-(void) writeBytes:(char *)b len:(long)length; @end