#include <config.h>
Inheritance diagram for SaX::SaXConfig:

Public Member Functions | |
| void | setParseErrorValue (char *) |
| void | setParseError (char *) |
| void | addImport (SaXImport *) |
| void | setMode (int) |
| QString | getParseErrorValue (void) |
| QString | getParseError (void) |
| bool | createConfiguration (void) |
| void | commitConfiguration (void) |
| int | testConfiguration (void) |
| bool | isChecksumOK (void) |
| SaXConfig (int=SAX_MERGE) | |
A SaXConfig object is mainly used as a container for SaXImport objects. Different import objects describing a complete configuration or only parts of it can be added using the addImport() method. A complete new configuration requires the following import ID's to be added:
If not all of these are provided it is necessary to set the config mode to SAX_MERGE using the setMode() method otherwise the configuration will be broken. If merging is used you may recognize problems while trying to remove complete devices. For example you want to remove one mouse out of two but your changes do not have any effect. This is because while merging the currently existing information is still there. As result of that you need to write a complete new configuration using the SAX_NEW mode to prevent existing sections from beeing imported again.
Calling createConfiguration() will create a preliminary configuration file named /var/lib/sax/xorg.conf. libsax will automatically check the syntax of the new created file and the programmer is able to get possible syntax errors using the getParseError* methods
#include <sax/sax.h> int importID[7] = { SAX_CARD, SAX_DESKTOP, SAX_POINTERS, SAX_KEYBOARD, SAX_LAYOUT, SAX_PATH, SAX_EXTENSIONS }; SaXConfig* config = new SaXConfig; for (int id=0; id < 7; id++) { SaXImport* import = new SaXImport ( importID[id] ); import->doImport(); config->addImport (import); } config->setMode (SAX_NEW); if ( ! config->createConfiguration() ) { printf ("%s\n",config->getParseErrorValue().ascii()); }
Definition at line 141 of file config.h.
| SaX::SaXConfig::SaXConfig | ( | int | = SAX_MERGE |
) |
Definition at line 32 of file config.cpp.
References SaX::SaXException::setLock(), and SaX::SaXException::unsetLock().
Here is the call graph for this function:

| void SaX::SaXConfig::setParseErrorValue | ( | char * | ) | [virtual] |
| void SaX::SaXConfig::setParseError | ( | char * | ) | [virtual] |
| void SaX::SaXConfig::addImport | ( | SaXImport * | ) | [virtual] |
Implements SaX::SaXConfigIF.
Definition at line 67 of file config.cpp.
References SaX::SaXException::errorString(), SaX::SaXException::excImportAlreadyAdded(), SaX::SaXException::excUnknownImport(), and SaX::SaXImport::getSectionID().
Here is the call graph for this function:

| void SaX::SaXConfig::setMode | ( | int | ) | [virtual] |
| QString SaX::SaXConfig::getParseErrorValue | ( | void | ) | [virtual] |
| QString SaX::SaXConfig::getParseError | ( | void | ) | [virtual] |
| bool SaX::SaXConfig::createConfiguration | ( | void | ) | [virtual] |
Implements SaX::SaXConfigIF.
Definition at line 179 of file config.cpp.
References SaX::SaXExport::doExport(), SaX::SaXException::errorString(), SaX::SaXException::excFileOpenFailed(), SaX::SaXException::excNoAPIFileFound(), SaX::SaXException::excProcessFailed(), SaX::SaXException::setLock(), and SaX::SaXException::unsetLock().
Referenced by testConfiguration().
Here is the call graph for this function:

| void SaX::SaXConfig::commitConfiguration | ( | void | ) | [virtual] |
Implements SaX::SaXConfigIF.
Definition at line 245 of file config.cpp.
References SaX::SaXException::errorString(), and SaX::SaXException::excFileOpenFailed().
Here is the call graph for this function:

| int SaX::SaXConfig::testConfiguration | ( | void | ) | [virtual] |
Implements SaX::SaXConfigIF.
Definition at line 356 of file config.cpp.
References createConfiguration(), SaX::SaXException::errorString(), and SaX::SaXException::excProcessFailed().
Here is the call graph for this function:

| bool SaX::SaXConfig::isChecksumOK | ( | void | ) | [virtual] |
Implements SaX::SaXConfigIF.
Definition at line 410 of file config.cpp.
References SaX::SaXException::errorString(), and SaX::SaXException::excProcessFailed().
Here is the call graph for this function:

1.5.0