From 17349a5e426dc7acf1216a3767a22f69974cbca0 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 14 Apr 2008 21:45:08 -0400 Subject: Initial commit. --- Liaison/WriterThread.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Liaison/WriterThread.h (limited to 'Liaison/WriterThread.h') diff --git a/Liaison/WriterThread.h b/Liaison/WriterThread.h new file mode 100644 index 0000000..6dc8ece --- /dev/null +++ b/Liaison/WriterThread.h @@ -0,0 +1,38 @@ +// +// WriterThread.h +// Liaison +// +// Created by Brian Cully on Wed Feb 26 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +#define WriterThreadDied @"LiWriterThreadDied" + +@interface WriterThread : NSObject { + NSMutableArray *theDataQueue; + NSConditionLock *theQueueLock; + + NSFileHandle *theFile; + + volatile BOOL theConnectionIsOpen; + volatile BOOL theKillFlag; +} +- (id)initWithFileHandle: (NSFileHandle *)aFileHandle; +- (void)die; + +- (void)writeData: (NSData *)someData; +@property (retain,getter=queueLock) NSConditionLock *theQueueLock; +@property (retain,getter=dataQueue) NSMutableArray *theDataQueue; +@property volatile BOOL theConnectionIsOpen; +@property volatile BOOL theKillFlag; +@property (assign,getter=file,setter=setFile:) NSFileHandle *theFile; +@end + +@interface WriterThread (Accessors) +- (NSMutableArray *)dataQueue; +- (void)setDataQueue: (NSMutableArray *)aQueue; +- (NSConditionLock *)queueLock; +- (void)setQueueLock: (NSConditionLock *)aLock; +- (NSFileHandle *)file; +- (void)setFile: (NSFileHandle *)aFile; +@end -- cgit v1.2.3