Repository

Repository — Class used to manage Repository connections and process Repository Commands.

Synopsis

#include <prolinga/Repository.hpp>

class PlRepository
{
        public:
                PlRepository();
                ~PlRepository();
                void         repositoryOpen           (const char *configFileName);
                void         repositoryClose          (void);
                xmlDocPtr    executeCommand           (const xmlDocPtr repositoryRequest);
                ...
};
typedef PlRepository *PlRepositoryPtr;

  

Description

This class is used to connect to a Repository and execute a Repository Command.

Details

PlRepository::repositoryOpen ()

void       PlRepository::repositoryOpen           (const char *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.

configFileName :

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.


PlRepository::repositoryClose ()

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.


PlRepository::executeCommand ()

xmlDocPtr       PlRepository::executeCommand           (const xmlDocPtr 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.