Run

Run — Class used to manage Run connections and process Web Commands.

Synopsis

#include <prolinga/Run.hpp>

class PlRun
{
        public:
                PlRun();
                ~PlRun();
                void         runOpen           (const char *configFileName,
                                                int argc,
                                                char **argv);
                void         runClose          (void);
                xmlDocPtr    executeCommand    (const xmlDocPtr runRequest);
                ...
};
typedef PlRun *PlRunPtr;

  

Description

This class is used to connect to a Run environment and to execute a Web Command.

Details

PlRun::runOpen ()

void       PlRun::runOpen           (const char *configFileName, 
                                     int argc,
                                     char **argv);

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

Function PlRun::runClose must be called when access to the Run environment is no longer needed in order to close all handles and to free memory.

configFileName :

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

argc :

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

argv :

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

PlRun::runClose ()

void       PlRun::runClose           (void);

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


PlRun::executeCommand ()

xmlDocPtr       PlRun::executeCommand      (const xmlDocPtr runRequest);

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