control-parameters.h
1 
21 #ifndef NDN_CONTROL_PARAMETERS_OPTIONS_H
22 #define NDN_CONTROL_PARAMETERS_OPTIONS_H
23 
24 #include <ndn-cpp/c/control-parameters-types.h>
25 #include "forwarding-flags-impl.h"
26 #include "name.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
45 static __inline void
46 ndn_ControlParameters_initialize
47  (struct ndn_ControlParameters *self, struct ndn_NameComponent *nameComponents,
48  size_t maxNameComponents, struct ndn_NameComponent *strategyNameComponents,
49  size_t strategyMaxNameComponents)
50 {
51  self->hasName = 0;
52  ndn_Name_initialize(&self->name, nameComponents, maxNameComponents);
53  self->faceId = -1;
54  ndn_Blob_initialize(&self->uri, 0, 0);
55  self->localControlFeature = -1;
56  self->origin = -1;
57  self->cost = -1;
58  ndn_ForwardingFlags_initialize(&self->flags);
59  ndn_Name_initialize
60  (&self->strategy, strategyNameComponents, strategyMaxNameComponents);
61  self->expirationPeriod = -1.0;
62 }
63 
73 ndn_Error
74 ndn_ControlParameters_setFromControlParameters
75  (struct ndn_ControlParameters *self, const struct ndn_ControlParameters *other);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif
Copyright (C) 2015-2016 Regents of the University of California.
Definition: name-types.h:33
An ndn_ControlParameters holds fields for a ControlParameters which is used in the command interest s...
Definition: control-parameters-types.h:42