processcall.h

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 #include <qtextstream.h>
00030 
00031 //====================================
00032 // Defines...
00033 //------------------------------------
00034 #define LINESIZE 2048
00035 
00036 namespace SaX {
00037 //====================================
00038 // Interface class for dlopen ability
00039 //------------------------------------
00047 class SaXProcessCallIF {
00048         public:
00049         virtual void addArgument ( const QString& ) = 0;
00050         virtual void addArgument ( int ) = 0;
00051         virtual void clearArguments ( void ) = 0;
00052         virtual QList<QString> readStdout ( void ) = 0;
00053         virtual bool start ( void ) = 0;
00054         virtual int exitStatus ( void ) = 0;
00055 
00056         public:
00057         virtual ~SaXProcessCallIF ( void ) { }
00058 };
00059 
00060 //====================================
00061 // Class SaXProcessCall...
00062 //------------------------------------
00070 class SaXProcessCall : public SaXProcessCallIF {
00071         private:
00072         QList<QString> mData;
00073         QList<QString> mArguments;
00074         int            mExitCode;
00075 
00076         public:
00077         void addArgument ( const QString& );
00078         void addArgument ( int );
00079         void clearArguments ( void );
00080         QList<QString> readStdout ( void );
00081         bool start ( void );
00082         int exitStatus ( void );
00083 
00084         public:
00085         SaXProcessCall ( void );
00086 };
00087 } // end namespace
00088 #endif

Generated on Mon Jan 7 17:25:36 2008 for libsax by  doxygen 1.4.6