aboutsummaryrefslogtreecommitdiff
path: root/lib/base/console.h
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-10-27 14:48:43 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-10-27 14:48:43 +0000
commitd0af96f7a28831d6f8c11fb224d483e6eb92b677 (patch)
treebb8382da168f07554cac20e76a6ddb1a20b5a1ff /lib/base/console.h
parent7542f853b1a682ad9bf21b592f26e31e3b64521c (diff)
downloadenigma2-d0af96f7a28831d6f8c11fb224d483e6eb92b677.tar.gz
enigma2-d0af96f7a28831d6f8c11fb224d483e6eb92b677.zip
add support for cyclic garbage collection to eConsoleAppContainer
Diffstat (limited to 'lib/base/console.h')
-rw-r--r--lib/base/console.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/base/console.h b/lib/base/console.h
index e6c61766..a5712bb7 100644
--- a/lib/base/console.h
+++ b/lib/base/console.h
@@ -7,7 +7,6 @@
#include <lib/python/connections.h>
#include <queue>
-#ifndef SWIG
struct queue_data
{
queue_data( char *data, int len )
@@ -18,11 +17,9 @@ struct queue_data
int len;
int dataSent;
};
-#endif
class eConsoleAppContainer: public Object
{
-#ifndef SWIG
int fd[3];
int filefd[3];
int pid;
@@ -34,22 +31,18 @@ class eConsoleAppContainer: public Object
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;