00001 // 00002 // Scheduler.h 00003 // 00004 // Copyright (c) Shareaza Development Team, 2002-2005. 00005 // This file is part of SHAREAZA (www.shareaza.com) 00006 // 00007 // Shareaza is free software; you can redistribute it 00008 // and/or modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 2 of 00010 // the License, or (at your option) any later version. 00011 // 00012 // Shareaza is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with Shareaza; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 #if !defined(AFX_SCHEDULER_H__INCLUDED_) 00022 #define AFX_SCHEDULER_H__INCLUDED_ 00023 00024 #pragma once 00025 00026 class CScheduler 00027 { 00028 // Construction 00029 public: 00030 CScheduler(); 00031 ~CScheduler(); 00032 00033 // Attributes 00034 public: 00035 BYTE m_pSchedule[7][24]; 00036 protected: 00037 BYTE m_nCurrentHour; 00038 DWORD m_tLastCheck; 00039 00040 00041 // Operations 00042 public: 00043 BOOL Load(); 00044 void Save(); 00045 void Update(); 00046 protected: 00047 void SetVariables(BYTE nCurrentSettings); 00048 void Serialize(CArchive& ar); 00049 }; 00050 00051 enum 00052 { 00053 SCHEDULE_OFF, SCHEDULE_LIMITED_SPEED, SCHEDULE_FULL_SPEED 00054 }; 00055 00056 extern CScheduler Schedule; 00057 00058 #endif // !defined(AFX_SCHEDULER_H__INCLUDED_)