libtdepim

weaverextensions.h
1 /*
2  This file declares the Weaver Extensions basics.
3 
4  $ Author: Mirko Boehm $
5  $ Copyright: (C) 2004, Mirko Boehm $
6  $ Contact: mirko@kde.org
7  http://www.kde.org
8  http://www.hackerbuero.org $
9  $ License: LGPL with the following explicit clarification:
10  This code may be linked against any version of the TQt toolkit
11  from Troll Tech, Norway. $
12 
13 */
14 
15 #ifndef WEAVEREXTENSIONS_H
16 #define WEAVEREXTENSIONS_H
17 
18 #include <tqobject.h>
19 
20 namespace KPIM {
21 namespace ThreadWeaver {
22 
23  class Weaver;
24  class Thread;
25 
32  class WeaverExtension : public TQObject
33  {
34  TQ_OBJECT
35 
36  public:
37  WeaverExtension ( TQObject *parent = 0, const char *name = 0);
41  void attach (Weaver *);
42  virtual ~WeaverExtension() = 0;
43  public slots:
44  // these methods are implemented, but do nothing in the default configuration
45  // a thread is created:
46  virtual void threadCreated (Thread *);
47  // a thread is destroyed:
48  virtual void threadDestroyed (Thread *);
49  // the thread is processing a job
50  virtual void threadBusy (Thread *);
51  // the thread is suspended and will be waked when jobs become
52  // available
53  virtual void threadSuspended (Thread *);
54  };
55 
56 } // namespace ThreadWeaver
57 }
58 
59 #endif // WEAVEREXTENSIONS_H
The class Thread is used to represent the worker threads in the weaver's inventory.
Definition: weaver.h:250
A WeaverExtension can be attached to an existing Weaver object and will then receive signals on actio...
void attach(Weaver *)
Attach() is a convenience method that will connect all our slots to signals emitted by the weaver.
A weaver is the manager of worker threads (Thread objects) to which it assigns jobs from it's queue.
Definition: weaver.h:297
TDEPIM classes for drag and drop of mails.