Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb691ba1

Browse files
committed
Fix build with latest ndn-cxx
Change-Id: I850fc92a0bb50632ba5b5bacab6cedb321754db1
1 parent01a2a8c commitb691ba1

File tree

9 files changed

+38
-47
lines changed

9 files changed

+38
-47
lines changed

‎src/handles/command-base-handle.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -54,7 +54,7 @@ ndn::mgmt::Authorization
5454
CommandBaseHandle::makeAuthorization()
5555
{
5656
return [=] (const ndn::Name&,constauto& interest,
57-
const ndn::mgmt::ControlParameters*,
57+
const ndn::mgmt::ControlParametersBase*,
5858
const ndn::mgmt::AcceptContinuation& accept,
5959
const ndn::mgmt::RejectContinuation& reject) {
6060
m_validator.validate(interest,

‎src/handles/command-base-handle.hpp‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -21,11 +21,10 @@
2121
#defineREPO_HANDLES_COMMAND_BASE_HANDLE_HPP
2222

2323
#include"common.hpp"
24-
25-
#include"storage/repo-storage.hpp"
26-
#include"repo-command-response.hpp"
27-
#include"repo-command-parameter.hpp"
2824
#include"repo-command.hpp"
25+
#include"repo-command-parameter.hpp"
26+
#include"repo-command-response.hpp"
27+
#include"storage/repo-storage.hpp"
2928

3029
#include<ndn-cxx/mgmt/dispatcher.hpp>
3130
#include<ndn-cxx/security/validator.hpp>
@@ -46,14 +45,13 @@ class CommandBaseHandle
4645

4746
template<typename T>
4847
bool
49-
validateParameters(const ndn::mgmt::ControlParameters& parameters)
48+
validateParameters(const ndn::mgmt::ControlParametersBase& parameters)const
5049
{
51-
constauto* castParams =dynamic_cast<const RepoCommandParameter*>(&parameters);
52-
BOOST_ASSERT(castParams !=nullptr);
50+
constauto& castParams =dynamic_cast<const RepoCommandParameter&>(parameters);
5351

5452
T command;
5553
try {
56-
command.validateRequest(*castParams);
54+
command.validateRequest(castParams);
5755
}
5856
catch (const RepoCommand::ArgumentError&) {
5957
returnfalse;

‎src/handles/delete-handle.cpp‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -38,11 +38,11 @@ DeleteHandle::DeleteHandle(Face& face, RepoStorage& storageHandle,
3838
}
3939

4040
void
41-
DeleteHandle::handleDeleteCommand(const Name& prefix,const Interest& interest,
42-
const ndn::mgmt::ControlParameters& parameter,
41+
DeleteHandle::handleDeleteCommand(const Name&,const Interest& interest,
42+
const ndn::mgmt::ControlParametersBase& parameter,
4343
const ndn::mgmt::CommandContinuation& done)
4444
{
45-
constRepoCommandParameter& repoParameter =dynamic_cast<const RepoCommandParameter&>(parameter);
45+
constauto& repoParameter =dynamic_cast<const RepoCommandParameter&>(parameter);
4646

4747
if (!repoParameter.hasStartBlockId() && !repoParameter.hasEndBlockId()) {
4848
processSingleDeleteCommand(interest, repoParameter, done);
@@ -53,7 +53,7 @@ DeleteHandle::handleDeleteCommand(const Name& prefix, const Interest& interest,
5353
}
5454

5555
RepoCommandResponse
56-
DeleteHandle::positiveReply(const Interest& interest,const RepoCommandParameter& parameter,
56+
DeleteHandle::positiveReply(const Interest&,const RepoCommandParameter& parameter,
5757
uint64_t statusCode,uint64_t nDeletedData)const
5858
{
5959
RepoCommandResponseresponse(statusCode,"Deletion Successful");
@@ -72,7 +72,7 @@ DeleteHandle::positiveReply(const Interest& interest, const RepoCommandParameter
7272
}
7373

7474
RepoCommandResponse
75-
DeleteHandle::negativeReply(const Interest& interest,uint64_t statusCode,
75+
DeleteHandle::negativeReply(const Interest&,uint64_t statusCode,
7676
const std::string& text)const
7777
{
7878
RepoCommandResponseresponse(statusCode, text);
@@ -110,7 +110,7 @@ DeleteHandle::processSegmentDeleteCommand(const Interest& interest, const RepoCo
110110
}
111111
}
112112

113-
//All the data deleted, return 200
113+
//All the data deleted, return 200
114114
done(positiveReply(interest, parameter,200, nDeletedData));
115115
}
116116

‎src/handles/delete-handle.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -40,7 +40,7 @@ class DeleteHandle : public CommandBaseHandle
4040
private:
4141
void
4242
handleDeleteCommand(const Name& prefix,const Interest& interest,
43-
const ndn::mgmt::ControlParameters& parameters,
43+
const ndn::mgmt::ControlParametersBase& parameters,
4444
const ndn::mgmt::CommandContinuation& done);
4545

4646
RepoCommandResponse

‎src/handles/read-handle.hpp‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -21,11 +21,7 @@
2121
#defineREPO_HANDLES_READ_HANDLE_HPP
2222

2323
#include"common.hpp"
24-
2524
#include"storage/repo-storage.hpp"
26-
#include"repo-command-response.hpp"
27-
#include"repo-command-parameter.hpp"
28-
#include"repo-command.hpp"
2925

3026
namespacerepo {
3127

@@ -59,9 +55,6 @@ class ReadHandle : public noncopyable
5955
void
6056
onDataDeleted(const Name& name);
6157

62-
/**
63-
* @param after Do something after successfully registering the data prefix
64-
*/
6558
void
6659
onDataInserted(const Name& name);
6760

‎src/handles/write-handle.cpp‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -53,11 +53,11 @@ WriteHandle::deleteProcess(ProcessId processId)
5353
}
5454

5555
void
56-
WriteHandle::handleInsertCommand(const Name& prefix,const Interest& interest,
57-
const ndn::mgmt::ControlParameters& params,
56+
WriteHandle::handleInsertCommand(const Name&,const Interest& interest,
57+
const ndn::mgmt::ControlParametersBase& params,
5858
const ndn::mgmt::CommandContinuation& done)
5959
{
60-
auto& repoParam =dynamic_cast<RepoCommandParameter&>(const_cast<ndn::mgmt::ControlParameters&>(params));
60+
constauto& repoParam =dynamic_cast<constRepoCommandParameter&>(params);
6161

6262
if (repoParam.hasStartBlockId() || repoParam.hasEndBlockId()) {
6363
processSegmentedInsertCommand(interest, repoParam, done);
@@ -79,7 +79,7 @@ WriteHandle::onData(const Interest& interest, const Data& data, ProcessId proces
7979
}
8080

8181
void
82-
WriteHandle::onDataValidated(const Interest& interest,const Data& data, ProcessId processId)
82+
WriteHandle::onDataValidated(const Interest&,const Data& data, ProcessId processId)
8383
{
8484
if (m_processes.count(processId) ==0) {
8585
return;
@@ -97,14 +97,14 @@ WriteHandle::onDataValidated(const Interest& interest, const Data& data, Process
9797
}
9898

9999
void
100-
WriteHandle::onTimeout(const Interest& interest, ProcessId processId)
100+
WriteHandle::onTimeout(const Interest&, ProcessId processId)
101101
{
102102
NDN_LOG_DEBUG("Timeout" << std::endl);
103103
m_processes.erase(processId);
104104
}
105105

106106
void
107-
WriteHandle::processSingleInsertCommand(const Interest& interest, RepoCommandParameter& parameter,
107+
WriteHandle::processSingleInsertCommand(const Interest&,const RepoCommandParameter& parameter,
108108
const ndn::mgmt::CommandContinuation& done)
109109
{
110110
ProcessId processId =ndn::random::generateWord64();
@@ -220,7 +220,7 @@ WriteHandle::onSegmentTimeout(ndn::SegmentFetcher& fetcher, ProcessId processId)
220220
}
221221

222222
void
223-
WriteHandle::processSegmentedInsertCommand(const Interest& interest, RepoCommandParameter& parameter,
223+
WriteHandle::processSegmentedInsertCommand(const Interest&,const RepoCommandParameter& parameter,
224224
const ndn::mgmt::CommandContinuation& done)
225225
{
226226
if (parameter.hasEndBlockId()) {
@@ -268,8 +268,8 @@ WriteHandle::processSegmentedInsertCommand(const Interest& interest, RepoCommand
268268
}
269269

270270
void
271-
WriteHandle::handleCheckCommand(const Name& prefix,const Interest& interest,
272-
const ndn::mgmt::ControlParameters& params,
271+
WriteHandle::handleCheckCommand(const Name&,const Interest&,
272+
const ndn::mgmt::ControlParametersBase& params,
273273
const ndn::mgmt::CommandContinuation& done)
274274
{
275275
constauto& repoParameter =dynamic_cast<const RepoCommandParameter&>(params);

‎src/handles/write-handle.hpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -93,7 +93,7 @@ class WriteHandle : public CommandBaseHandle
9393
*/
9494
void
9595
handleInsertCommand(const Name& prefix,const Interest& interest,
96-
const ndn::mgmt::ControlParameters& parameters,
96+
const ndn::mgmt::ControlParametersBase& parameters,
9797
const ndn::mgmt::CommandContinuation& done);
9898

9999
void
@@ -116,7 +116,7 @@ class WriteHandle : public CommandBaseHandle
116116
onTimeout(const Interest& interest, ProcessId processId);
117117

118118
void
119-
processSingleInsertCommand(const Interest& interest, RepoCommandParameter& parameter,
119+
processSingleInsertCommand(const Interest& interest,constRepoCommandParameter& parameter,
120120
const ndn::mgmt::CommandContinuation& done);
121121

122122
private:// segmented data fetching
@@ -139,7 +139,7 @@ class WriteHandle : public CommandBaseHandle
139139
segInit(ProcessId processId,const RepoCommandParameter& parameter);
140140

141141
void
142-
processSegmentedInsertCommand(const Interest& interest, RepoCommandParameter& parameter,
142+
processSegmentedInsertCommand(const Interest& interest,constRepoCommandParameter& parameter,
143143
const ndn::mgmt::CommandContinuation& done);
144144

145145
private:
@@ -159,7 +159,7 @@ class WriteHandle : public CommandBaseHandle
159159

160160
void
161161
handleCheckCommand(const Name& prefix,const Interest& interest,
162-
const ndn::mgmt::ControlParameters& parameters,
162+
const ndn::mgmt::ControlParametersBase& parameters,
163163
const ndn::mgmt::CommandContinuation& done);
164164

165165
void

‎src/repo-command-parameter.hpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*-*/
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California.
3+
* Copyright (c) 2014-2025, Regents of the University of California.
44
*
55
* This file is part of NDN repo-ng (Next generation of NDN repository).
66
* See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -24,7 +24,7 @@
2424
#include"repo-tlv.hpp"
2525

2626
#include<ndn-cxx/encoding/encoding-buffer.hpp>
27-
#include<ndn-cxx/mgmt/control-parameters.hpp>
27+
#include<ndn-cxx/mgmt/control-parameters-base.hpp>
2828

2929
namespacerepo {
3030

@@ -49,7 +49,7 @@ const std::string REPO_PARAMETER_FIELD[REPO_PARAMETER_UBOUND] = {
4949
* @brief Class defining abstraction of parameter of command for NDN Repo Protocol
5050
* @sa link https://redmine.named-data.net/projects/repo-ng/wiki/Repo_Protocol_Specification#RepoCommandParameter
5151
*/
52-
classRepoCommandParameter :publicndn::mgmt::ControlParameters
52+
classRepoCommandParameter :publicndn::mgmt::ControlParametersBase
5353
{
5454
public:
5555
classError :publictlv::Error

‎wscript‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def configure(conf):
3434
conf.find_program(['pkgconf','pkg-config'],var='PKGCONFIG')
3535

3636
pkg_config_path=os.environ.get('PKG_CONFIG_PATH',f'{conf.env.LIBDIR}/pkgconfig')
37-
conf.check_cfg(package='libndn-cxx',args=['libndn-cxx >= 0.8.1','--cflags','--libs'],
37+
conf.check_cfg(package='libndn-cxx',args=['libndn-cxx >= 0.9.0','--cflags','--libs'],
3838
uselib_store='NDN_CXX',pkg_config_path=pkg_config_path)
3939

4040
conf.check_sqlite3()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp