• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

ThreadWeaver

  • threadweaver
  • Weaver
WeaverInterface.h
Go to the documentation of this file.
1 /* -*- C++ -*-
2 
3  This file declares the WeaverInterface class.
4 
5  $ Author: Mirko Boehm $
6  $ Copyright: (C) 2005, 2006 Mirko Boehm $
7  $ Contact: mirko@kde.org
8  http://www.kde.org
9  http://www.hackerbuero.org $
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Library General Public
13  License as published by the Free Software Foundation; either
14  version 2 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Library General Public License for more details.
20 
21  You should have received a copy of the GNU Library General Public License
22  along with this library; see the file COPYING.LIB. If not, write to
23  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  Boston, MA 02110-1301, USA.
25 
26  $Id: WeaverImpl.h 29 2005-08-14 19:04:30Z mirko $
27 */
28 
29 #ifndef WeaverInterface_H
30 #define WeaverInterface_H
31 
32 #include <QtCore/QObject>
33 
34 #include <threadweaver/threadweaver_export.h>
35 
36 namespace ThreadWeaver {
37 
38  class Job;
39  class State;
40  class WeaverObserver;
41 
61  class THREADWEAVER_EXPORT WeaverInterface : public QObject {
62  Q_OBJECT
63 
64  public:
68  explicit WeaverInterface ( QObject* parent = 0 );
69  virtual ~WeaverInterface() {}
71  virtual const State& state() const = 0;
72 
74  virtual void setMaximumNumberOfThreads( int cap ) = 0;
75 
77  virtual int maximumNumberOfThreads() const = 0;
78 
80  virtual int currentNumberOfThreads () const = 0;
81 
92  virtual void registerObserver ( WeaverObserver* ) = 0;
101  virtual void enqueue ( Job* ) = 0;
111  virtual bool dequeue ( Job* ) = 0;
115  virtual void dequeue () = 0;
126  virtual void finish () = 0;
136  virtual void suspend () = 0;
140  virtual void resume () = 0;
143  virtual bool isEmpty () const = 0;
147  virtual bool isIdle () const = 0;
153  virtual int queueLength () const = 0;
154 
160  virtual void requestAbort() = 0;
161 
162  Q_SIGNALS:
169  void finished ();
170 
175  void suspended ();
176 
182  void jobDone ( ThreadWeaver::Job* );
183  // FIXME (0.7) test if signal is emitted properly
184  // FIXME (0.7) provide jobStarted and jobFailed signals
185  // FIXME (0.7) or remove all these, and add them to WeaverObserver
186 
188  void stateChanged ( ThreadWeaver::State* );
189  };
190 
191 }
192 
193 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 17:49:04 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ThreadWeaver

Skip menu "ThreadWeaver"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal