diff options
author | Brian Cully <bjc@kublai.com> | 2008-04-14 21:45:08 -0400 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2008-04-14 21:45:08 -0400 |
commit | 17349a5e426dc7acf1216a3767a22f69974cbca0 (patch) | |
tree | 20029d02f07ab6257cccec36d34fb312f796e1d1 /Liaison/WriterThread.h | |
download | liaison-17349a5e426dc7acf1216a3767a22f69974cbca0.tar.gz liaison-17349a5e426dc7acf1216a3767a22f69974cbca0.zip |
Initial commit.
Diffstat (limited to 'Liaison/WriterThread.h')
-rw-r--r-- | Liaison/WriterThread.h | 38 |
1 files changed, 38 insertions, 0 deletions
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 |