22 #ifndef NDN_CONTROL_RESPONSE_LITE_HPP
23 #define NDN_CONTROL_RESPONSE_LITE_HPP
25 #include "control-parameters-lite.hpp"
26 #include "../c/control-response-types.h"
57 size_t strategyMaxNameComponents);
97 this->hasBodyAsControlParameters = hasBodyAsControlParameters ? 1 : 0;
112 hasBodyAsControlParameters = 1;
114 .
set(bodyAsControlParameters);
163 friend class Tlv0_1_1WireFormatLite;
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
static ControlResponseLite & downCast(ndn_ControlResponse &controlResponse)
Downcast the reference to the ndn_ControlResponse struct to a ControlResponseLite.
Definition: control-response-lite.hpp:150
A ControlResponseLite holds a status code, status text and other fields for a ControlResponse which i...
Definition: control-response-lite.hpp:35
Copyright (C) 2016 Regents of the University of California.
Definition: control-response-types.h:35
struct ndn_Blob statusText
A Blob whose value is a pointer to pre-allocated buffer.
Definition: control-response-types.h:37
static BlobLite & downCast(ndn_Blob &blob)
Downcast the reference to the ndn_Blob struct to a BlobLite.
Definition: blob-lite.hpp:76
void setHasBodyAsControlParameters(bool hasBodyAsControlParameters)
Set the flag for whether the bodyAsControlParameters is specified.
Definition: control-response-lite.hpp:95
ndn_Error setBodyAsControlParameters(const ControlParametersLite &bodyAsControlParameters)
Set the bodyAsControlParameters to have the values from the given control parameters.
Definition: control-response-lite.hpp:110
ControlResponseLite & setStatusText(const BlobLite &statusText)
Set status text.
Definition: control-response-lite.hpp:137
Copyright (C) 2015-2016 Regents of the University of California.
Definition: name-types.h:33
static ControlParametersLite & downCast(ndn_ControlParameters &controlParameters)
Downcast the reference to the ndn_ControlParameters struct to a ControlParametersLite.
Definition: control-parameters-lite.hpp:253
ControlResponseLite(struct ndn_NameComponent *nameComponents, size_t maxNameComponents, struct ndn_NameComponent *strategyNameComponents, size_t strategyMaxNameComponents)
Create a ControlResponseLite to use the pre-allocated nameComponents and strategyNameComponents for t...
Definition: control-response-lite.cpp:28
A BlobLite holds a pointer to an immutable pre-allocated buffer and its length This is like a JavaScr...
Definition: blob-lite.hpp:37
A ControlParametersLite holds a Name and other fields for a ControlParameters which is used...
Definition: control-parameters-lite.hpp:37
ControlParametersLite & getBodyAsControlParameters()
Get the bodyAsControlParameters, if specified.
Definition: control-response-lite.hpp:77
bool getHasBodyAsControlParameters() const
Check if the bodyAsControlParameters is specified.
Definition: control-response-lite.hpp:70
ControlResponseLite & setStatusCode(int statusCode)
Set the status code.
Definition: control-response-lite.hpp:124
ndn_Error set(const ControlParametersLite &other)
Set this control parameters to have the values from the other control parameters. ...
Definition: control-parameters-lite.cpp:38
int statusCode
-1 for none.
Definition: control-response-types.h:36