ProLinga-Repository Project |
---|
Repository — Class used to manage Repository connections and process Repository Commands.
#include <prolinga/Repository.hpp> class PlRepository { public:PlRepository (); ~PlRepository ();void repositoryOpen (constchar *configFileName);void repositoryClose (void );xmlDocPtr executeCommand (constxmlDocPtr repositoryRequest); ... }; typedef PlRepository *PlRepositoryPtr;
void PlRepository::repositoryOpen (constchar *configFileName);
This function is called to initialize a connection to the Repository. The configuration file which is passed as an argument, is processed and the XML database is opened. If the argument is set to NULL, the Repository default configuration file (etc/prolingarepcfg.xml) will be used.
Function PlRepository::repositoryClose must be called when access to the Repository is no longer needed in order to flush XML data to the database and close all handles.
| the name or the Repository configuration file. If the argument is set to NULL, the Repository default configuration file (etc/prolingarepcfg.xml) will be used. |
void PlRepository::repositoryClose (void );
This function is called to close a connection to the Repository. All XML data that may be in cache is flushed to the XML database and file handles are closed.
xmlDocPtr PlRepository::executeCommand (constxmlDocPtr repositoryRequest);
This function presents a Repository Command to the Repository. The command gets processed and a result returned. The returned XML document needs to be freed manually when it is no longer needed.
Returns : | the Repository Command response as a libxml2 XML document. |
<< Part I. ProLinga-Repository C++ API | Part II. ProLinga-Repository User Guide >> |