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

md5file.hpp

Go to the documentation of this file.
00001 /* 00002 * wxChecksums 00003 * Copyright (C) 2003-2004 Julien Couot 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 /** 00021 * \file md5file.hpp 00022 * Classes that encapsulate %MD5 files. 00023 */ 00024 00025 00026 #ifndef INC_MD5FILE_HPP 00027 #define INC_MD5FILE_HPP 00028 00029 00030 //--------------------------------------------------------------------------- 00031 #include "sumfile.hpp" 00032 //--------------------------------------------------------------------------- 00033 00034 00035 /** 00036 * A %MD5 file. 00037 */ 00038 class MD5File : public SumFile 00039 { 00040 private: 00041 // Copy constructor. 00042 MD5File(const MD5File& source); 00043 00044 // Assignment operator. 00045 virtual MD5File& operator=(const MD5File& source); 00046 00047 protected: 00048 // Clones the source instance in this instance. 00049 void clone(const MD5File& source); 00050 00051 public: 00052 // Default constructor. 00053 MD5File(); 00054 00055 // Returns an instance of a class that permits to compute the MD5 value. 00056 virtual Checksum* getChecksumCalculator() const; 00057 00058 // Returns the type of the file. 00059 virtual wxString getFileType() const; 00060 00061 // Reads the checksums from a file. 00062 virtual bool read(const wxFileName& fileName); 00063 00064 // Writes the checksums in a file. 00065 virtual bool write(const wxFileName& fileName); 00066 00067 // Indicates if the given checksum is valid. 00068 static bool IsValidChecksum(const wxString& checksum); 00069 00070 // Gets a new instance of this class. 00071 static SumFile* getNewInstance(); 00072 }; 00073 //--------------------------------------------------------------------------- 00074 00075 00076 #endif // INC_MD5FILE_HPP 00077

Generated on Sun May 30 13:37:45 2004 for wxChecksums by doxygen 1.3.7