ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Syncify/Syncify.hpp
Revision: 444
Committed: 2005-04-16T22:45:40-07:00 (20 years, 2 months ago) by douglas
File size: 1192 byte(s)
Log Message:
Fux0r!

File Contents

# User Rev Content
1 douglas 435 // Syncify
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #ifndef _Syncify_hpp_
8     #define _Syncify_hpp_
9    
10     #include <menes/platform.hpp>
11    
12     #ifdef MENES_PRAGMA_ONCE
13     #pragma once
14     #endif
15    
16     #include <menes-api/console.hpp>
17     #include <menes-api/files.hpp>
18 douglas 444 #include <menes-api/locks.hpp>
19 douglas 435 #include <menes-api/path.hpp>
20 douglas 444 #include <menes-api/threads.hpp>
21     #include <menes-etl/fnbind.hpp>
22     #include <menes-ext/scopes.hpp>
23     #include <menes-ext/stack.hpp>
24 douglas 435 #include <menes-ext/string.hpp>
25 douglas 444 #include <menes-ext/threadset.hpp>
26 douglas 435 #include <menes-ios/helpers.hpp>
27    
28 douglas 444 #include <queue>
29     #include <utility>
30    
31 douglas 435 #include "Matcher/Matcher.hpp"
32    
33 douglas 436 #include "Error.hpp"
34    
35 douglas 435 struct Syncify
36     {
37 douglas 436 Syncify(const ext::String& local, const ext::String& remote, const ext::String& pattern);
38     ~Syncify();
39 douglas 444 struct Transfer
40     {
41     ext::String local, remote;
42     Transfer() {}
43     Transfer(const ext::String& local, const ext::String& remote) : local(local), remote(remote) {}
44     };
45 douglas 435 static ext::String program;
46     static bool debug;
47 douglas 436 Matcher pattern;
48 douglas 444 std::queue<Transfer> transfers;
49     api::ThreadMutex transfersLock;
50     bool transfering;
51     ext::ThreadPool<> transferers;
52 douglas 440 void syncify(const api::Path& local, const ext::String& remote);
53 douglas 444 int transfer();
54 douglas 435 };
55    
56     #endif//_Syncify_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id