X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/af1fcfcf8c78f03127d3929b49330cc191259487..3215be951cbc1e5e8bad14701507b68ebf380ab5:/ITByteStream.h diff --git a/ITByteStream.h b/ITByteStream.h index a1053f3..c008aac 100755 --- a/ITByteStream.h +++ b/ITByteStream.h @@ -9,27 +9,26 @@ #import @class ITByteStream; - -@protocol ITByteStreamDelegate --(oneway 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