Jeff Thompson | fa30664 | 2013-06-17 15:06:57 -0700 | [diff] [blame] | 1 | /* |
| 2 | * File: test-no-boost.cpp |
| 3 | * Author: jefft0 |
| 4 | * |
| 5 | * Created on June 10, 2013, 4:21 PM |
| 6 | */ |
| 7 | |
| 8 | #include <cstdlib> |
| 9 | #include <sstream> |
| 10 | #include "ndn-cpp/fields/name.h" |
| 11 | #include "ndn-cpp/fields/name-component.h" |
| 12 | #include "ndn-cpp/interest.h" |
| 13 | #include "ndn-cpp/wire/ccnb.h" |
| 14 | |
| 15 | using namespace std; |
| 16 | using namespace ndn; |
| 17 | |
| 18 | /* |
| 19 | * |
| 20 | */ |
| 21 | int main(int argc, char** argv) { |
Jeff Thompson | 4454bf7 | 2013-06-18 13:33:12 -0700 | [diff] [blame^] | 22 | InterestPtr interest(new Interest()); |
| 23 | interest->setName(Name("/test")); |
| 24 | interest->setMinSuffixComponents(2); |
| 25 | interest->setMaxSuffixComponents(2); |
| 26 | interest->setInterestLifetime(boost::posix_time::seconds(10)); |
| 27 | interest->setScope(Interest::SCOPE_LOCAL_CCND); |
| 28 | interest->setAnswerOriginKind(Interest::AOK_STALE); |
| 29 | interest->setChildSelector(Interest::CHILD_RIGHT); |
Jeff Thompson | fa30664 | 2013-06-17 15:06:57 -0700 | [diff] [blame] | 30 | // i.setPublisherPublicKeyDigest(?); |
| 31 | ostringstream binary; |
Jeff Thompson | 4454bf7 | 2013-06-18 13:33:12 -0700 | [diff] [blame^] | 32 | wire::Ccnb::appendInterest(binary, *interest); |
Jeff Thompson | fa30664 | 2013-06-17 15:06:57 -0700 | [diff] [blame] | 33 | cout << binary.str().size(); |
| 34 | |
| 35 | return 0; |
| 36 | } |