ZOO-Project: service_internal_python.h File Reference
ZOO-Project
service_internal_python.h File Reference
#include <Python.h>
#include "service_internal.h"
#include "response_print.h"

Go to the source code of this file.

Functions

PyDictObject * PyDict_FromMaps (maps *t)
 Convert a maps to a Python dictionary. More...
 
PyDictObject * PyDict_FromMap (map *t)
 Convert a map to a Python dictionary. More...
 
mapsmapsFromPyDict (PyDictObject *t)
 Convert a Python dictionary to a maps. More...
 
mapmapFromPyDict (PyDictObject *t)
 Convert a Python dictionary to a map. More...
 
int zoo_python_support (maps **, map *, service *, maps **, maps **)
 Load a Python module then run the function corresponding to the service by passing the conf, inputs and outputs parameters by reference. More...
 
void PythonZooReport (maps *, const char *, int)
 Report Python error which may occur on loading the Python module or at runtime. More...
 
PyObject * PythonTranslate (PyObject *, PyObject *)
 Use the ZOO-Services messages translation function from the Python environment. More...
 
PyObject * PythonUpdateStatus (PyObject *, PyObject *)
 Update the ongoing status of a running service from the Python environment. More...
 

Function Documentation

map* mapFromPyDict ( PyDictObject *  t)

Convert a Python dictionary to a map.

Parameters
tthe PyDictObject to convert
Returns
a new map containing the converted PyDictObject
Warning
make sure to free resources returned by this function
maps* mapsFromPyDict ( PyDictObject *  t)

Convert a Python dictionary to a maps.

Parameters
tthe PyDictObject to convert
Returns
a new maps containing the converted PyDictObject
Warning
make sure to free resources returned by this function
PyDictObject* PyDict_FromMap ( map t)

Convert a map to a Python dictionary.

Parameters
tthe map to convert
Returns
a new PyDictObject containing the converted maps
Warning
make sure to free resources returned by this function
PyDictObject* PyDict_FromMaps ( maps t)

Convert a maps to a Python dictionary.

Parameters
tthe maps to convert
Returns
a new PyDictObject containing the converted maps
See also
PyDict_FromMap
Warning
make sure to free resources returned by this function
PyObject* PythonTranslate ( PyObject *  self,
PyObject *  args 
)

Use the ZOO-Services messages translation function from the Python environment.

Parameters
selfthe Python object on which we can run the method
argsthe Python arguments given from the Python environment
Returns
a new Python string containing the translated value
See also
_ss
PyObject* PythonUpdateStatus ( PyObject *  self,
PyObject *  args 
)

Update the ongoing status of a running service from the Python environment.

Parameters
selfthe Python object on which we can run the method
argsthe Python arguments given from the Python environment
Returns
None to the Python environment
See also
_updateStatus
void PythonZooReport ( maps m,
const char *  module,
int  load 
)

Report Python error which may occur on loading the Python module or at runtime.

Parameters
mthe conf maps containing the main.cfg settings
modulethe service name
load1 if the Python module was not loaded yet
int zoo_python_support ( maps **  main_conf,
map request,
service s,
maps **  real_inputs,
maps **  real_outputs 
)

Load a Python module then run the function corresponding to the service by passing the conf, inputs and outputs parameters by reference.

Parameters
main_confthe conf maps containing the main.cfg settings
requestthe map containing the HTTP request
sthe service structure
real_inputsthe maps containing the inputs
real_outputsthe maps containing the outputs

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png