libkdepim

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 Qt toolkit
00012          from Troll Tech, Norway. $
00013 
00014 */
00015 
00016 #ifndef WEAVEREXTENSIONS_H
00017 #define WEAVEREXTENSIONS_H
00018 
00019 #include <qobject.h>
00020 
00021 namespace KPIM {
00022 namespace ThreadWeaver {
00023 
00024     class Weaver;
00025     class Thread;
00026 
00033     class WeaverExtension : public QObject
00034         {
00035             Q_OBJECT
00036         public:
00037             WeaverExtension ( QObject *parent = 0, const char *name = 0);
00041             void attach (Weaver *);
00042             virtual ~WeaverExtension() = 0;
00043         public slots:
00044             // these methods are implemented, but do nothing in the default configuration
00045             // a thread is created:
00046             virtual void threadCreated (Thread *);
00047             // a thread is destroyed:
00048             virtual void threadDestroyed (Thread *);
00049             // the thread is processing a job
00050             virtual void threadBusy (Thread *);
00051             // the thread is suspended and will be waked when jobs become
00052             // available
00053             virtual void threadSuspended (Thread *);
00054         };
00055 
00056 } // namespace ThreadWeaver
00057 }
00058 
00059 #endif // WEAVEREXTENSIONS_H
KDE Home | KDE Accessibility Home | Description of Access Keys