/www/proggenOrg/dedupe/export/trunk/filesearch/fileinfo.h

Go to the documentation of this file.
00001 
00008 #ifndef ORG_PROGGEN_DEDUPE_FILEINFO_FILEINFO_H
00009 #define ORG_PROGGEN_DEDUPE_FILEINFO_FILEINFO_H
00010 
00011 #include "state.h"
00012 #include <boost/filesystem.hpp>
00013 
00014 namespace Dedupe
00015 {
00020   typedef boost::filesystem::path FilePath;
00021 
00025   namespace FileInfo
00026   {
00027 
00032     enum FileType
00033     {
00034       TFile,        
00035       TDirectory,   
00036       TSymbolicLink,
00037       TNotDefined,  
00038       TNotAvailable 
00039     };
00040 
00049     class FileInfo
00050     {
00051       public:
00052 
00057       FileInfo( Dedupe::FilePath PathToFile );
00058 
00059 /*****************************************************************************/
00060 
00064       Dedupe::FilePath GetPath() const;
00065 
00069       unsigned long long GetSize() const;
00070 
00074       time_t GetDateChanged() const;
00075 
00079       bool GetExisting() const;
00080 
00084       Dedupe::FileInfo::FileType GetType() const;
00085 
00086 /*****************************************************************************/
00087 
00092       State::GeneralCodes SetHash( unsigned long long const &value );
00093 
00097       unsigned long long GetHash() const;
00098 
00099 /*****************************************************************************/
00100 
00105       State::GeneralCodes
00106                 SetInfoFilesearch( State::InfoFileSearch value );
00107 
00111       State::InfoFileSearch GetInfoFilesearch() const;
00112 
00117       State::GeneralCodes SetErrorMessage( std::string const &message );
00118 
00123       std::string GetErrorMessage() const;
00124 
00125 /*****************************************************************************/
00126 
00131       State::GeneralCodes SetInfoHash( State::InfoHash const &value );
00132 
00136       State::InfoHash GetInfoHash() const;
00137 
00138 /*****************************************************************************/
00139 
00144       State::GeneralCodes SetInfoDatabase( State::InfoDatabase const &value );
00145 
00149       State::InfoDatabase GetInfoDatabase() const;
00150 
00151 /*****************************************************************************/
00152 
00157       State::GeneralCodes SetInfoGui( State::InfoGui const &value );
00158 
00162       State::InfoGui GetInfoGui() const;
00163 
00164 /*****************************************************************************/
00168       bool operator < (const FileInfo & rhs ) const { return Path < rhs.Path; }
00169 
00170 /*****************************************************************************/
00171 
00172       private:
00173 
00174       Dedupe::FilePath Path;
00175       unsigned long long Size;
00176       time_t DateChanged;
00177       bool Existing;
00178       Dedupe::FileInfo::FileType Type;
00179 
00180       unsigned long long  Hash;
00181 
00182       State::InfoFileSearch InfoFilesearch;
00183       std::string FileSearchErrorMessage;
00184 
00185       State::InfoHash       InfoHash;
00186       State::InfoDatabase   InfoDatabase;
00187       State::InfoGui        InfoGui;
00188     };
00189   }
00190 }
00191 
00192 #endif

Generated on Thu Apr 7 12:57:25 2011 for Dedupe by  doxygen 1.5.1