Skip to content

Commit

Permalink
Change namespace of DummyClientFace, Signal, Segmenter
Browse files Browse the repository at this point in the history
refs #3940

Change-Id: I67ca0ecb8c916aab411a2f90454e0d25925978cd
  • Loading branch information
yoursunny committed Aug 10, 2023
1 parent dd808b0 commit 869d73e
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 39 deletions.
8 changes: 4 additions & 4 deletions tests/chunks/consumer.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2023, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE(InOrderData)
"consequat massa Donec pede justo,"
};

util::DummyClientFace face;
DummyClientFace face;
output_test_stream output("");
Consumer cons(security::getAcceptAllValidator(), output);

Expand Down Expand Up @@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(OutOfOrderData)
"consequat massa Donec pede justo,"
};

util::DummyClientFace face;
DummyClientFace face;
output_test_stream output("");
Consumer cons(security::getAcceptAllValidator(), output);

Expand Down Expand Up @@ -148,7 +148,7 @@ class PipelineInterestsDummy : public PipelineInterests

BOOST_FIXTURE_TEST_CASE(RunBasic, IoFixture)
{
util::DummyClientFace face(m_io);
DummyClientFace face(m_io);
Options options;
Consumer consumer(security::getAcceptAllValidator());

Expand Down
4 changes: 2 additions & 2 deletions tests/chunks/discover-version.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2023, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -60,7 +60,7 @@ class DiscoverVersionFixture : public IoFixture, public KeyChainFixture
protected:
const Name name = "/ndn/chunks/test";
const uint64_t version = 1449227841747;
util::DummyClientFace face{m_io};
DummyClientFace face{m_io};
Options opt;
unique_ptr<DiscoverVersion> discover;
std::optional<Name> discoveredName;
Expand Down
4 changes: 2 additions & 2 deletions tests/chunks/pipeline-interests-fixture.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2023, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -77,7 +77,7 @@ class PipelineInterestsFixture : public IoFixture
}

protected:
util::DummyClientFace face{m_io};
DummyClientFace face{m_io};
Name name{"/ndn/chunks/test"};
uint64_t nDataSegments = 0;
bool hasFailed = false;
Expand Down
4 changes: 2 additions & 2 deletions tests/chunks/producer.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2023, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -51,7 +51,7 @@ class ProducerFixture : public IoFixture, public KeyChainFixture
}

protected:
util::DummyClientFace face{m_io, {true, true}};
DummyClientFace face{m_io, {true, true}};
Name prefix = "/ndn/chunks/test";
Producer::Options options;
uint64_t version = 1449227841747;
Expand Down
2 changes: 1 addition & 1 deletion tests/peek/ndnpeek.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class NdnPeekFixture : public IoFixture
}

protected:
ndn::util::DummyClientFace face{m_io};
DummyClientFace face{m_io};
output_test_stream output;
unique_ptr<NdnPeek> peek;
};
Expand Down
4 changes: 2 additions & 2 deletions tests/peek/ndnpoke.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2022, Regents of the University of California,
* Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
Expand Down Expand Up @@ -59,7 +59,7 @@ class NdnPokeFixture : public IoFixture, public KeyChainFixture
}

protected:
ndn::util::DummyClientFace face{m_io, m_keyChain, {true, WANT_PREFIX_REG_REPLY}};
DummyClientFace face{m_io, m_keyChain, {true, WANT_PREFIX_REG_REPLY}};
std::stringstream payload{"Hello, world!\n"};
unique_ptr<NdnPoke> poke;
};
Expand Down
4 changes: 2 additions & 2 deletions tests/ping/client/ping.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2022, Arizona Board of Regents.
* Copyright (c) 2014-2023, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -35,7 +35,7 @@ using client::Ping;

BOOST_FIXTURE_TEST_CASE(Basic, IoFixture)
{
util::DummyClientFace face(m_io, {true, true});
DummyClientFace face(m_io, {true, true});
Options pingOptions;
pingOptions.prefix = "/test-prefix";
pingOptions.shouldAllowStaleData = false;
Expand Down
4 changes: 2 additions & 2 deletions tests/ping/client/statistics-collector.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2022, Arizona Board of Regents.
* Copyright (c) 2014-2023, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -44,7 +44,7 @@ class StatisticsCollectorFixture
}

protected:
util::DummyClientFace face;
DummyClientFace face;
Options pingOptions{makeOptions()};
Ping pingProgram{face, pingOptions};
StatisticsCollector sc{pingProgram, pingOptions};
Expand Down
8 changes: 4 additions & 4 deletions tests/ping/integrated.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015-2022, Arizona Board of Regents.
* Copyright (c) 2015-2023, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -51,7 +51,7 @@ class PingIntegratedFixture : public IoFixture, public KeyChainFixture

template<typename Packet>
void
receive(util::DummyClientFace& face, const Packet& pkt)
receive(DummyClientFace& face, const Packet& pkt)
{
m_io.post([=, &face] {
if (!wantLoss) {
Expand All @@ -69,8 +69,8 @@ class PingIntegratedFixture : public IoFixture, public KeyChainFixture
}

protected:
util::DummyClientFace serverFace{m_io, m_keyChain, {false, true}};
util::DummyClientFace clientFace{m_io, m_keyChain, {false, true}};
DummyClientFace serverFace{m_io, m_keyChain, {false, true}};
DummyClientFace clientFace{m_io, m_keyChain, {false, true}};
std::unique_ptr<server::PingServer> server;
std::unique_ptr<client::Ping> client;
bool wantLoss = false;
Expand Down
4 changes: 2 additions & 2 deletions tests/ping/server/ping-server.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2022, Arizona Board of Regents.
* Copyright (c) 2014-2023, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -59,7 +59,7 @@ class PingServerFixture : public IoFixture, public KeyChainFixture
}

protected:
util::DummyClientFace face{m_io, m_keyChain, {false, true}};
DummyClientFace face{m_io, m_keyChain, {false, true}};
Options pingOptions{makeOptions()};
PingServer pingServer{face, m_keyChain, pingOptions};
};
Expand Down
6 changes: 3 additions & 3 deletions tools/chunks/catchunks/discover-version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2023, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -51,12 +51,12 @@ class DiscoverVersion
/**
* @brief Signal emitted when the versioned name of Data is found.
*/
util::Signal<DiscoverVersion, Name> onDiscoverySuccess;
signal::Signal<DiscoverVersion, Name> onDiscoverySuccess;

/**
* @brief Signal emitted when a failure occurs.
*/
util::Signal<DiscoverVersion, std::string> onDiscoveryFailure;
signal::Signal<DiscoverVersion, std::string> onDiscoveryFailure;

void
run();
Expand Down
6 changes: 3 additions & 3 deletions tools/chunks/catchunks/pipeline-interests-adaptive.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2023, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -94,7 +94,7 @@ class PipelineInterestsAdaptive : public PipelineInterests
* The callback function should be: `void(nanoseconds age, double cwnd)`, where `age` is the
* time since the pipeline started and `cwnd` is the new congestion window size (in segments).
*/
util::Signal<PipelineInterestsAdaptive, time::nanoseconds, double> afterCwndChange;
signal::Signal<PipelineInterestsAdaptive, time::nanoseconds, double> afterCwndChange;

struct RttSample
{
Expand All @@ -108,7 +108,7 @@ class PipelineInterestsAdaptive : public PipelineInterests
/**
* @brief Signals when a new RTT sample has been taken.
*/
util::Signal<PipelineInterestsAdaptive, RttSample> afterRttMeasurement;
signal::Signal<PipelineInterestsAdaptive, RttSample> afterRttMeasurement;

protected:
DECLARE_SIGNAL_EMIT(afterCwndChange)
Expand Down
4 changes: 2 additions & 2 deletions tools/chunks/putchunks/producer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2023, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -53,7 +53,7 @@ Producer::Producer(const Name& prefix, Face& face, KeyChain& keyChain, std::istr
if (!m_options.isQuiet) {
std::cerr << "Loading input ...\n";
}
util::Segmenter segmenter(m_keyChain, m_options.signingInfo);
Segmenter segmenter(m_keyChain, m_options.signingInfo);
m_store = segmenter.segment(is, m_versionedPrefix, m_options.maxSegmentSize, m_options.freshnessPeriod);

// register m_prefix without Interest handler
Expand Down
10 changes: 5 additions & 5 deletions tools/ping/client/ping.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015-2022, Arizona Board of Regents.
* Copyright (c) 2015-2023, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -62,7 +62,7 @@ class Ping : noncopyable
* @param seq ping sequence number
* @param rtt round trip time
*/
util::Signal<Ping, uint64_t, Rtt> afterData;
signal::Signal<Ping, uint64_t, Rtt> afterData;

/**
* @brief Signals on the return of a Nack
Expand All @@ -71,19 +71,19 @@ class Ping : noncopyable
* @param rtt round trip time
* @param header the received Network NACK header
*/
util::Signal<Ping, uint64_t, Rtt, lp::NackHeader> afterNack;
signal::Signal<Ping, uint64_t, Rtt, lp::NackHeader> afterNack;

/**
* @brief Signals on timeout of a packet
*
* @param seq ping sequence number
*/
util::Signal<Ping, uint64_t> afterTimeout;
signal::Signal<Ping, uint64_t> afterTimeout;

/**
* @brief Signals when finished pinging
*/
util::Signal<Ping> afterFinish;
signal::Signal<Ping> afterFinish;

/**
* @brief Start sending ping interests
Expand Down
6 changes: 3 additions & 3 deletions tools/ping/server/ping-server.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015-2022, Arizona Board of Regents.
* Copyright (c) 2015-2023, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -55,12 +55,12 @@ class PingServer : noncopyable
*
* @param name incoming interest name
*/
util::Signal<PingServer, Name> afterReceive;
signal::Signal<PingServer, Name> afterReceive;

/**
* @brief Signals when finished pinging
*/
util::Signal<PingServer> afterFinish;
signal::Signal<PingServer> afterFinish;

/** @brief starts ping server
*
Expand Down

0 comments on commit 869d73e

Please sign in to comment.