X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcommon%2Fetag.h;h=1686fa553a5d32d954f0ea061b63a1719cd2e8c7;hb=HEAD;hp=a75df52a74cb5a54dfec7e792c90d70fea5429c7;hpb=45729fca56479bd9158486e0cda0c4a94b4dd1dc;p=xestiaab%2F.git diff --git a/source/common/etag.h b/source/common/etag.h index a75df52..1686fa5 100644 --- a/source/common/etag.h +++ b/source/common/etag.h @@ -1,3 +1,21 @@ +// etag.h - ETag subroutines header. +// +// (c) 2012-2015 Xestia Software Development. +// +// This file is part of Xestia Address Book. +// +// Xestia Address Book is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by the +// Free Software Foundation, version 3 of the license. +// +// Xestia Address Book is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with Xestia Address Book. If not, see + #include #include #include @@ -10,54 +28,54 @@ #define ETAG_H struct ETagData{ - - wxString ETagValue; - wxString ETagOrigValue; - int ETagStatus; - + + wxString ETagValue; + wxString ETagOrigValue; + int ETagStatus; + }; class ETagDB{ public: - //ETagDB(wxString AccountDir); - ETagDB() {}; - ~ETagDB(); - - // ETag functions. - - void AddETag(wxString Filename, wxString ETag, wxString ETagOriginal); - void RemoveETag(wxString Filename); - void UpdateETag(wxString Filename, wxString ETag); - void UpdateETag(wxString Filename, wxString ETag, wxString ETagOriginal); - std::map* GetFilenamePointer(); - wxString GetETag(wxString Filename); - wxString GetETagOriginal(wxString Filename); - bool CheckETagExists(wxString Filename); - //boost::mutex ProcessLock; - - // ETagDB functions. - - bool WriteETagDB(); - bool LoadETagDB(); - void DeleteETagDB(); - void SetupDB(wxString AccountDirFilename); - - bool GetWriteStatus(); - std::map GetETagData(); - //void *ProcessLock = new std::mutex; - + //ETagDB(wxString AccountDir); + ETagDB() {}; + ~ETagDB(); + + // ETag functions. + + void AddETag(wxString Filename, wxString ETag, wxString ETagOriginal); + void RemoveETag(wxString Filename); + void UpdateETag(wxString Filename, wxString ETag); + void UpdateETag(wxString Filename, wxString ETag, wxString ETagOriginal); + std::map* GetFilenamePointer(); + wxString GetETag(wxString Filename); + wxString GetETagOriginal(wxString Filename); + bool CheckETagExists(wxString Filename); + bool ETagExists(wxString Filename); + + // ETagDB functions. + + bool WriteETagDB(); + bool LoadETagDB(); + void DeleteETagDB(); + void SetupDB(wxString AccountDirFilename); + + bool GetWriteStatus(); + std::map GetETagData(); + //void *ProcessLock = new std::mutex; + private: - std::map FilenameETag; - std::map FilenameETagOriginal; - bool NeedsWrite = FALSE; - bool MarkedDeleted = FALSE; - wxString AccountDir; - std::mutex *ProcessLock = new std::mutex(); + std::map FilenameETag; + std::map FilenameETagOriginal; + bool NeedsWrite = FALSE; + bool MarkedDeleted = FALSE; + wxString AccountDir; + std::mutex *ProcessLock = new std::mutex(); }; /* -class ETagDB2{ -public: + class ETagDB2{ + public: ETagDB2() {} ; ~ETagDB2() {}; @@ -77,16 +95,15 @@ public: void DeleteETagDB(); bool GetWriteStatus(); -private: + private: std::map FilenameETag; std::map FilenameETagOriginal; bool NeedsWrite = FALSE; bool MarkedDeleted = FALSE; - /* std::mutex ProcessLock; wxString AccountDir; -}; -*/ + }; + */ #endif \ No newline at end of file