• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

knode

  • sources
  • kde-4.12
  • kdepim
  • knode
scheduler.h
Go to the documentation of this file.
1 /*
2  KNode, the KDE newsreader
3  Copyright (c) 1999-2005 the KNode authors.
4  See file AUTHORS for details
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  You should have received a copy of the GNU General Public License
11  along with this program; if not, write to the Free Software Foundation,
12  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
13 */
14 
15 #ifndef KNODE_SCHEDULER_H
16 #define KNODE_SCHEDULER_H
17 
18 #include <QObject>
19 #include <QMutex>
20 #include <QList>
21 
22 namespace KPIM {
23  class ProgressItem;
24 }
25 
26 class KNJobData;
27 
28 namespace KNode {
29 
41 class Scheduler : public QObject {
42 
43  Q_OBJECT
44 
45  public:
46 
50  explicit Scheduler( QObject *parent = 0 );
51  ~Scheduler();
52 
56  void addJob(KNJobData *job);
57 
58  QMutex& nntpMutex() { return nntp_Mutex; }
59 
65  void cancelJobs( int type = 0, KPIM::ProgressItem* item = 0 );
66 
67  protected:
69  KNJobData *currentNntpJob;
71  KNJobData *currentSmtpJob;
72  QMutex nntp_Mutex;
73 
74  signals:
78  void netActive(bool);
79 
80  private:
84  void schedule();
85 
89  void startJob( KNJobData *job );
90 
92  void updateStatus();
93 
94  private slots:
98  void slotJobFinished( KNJobData *job );
99 
103  void slotCancelJob( KPIM::ProgressItem *item );
104 
105  void slotPasswordsChanged();
106 
107  private:
109  QList<KNJobData*> nntpJobQueue;
111  QList<KNJobData*> smtpJobs;
113  QList<KNJobData*> mWalletQueue;
114 
115 };
116 
117 }
118 
119 #endif
KNJobData
Abstract base class for all KNode internal jobs.
Definition: knjobdata.h:101
KNode::Scheduler::nntp_Mutex
QMutex nntp_Mutex
Definition: scheduler.h:72
QObject
KNode::Scheduler::currentSmtpJob
KNJobData * currentSmtpJob
the currently active SMTP job
Definition: scheduler.h:71
KNode::Scheduler::netActive
void netActive(bool)
Indicates whether there are currently active jobs, useful to e.g.
KNode::Scheduler::cancelJobs
void cancelJobs(int type=0, KPIM::ProgressItem *item=0)
Cancel the selected jobs.
Definition: scheduler.cpp:126
KNode::Scheduler::~Scheduler
~Scheduler()
Definition: scheduler.cpp:41
KNode::Scheduler::nntpMutex
QMutex & nntpMutex()
Definition: scheduler.h:58
KNode::Scheduler::currentNntpJob
KNJobData * currentNntpJob
the currently active NNTP job
Definition: scheduler.h:69
KNode::Scheduler::Scheduler
Scheduler(QObject *parent=0)
Create a new Scheduler object.
Definition: scheduler.cpp:32
KPIM::ProgressItem
KNode::Scheduler
The job scheduler.
Definition: scheduler.h:41
QList< KNJobData * >
KNode::Scheduler::addJob
void addJob(KNJobData *job)
Adds a new job to the scheduler queue.
Definition: scheduler.cpp:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

knode

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



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