[go: up one dir, main page]

Menu

[14870f]: / sync / syncjob.h  Maximize  Restore  History

Download this file

48 lines (38 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/////////////////////////////////////////////////////////////////////////////////
// Author: Steven Lamerton
// Copyright: Copyright (C) 2009 - 2010 Steven Lamerton
// License: GNU GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
/////////////////////////////////////////////////////////////////////////////////
#ifndef H_SYNCJOB
#define H_SYNCJOB
class SyncData;
#include "../job.h"
#include "syncbase.h"
#include <wx/string.h>
class SyncJob : public Job
{
public:
SyncJob(SyncData *Data);
virtual void* Entry();
};
class SyncFiles : public SyncBase
{
public:
SyncFiles(const wxString &syncsource, const wxString &syncdest, SyncData* syncdata);
bool Execute();
protected:
virtual void OperationCaller(std::map<wxString, int> paths);
virtual void OnSourceNotDestFile(const wxString &path);
virtual void OnNotSourceDestFile(const wxString &path);
virtual void OnSourceAndDestFile(const wxString &path);
virtual void OnSourceNotDestFolder(const wxString &path);
virtual void OnNotSourceDestFolder(const wxString &path);
virtual void OnSourceAndDestFolder(const wxString &path);
bool CopyIfNeeded(const wxString &source, const wxString &dest);
bool CopyFile(const wxString &source, const wxString &dest);
bool CopyFolderTimestamp(const wxString &source, const wxString &dest);
bool SourceAndDestCopy(const wxString &source, const wxString &dest);
bool RemoveDirectory(wxString path);
bool RemoveFile(const wxString &path);
};
#endif