summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups/src/stdafx.h
blob: 1fad41efd7fd5a54e8c0a2a6a4e5518c1da56021 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _HEADERS_H
#define _HEADERS_H

#define _CRT_SECURE_NO_DEPRECATE

#include <windows.h>
#include <shlobj.h>
#include <time.h>
#include <vector>
#include <functional>

#if defined(_MSC_VER) && (_MSC_VER >= 1800)
#	include <filesystem>
	namespace fs = std::tr2::sys;
#else
#	include <boost/filesystem.hpp>
	namespace fs = boost::filesystem;
#endif

#include <newpluginapi.h>
#include <m_clist.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_options.h>
#include <m_popup.h>
#include <m_icolib.h>
#include <m_autobackups.h>
#include <m_gui.h>

#include <m_folders.h>
#include <m_cloudfile.h>

#define MODULE "AutoBackups"

#include "options.h"
#include "resource.h"
#include "version.h"

#define SUB_DIR L"\\AutoBackups"
#define DIR L"%miranda_userdata%"

struct Options;
extern Options options;

int	SetBackupTimer(void);
int	OptionsInit(WPARAM wParam, LPARAM lParam);
void BackupStart(wchar_t *backup_filename);

struct ZipFile
{
	std::string sPath;
	std::string sZipPath;
	__forceinline ZipFile(const std::string &path, const std::string &zpath) : sPath(path), sZipPath(zpath) {}
};

int CreateZipFile(const char *szDestPath, OBJLIST<ZipFile> &lstFiles, const std::function<bool(size_t)> &fnCallback);

extern HINSTANCE g_hInstance;
extern char g_szMirVer[];

static IconItem iconList[] = {
	{ LPGEN("Backup profile"),     "backup", IDI_ICON1 },
	{ LPGEN("Save profile as..."), "saveas", IDI_ICON1 }
};

#endif