X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/c1dc61cc189c0eb83fe8027c70949b9c4dcdbd24..8d770173cee35e1b6139ee6ccb1511ccfa55a3c2:/ITByteStream.h?ds=inline diff --git a/ITByteStream.h b/ITByteStream.h index 265b7a6..c008aac 100755 --- a/ITByteStream.h +++ b/ITByteStream.h @@ -8,15 +8,27 @@ #import -/*! @class ITByteStream - * @abstract A FIFO bytestream - */ - +@class ITByteStream; +@protocol DataReciever +-(oneway void)newDataAdded:(id)sender; +@end @interface ITByteStream : NSObject { + @public NSMutableData *data; + @private + NSLock *lock; + id delegate; } --(id) initWithStream:(ITByteStream*)stream; +-(id) initWithStream:(ITByteStream*)stream delegate:(id )d; -(int) availableDataLength; -(NSData*) readDataOfLength:(int)length; --(void) writeData:(NSData*)data; +-(NSData*) readAllData; +-(void) writeData:(in NSData*)data; +-(void) writeBytes:(in char *)b len:(long)length; +-(void) lockStream; +-(void) unlockStream; +-(void) shortenData:(long)length; +-initWithDelegate:(id)delegate; +-setDelegate:(id)delegate; +-delegate; @end