#include "response_print.h"
#include <stdio.h>
#include <ctype.h>
#include <service.h>
#include <json_object.h>
Go to the source code of this file.
|
| json_object * | mapToJson (map *) |
| | Convert a map to a json object. More...
|
| |
| json_object * | mapsToJson (maps *) |
| | Convert a maps to a json object. More...
|
| |
| json_object * | serviceToJson (service *) |
| | Convert an service to a json object. More...
|
| |
| void | printGetCapabilitiesForProcessJ (registry *, maps *, void *, void *, service *) |
| | Add all the capabilities properties to a json_object. More...
|
| |
| void | printExceptionReportResponseJ (maps *, map *) |
| | Print an OWS ExceptionReport Document and HTTP headers (when required) depending on the code. More...
|
| |
| void | parseJRequest (maps *, service *, json_object *, map *, maps **, maps **) |
| | Parse Json Request. More...
|
| |
| json_object * | printJResult (maps *, service *, maps *, int) |
| | Print the result of an execution. More...
|
| |
| json_object * | printJobStatus (maps *, char *) |
| | Print the jobs status info cf. More...
|
| |
| json_object * | printJobList (maps *) |
| | Print the jobs list. More...
|
| |
| int | createStatusFile (maps *, int) |
| | Create the status file. More...
|
| |
| json_object * | createStatus (maps *, int) |
| |
| char * | json_getStatusFilePath (maps *) |
| | Get the status file path. More...
|
| |
| json_object * | parseJson (maps *, char *) |
| |
| json_object * | json_readFile (maps *, char *) |
| |
| char * | getResultPath (maps *, char *) |
| |
| int | json_getStatusFile (maps *) |
| | Create the status file. More...
|
| |
| void | produceApi (maps *, json_object *) |
| | Produce the JSON object for /api. More...
|
| |
|
| static const char * | jcapabilities [4] |
| | Name and corresponding attributes depending on the WPS version. More...
|
| |
| json_object* createStatus |
( |
maps * |
, |
|
|
int |
|
|
) |
| |
| int createStatusFile |
( |
maps * |
conf, |
|
|
int |
status |
|
) |
| |
Create the status file.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
| status | an integer (SERVICE_ACCEPTED,SERVICE_STARTED...) |
- Returns
- an integer (0 in case of success, 1 in case of failure)
| char* getResultPath |
( |
maps * |
, |
|
|
char * |
|
|
) |
| |
| int json_getStatusFile |
( |
maps * |
conf | ) |
|
Create the status file.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
- Returns
- an integer (0 in case of success, 1 in case of failure)
| char* json_getStatusFilePath |
( |
maps * |
conf | ) |
|
Get the status file path.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
- Returns
- a char* containing the full status file path
| json_object* json_readFile |
( |
maps * |
, |
|
|
char * |
|
|
) |
| |
| json_object* mapsToJson |
( |
maps * |
myMap | ) |
|
Convert a maps to a json object.
- Parameters
-
| myMap | the maps to be converted into json object |
- Returns
- a json_object pointer to the created json_object
| json_object* mapToJson |
( |
map * |
myMap | ) |
|
Convert a map to a json object.
- Parameters
-
| myMap | the map to be converted into json object |
- Returns
- a json_object pointer to the created json_object
| void parseJRequest |
( |
maps * |
conf, |
|
|
service * |
s, |
|
|
json_object * |
req, |
|
|
map * |
request_inputs, |
|
|
maps ** |
inputs, |
|
|
maps ** |
outputs |
|
) |
| |
Parse Json Request.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
| s | the current service metadata |
| req | the JSON object of the request body |
| inputs | the produced maps |
| outputs | the produced maps |
| json_object* parseJson |
( |
maps * |
, |
|
|
char * |
|
|
) |
| |
| void printExceptionReportResponseJ |
( |
maps * |
m, |
|
|
map * |
s |
|
) |
| |
Print an OWS ExceptionReport Document and HTTP headers (when required) depending on the code.
Set hasPrinted value to true in the [lenv] section.
- Parameters
-
| m | the maps containing the settings of the main.cfg file |
| s | the map containing the text,code,locator keys (or a map array of the same keys) |
| void printGetCapabilitiesForProcessJ |
( |
registry * |
reg, |
|
|
maps * |
m, |
|
|
void * |
doc0, |
|
|
void * |
nc0, |
|
|
service * |
serv |
|
) |
| |
Add all the capabilities properties to a json_object.
- Parameters
-
| ref | the registry pointer |
| m | the main configuration maps pointer |
| doc0 | the void (json_object) pointer to add the property to |
| nc0 | the void (json_object) pointer to add the property to |
| serv | the service pointer to extract the metadata from |
| json_object* printJobList |
( |
maps * |
conf | ) |
|
Print the jobs list.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
- Returns
- the JSON object pointer to the jobs list
| json_object* printJobStatus |
( |
maps * |
pmsConf, |
|
|
char * |
pcJobId |
|
) |
| |
Print the jobs status info cf.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
- Returns
- the JSON object pointer to the jobs list
| json_object* printJResult |
( |
maps * |
conf, |
|
|
service * |
s, |
|
|
maps * |
result, |
|
|
int |
res |
|
) |
| |
Print the result of an execution.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
| s | service pointer to metadata |
| result | outputs of the service |
| res | the status of execution SERVICE_FAILED/SERVICE_SUCCEEDED |
- Returns
- the JSON object pointer to the result
| void produceApi |
( |
maps * |
conf, |
|
|
json_object * |
res |
|
) |
| |
Produce the JSON object for /api.
- Parameters
-
| conf | the maps containing the settings of the main.cfg file |
| res | the JSON object to populate |
| json_object* serviceToJson |
( |
service * |
myService | ) |
|
Convert an service to a json object.
- Parameters
-
| myService | the service pointer to be converted into a json object |
- Returns
- a json_object pointer to the created json_object
| const char* jcapabilities[4] |
|
static |
Initial value:={
"jobControlOptions","sync-execute async-execute dismiss",
"outputTransmission","value reference"
}
Name and corresponding attributes depending on the WPS version.