]> git.siccegge.de Git - frida/frida.git/blob - src/bindings/Guile.hxx
add logging to the Guile module
[frida/frida.git] / src / bindings / Guile.hxx
1 #ifndef INCLUDE__Guile_hxx_
2 #define INCLUDE__Guile_hxx_
3
4 #include <libguile.h>
5 #include <log4cxx/logger.h>
6
7 #include "Interpreter.hxx"
8
9 class GuileInterpreter : public QObject, public Interpreter {
10 Q_OBJECT
11 Q_PLUGIN_METADATA(IID "xyz.frida.Interpreter")
12 Q_INTERFACES(Interpreter)
13 public:
14 GuileInterpreter();
15
16 int evaluate(const std::string& command,
17 std::ostream& stdout,
18 std::ostream& stderr,
19 std::string& result);
20
21 int loadFile(const std::string& filename,
22 std::ostream& stdout,
23 std::ostream& stderr,
24 std::string& result);
25
26 std::string fileExtension() const {return "scm";}
27 private:
28 SCM guile_output_port;
29 SCM guile_error_port;
30 log4cxx::LoggerPtr logger;
31 };
32
33 #endif /* INCLUDE__Guile_hxx_ */