blob: 06e7700ac82fe81c030a21446e88e3a7bbf98508 [file] [log] [blame]
Zhenkai Zhu974c5a62012-12-28 14:15:30 -08001#ifndef CCNX_COMMON_H
2#define CCNX_COMMON_H
3
Zhenkai Zhuf47109b2013-01-02 19:41:34 -08004extern "C" {
5#include <ccn/ccn.h>
6#include <ccn/charbuf.h>
7#include <ccn/keystore.h>
8#include <ccn/uri.h>
9#include <ccn/bloom.h>
10#include <ccn/signing.h>
11}
Zhenkai Zhu974c5a62012-12-28 14:15:30 -080012#include <vector>
13#include <boost/shared_ptr.hpp>
14#include <boost/exception/all.hpp>
15#include <boost/function.hpp>
16#include <string>
17#include <sstream>
18#include <map>
19#include <utility>
20
21using namespace std;
22namespace Ccnx {
23typedef vector<unsigned char> Bytes;
Zhenkai Zhu9bad2bf2012-12-28 15:31:46 -080024typedef vector<string>Comps;
Zhenkai Zhu974c5a62012-12-28 14:15:30 -080025
Zhenkai Zhu9bad2bf2012-12-28 15:31:46 -080026// --- Bytes operations start ---
Zhenkai Zhu974c5a62012-12-28 14:15:30 -080027void
28readRaw(Bytes &bytes, const unsigned char *src, size_t len);
29
30const unsigned char *
31head(const Bytes &bytes);
32
Zhenkai Zhu9bad2bf2012-12-28 15:31:46 -080033// --- Bytes operations end ---
34
Zhenkai Zhuf47109b2013-01-02 19:41:34 -080035// Exceptions
36typedef boost::error_info<struct tag_errmsg, std::string> error_info_str;
Zhenkai Zhu9bad2bf2012-12-28 15:31:46 -080037
Zhenkai Zhu974c5a62012-12-28 14:15:30 -080038} // Ccnx
39#endif // CCNX_COMMON_H