Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 1 | #ifndef CCNX_COMMON_H |
| 2 | #define CCNX_COMMON_H |
| 3 | |
Zhenkai Zhu | f47109b | 2013-01-02 19:41:34 -0800 | [diff] [blame^] | 4 | extern "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 Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 12 | #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 | |
| 21 | using namespace std; |
| 22 | namespace Ccnx { |
| 23 | typedef vector<unsigned char> Bytes; |
Zhenkai Zhu | 9bad2bf | 2012-12-28 15:31:46 -0800 | [diff] [blame] | 24 | typedef vector<string>Comps; |
Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 25 | |
Zhenkai Zhu | 9bad2bf | 2012-12-28 15:31:46 -0800 | [diff] [blame] | 26 | // --- Bytes operations start --- |
Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 27 | void |
| 28 | readRaw(Bytes &bytes, const unsigned char *src, size_t len); |
| 29 | |
| 30 | const unsigned char * |
| 31 | head(const Bytes &bytes); |
| 32 | |
Zhenkai Zhu | 9bad2bf | 2012-12-28 15:31:46 -0800 | [diff] [blame] | 33 | // --- Bytes operations end --- |
| 34 | |
Zhenkai Zhu | f47109b | 2013-01-02 19:41:34 -0800 | [diff] [blame^] | 35 | // Exceptions |
| 36 | typedef boost::error_info<struct tag_errmsg, std::string> error_info_str; |
Zhenkai Zhu | 9bad2bf | 2012-12-28 15:31:46 -0800 | [diff] [blame] | 37 | |
Zhenkai Zhu | 974c5a6 | 2012-12-28 14:15:30 -0800 | [diff] [blame] | 38 | } // Ccnx |
| 39 | #endif // CCNX_COMMON_H |