blob: f6abf52f8e7eb744b9520e80ce374a8b3287f977 [file] [log] [blame]
Jeff Thompson47eecfc2013-07-07 22:56:46 -07001/**
2 * @author: Jeff Thompson
3 * See COPYING for copyright and distribution information.
Jeff Thompsonb7f95562013-07-03 18:36:42 -07004 */
5
6#include "Interest.hpp"
7
8using namespace std;
9
10namespace ndn {
11
12void Interest::set(struct ndn_Interest &interestStruct)
13{
14 name_.set(interestStruct.name);
15 maxSuffixComponents_ = interestStruct.maxSuffixComponents;
16 minSuffixComponents_ = interestStruct.minSuffixComponents;
17
18 publisherPublicKeyDigest_.clear();
19 if (interestStruct.publisherPublicKeyDigest)
20 publisherPublicKeyDigest_.insert
21 (publisherPublicKeyDigest_.begin(), interestStruct.publisherPublicKeyDigest, interestStruct.publisherPublicKeyDigest + interestStruct.publisherPublicKeyDigestLength);
22 // TODO: implement exclude
23 childSelector_ = interestStruct.childSelector;
24 answerOriginKind_ = interestStruct.answerOriginKind;
25 scope_ = interestStruct.scope;
26 interestLifetime_ = interestStruct.interestLifetime;
27 nonce_.clear();
28 if (interestStruct.nonce)
29 nonce_.insert
30 (nonce_.begin(), interestStruct.nonce, interestStruct.nonce + interestStruct.nonceLength);
31}
32
33}
34