1 #ifndef __LIB_BASE_CONSOLE_H__
2 #define __LIB_BASE_CONSOLE_H__
6 #include <lib/base/ebase.h>
7 #include <lib/python/connections.h>
13 queue_data( char *data, int len )
22 class eConsoleAppContainer: public Object
29 std::queue<struct queue_data> outbuf;
30 eSocketNotifier *in, *out, *err;
31 void readyRead(int what);
32 void readyErrRead(int what);
33 void readyWrite(int what);
37 eConsoleAppContainer();
38 int setCWD( const char *path );
39 int execute( const char *str );
40 int execute( const char *cmdline, const char *const argv[] );
41 int execute( PyObject *cmdline, PyObject *args );
42 ~eConsoleAppContainer();
43 int getPID() { return pid; }
46 void write( const char *data, int len );
47 void write( PyObject *data );
48 bool running() { return (fd[0]!=-1) && (fd[1]!=-1) && (fd[2]!=-1); }
49 PSignal1<void, const char*> dataAvail;
50 PSignal1<void,int> dataSent;
51 PSignal1<void,int> appClosed;
54 #endif // __LIB_BASE_CONSOLE_H__