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
15
16#include <dns/rrset.h>
17
18namespace isc {
19namespace dns {
20class Name;
21class RRClass;
22
26public:
27 MasterLoadError(const char* file, size_t line, const char* what) :
28 isc::Exception(file, line, what) {}
29};
30
35typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
36
40
41
141void masterLoad(const char* const filename, const Name& origin,
142 const RRClass& zone_class, MasterLoadCallback callback);
143
164void 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:
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
An exception that is thrown if an error occurs while loading a master zone data.
Definition: masterload.h:25
MasterLoadError(const char *file, size_t line, const char *what)
Definition: masterload.h:27
The Name class encapsulates DNS names.
Definition: name.h:223
The RRClass class encapsulates DNS resource record classes.
Definition: rrclass.h:98
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
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
Definition: rrset.h:53
boost::function< void(RRsetPtr)> MasterLoadCallback
The type of the callback parameter of masterLoad().
Definition: masterload.h:35
Defines the logger used by the top-level component of kea-dhcp-ddns.