Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 1 | #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 | |
| 13 | using namespace std; |
| 14 | namespace Ccnx { |
| 15 | typedef vector<unsigned char> Bytes; |
Zhenkai Zhu | 9bad2bf | 2012-12-28 15:31:46 -0800 | [diff] [blame^] | 16 | typedef vector<string>Comps; |
Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 17 | |
Zhenkai Zhu | 9bad2bf | 2012-12-28 15:31:46 -0800 | [diff] [blame^] | 18 | // --- Bytes operations start --- |
Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 19 | void |
| 20 | readRaw(Bytes &bytes, const unsigned char *src, size_t len); |
| 21 | |
| 22 | const unsigned char * |
| 23 | head(const Bytes &bytes); |
| 24 | |
Zhenkai Zhu | 9bad2bf | 2012-12-28 15:31:46 -0800 | [diff] [blame^] | 25 | // --- Bytes operations end --- |
| 26 | |
| 27 | // --- Name operation start --- |
| 28 | void |
| 29 | split(const string &name, Comps &comps); |
| 30 | // --- Name operation end --- |
| 31 | |
Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 32 | } // Ccnx |
| 33 | #endif // CCNX_COMMON_H |