Kea  2.3.5-git
simple_remove.h
Go to the documentation of this file.
1 // Copyright (C) 2020-2021 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 SIMPLE_REMOVE_H
8 #define SIMPLE_REMOVE_H
9 
11 
12 #include <d2srv/nc_trans.h>
13 
14 namespace isc {
15 namespace d2 {
16 
19 public:
20  SimpleRemoveTransactionError(const char* file, size_t line,
21  const char* what) :
22  isc::Exception(file, line, what) { };
23 };
24 
50 public:
51 
53  static const int REMOVING_FWD_RRS_ST = NCT_DERIVED_STATE_MIN + 2;
55 
57  static const int REMOVING_REV_PTRS_ST = NCT_DERIVED_STATE_MIN + 3;
59 
61 
64 
79  DdnsDomainPtr& forward_domain,
80  DdnsDomainPtr& reverse_domain,
81  D2CfgMgrPtr& cfg_mgr);
82 
84  virtual ~SimpleRemoveTransaction();
85 
86 protected:
93  virtual void defineEvents();
94 
102  virtual void verifyEvents();
103 
110  virtual void defineStates();
111 
119  virtual void verifyStates();
120 
141  void readyHandler();
142 
164  void selectingFwdServerHandler();
165 
188  void selectingRevServerHandler();
189 
233  void removingFwdRRsHandler();
234 
275  void removingRevPtrsHandler();
276 
291  void processRemoveOkHandler();
292 
310  void processRemoveFailedHandler();
311 
326  void buildRemoveFwdRRsRequest();
327 
342  void buildRemoveRevPtrsRequest();
343 };
344 
346 typedef boost::shared_ptr<SimpleRemoveTransaction> SimpleRemoveTransactionPtr;
347 
348 
349 } // namespace isc::d2
350 } // namespace isc
351 #endif
This file defines the class NameChangeTransaction.
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
Definition: d2_config.h:612
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Definition: ncr_msg.h:212
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Thrown if the SimpleRemoveTransaction encounters a general error.
Definition: simple_remove.h:18
boost::shared_ptr< D2CfgMgr > D2CfgMgrPtr
Defines a shared pointer to D2CfgMgr.
Definition: d2_cfg_mgr.h:334
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
boost::shared_ptr< SimpleRemoveTransaction > SimpleRemoveTransactionPtr
Defines a pointer to a SimpleRemoveTransaction.
Embodies the "life-cycle" required to carry out a DDNS Remove update.
Definition: simple_remove.h:49
Embodies the "life-cycle" required to carry out a DDNS update.
Definition: nc_trans.h:77
SimpleRemoveTransactionError(const char *file, size_t line, const char *what)
Definition: simple_remove.h:20