blob: ebc8553833bcfcb9ed03b5b2ffe23d200e8ec49c [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) {
22 Interest 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);
30 // i.setPublisherPublicKeyDigest(?);
31 ostringstream binary;
32 wire::Ccnb::appendInterest(binary, interest);
33 cout << binary.str().size();
34
35 return 0;
36}