More work on ITAppleEventTools and also fix a compiler warning
[ITFoundation.git] / ITByteStream.h
index 027e326..c008aac 100755 (executable)
@@ -7,19 +7,28 @@
 //
 
 #import <Foundation/Foundation.h>
 //
 
 #import <Foundation/Foundation.h>
-/*! @class ITByteStream
- *  @abstract A FIFO bytestream
- */
 
 
+@class ITByteStream;
+@protocol DataReciever <NSObject>
+-(oneway void)newDataAdded:(id)sender;
+@end
 @interface ITByteStream : NSObject {
     @public
     NSMutableData *data;
     @private
     NSLock *lock;
 @interface ITByteStream : NSObject {
     @public
     NSMutableData *data;
     @private
     NSLock *lock;
+    id <DataReciever> delegate;
 }
 }
--(id) initWithStream:(ITByteStream*)stream;
+-(id) initWithStream:(ITByteStream*)stream delegate:(id <DataReciever>)d;
 -(int) availableDataLength;
 -(NSData*) readDataOfLength:(int)length;
 -(NSData*) readAllData;
 -(void) writeData:(in NSData*)data;
 -(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;
 @end
 @end