some more work on plugin manager
[enigma2.git] / lib / base / console.h
index f7cd469ca19de6918be232e4d1dd902805fd5af1..e730b40ee97a5dd4c023ad6176fe22b85bcb2e22 100644 (file)
@@ -7,7 +7,6 @@
 #include <lib/python/connections.h>
 #include <queue>
 
-#ifndef SWIG
 struct queue_data
 {
        queue_data( char *data, int len )
@@ -18,37 +17,33 @@ struct queue_data
        int len;
        int dataSent;
 };
-#endif
 
-class eConsoleAppContainer: public Object
+class eConsoleAppContainer: public Object, public iObject
 {
-#ifndef SWIG
+       DECLARE_REF(eConsoleAppContainer);
        int fd[3];
        int filefd[3];
        int pid;
        int killstate;
        std::string m_cwd;
        std::queue<struct queue_data> outbuf;
-       eSocketNotifier *in, *out, *err;
+       ePtr<eSocketNotifier> in, out, err;
        void readyRead(int what);
        void readyErrRead(int what);
        void readyWrite(int what);
        void closePipes();
-#endif
 public:
        eConsoleAppContainer();
+       ~eConsoleAppContainer();
        int setCWD( const char *path );
        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 sendEOF();
        void write( const char *data, int len );
-       void write( PyObject *data );
-       void readFromFile( PyObject *py_filename );
-       void dumpToFile( PyObject *py_filename );
+       void setFileFD(int num, int fd) { if (num >= 0 && num <= 2) filefd[num] = fd; }
        bool running() { return (fd[0]!=-1) && (fd[1]!=-1) && (fd[2]!=-1); }
        PSignal1<void, const char*> dataAvail;
        PSignal1<void, const char*> stdoutAvail;