Kea 2.5.5
masterload.h
Go to the documentation of this file.
1// Copyright (C) 2010-2020 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 <dns/rrset.h>
12
13#include <functional>
14#include <iosfwd>
15
16namespace isc {
17namespace dns {
18class Name;
19class RRClass;
20
24public:
25 MasterLoadError(const char* file, size_t line, const char* what) :
26 isc::Exception(file, line, what) {}
27};
28
33typedef std::function<void(RRsetPtr)> MasterLoadCallback;
34
38
39
139void masterLoad(const char* const filename, const Name& origin,
140 const RRClass& zone_class, MasterLoadCallback callback);
141
162void masterLoad(std::istream& input, const Name& origin,
163 const RRClass& zone_class, MasterLoadCallback callback,
164 const char* source = NULL);
165}
166
167
169}
170
171#endif // MASTERLOAD_H
172
173// Local Variables:
174// mode: c++
175// 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:23
MasterLoadError(const char *file, size_t line, const char *what)
Definition: masterload.h:25
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
std::function< void(RRsetPtr)> MasterLoadCallback
The type of the callback parameter of masterLoad().
Definition: masterload.h:33
Defines the logger used by the top-level component of kea-lfc.