blob: 0636a62e0cc2edceab07b6564f752db1d0f78505 [file] [log] [blame]
Zhenkai Zhu974c5a62012-12-28 14:15:30 -08001#ifndef CCNX_COMMON_H
2#define CCNX_COMMON_H
3
4#include <vector>
5#include <boost/shared_ptr.hpp>
6#include <boost/exception/all.hpp>
7#include <boost/function.hpp>
8#include <string>
9#include <sstream>
10#include <map>
11#include <utility>
12
13using namespace std;
14namespace Ccnx {
15typedef vector<unsigned char> Bytes;
Zhenkai Zhu9bad2bf2012-12-28 15:31:46 -080016typedef vector<string>Comps;
Zhenkai Zhu974c5a62012-12-28 14:15:30 -080017
Zhenkai Zhu9bad2bf2012-12-28 15:31:46 -080018// --- Bytes operations start ---
Zhenkai Zhu974c5a62012-12-28 14:15:30 -080019void
20readRaw(Bytes &bytes, const unsigned char *src, size_t len);
21
22const unsigned char *
23head(const Bytes &bytes);
24
Zhenkai Zhu9bad2bf2012-12-28 15:31:46 -080025// --- Bytes operations end ---
26
27// --- Name operation start ---
28void
29split(const string &name, Comps &comps);
30// --- Name operation end ---
31
Zhenkai Zhu974c5a62012-12-28 14:15:30 -080032} // Ccnx
33#endif // CCNX_COMMON_H