X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/14a301f7aa7b244c4831006cfc4cfa42185517a4..086eb4c9abbda3c5d5f74c07800ad5cb04a50505:/ITByteStream.h diff --git a/ITByteStream.h b/ITByteStream.h index 52297c5..c008aac 100755 --- a/ITByteStream.h +++ b/ITByteStream.h @@ -9,24 +9,26 @@ #import @class ITByteStream; - -@protocol ITByteStreamDelegate --(void)newDataAdded:(ITByteStream *)sender; +@protocol DataReciever +-(oneway void)newDataAdded:(id)sender; @end - @interface ITByteStream : NSObject { @public NSMutableData *data; @private NSLock *lock; - id delegate; + id delegate; } --(id) initWithStream:(ITByteStream*)stream delegate:(id )d; --(id) initWithDelegate:(id )d; --(void) setDelegate:(id )d; +-(id) initWithStream:(ITByteStream*)stream delegate:(id )d; -(int) availableDataLength; -(NSData*) readDataOfLength:(int)length; -(NSData*) readAllData; -(void) writeData:(in NSData*)data; --(void) writeBytes:(char *)b len:(long)length; +-(void) writeBytes:(in char *)b len:(long)length; +-(void) lockStream; +-(void) unlockStream; +-(void) shortenData:(long)length; +-initWithDelegate:(id)delegate; +-setDelegate:(id)delegate; +-delegate; @end