extensions.h

00001 /**************
00002 FILE          : extensions.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_EXTENSIONS_H
00022 #define SAX_EXTENSIONS_H 1
00023 
00024 //====================================
00025 // Includes...
00026 //------------------------------------
00027 #include "import.h"
00028 #include "device.h"
00029 #include "pointers.h"
00030 #include "keyboard.h"
00031 #include "card.h"
00032 #include "path.h"
00033 
00034 namespace SaX {
00035 //====================================
00036 // Defines...
00037 //------------------------------------
00038 #define SAX_CREATE_VNC_PWD  "/var/lib/sax/createVNC.sh"
00039 #define SAX_VNC_MOUSE       0
00040 #define SAX_VNC_KEYBOARD    1
00041 
00042 //====================================
00043 // Interface class for dlopen ability
00044 //------------------------------------
00052 class SaXManipulateExtensionsIF : public SaXException {
00053         public:
00054         virtual ~SaXManipulateExtensionsIF ( void ) { }
00055 };
00056 //====================================
00057 // Class SaXManipulateExtensions...
00058 //------------------------------------
00063 class SaXManipulateExtensions : public SaXManipulateExtensionsIF {
00064         private:
00065         SaXImport* mImport;
00066         int mExtensions;
00067 
00068         public:
00069         SaXManipulateExtensions ( SaXImport* );
00070 };
00071 
00072 //====================================
00073 // Interface class for dlopen ability
00074 //------------------------------------
00082 class SaXManipulateVNCIF : public SaXManipulateCard {
00083         public:
00084         virtual void addVNCKeyboard    ( void ) = 0;
00085         virtual void addVNCMouse       ( void ) = 0;
00086         virtual void removeVNCMouse    ( void ) = 0;
00087         virtual void removeVNCKeyboard ( void ) = 0;
00088 
00089         public:
00090         virtual void enableVNC   ( void ) = 0;
00091         virtual void disableVNC  ( void ) = 0;
00092         virtual void setPassword ( const QString& ) = 0;
00093         virtual void enablePasswordProtection  ( const QString& ) = 0;
00094         virtual void disablePasswordProtection ( void ) = 0;
00095         virtual void enableHTTPAccess  ( int = 5800 ) = 0;
00096         virtual void disableHTTPAccess ( void ) = 0;
00097         virtual void allowMultipleConnections ( bool = true ) = 0;
00098         virtual int  getHTTPPort ( void ) = 0;
00099 
00100         public:
00101         virtual bool isVNCEnabled           ( void ) = 0;
00102         virtual bool isHTTPAccessEnabled    ( void ) = 0;
00103         virtual bool isMultiConnectEnabled  ( void ) = 0;
00104         virtual bool isPwdProtectionEnabled ( void ) = 0;
00105 
00106         public:
00107         virtual ~SaXManipulateVNCIF ( void ) { }
00108 
00109         protected:
00110         SaXManipulateVNCIF (SaXImport* in,int id= 0) : SaXManipulateCard (in,id) { }
00111 };
00112 //====================================
00113 // Class SaXManipulateVNC...
00114 //------------------------------------
00168 class SaXManipulateVNC : public SaXManipulateVNCIF {
00169         private:
00170         int mVNCMouse;
00171         int mVNCKeyboard;
00172 
00173         private:
00174         SaXManipulateDevices*  mManipKeyboard;
00175         SaXManipulateDevices*  mManipPointer;
00176         SaXManipulatePath*     mManipModules;
00177         SaXImport*             mLayout;
00178         SaXImport*             mPointer;
00179         SaXImport*             mKeyboard;
00180 
00181         private:
00182         int searchVNCDevice    ( int );
00183 
00184         public:
00185         void addVNCKeyboard    ( void );
00186         void addVNCMouse       ( void );
00187         void removeVNCMouse    ( void );
00188         void removeVNCKeyboard ( void );
00189 
00190         public:
00191         void enableVNC   ( void );
00192         void disableVNC  ( void );
00193         void setPassword ( const QString& );
00194         void enablePasswordProtection  ( const QString& );
00195         void disablePasswordProtection ( void );
00196         void enableHTTPAccess  ( int = 5800 );
00197         void disableHTTPAccess ( void );
00198         void allowMultipleConnections ( bool = true );
00199         int  getHTTPPort ( void );
00200 
00201         public:
00202         bool isVNCEnabled           ( void );
00203         bool isHTTPAccessEnabled    ( void );
00204         bool isMultiConnectEnabled  ( void );
00205         bool isPwdProtectionEnabled ( void );
00206 
00207         public:
00208         SaXManipulateVNC (
00209                 SaXImport*, SaXImport*, SaXImport*,
00210                 SaXImport*, SaXImport*, int = 0
00211         );
00212 };
00213 } // end namespace
00214 #endif

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