diff options
Diffstat (limited to 'kdict/dict.h')
-rw-r--r-- | kdict/dict.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/kdict/dict.h b/kdict/dict.h index a4947c93..eb236fc2 100644 --- a/kdict/dict.h +++ b/kdict/dict.h @@ -1,9 +1,9 @@ /* ------------------------------------------------------------- - dict.h (part of The KDE Dictionary Client) + dict.h (part of The TDE Dictionary Client) Copyright (C) 2000-2001 Christian Gebauer <gebauer@kde.org> - (C) by Matthias Hölzer 1998 + (C) by Matthias Hölzer 1998 This file is distributed under the Artistic License. See LICENSE for details. @@ -19,7 +19,7 @@ #ifndef _DICT_H_ #define _DICT_H_ -#include <pthread.h> +#include <ntqthread.h> #include <tqptrlist.h> #include <tqsocketnotifier.h> @@ -95,22 +95,21 @@ public: //********* DictAsyncClient ****************************************** -class DictAsyncClient +class DictAsyncClient : public TQThread { - public: DictAsyncClient(int NfdPipeIn, int NfdPipeOut); ~DictAsyncClient(); - static void* startThread(void* pseudoThis); - + void run(); // main loop + void request_termination() { m_request_termination = true; } + void insertJob(JobData *newJob); void removeJob(); - + private: - void waitForWork(); // main loop void define(); bool getDefinitions(); bool match(); @@ -144,6 +143,7 @@ private: int fdPipeIn,fdPipeOut; //IPC-Pipes to/from async thread int tcpSocket,timeout,idleHold; TQTextCodec *codec; + bool m_request_termination; }; @@ -194,7 +194,6 @@ private: TQSocketNotifier *notifier; int fdPipeIn[2],fdPipeOut[2]; //IPC-Pipes to/from async thread - pthread_t threadID; DictAsyncClient *client; TQPtrList<JobData> jobList; bool newServer,clientDoneInProgress; |