SaX::SaXManipulatePath Class Reference

SaX2 - Path class. More...

#include <path.h>

Inheritance diagram for SaX::SaXManipulatePath:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void setFontPath (const QString &)
void addFontPath (const QString &)
void removeFontPath (const QString &)
void setLoadableModule (const QString &)
void addLoadableModule (const QString &)
void removeLoadableModule (const QString &)
void setServerFlag (const QString &)
void addServerFlag (const QString &)
void removeServerFlag (const QString &)
QList< QString > getFontPaths (void)
QList< QString > getModules (void)
QList< QString > getServerFlags (void)
 SaXManipulatePath (SaXImport *, int=0)

Detailed Description

SaX2 - Path class.

The path manipulator requires one import object (Path) to become created. Once created the manipulator object is able to get/set information related to server-flags server-modules and search paths. The following example demonstrates how to add a server flag to the configuration. The DontVTSwitch server flag disallows the use of the Ctrl+Alt+Fn sequence (where Fn refers to one of the numbered function keys). That sequence is normally used to switch to another "virtual terminal" on operating systems that have this feature. When this option is enabled, that key sequence has no special meaning and is passed to clients.

 #include <sax/sax.h>

 int main (void) {
     SaXException().setDebug (true);
     QDict<SaXImport> section;
 
     printf ("Importing data...\n");
     SaXConfig* config = new SaXConfig;
     SaXImport* import = new SaXImport ( SAX_PATH );
     import->setSource ( SAX_SYSTEM_CONFIG );
     import->doImport();
     config->addImport (import);
     section.insert (
         import->getSectionName(),import
     );
     printf ("Disable VT switching...\n");
     SaXManipulatePath mPath (
         section["Path"]
     );
     mPath.addServerFlag ("DontVTSwitch");
 
     printf ("Writing configuration\n");
     config->setMode (SAX_MERGE);
     if ( ! config->createConfiguration() ) {
         printf ("%s\n",config->errorString().ascii());
         printf ("%s\n",config->getParseErrorValue().ascii());
         return 1;
     }
     return 0;
 }

Definition at line 112 of file path.h.


Constructor & Destructor Documentation

SaX::SaXManipulatePath::SaXManipulatePath SaXImport in,
int  path = 0
 

An object of this type is used to configure the Files,Module and ServerFlags specifications including path descriptions for Fonts loadable module settings and server flags

Definition at line 27 of file path.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excNullPointerArgument(), SaX::SaXException::excPathImportBindFailed(), and SaX::SaXImport::getSectionID().

Here is the call graph for this function:


Member Function Documentation

void SaX::SaXManipulatePath::addFontPath const QString &  path  )  [virtual]
 

add FontPath to the current list of font pathes. The comma separator is used for each item

Implements SaX::SaXManipulatePathIF.

Definition at line 66 of file path.cpp.

void SaX::SaXManipulatePath::addLoadableModule const QString &  module  )  [virtual]
 

add module name to the current list of modules. The comma separator is used for each item

Implements SaX::SaXManipulatePathIF.

Definition at line 119 of file path.cpp.

Referenced by SaX::SaXManipulateDesktop::enable3D(), and SaX::SaXManipulateVNC::enableVNC().

void SaX::SaXManipulatePath::addServerFlag const QString &  flag  )  [virtual]
 

add server flag to the current list of flags. The comma separator is used for each item

Implements SaX::SaXManipulatePathIF.

Definition at line 172 of file path.cpp.

QList< QString > SaX::SaXManipulatePath::getFontPaths void   )  [virtual]
 

return a list of server font paths defined for this X11 configuration

Implements SaX::SaXManipulatePathIF.

Definition at line 211 of file path.cpp.

QList< QString > SaX::SaXManipulatePath::getModules void   )  [virtual]
 

return a list of server modules defined for this X11 configuration

Implements SaX::SaXManipulatePathIF.

Definition at line 226 of file path.cpp.

Referenced by SaX::SaXManipulateDesktop::is3DEnabled().

QList< QString > SaX::SaXManipulatePath::getServerFlags void   )  [virtual]
 

return a list of server flags defined for this X11 configuration

Implements SaX::SaXManipulatePathIF.

Definition at line 241 of file path.cpp.

void SaX::SaXManipulatePath::removeFontPath const QString &  path  )  [virtual]
 

remove the given font path (path) from the current list of font pathes. If the path doesn't exist nothing will be changed

Implements SaX::SaXManipulatePathIF.

Definition at line 86 of file path.cpp.

void SaX::SaXManipulatePath::removeLoadableModule const QString &  module  )  [virtual]
 

remove the given module (module) from the current list of modules. If the module doesn't exist nothing will be changed

Implements SaX::SaXManipulatePathIF.

Definition at line 139 of file path.cpp.

Referenced by SaX::SaXManipulateDesktop::disable3D(), SaX::SaXManipulateVNC::disableVNC(), SaX::SaXManipulateDesktop::enable3D(), and SaX::SaXManipulateVNC::enableVNC().

void SaX::SaXManipulatePath::removeServerFlag const QString &  flag  )  [virtual]
 

remove the given flag (flag) from the current list of flags. If the flag doesn't exist nothing will be changed

Implements SaX::SaXManipulatePathIF.

Definition at line 192 of file path.cpp.

void SaX::SaXManipulatePath::setFontPath const QString &  path  )  [virtual]
 

set global FontPath for this configuration. Using this function will overwrite the current FontPath setting

Implements SaX::SaXManipulatePathIF.

Definition at line 52 of file path.cpp.

void SaX::SaXManipulatePath::setLoadableModule const QString &  module  )  [virtual]
 

set global module to load for this configuration. Using this function will overwrite the current module list

Implements SaX::SaXManipulatePathIF.

Definition at line 105 of file path.cpp.

void SaX::SaXManipulatePath::setServerFlag const QString &  flag  )  [virtual]
 

set global server flag for this configuration. Using this function will overwrite the current flag list

Implements SaX::SaXManipulatePathIF.

Definition at line 158 of file path.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 17:38:46 2008 for libsax by  doxygen 1.4.6