ZOO-Project
|
#include <pthread.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#include "service_callback.h"
#include "service_json.h"
#include "sqlapi.h"
#include <ulinet.h>
#include "json_object_iterator.h"
Data Structures | |
struct | local_params |
Parameter definition to be used for sending parameters to a thread. More... | |
struct | job_handlers_params |
Parameter definition to be used for sending parameters to a thread. More... | |
Functions | |
bool | isProhibited (maps *conf, const char *serviceName) |
Check if a service name is prohibited, meaning that the Kernel doesn't have to invoke the callback for this specific service. More... | |
void * | _handleJobStatus (void *args) |
Practically handle the job status, meaning polling for status until the end of process execution. More... | |
bool | handleJobStatus (maps *pmsConf, maps *pmsInputs, int iCnt) |
Invoke the handleJobStatus for a given input. More... | |
void | cleanupJobStatusThreads (maps **pmsInputs) |
Wait for the threads to end then, clean used memory. More... | |
void * | _invokeBasicCallback (void *args) |
Practically invoke the callback, meaning sending the HTTP POST request. More... | |
bool | invokeBasicCallback (maps *conf, int state) |
Invoke the callback in case there is a [subscriber] section containing one or more url parameter. More... | |
void | cleanupCallbackThreads () |
Wait for the threads to end then, clean used memory. More... | |
Variables | |
int | iNbJobsHandlers =0 |
Number of threads associated with a job handler. More... | |
int | iNbJobsHandled =0 |
Number of job handled. More... | |
pthread_t * | ppJobsHandlers =NULL |
Thread array associated with a job handler. More... | |
int | nbThreads =0 |
Number of threads. More... | |
int | cStep =0 |
Current step. More... | |
int | maxProgress =0 |
Maximum value of PercentCompleted. More... | |
int | isOngoing =0 |
Is there any ongoing HTTP request. More... | |
pthread_t * | myThreads =NULL |
Threads array. More... | |
bool | steps [7][2] |
Steps array. More... | |
local_params ** | local_arguments |
Arguments array to give to the _invokeCallback thread's function. More... | |
job_handlers_params ** | job_handler_arguments |
Arguments array to give to the _handleJobStatus thread's function. More... | |
struct local_params |
struct job_handlers_params |
void* _handleJobStatus | ( | void * | args | ) |
Practically handle the job status, meaning polling for status until the end of process execution.
Once status is suceeded, the result is fetched. Depending on the transmission mode, the result is either downloaded or the value si stored in the input map.
args | job_handlers_params containing the variables required |
void* _invokeBasicCallback | ( | void * | args | ) |
Practically invoke the callback, meaning sending the HTTP POST request.
args | local_params containing all the variables required |
void cleanupCallbackThreads | ( | ) |
Wait for the threads to end then, clean used memory.
void cleanupJobStatusThreads | ( | maps ** | pmsInputs | ) |
Wait for the threads to end then, clean used memory.
Invoke the handleJobStatus for a given input.
pmsConf | the maps containing the main configuration file definitions |
pmsInputs | the inputs defined in the request |
bool invokeBasicCallback | ( | maps * | conf, |
int | state | ||
) |
Invoke the callback in case there is a [subscriber] section containing one or more url parameter.
conf | the maps containing the main configuration file definitions |
state | the service state SERVICE_SUCCEEDED / STARTED / FAILED |
bool isProhibited | ( | maps * | conf, |
const char * | serviceName | ||
) |
Check if a service name is prohibited, meaning that the Kernel doesn't have to invoke the callback for this specific service.
conf | the main configuration file maps |
serviceName | the serviceName |
int cStep =0 |
Current step.
int iNbJobsHandled =0 |
Number of job handled.
int iNbJobsHandlers =0 |
Number of threads associated with a job handler.
int isOngoing =0 |
Is there any ongoing HTTP request.
job_handlers_params** job_handler_arguments |
Arguments array to give to the _handleJobStatus thread's function.
local_params** local_arguments |
Arguments array to give to the _invokeCallback thread's function.
int maxProgress =0 |
Maximum value of PercentCompleted.
pthread_t* myThreads =NULL |
Threads array.
int nbThreads =0 |
Number of threads.
pthread_t* ppJobsHandlers =NULL |
Thread array associated with a job handler.
bool steps[7][2] |
Steps array.