Kea  1.5.0
masterload.h
Go to the documentation of this file.
1 // Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef MASTERLOAD_H
8 #define MASTERLOAD_H 1
9 
10 #include <iosfwd>
11 
12 #include <boost/function.hpp>
13 
14 #include <exceptions/exceptions.h>
15 
16 #include <dns/rrset.h>
17 
18 namespace isc {
19 namespace dns {
20 class Name;
21 class RRClass;
22 
26 public:
27  MasterLoadError(const char* file, size_t line, const char* what) :
28  isc::Exception(file, line, what) {}
29 };
30 
35 typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
36 
40 
41 void masterLoad(const char* const filename, const Name& origin,
142  const RRClass& zone_class, MasterLoadCallback callback);
143 
164 void masterLoad(std::istream& input, const Name& origin,
165  const RRClass& zone_class, MasterLoadCallback callback,
166  const char* source = NULL);
167 }
168 
169 
171 }
172 
173 #endif // MASTERLOAD_H
174 
175 // Local Variables:
176 // mode: c++
177 // End:
The Name class encapsulates DNS names.
Definition: name.h:223
boost::function< void(RRsetPtr)> MasterLoadCallback
The type of the callback parameter of masterLoad().
Definition: masterload.h:35
An exception that is thrown if an error occurs while loading a master zone data.
Definition: masterload.h:25
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
The RRClass class encapsulates DNS resource record classes.
Definition: rrclass.h:98
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
MasterLoadError(const char *file, size_t line, const char *what)
Definition: masterload.h:27
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
Definition: rrset.h:47
void masterLoad(const char *const filename, const Name &origin, const RRClass &zone_class, MasterLoadCallback callback)
Master zone file loader from a file.
Definition: masterload.cc:82