add support for writing python strings directly
[enigma2.git] / lib / base / console.h
index ddfd82a9d9d4ea7a298066d63e5b9cce68063064..07ad6a90f5f5a99de81c16535f6d3827cdd4f541 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __LIB_BASE_CONSOLE_H__
 #define __LIB_BASE_CONSOLE_H__
 
+#include "Python.h"
 #include <string>
 #include <lib/base/ebase.h>
 #include <lib/python/connections.h>
@@ -33,12 +34,15 @@ class eConsoleAppContainer: public Object
 #endif
 public:
        eConsoleAppContainer();
-       int execute( const std::string &str );
+       int execute( const char *str );
+       int execute( const char *cmdline, const char *const argv[] );
+       int execute( PyObject *cmdline, PyObject *args );
        ~eConsoleAppContainer();
        int getPID() { return pid; }
        void kill();
        void sendCtrlC();
        void write( const char *data, int len );
+       void write( PyObject *data );
        bool running() { return (fd[0]!=-1) && (fd[1]!=-1) && (fd[2]!=-1); }
        PSignal1<void, const char*> dataAvail;
        PSignal1<void,int> dataSent;