blob: 6f516b462d83b5e85b99044519e7b9402c02a05c (
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
|
#include <string>
#include <sys/time.h> /* for gettimeofday(), timeval */
#include <vector>
class whatsit{
public:
std::string parent_dir;
std::string progname;
pid_t mypid;
timeval now;
int mod_age;
int ac_age;
std::string suffix;
std::string progid;
int verbosity;
whatsit(const std::string name, const std::string _parent_dir);
int doit(const int penalty, const int stain);
// access comes after modification:
void update(const std::string msg, const timeval new_mod,
const timeval new_ac, const int penalty, const int stain);
int setup();
int check_dns(const char* ipvar, const char* namevar);
int check_dns_sub(const char* ipvar, const char* namevar,
std::string &addr, std::string &host,
std::vector<std::string> &checked);
void dump(const std::string var);
int maybe_mkdir(const std::string somedir, const std::string msg);
};
|