NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
status-dataset-context.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NDN_MGMT_STATUS_DATASET_CONTEXT_HPP
27
#define NDN_MGMT_STATUS_DATASET_CONTEXT_HPP
28
29
#include "../interest.hpp"
30
#include "../data.hpp"
31
#include "../util/time.hpp"
32
#include "../encoding/encoding-buffer.hpp"
33
#include "
control-response.hpp
"
34
35
namespace
ndn
{
36
namespace
mgmt {
37
38
class
StatusDatasetContext
39
{
40
public
:
43
const
Name
&
44
getPrefix
()
const
;
45
56
StatusDatasetContext
&
57
setPrefix
(
const
Name
& prefix);
58
61
const
time::milliseconds&
62
getExpiry
()
const
;
63
70
StatusDatasetContext
&
71
setExpiry
(
const
time::milliseconds& expiry);
72
76
void
77
append
(
const
Block
& block);
78
82
void
83
end
();
84
93
void
94
reject
(
const
ControlResponse
& resp =
ControlResponse
().setCode(400));
95
96
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
97
typedef
std::function<void(
const
Name
& dataName,
const
Block
&
content
,
98
const
MetaInfo
& metaInfo)>
DataSender
;
99
100
StatusDatasetContext
(
const
Interest
& interest,
const
DataSender& dataSender);
101
102
private
:
103
friend
class
Dispatcher
;
104
105
const
Interest
& m_interest;
106
DataSender m_dataSender;
107
Name
m_prefix;
108
time::milliseconds m_expiry;
109
110
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
111
shared_ptr<EncodingBuffer> m_buffer;
112
uint64_t m_segmentNo;
113
114
enum class
State {
115
INITIAL,
116
RESPONDED,
117
FINALIZED
118
};
119
State m_state;
120
};
121
122
}
// namespace mgmt
123
}
// namespace ndn
124
125
#endif // NDN_MGMT_STATUS_DATASET_CONTEXT_HPP
ndn::mgmt::StatusDatasetContext::getPrefix
const Name & getPrefix() const
Definition:
status-dataset-context.cpp:34
ndn::mgmt::StatusDatasetContext::StatusDatasetContext
StatusDatasetContext(const Interest &interest, const DataSender &dataSender)
Definition:
status-dataset-context.cpp:126
ndn::mgmt::StatusDatasetContext::reject
void reject(const ControlResponse &resp=ControlResponse().setCode(400))
declare the non-existence of a response
Definition:
status-dataset-context.cpp:114
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::mgmt::StatusDatasetContext::setExpiry
StatusDatasetContext & setExpiry(const time::milliseconds &expiry)
set expiration duration
Definition:
status-dataset-context.cpp:66
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:43
ndn::mgmt::Dispatcher
represents a dispatcher on server side of NFD Management protocol
Definition:
dispatcher.hpp:132
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:45
control-response.hpp
ndn::nfd::ControlResponse
ndn::mgmt::ControlResponse ControlResponse
Definition:
nfd-control-response.hpp:30
ndn::mgmt::StatusDatasetContext::DataSender
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const Block const MetaInfo &metaInfo DataSender
Definition:
status-dataset-context.hpp:97
ndn::mgmt::StatusDatasetContext::content
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE const Block & content
Definition:
status-dataset-context.hpp:97
ndn::mgmt::StatusDatasetContext::end
void end()
end the response successfully after appending zero or more blocks
Definition:
status-dataset-context.cpp:100
ndn::MetaInfo
An MetaInfo holds the meta info which is signed inside the data packet.
Definition:
meta-info.hpp:56
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::mgmt::StatusDatasetContext::setPrefix
StatusDatasetContext & setPrefix(const Name &prefix)
change prefix of Data packets
Definition:
status-dataset-context.cpp:40
ndn::mgmt::StatusDatasetContext::append
void append(const Block &block)
append a Block to the response
Definition:
status-dataset-context.cpp:73
ndn::mgmt::ControlResponse
ControlCommand response.
Definition:
control-response.hpp:36
ndn::mgmt::StatusDatasetContext
Definition:
status-dataset-context.hpp:38
ndn::mgmt::StatusDatasetContext::getExpiry
const time::milliseconds & getExpiry() const
Definition:
status-dataset-context.cpp:60
ndnSIM
ndn-cxx
src
mgmt
status-dataset-context.hpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11