• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

job.cpp

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002 
00003    Copyright (C) 2005 Dario Massarin <nekkar@libero.it>
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 */
00010 
00011 #include "core/job.h"
00012 
00013 #include "core/jobqueue.h"
00014 #include "core/scheduler.h"
00015 
00016 #include <kdebug.h>
00017 
00018 Job::Job(JobQueue * parent, Scheduler * scheduler)
00019     : m_jobQueue(parent),
00020       m_scheduler(scheduler),
00021       m_status(Stopped),
00022       m_policy(None)
00023 {
00024 
00025 }
00026 
00027 Job::~Job()
00028 {
00029 }
00030 
00031 void Job::setStatus(Status jobStatus)
00032 {
00033     if(jobStatus == m_status)
00034         return;
00035 
00036     if(m_status == Job::Delayed)
00037     {
00038         //The previous status was Job::Delayed. We must stop all the timers
00039         m_scheduler->stopDelayTimer(this);
00040     }
00041 
00042     m_status = jobStatus;
00043     m_scheduler->jobChangedEvent(this, m_status);
00044 }
00045 
00046 void Job::setPolicy(Policy jobPolicy)
00047 {
00048     if(jobPolicy == m_policy)
00049         return;
00050 
00051     kDebug(5001) << "Job::setPolicy(" << jobPolicy << ")";
00052 
00053     m_policy = jobPolicy;
00054     m_scheduler->jobChangedEvent(this, m_policy);
00055 }

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal