blob: 03f3efad93c74fd4f944e3436a51f391919549ad [file] [log] [blame]
Jeff Thompsonfa306642013-06-17 15:06:57 -07001/*
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
15using namespace std;
16using namespace ndn;
17
18/*
19 *
20 */
21int main(int argc, char** argv) {
Jeff Thompson4454bf72013-06-18 13:33:12 -070022 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 Thompsonfa306642013-06-17 15:06:57 -070030 // i.setPublisherPublicKeyDigest(?);
31 ostringstream binary;
Jeff Thompson4454bf72013-06-18 13:33:12 -070032 wire::Ccnb::appendInterest(binary, *interest);
Jeff Thompsonfa306642013-06-17 15:06:57 -070033 cout << binary.str().size();
34
35 return 0;
36}