Data

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

Synopsis

#include <prolinga/Data.hpp>

class PlData
{
        public:
                PlData();
                ~PlData();
                void         dataOpen           (const char *configFileName,
                                                 int argc,
                                                 char **argv);
                void         dataClose          (void);
                xmlDocPtr    executeCommand     (const xmlDocPtr dataRequest);
                ...
};
typedef PlData *PlDataPtr;

  

Description

This class is used to connect to a Data environment and executes a Data Command.

Details

PlData::dataOpen ()

void       PlData::dataOpen           (const char *configFileName, 
                                       int argc,
                                       char **argv);

This function is called to initialize a connection to the Data environment.

Function PlData::dataClose must be called when access to the Data is no longer needed in order to close all handles and to free memory.

configFileName :

the name or the Data configuration file. If the argument is set to NULL, the Data default configuration file (etc/prolingadatcfg.xml) will be used.

argc :

argument passed on to libgda environment, usually argc from main(). It is unclear from the libgda documentation where it is used for.

argv :

argument passed on to libgda environment, usually argv from main(). It is unclear from the libgda documentation where it is used for.

PlData::dataClose ()

void       PlData::dataClose           (void);

This function is called to close a connection to the Data environment. All handles and allocated memory will be freed.


PlData::executeCommand ()

xmlDocPtr       PlData::executeCommand      (const xmlDocPtr dataRequest);

This function presents a Data Command to the Data processing engine. 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 Data Command response as a libxml2 XML document.