blob: c76180502c8cc2111e37be5361eaa180e9c0a002 [file] [log] [blame]
Shuo Chen9c2477f2014-03-13 15:01:06 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Regents of the University of California.
4 * See COPYING for copyright and distribution information.
5 */
Shuo Chenba793e92014-03-17 17:17:16 -07006
Shuo Chen9c2477f2014-03-13 15:01:06 -07007#ifndef REPO_NDN_HANDLE_NDN_HANDLE_COMMON_HPP
8#define REPO_NDN_HANDLE_NDN_HANDLE_COMMON_HPP
9
10
Shuo Chenba793e92014-03-17 17:17:16 -070011#include "../storage/storage-handle.hpp"
12#include "../helpers/repo-command-response.hpp"
13#include "../helpers/repo-command-parameter.hpp"
14
Shuo Chen9c2477f2014-03-13 15:01:06 -070015#include <cstdlib>
16#include <sstream>
17#include <iostream>
18#include <time.h>
19#include <unistd.h>
20#include <ndn-cpp-dev/face.hpp>
21#include <ndn-cpp-dev/security/key-chain.hpp>
Shuo Chenba793e92014-03-17 17:17:16 -070022#include <ndn-cpp-dev/util/command-interest-validator.hpp>
Shuo Chen9c2477f2014-03-13 15:01:06 -070023#include <boost/random/mersenne_twister.hpp>
24#include <boost/random/uniform_int_distribution.hpp>
25#include <map>
26
27#define RETRY_TIMEOUT 3
28#define DEFAULT_CREDIT 12
29#define NOEND_TIMEOUT 10000
30
31namespace repo {
Shuo Chenba793e92014-03-17 17:17:16 -070032
Shuo Chen9c2477f2014-03-13 15:01:06 -070033using ndn::Face;
34using ndn::Name;
35using ndn::Interest;
36using ndn::KeyChain;
37using ndn::Selectors;
38using ndn::bind;
Shuo Chenba793e92014-03-17 17:17:16 -070039using ndn::CommandInterestValidator;
40
41using boost::shared_ptr;
42
Shuo Chen9c2477f2014-03-13 15:01:06 -070043}
44
Shuo Chenba793e92014-03-17 17:17:16 -070045#endif // REPO_NDN_HANDLE_NDN_HANDLE_COMMON_HPP