libtdepim

weaverextensions.h
00001 /* -*- C++ -*-
00002 
00003    This file declares the Weaver Extensions basics.
00004 
00005    $ Author: Mirko Boehm $
00006    $ Copyright: (C) 2004, Mirko Boehm $
00007    $ Contact: mirko@kde.org
00008          http://www.kde.org
00009          http://www.hackerbuero.org $
00010    $ License: LGPL with the following explicit clarification:
00011          This code may be linked against any version of the TQt toolkit
00012          from Troll Tech, Norway. $
00013 
00014 */
00015 
00016 #ifndef WEAVEREXTENSIONS_H
00017 #define WEAVEREXTENSIONS_H
00018 
00019 #include <tqobject.h>
00020 
00021 namespace KPIM {
00022 namespace ThreadWeaver {
00023 
00024     class Weaver;
00025     class Thread;
00026 
00033     class WeaverExtension : public TQObject
00034         {
00035             Q_OBJECT
00036   
00037         public:
00038             WeaverExtension ( TQObject *parent = 0, const char *name = 0);
00042             void attach (Weaver *);
00043             virtual ~WeaverExtension() = 0;
00044         public slots:
00045             // these methods are implemented, but do nothing in the default configuration
00046             // a thread is created:
00047             virtual void threadCreated (Thread *);
00048             // a thread is destroyed:
00049             virtual void threadDestroyed (Thread *);
00050             // the thread is processing a job
00051             virtual void threadBusy (Thread *);
00052             // the thread is suspended and will be waked when jobs become
00053             // available
00054             virtual void threadSuspended (Thread *);
00055         };
00056 
00057 } // namespace ThreadWeaver
00058 }
00059 
00060 #endif // WEAVEREXTENSIONS_H