| 193 | #endif |
| 194 | |
| 195 | void bind_error_code() |
| 196 | { |
| 197 | class_<category_holder>("error_category", no_init) |
| 198 | .def("name", &category_holder::name) |
| 199 | .def("message", &category_holder::message) |
| 200 | .def(self == self) |
| 201 | .def(self < self) |
| 202 | .def(self != self) |
| 203 | ; |
| 204 | |
| 205 | class_<error_code>("error_code") |
| 206 | .def(init<>()) |
| 207 | .def(init<int, category_holder>()) |
| 208 | .def("message", static_cast<std::string (error_code::*)() const>(&error_code::message)) |
| 209 | .def("value", &error_code::value) |
| 210 | .def("clear", &error_code::clear) |
| 211 | .def("category", &error_code_category) |
| 212 | .def("assign", &error_code_assign) |
| 213 | .def_pickle(ec_pickle_suite()) |
| 214 | ; |
| 215 | |
| 216 | def("libtorrent_category", &wrap_libtorrent_category); |
| 217 | def("upnp_category", &wrap_upnp_category); |
| 218 | def("http_category", &wrap_http_category); |
| 219 | def("socks_category", &wrap_socks_category); |
| 220 | def("bdecode_category", &wrap_bdecode_category); |
| 221 | #if TORRENT_USE_I2P |
| 222 | def("i2p_category", &wrap_i2p_category); |
| 223 | #endif |
| 224 | |
| 225 | #if TORRENT_ABI_VERSION == 1 |
| 226 | def("get_libtorrent_category", &wrap_libtorrent_category_deprecated); |
| 227 | def("get_upnp_category", &wrap_upnp_category_deprecated); |
| 228 | def("get_http_category", &wrap_http_category_deprecated); |
| 229 | def("get_socks_category", &wrap_socks_category_deprecated); |
| 230 | def("get_bdecode_category", &wrap_bdecode_category_deprecated); |
| 231 | #if TORRENT_USE_I2P |
| 232 | def("get_i2p_category", &wrap_i2p_category_deprecated); |
| 233 | #endif |
| 234 | #endif // TORRENT_ABI_VERSION |
| 235 | |
| 236 | def("generic_category", &wrap_generic_category); |
| 237 | |
| 238 | def("system_category", &wrap_system_category); |
| 239 | } |
| 240 |
no test coverage detected