Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

VersionChecker.h

Go to the documentation of this file.
00001 //
00002 // VersionChecker.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 
00022 #if !defined(AFX_VERSIONCHECKER_H__EB5F6233_9917_44C3_BE67_CACB43D929CA__INCLUDED_)
00023 #define AFX_VERSIONCHECKER_H__EB5F6233_9917_44C3_BE67_CACB43D929CA__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "HttpRequest.h"
00028 
00029 
00030 class CVersionChecker  
00031 {
00032 // Construction
00033 public:
00034         CVersionChecker();
00035         virtual ~CVersionChecker();
00036         
00037 // Attributes
00038 public:
00039         CString         m_sMessage;
00040         CString         m_sQuote;
00041         BOOL            m_bUpgrade;
00042         CString         m_sUpgradePrompt;
00043         CString         m_sUpgradeFile;
00044         CString         m_sUpgradeSHA1;
00045         CString         m_sUpgradeTiger;
00046         CString         m_sUpgradeSize;
00047         CString         m_sUpgradeSources;
00048         CString         m_sUpgradePath;
00049         CString         m_sUpgradeVersion;
00050 
00051 protected:
00052         HANDLE                          m_hThread;
00053         CHttpRequest            m_pRequest;
00054         CMapStringToString      m_pResponse;
00055         HWND                            m_hWndNotify;
00056 
00057 // Operations
00058 public:
00059         BOOL            NeedToCheck();
00060         BOOL            Start(HWND hWndNotify);
00061         void            Stop();
00062         void            SetNextCheck(int nDays);
00063         BOOL            CheckUpgradeHash(const SHA1* pHash, LPCTSTR pszPath);
00064 protected:
00065         static UINT     ThreadStart(LPVOID pParam);
00066         void            OnRun();
00067         void            BuildRequest(CString& strRequest);
00068         BOOL            UndertakeRequest(CString& strPost);
00069         void            ProcessResponse();
00070 
00071 };
00072 
00073 extern CVersionChecker VersionChecker;
00074 
00075 #endif // !defined(AFX_VERSIONCHECKER_H__EB5F6233_9917_44C3_BE67_CACB43D929CA__INCLUDED_)

Generated on Thu Dec 15 10:39:51 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2