Jeff Thompson | 47eecfc | 2013-07-07 22:56:46 -0700 | [diff] [blame^] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
Jeff Thompson | b7f9556 | 2013-07-03 18:36:42 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include "Interest.hpp" |
| 7 | |
| 8 | using namespace std; |
| 9 | |
| 10 | namespace ndn { |
| 11 | |
| 12 | void 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 | |