|
libsax 7.2
|
00001 /************** 00002 FILE : init.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_INIT_H 00022 #define SAX_INIT_H 1 00023 00024 //==================================== 00025 // Includes... 00026 //------------------------------------ 00027 #include <stdlib.h> 00028 #include <qfileinfo.h> 00029 #include <qtextstream.h> 00030 00031 #include "processcall.h" 00032 #include "exception.h" 00033 00034 namespace SaX { 00035 //==================================== 00036 // Defines... 00037 //------------------------------------ 00038 #define SAX_INIT "/usr/share/sax/init.pl" 00039 #define CACHE_CONFIG "/var/cache/sax/files/config" 00040 #define GET_PRIMARY "/usr/sbin/getPrimary" 00041 #define GET_BASH "/bin/bash" 00042 00043 //==================================== 00044 // Interface class for dlopen ability 00045 //------------------------------------ 00053 class SaXInitIF : public SaXException { 00054 public: 00055 virtual bool needInit (void) = 0; 00056 virtual void ignoreProfile (void) = 0; 00057 virtual void setPrimaryChip (void) = 0; 00058 virtual void setValidBusID (void) = 0; 00059 00060 public: 00061 virtual void doInit (void) = 0; 00062 00063 public: 00064 virtual ~SaXInitIF ( void ) { } 00065 }; 00066 //==================================== 00067 // Class SaXInit... 00068 //------------------------------------ 00088 class SaXInit : public SaXInitIF { 00089 private: 00090 QList<const char*> mOptions; 00091 00092 public: 00093 bool needInit (void); 00094 void ignoreProfile (void); 00095 void setPrimaryChip (void); 00096 void setValidBusID (void); 00097 00098 public: 00099 void doInit (void); 00100 00101 public: 00102 SaXInit ( QList<const char*> ); 00103 SaXInit ( void ); 00104 }; 00105 } // end namespace 00106 #endif
1.7.3