-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecord.cpp
More file actions
139 lines (110 loc) · 2.36 KB
/
Copy pathrecord.cpp
File metadata and controls
139 lines (110 loc) · 2.36 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#include "record.h"
std::string Record::getName() {
return name;
}
std::string Record::getContent() {
return content;
}
uint32_t Record::getTtl() {
return ttl;
}
Tins::DNS::QueryType Record::getType() {
return type;
}
uint16_t Record::getPriority() {
return priority;
}
std::string Record::getMail() {
return mail;
}
uint32_t Record::getSerial() {
return serial;
}
uint32_t Record::getRefresh() {
return refresh;
}
uint32_t Record::getRetry() {
return retry;
}
uint32_t Record::getExpire() {
return expire;
}
uint32_t Record::getMinTtl() {
return minTtl;
}
int Record::setName(std::string newName) {
return 0;
}
int Record::setContent(std::string newContent) {
return 0;
}
int Record::setTtl(uint32_t newTtl) {
return 0;
}
int Record::setType(Tins::DNS::QueryType newType) {
return 0;
}
int Record::setPriority(uint16_t newPriority) {
priority = newPriority;
return 0;
}
int Record::setMail(std::string newMail) {
mail = newMail;
return 0;
}
int Record::setSerial(uint32_t newSerial) {
serial = newSerial;
return 0;
}
int Record::setRefresh(uint32_t newRefresh) {
refresh = newRefresh;
return 0;
}
int Record::setRetry(uint32_t newRetry) {
retry = newRetry;
return 0;
}
int Record::setExpire(uint32_t newExpire) {
expire = newExpire;
return 0;
}
int Record::setMinTtl(uint32_t newMinTtl) {
minTtl = newMinTtl;
return 0;
}
Record Record::returnCopy() {
return Record(this->name, this->content, this->ttl, this->type);
}
Record Record::returnSOACopy() {
return Record(this->name, this->content, this->ttl, this->mail, this->serial, this->refresh, this->retry, this->expire, this->minTtl, this->type);
}
Record Record::returnMXCopy() {
return Record(this->name, this->content, this->ttl, this->priority, this->type);
}
Record::Record(std::string n, std::string c, uint32_t tt, Tins::DNS::QueryType rec) {
name = n;
content = c;
ttl = tt;
type = rec;
}
Record::Record(std::string n, std::string c, uint32_t tt, uint16_t pri, Tins::DNS::QueryType rec) {
name = n;
content = c;
ttl = tt;
type = rec;
priority = pri;
}
Record::Record(std::string n, std::string c, uint32_t tt, std::string email, uint32_t ser, uint32_t ref, uint32_t ret, uint32_t exp, uint32_t min, Tins::DNS::QueryType rec) {
name = n;
content = c;
ttl = tt;
type = rec;
mail = email;
serial = ser;
refresh = ref;
retry = ret;
expire = exp;
minTtl = min;
}
Record::~Record() {
}