Kea 3.1.1
class_cmds.h
Go to the documentation of this file.
1// Copyright (C) 2020-2025 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 CLASS_CMDS_H
8#define CLASS_CMDS_H
9
11#include <cc/data.h>
12#include <hooks/hooks.h>
13#include <boost/shared_ptr.hpp>
14
15namespace isc {
16namespace class_cmds {
17
25public:
26 DependOnKnownError(const char* file, size_t line, const char* what) :
27 isc::Exception(file, line, what)
28 {}
29};
30
33class InUseError : public isc::Exception {
34public:
35 InUseError(const char* file, size_t line, const char* what) :
36 isc::Exception(file, line, what)
37 {}
38};
39
41class ClassCmdsImpl;
42
60class ClassCmds {
61public:
65 ClassCmds();
66
102 void addClass(hooks::CalloutHandle& callout_handle);
103
126 void getClass(hooks::CalloutHandle& callout_handle) const;
127
151
154 void getClassList(hooks::CalloutHandle& callout_handle) const;
155
190
193 void updateClass(hooks::CalloutHandle& callout_handle);
194
217 void delClass(hooks::CalloutHandle& callout_handle);
218
219private:
220
222 boost::shared_ptr<ClassCmdsImpl> impl_;
223};
224
225} // end of namespace class_cmds
226} // end of namespace isc
227
228#endif // CLASS_CMDS_H
This is a base class for exceptions thrown from the DNS library module.
Exception(const char *file, size_t line, const char *what)
Constructor for a given type for exceptions with file name and file line number.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
void updateClass(hooks::CalloutHandle &callout_handle)
Returns a response to a 'class-update' command.
void getClass(hooks::CalloutHandle &callout_handle) const
Returns a response to a 'class-get' command.
void getClassList(hooks::CalloutHandle &callout_handle) const
Returns a response to a 'class-list' command.
void delClass(hooks::CalloutHandle &callout_handle)
Processes and returns a response to 'class-del' command.
void addClass(hooks::CalloutHandle &callout_handle)
Returns a response to a 'class-add' command.
DependOnKnownError(const char *file, size_t line, const char *what)
Definition class_cmds.h:26
InUseError(const char *file, size_t line, const char *what)
Definition class_cmds.h:35
Per-packet callout handle.
Defines the logger used by the top-level component of kea-lfc.