// Copyright (c) 2010 Martin Knafve / hMailServer.com. // http://www.hmailserver.com #pragma once namespace HM { class FolderManipulationLock { public: FolderManipulationLock(int iAccountID, int iFolderID); ~FolderManipulationLock(void); void Lock(); private: static void Acquire(std::pair lockPair); static void Release(std::pair lockPair); static std::set > folders_; static boost::recursive_mutex mutex_; bool has_lock_; std::pair lock_pair_; }; }