[go: up one dir, main page]

Menu

[96b3e1]: / sync / syncjob.h  Maximize  Restore  History

Download this file

47 lines (37 with data), 1.6 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
/////////////////////////////////////////////////////////////////////////////////
// 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 wxFileName &syncsource, const wxFileName &syncdest, SyncData* syncdata);
bool Execute();
protected:
virtual void OnSourceNotDestFile(const wxFileName &source, const wxFileName &dest);
virtual void OnNotSourceDestFile(const wxFileName &source, const wxFileName &dest);
virtual void OnSourceAndDestFile(const wxFileName &source, const wxFileName &dest);
virtual void OnSourceNotDestFolder(const wxFileName &source, const wxFileName &dest);
virtual void OnNotSourceDestFolder(const wxFileName &source, const wxFileName &dest);
virtual void OnSourceAndDestFolder(const wxFileName &source, const wxFileName &dest);
bool CopyIfNeeded(const wxFileName &source, const wxFileName &dest);
bool CopyFile(const wxFileName &source, const wxFileName &dest);
bool CopyFolderTimestamp(const wxFileName &source, const wxFileName &dest);
bool SourceAndDestCopy(const wxFileName &source, const wxFileName &dest);
bool DeleteDirectory(const wxFileName &path);
bool RemoveFile(const wxFileName &path);
};
#endif