|
libsax 7.2
|
00001 /************** 00002 FILE : processcall.h 00003 *************** 00004 PROJECT : SaX2 - library interface [header] 00005 : 00006 AUTHOR : Marcus Schäfer <ms@suse.de> 00007 : 00008 BELONGS TO : SaX2 - SuSE advanced X11 configuration 00009 : 00010 : 00011 DESCRIPTION : native C++ class library to access SaX2 00012 : functionality. Easy to use interface for 00013 : //.../ 00014 : - importing/exporting X11 configurations 00015 : - modifying/creating X11 configurations 00016 : --- 00017 : 00018 : 00019 STATUS : Status: Development 00020 **************/ 00021 #ifndef SAX_PROCESS_CALL_H 00022 #define SAX_PROCESS_CALL_H 1 00023 00024 //==================================== 00025 // Includes... 00026 //------------------------------------ 00027 #include <qlist.h> 00028 #include <qstring.h> 00029 #if QT_VERSION > 0x040100 00030 #include <Q3TextStream> 00031 #else 00032 #include <qtextstream.h> 00033 typedef QTextStream Q3TextStream; 00034 #endif 00035 00036 //==================================== 00037 // Defines... 00038 //------------------------------------ 00039 #define LINESIZE 2048 00040 00041 namespace SaX { 00042 //==================================== 00043 // Interface class for dlopen ability 00044 //------------------------------------ 00052 class SaXProcessCallIF { 00053 public: 00054 virtual void addArgument ( const QString& ) = 0; 00055 virtual void addArgument ( int ) = 0; 00056 virtual void clearArguments ( void ) = 0; 00057 virtual QList<QString> readStdout ( void ) = 0; 00058 virtual bool start ( void ) = 0; 00059 virtual int exitStatus ( void ) = 0; 00060 00061 public: 00062 virtual ~SaXProcessCallIF ( void ) { } 00063 }; 00064 00065 //==================================== 00066 // Class SaXProcessCall... 00067 //------------------------------------ 00075 class SaXProcessCall : public SaXProcessCallIF { 00076 private: 00077 QList<QString> mData; 00078 QList<QString> mArguments; 00079 int mExitCode; 00080 00081 public: 00082 void addArgument ( const QString& ); 00083 void addArgument ( int ); 00084 void clearArguments ( void ); 00085 QList<QString> readStdout ( void ); 00086 bool start ( void ); 00087 int exitStatus ( void ); 00088 00089 public: 00090 SaXProcessCall ( void ); 00091 }; 00092 } // end namespace 00093 #endif
1.7.3