-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibrary.h
65 lines (53 loc) · 1.36 KB
/
library.h
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
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <fcntl.h> // for open()
#include <pwd.h>
#include <vector>
#include <time.h>
#include <fstream>
#include <string.h>
#include <unistd.h> //for getcwd()
#include <dirent.h> // opendir()
#include <sys/stat.h> // for stat
#include <thread>
#include <pthread.h>
#include <bits/stdc++.h>
#include <sstream>
#include <openssl/md5.h>
#include <openssl/sha.h>
#define MDPath "./MetaDataFile/All_snapshot_details.txt"
#define MDPathLogFile "./LogFile/logfile.txt"
//#define timeInterval 1200000 //20 minutes
#define timeInterval 15 //5sec
// if 1 then Update Index file will be deleted from location
// if 0 the Update Index file will be not deleted from location
#define toShowUpdateIndexFileOfRsync 0
// #define MODVAL 1048576
// static const string DELIM = "$";
using namespace std;
// struct checksumValues{
// int r1,r2;
// string checksum;
// };
struct snapshotDetails{
string fullQualifiedPath;
string ownership;
string timeStamp;
string accessRights;
bool isFile=false; // 1 -> file else directory
};
struct compareSnapshot{
struct snapshotDetails details;
string newTimeStamp;
string oldTimeStamp;
string operationType;
};
//redefined in Main.cpp
struct SnapShotMetaDataInformation
{
string sourcePath;
string destinationPath;
string creationTimeStamp;
string lastRunTime;
};