aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-22 23:09:06 +0000
committerlloyd <[email protected]>2006-08-22 23:09:06 +0000
commitae1296f866ab4ead46c08c0467ec967a4de73d5e (patch)
tree7c250b97c9ed58bc0b6f3bc130d7dfa79e625462 /misc
parentd22706440b51b15df905f03396efc6bf7a42e809 (diff)
Move the contents of pipe.cpp into filter.cpp
Diffstat (limited to 'misc')
-rw-r--r--misc/python/src/filter.cpp14
-rw-r--r--misc/python/src/pipe.cpp24
2 files changed, 14 insertions, 24 deletions
diff --git a/misc/python/src/filter.cpp b/misc/python/src/filter.cpp
index 10497f851..f028d05cd 100644
--- a/misc/python/src/filter.cpp
+++ b/misc/python/src/filter.cpp
@@ -69,3 +69,17 @@ void export_filters()
def("make_filter", make_filter2,
return_value_policy<manage_new_object>());
}
+
+void export_pipe()
+ {
+ void (Pipe::*pipe_write1)(const std::string&) = &Pipe::write;
+ void (Pipe::*pipe_write2)(const byte[], u32bit) = &Pipe::write;
+
+ class_<Pipe, boost::noncopyable>("Pipe")
+ .def(init< Python_Filter*, optional<Python_Filter*> >())
+ .def("start_msg", &Pipe::start_msg)
+ .def("end_msg", &Pipe::end_msg)
+ .def("write", pipe_write1)
+ .def("write", pipe_write2)
+ .def("read_all", &Pipe::read_all_as_string);
+ }
diff --git a/misc/python/src/pipe.cpp b/misc/python/src/pipe.cpp
deleted file mode 100644
index e586b087f..000000000
--- a/misc/python/src/pipe.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************
-* Pipe wrapper using Boost.Python *
-* (C) 2005-2006 Jack Lloyd <[email protected]> *
-*************************************************/
-
-#include <boost/python.hpp>
-using namespace boost::python;
-
-#include <botan/pipe.h>
-using namespace Botan;
-
-void export_pipe()
- {
- void (Pipe::*pipe_write1)(const std::string&) = &Pipe::write;
- void (Pipe::*pipe_write2)(const byte[], u32bit) = &Pipe::write;
-
- class_<Pipe, boost::noncopyable>("Pipe")
- .def(init< Python_Filter*, optional<Python_Filter*> >())
- .def("start_msg", &Pipe::start_msg)
- .def("end_msg", &Pipe::end_msg)
- .def("write", pipe_write1)
- .def("write", pipe_write2)
- .def("read_all", &Pipe::read_all_as_string);
- }