This file is indexed.

/usr/include/rds/client/rdsdnszone.h is in librdsclient-dev 1.1.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
/***************************************************************************
 *  Copyright (C) 2011 by Resara LLC                                       *
 *  brendan@resara.com                                                     *
 *                                                                         *
 *  This program is free software; you can redistribute it and/or modify   *
 *  it under the terms of the GNU Lesser General Public License as         *
 *  published by the Free Software Foundation; either version 2 of the     *
 *  License, or (at your option) any later version.                        *
 *                                                                         *
 *  This program is distributed in the hope that it will be useful, but    *
 *  WITHOUT ANY WARRANTY; without even the implied warranty of             *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
 *  Lesser General Public License for more details.                        *
 *                                                                         *
 *  You should have received a copy of the GNU Lesser General Public       *
 *  License along with this program; if not, write to the                  *
 *  Free Software Foundation, Inc.,                                        *
 *  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
 *                                                                         *
 ***************************************************************************/
#ifndef RDSDNSZONE_H
#define RDSDNSZONE_H

#include <ClientProxy>
#include <QxtPimpl>
#include <rdsglobal.h>

#include <QStringList>

class RdsDnsZonePrivate;
class RdsDnsRecord;

/**
	@author Chris Vickery <chris@resara.com>
 */
class RDS_CLIENT_EXPORT RdsDnsZone : public QtRpc::ClientProxy
{
	Q_OBJECT;
	QXT_DECLARE_PRIVATE(RdsDnsZone);
	QTRPC_CLIENTPROXY_PIMPL(RdsDnsZone);
public:
	RdsDnsZone(QObject *parent = 0);
	RdsDnsZone(const RdsDnsZone &mgr);
	~RdsDnsZone();

	RdsDnsZone &operator=(const RdsDnsZone &mgr);

	/// IMPORTANT! This is copied on the server side, too. Keep them synced plox!
	enum RecordType
	{
		Invalid,
		A,
		AAAA,
		AFSDB,
		CERT,
		CNAME,
		DHCID,
		DLV,
		DNAME,
		DNSKEY,
		DS,
		HIP,
		IPSECKEY,
		KEY,
		LOC,
		MX,
		NAPTR,
		NS,
		NSEC,
		NSEC3,
		NSEC3PARAM,
		PTR,
		RRSIG,
		SIG,
		SOA,
		SPF,
		SRV,
		SSHFP,
		TA,
		TXT
	};
	static QString typeToString(RecordType type);
	static RecordType stringToType(const QString& type);

signals:
	/**
	 *        Parses a zone file
	 * @param config the zone file to parse
	 * @return true.  Check isValid() and errorString() for errors.
	 */
	ReturnValue parse(const QString &config);
	/**
		 *         Gets the currently loaded zone file.
		 * @return QString on success, error on failure.
	 */
	ReturnValue toString() const;
	/**
		 *        Saves the current zone information to a file
		 * @return true on success, error on failure.
	 */
	ReturnValue save();

	/**
		 *        Gets the domain name for the zone
		 * @return domain name as a QString
	 */
	ReturnValue domainName() const;
	/**
		 *        Sets the Domain Name for the zone
		 * @param domainName the domain name
		 * @return true
	 */
	ReturnValue setDomainName(const QString &domainName);

	/**
		 *        Gets the name of the primary name server
		 * @return returns the server name as a QString
	 */
	ReturnValue primaryNameServer() const;
	/**
		 *        Sets the name of the primary name server for the zone
		 * @param primaryNameServer name of the name server
		 * @return true
	 */
	ReturnValue setPrimaryNameServer(const QString &primaryNameServer); //must also have a host entry if it's not an IP, which it shouldn't be
	/**
		 *        Gets the name of the administrator name server
		 * @return the server name as a QString
	 */
	ReturnValue adminNameServer() const;
	/**
		 *        Sets the name of the administrator name server for the zone
		 * @param ns the name of the admininstrator name server
		 * @return true
	 */
	ReturnValue setAdminNameServer(const QString &ns);
	/**
		 *         Gets a the SOA values for the zone
		 * @return QVariantList of SOA vlaues
	 */
	ReturnValue soaValues() const;
	/**
		 *        Sets the SOA values for the zone.  Must be 5 values in the list to be valid.
		 * @param values a list of the SOA values
		 * @return true
	 */
	ReturnValue setSoaValues(const QStringList &values);

	/**
		 *        Adds a resource record to the zone
		 * @param type the resource record type (NS, A, CNAME,...)
		 * @param key the key to identify the RR
		 * @param value the value of the RR
		 * @return true if a new record was added, false if it replaced an existing record
	 */
	ReturnValue addRecord(int type, const QString &key, const QString &value);
	ReturnValue addRecord(int type, const QString &key, const QString &value, const QString &origin);
	ReturnValue addRecord(int type, const QString &key, const QString &value, const QString &origin, const QString &ttl);
	ReturnValue addRecord(int type, const QString &key, const QStringList &value);
	ReturnValue addRecord(int type, const QString &key, const QStringList &value, const QString &origin);
	ReturnValue addRecord(int type, const QString &key, const QStringList &value, const QString &origin, const QString &ttl);

	/**
		 *        Adds a resource record to the zone (ignores comments, origin, and ttl)
		 * @param record the record to add
		 * @return true if a new record was added, false if it replaced an existing record
	 */
	ReturnValue addRecord(const RdsDnsRecord &record); //return value is if it replaced or not
	/**
		 *        Removes a record from the zone
		 * @param type the type of record being removed
		 * @param key the key of the record to remove
		 * @return true if the record was removed, false if not (record did not exist)
	 */
	ReturnValue removeRecord(int type, const QString &key); //return value is if it existed or not
	/**
		 *        Removes a record from the zone
		 * @param record The record to remove
		 * @return true if the record was removed, false if not (record did not exist)
	 */
	ReturnValue removeRecord(const RdsDnsRecord &record); //return value is if it existed or not
	/**
		 *        Gets a resource record from the zone
		 * @param type the type of record to get
		 * @param key the key of the desired record
		 * @return returns a DnsRecord of the record, if the record was not found the type will be RdsDnsZone::Invalid
	 */
	ReturnValue record(int type, const QString &key) const;
	ReturnValue record(int type, const QString &key, const QString &origin) const;
	ReturnValue records(int type, const QString &key) const;
	ReturnValue records(int type, const QString &key, const QString &origin) const;
	/**
		 *         Gets a list of all the records from the zone
		 * @return DnsRecordList
	 */
	ReturnValue listRecords() const;
	/**
		 *        Gets a list of records with the specified type
		 * @param type the type of records to get
		 * @return DnsRecordList
	 */
	ReturnValue listRecordsByType(int type) const;
	/**
		 *        Gets a list of records with the specified key
		 * @param key the key of the desired records
		 * @return DnsRecordList
	 */
	ReturnValue listRecordsByKey(const QString &key) const;
	/**
		 *        Gets a list of records with the specified origin value
		 * @param origin the origin of the records to list
		 * @return DnsRecordList
	 */
	ReturnValue listRecordsByOrigin(const QString &origin) const;

	/**
		 * 	  TODO fix so it actually returns things...
		 * @param root
		 * @return QStringList
	 */
	ReturnValue listOrigins(const QString &root) const;
	/**
		 *
		 * @return QStringList
	 */
	ReturnValue listOrigins() const;

	/**
		 *        checks the validity of the zone
		 * @return true if valid, false if not
	 */
	ReturnValue isValid() const;
	/**
		 *        Gets the Error String
		 * @return QString
	 */
	ReturnValue errorString() const;

	ReturnValue addOrigin(const QString &origin);
	ReturnValue removeOrigin(const QString &origin);
	ReturnValue renameOrigin(const QString &oldname, const QString &newname);
};

Q_DECLARE_METATYPE(RdsDnsZone);


#endif