Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
cc6e80a4
Commit
cc6e80a4
authored
Jan 12, 2015
by
Marcin Siodelski
Browse files
[3668] Moved the definition of IOServicePtr to asiolink/io_service.h
parent
f8b8d39b
Changes
32
Hide whitespace changes
Inline
Side-by-side
src/bin/d2/Makefile.am
View file @
cc6e80a4
...
...
@@ -53,7 +53,6 @@ libd2_la_SOURCES =
libd2_la_SOURCES
+=
d_process.h
libd2_la_SOURCES
+=
d_controller.cc d_controller.h
libd2_la_SOURCES
+=
d_cfg_mgr.cc d_cfg_mgr.h
libd2_la_SOURCES
+=
d2_asio.h
libd2_la_SOURCES
+=
d2_log.cc d2_log.h
libd2_la_SOURCES
+=
d2_process.cc d2_process.h
libd2_la_SOURCES
+=
d2_config.cc d2_config.h
...
...
src/bin/d2/bundy_d2_controller.h
View file @
cc6e80a4
// Copyright (C) 2014
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014
-2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -15,10 +15,10 @@
#ifndef BUNDY_D2_CONTROLLER_H
#define BUNDY_D2_CONTROLLER_H
#include
<asiolink/io_service.h>
#include
<cc/data.h>
#include
<cc/session.h>
#include
<config/ccsession.h>
#include
<d2/d2_asio.h>
#include
<d2/d2_log.h>
#include
<d2/d_controller.h>
#include
<d2/d_process.h>
...
...
src/bin/d2/d2_asio.h
deleted
100644 → 0
View file @
f8b8d39b
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef D2_ASIO_H
#define D2_ASIO_H
#include
<asiolink/asiolink.h>
#include
<boost/shared_ptr.hpp>
namespace
isc
{
namespace
d2
{
/// @brief Defines a smart pointer to an IOService instance.
typedef
boost
::
shared_ptr
<
isc
::
asiolink
::
IOService
>
IOServicePtr
;
};
// namespace isc::d2
};
// namespace isc
#endif
src/bin/d2/d2_cfg_mgr.h
View file @
cc6e80a4
// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014
-2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -15,9 +15,9 @@
#ifndef D2_CFG_MGR_H
#define D2_CFG_MGR_H
#include
<asiolink/io_service.h>
#include
<cc/data.h>
#include
<exceptions/exceptions.h>
#include
<d2/d2_asio.h>
#include
<d2/d_cfg_mgr.h>
#include
<d2/d2_config.h>
...
...
src/bin/d2/d2_config.h
View file @
cc6e80a4
// Copyright (C) 2013-201
4
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
5
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -15,8 +15,8 @@
#ifndef D2_CONFIG_H
#define D2_CONFIG_H
#include
<asiolink/io_service.h>
#include
<cc/data.h>
#include
<d2/d2_asio.h>
#include
<d2/d_cfg_mgr.h>
#include
<dhcpsrv/parsers/dhcp_parsers.h>
#include
<dns/tsig.h>
...
...
src/bin/d2/d2_process.cc
View file @
cc6e80a4
...
...
@@ -26,7 +26,7 @@ namespace d2 {
// be configurable.
const
unsigned
int
D2Process
::
QUEUE_RESTART_PERCENT
=
80
;
D2Process
::
D2Process
(
const
char
*
name
,
IOServicePtr
io_service
)
D2Process
::
D2Process
(
const
char
*
name
,
asiolink
::
IOServicePtr
io_service
)
:
DProcessBase
(
name
,
io_service
,
DCfgMgrBasePtr
(
new
D2CfgMgr
())),
reconf_queue_flag_
(
false
),
shutdown_type_
(
SD_NORMAL
)
{
...
...
@@ -101,7 +101,7 @@ D2Process::runIO() {
// service. Secondly, asiolink::IOService does not provide the poll
// method. This is a handy method which runs all ready handlers without
// blocking.
IOServicePtr
&
io
=
getIoService
();
asiolink
::
IOServicePtr
&
io
=
getIoService
();
asio
::
io_service
&
asio_io_service
=
io
->
get_io_service
();
// Poll runs all that are ready. If none are ready it returns immediately
...
...
src/bin/d2/d2_process.h
View file @
cc6e80a4
...
...
@@ -66,7 +66,7 @@ public:
/// asynchronous event handling.
///
/// @throw DProcessBaseError is io_service is NULL.
D2Process
(
const
char
*
name
,
IOServicePtr
io_service
);
D2Process
(
const
char
*
name
,
asiolink
::
IOServicePtr
io_service
);
/// @brief Called after instantiation to perform initialization unique to
/// D2.
...
...
src/bin/d2/d2_queue_mgr.cc
View file @
cc6e80a4
// Copyright (C) 2013-201
4
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
5
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -22,7 +22,7 @@ namespace d2 {
// Makes constant visible to Google test macros.
const
size_t
D2QueueMgr
::
MAX_QUEUE_DEFAULT
;
D2QueueMgr
::
D2QueueMgr
(
IOServicePtr
&
io_service
,
const
size_t
max_queue_size
)
D2QueueMgr
::
D2QueueMgr
(
asiolink
::
IOServicePtr
&
io_service
,
const
size_t
max_queue_size
)
:
io_service_
(
io_service
),
max_queue_size_
(
max_queue_size
),
mgr_state_
(
NOT_INITTED
),
target_stop_state_
(
NOT_INITTED
)
{
if
(
!
io_service_
)
{
...
...
src/bin/d2/d2_queue_mgr.h
View file @
cc6e80a4
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013
, 2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -17,8 +17,8 @@
/// @file d2_queue_mgr.h This file defines the class D2QueueMgr.
#include
<asiolink/io_service.h>
#include
<exceptions/exceptions.h>
#include
<d2/d2_asio.h>
#include
<dhcp_ddns/ncr_msg.h>
#include
<dhcp_ddns/ncr_io.h>
...
...
@@ -165,7 +165,7 @@ public:
/// This value must be greater than zero. It defaults to MAX_QUEUE_DEFAULT.
///
/// @throw D2QueueMgrError if max_queue_size is zero.
D2QueueMgr
(
IOServicePtr
&
io_service
,
D2QueueMgr
(
asiolink
::
IOServicePtr
&
io_service
,
const
size_t
max_queue_size
=
MAX_QUEUE_DEFAULT
);
/// @brief Destructor
...
...
@@ -327,7 +327,7 @@ public:
void
updateStopState
();
/// @brief IOService that our listener should use for IO management.
IOServicePtr
io_service_
;
asiolink
::
IOServicePtr
io_service_
;
/// @brief Dictates the maximum number of entries allowed in the queue.
size_t
max_queue_size_
;
...
...
src/bin/d2/d2_update_mgr.cc
View file @
cc6e80a4
...
...
@@ -26,7 +26,7 @@ namespace d2 {
const
size_t
D2UpdateMgr
::
MAX_TRANSACTIONS_DEFAULT
;
D2UpdateMgr
::
D2UpdateMgr
(
D2QueueMgrPtr
&
queue_mgr
,
D2CfgMgrPtr
&
cfg_mgr
,
IOServicePtr
&
io_service
,
asiolink
::
IOServicePtr
&
io_service
,
const
size_t
max_transactions
)
:
queue_mgr_
(
queue_mgr
),
cfg_mgr_
(
cfg_mgr
),
io_service_
(
io_service
)
{
if
(
!
queue_mgr_
)
{
...
...
src/bin/d2/d2_update_mgr.h
View file @
cc6e80a4
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013
, 2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -17,8 +17,8 @@
/// @file d2_update_mgr.h This file defines the class D2UpdateMgr.
#include
<asiolink/io_service.h>
#include
<exceptions/exceptions.h>
#include
<d2/d2_asio.h>
#include
<d2/d2_log.h>
#include
<d2/d2_queue_mgr.h>
#include
<d2/d2_cfg_mgr.h>
...
...
@@ -100,7 +100,7 @@ public:
/// @throw D2UpdateMgrError if either the queue manager or configuration
/// managers are NULL, or max transactions is less than one.
D2UpdateMgr
(
D2QueueMgrPtr
&
queue_mgr
,
D2CfgMgrPtr
&
cfg_mgr
,
IOServicePtr
&
io_service
,
asiolink
::
IOServicePtr
&
io_service
,
const
size_t
max_transactions
=
MAX_TRANSACTIONS_DEFAULT
);
/// @brief Destructor
...
...
@@ -173,7 +173,7 @@ public:
/// @brief Gets the D2UpdateMgr's IOService.
///
/// @return returns a reference to the IOService
const
IOServicePtr
&
getIOService
()
{
const
asiolink
::
IOServicePtr
&
getIOService
()
{
return
(
io_service_
);
}
...
...
@@ -246,7 +246,7 @@ private:
/// passed into transactions to manager their IO events.
/// (For future reference, multi-threaded transactions would each use their
/// own IOService instance.)
IOServicePtr
io_service_
;
asiolink
::
IOServicePtr
io_service_
;
/// @brief Maximum number of concurrent transactions.
size_t
max_transactions_
;
...
...
src/bin/d2/d_controller.h
View file @
cc6e80a4
// Copyright (C) 2013-201
4
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
5
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -15,8 +15,8 @@
#ifndef D_CONTROLLER_H
#define D_CONTROLLER_H
#include
<asiolink/io_service.h>
#include
<cc/data.h>
#include
<d2/d2_asio.h>
#include
<d2/d2_log.h>
#include
<d2/d_process.h>
#include
<d2/io_service_signal.h>
...
...
@@ -320,7 +320,7 @@ protected:
/// @brief Getter for fetching the controller's IOService
///
/// @return returns a pointer reference to the IOService.
IOServicePtr
&
getIOService
()
{
asiolink
::
IOServicePtr
&
getIOService
()
{
return
(
io_service_
);
}
...
...
@@ -481,7 +481,7 @@ private:
DProcessBasePtr
process_
;
/// @brief Shared pointer to an IOService object, used for ASIO operations.
IOServicePtr
io_service_
;
asiolink
::
IOServicePtr
io_service_
;
/// @brief Set of registered signals to handle.
util
::
SignalSetPtr
signal_set_
;
...
...
src/bin/d2/d_process.h
View file @
cc6e80a4
// Copyright (C) 2013
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013
, 2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -15,8 +15,8 @@
#ifndef D_PROCESS_H
#define D_PROCESS_H
#include
<asiolink/io_service.h>
#include
<cc/data.h>
#include
<d2/d2_asio.h>
#include
<d2/d_cfg_mgr.h>
#include
<boost/shared_ptr.hpp>
...
...
@@ -69,7 +69,7 @@ public:
/// configuration parsing.
///
/// @throw DProcessBaseError is io_service is NULL.
DProcessBase
(
const
char
*
app_name
,
IOServicePtr
io_service
,
DProcessBase
(
const
char
*
app_name
,
asiolink
::
IOServicePtr
io_service
,
DCfgMgrBasePtr
cfg_mgr
)
:
app_name_
(
app_name
),
io_service_
(
io_service
),
shut_down_flag_
(
false
),
cfg_mgr_
(
cfg_mgr
)
{
...
...
@@ -174,7 +174,7 @@ public:
/// @brief Fetches the controller's IOService.
///
/// @return a reference to the controller's IOService.
IOServicePtr
&
getIoService
()
{
asiolink
::
IOServicePtr
&
getIoService
()
{
return
(
io_service_
);
}
...
...
@@ -199,7 +199,7 @@ private:
std
::
string
app_name_
;
/// @brief The IOService to be used for asynchronous event handling.
IOServicePtr
io_service_
;
asiolink
::
IOServicePtr
io_service_
;
/// @brief Boolean flag set when shutdown has been requested.
bool
shut_down_flag_
;
...
...
src/bin/d2/io_service_signal.cc
View file @
cc6e80a4
// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014
-2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -65,7 +65,7 @@ IOSignal::TimerCallback::operator()() {
return
;
}
IOSignalQueue
::
IOSignalQueue
(
IOServicePtr
&
io_service
)
IOSignalQueue
::
IOSignalQueue
(
asiolink
::
IOServicePtr
&
io_service
)
:
io_service_
(
io_service
),
signals_
()
{
if
(
!
io_service_
)
{
isc_throw
(
IOSignalError
,
"IOSignalQueue - io_serivce cannot be NULL"
);
...
...
src/bin/d2/io_service_signal.h
View file @
cc6e80a4
// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014
-2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -15,7 +15,8 @@
#ifndef IO_SERVICE_SIGNAL_H
#define IO_SERVICE_SIGNAL_H
#include
<d2/d2_asio.h>
#include
<asiolink/io_service.h>
#include
<asiolink/interval_timer.h>
#include
<exceptions/exceptions.h>
#include
<map>
...
...
@@ -202,7 +203,7 @@ public:
///
/// @param io_service the IOService to which to send signals.
/// @throw IOSignalError if io_service is NULL.
IOSignalQueue
(
IOServicePtr
&
io_service
);
IOSignalQueue
(
asiolink
::
IOServicePtr
&
io_service
);
/// @brief Destructor.
~
IOSignalQueue
();
...
...
@@ -248,7 +249,7 @@ public:
private:
/// @brief Pointer to the IOService which will receive the signals.
IOServicePtr
io_service_
;
asiolink
::
IOServicePtr
io_service_
;
/// @brief A map of the IOSignals pushed through this queue.
IOSignalMap
signals_
;
...
...
src/bin/d2/nc_add.cc
View file @
cc6e80a4
// Copyright (C) 2013-201
4
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
5
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -35,7 +35,7 @@ const int NameAddTransaction::FQDN_IN_USE_EVT;
const
int
NameAddTransaction
::
FQDN_NOT_IN_USE_EVT
;
NameAddTransaction
::
NameAddTransaction
(
IOServicePtr
&
io_service
,
NameAddTransaction
(
asiolink
::
IOServicePtr
&
io_service
,
dhcp_ddns
::
NameChangeRequestPtr
&
ncr
,
DdnsDomainPtr
&
forward_domain
,
DdnsDomainPtr
&
reverse_domain
,
...
...
src/bin/d2/nc_add.h
View file @
cc6e80a4
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013
, 2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -91,7 +91,7 @@ public:
///
/// @throw NameAddTransaction error if given request is not a CHG_ADD,
/// NameChangeTransaction error for base class construction errors.
NameAddTransaction
(
IOServicePtr
&
io_service
,
NameAddTransaction
(
asiolink
::
IOServicePtr
&
io_service
,
dhcp_ddns
::
NameChangeRequestPtr
&
ncr
,
DdnsDomainPtr
&
forward_domain
,
DdnsDomainPtr
&
reverse_domain
,
...
...
src/bin/d2/nc_remove.cc
View file @
cc6e80a4
// Copyright (C) 2013-201
4
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
5
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -32,7 +32,7 @@ const int NameRemoveTransaction::REMOVING_REV_PTRS_ST;
// Currently NameRemoveTransaction does not define any events.
NameRemoveTransaction
::
NameRemoveTransaction
(
IOServicePtr
&
io_service
,
NameRemoveTransaction
(
asiolink
::
IOServicePtr
&
io_service
,
dhcp_ddns
::
NameChangeRequestPtr
&
ncr
,
DdnsDomainPtr
&
forward_domain
,
DdnsDomainPtr
&
reverse_domain
,
...
...
src/bin/d2/nc_remove.h
View file @
cc6e80a4
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013
, 2015
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -87,7 +87,7 @@ public:
///
/// @throw NameRemoveTransaction error if given request is not a CHG_REMOVE,
/// NameChangeTransaction error for base class construction errors.
NameRemoveTransaction
(
IOServicePtr
&
io_service
,
NameRemoveTransaction
(
asiolink
::
IOServicePtr
&
io_service
,
dhcp_ddns
::
NameChangeRequestPtr
&
ncr
,
DdnsDomainPtr
&
forward_domain
,
DdnsDomainPtr
&
reverse_domain
,
...
...
src/bin/d2/nc_trans.cc
View file @
cc6e80a4
// Copyright (C) 2013-201
4
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-201
5
Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
...
...
@@ -44,7 +44,7 @@ const int NameChangeTransaction::NCT_DERIVED_EVENT_MIN;
const
unsigned
int
NameChangeTransaction
::
MAX_UPDATE_TRIES_PER_SERVER
;
NameChangeTransaction
::
NameChangeTransaction
(
IOServicePtr
&
io_service
,
NameChangeTransaction
(
asiolink
::
IOServicePtr
&
io_service
,
dhcp_ddns
::
NameChangeRequestPtr
&
ncr
,
DdnsDomainPtr
&
forward_domain
,
DdnsDomainPtr
&
reverse_domain
,
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment