blob: 0ef645fee0caff7d1d34fbcf374a2a7862f0c949 [file] [log] [blame]
Jeff Thompson3b3aabf2013-06-21 16:50:20 -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 <iostream>
11#include "ndn-cpp/interest.h"
Jeff Thompson42cea3a2013-06-25 19:10:59 -070012#include "ndn-cpp/encoding/ccnb.h"
Jeff Thompson3b3aabf2013-06-21 16:50:20 -070013
14using namespace std;
15using namespace ndn;
16
17/*
18 *
19 */
20int main(int argc, char** argv) {
21 ndn::ptr_lib::shared_ptr<Interest> interest(new Interest());
22 interest->setName(Name("/test"));
23 interest->setMinSuffixComponents(2);
24 interest->setMaxSuffixComponents(2);
25 interest->setInterestLifetime(boost::posix_time::seconds(10));
26 interest->setScope(Interest::SCOPE_LOCAL_CCND);
27 interest->setAnswerOriginKind(Interest::AOK_STALE);
28 interest->setChildSelector(Interest::CHILD_RIGHT);
29 // i.setPublisherPublicKeyDigest(?);
30 ostringstream binary;
31 wire::Ccnb::appendInterest(binary, *interest);
32 cout << binary.str().size() << "\n";
33
34 return 0;
35}