X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/3d646c75403df6d5324833a701723a765555177f..692faf9cb79903190c1885a7ed08a2c97cc7fb8b:/ITByteStream.h diff --git a/ITByteStream.h b/ITByteStream.h old mode 100755 new mode 100644 index c008aac..a2193d6 --- a/ITByteStream.h +++ b/ITByteStream.h @@ -1,34 +1,46 @@ -// -// ITByteStream.h -// ITFoundation -// -// Created by Alexander Strange on Thu Feb 27 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// +/* + * ITFoundation + * ITByteStream.h + * + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ + * + */ #import -@class ITByteStream; -@protocol DataReciever --(oneway void)newDataAdded:(id)sender; +@protocol ITDataReceiver; + +@protocol ITDataProvider +- (id )setDelegate:(id )delegate; +- (id )delegate; @end -@interface ITByteStream : NSObject { - @public - NSMutableData *data; - @private - NSLock *lock; - id delegate; -} --(id) initWithStream:(ITByteStream*)stream delegate:(id )d; --(int) availableDataLength; --(NSData*) readDataOfLength:(int)length; --(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; + +@protocol ITDataReceiver +-(oneway void)newDataAdded:(id )sender; @end + +@interface ITByteStream : NSObject { + @public + NSMutableData *data; + @private + NSLock *lock; + id delegate; +} + +- (id)initWithDelegate:(id )delegate; +- (id)initWithStream:(ITByteStream *)stream delegate:(id )d; +- (int)availableDataLength; +- (NSData*)readDataOfLength:(int)length; +- (NSData*)readAllData; +- (void)writeData:(in NSData *)data; +- (void)writeBytes:(in char *)b len:(long)length; +- (void)lockStream; +- (void)unlockStream; +- (void)shortenData:(long)length; +- (id )setDelegate:(id )delegate; +- (id )delegate; + +@end \ No newline at end of file