// Syncify // // Douglas Thrift // // $Id$ #ifndef _Syncify_hpp_ #define _Syncify_hpp_ #include #ifdef MENES_PRAGMA_ONCE #pragma once #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "Matcher/Matcher.hpp" #include "Error.hpp" struct Syncify { Syncify(const ext::String& local, const ext::String& remote, const ext::String& pattern); ~Syncify(); struct Transfer { ext::String local, remote; Transfer() {} Transfer(const ext::String& local, const ext::String& remote) : local(local), remote(remote) {} }; static ext::String program; static bool debug; Matcher pattern; std::queue transfers; api::ThreadMutex transfersLock; bool transfering; ext::ThreadPool<> transferers; void syncify(const api::Path& local, const ext::String& remote); int transfer(); }; #endif//_Syncify_hpp_