X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/fbc584e3df355220dfd44f7207e304dbe7dd5d93..b64cdf3e84e76273251024a99bbe275ed1eeae4b:/ITByteStream.h?ds=inline diff --git a/ITByteStream.h b/ITByteStream.h index 10d9f0f..52f4856 100755 --- a/ITByteStream.h +++ b/ITByteStream.h @@ -8,17 +8,25 @@ #import -/*! @class ITByteStream - * @abstract A FIFO bytestream - */ +@class ITByteStream; + +@protocol ITByteStreamDelegate +-(oneway 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