#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <signal.h>
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/abyss.h>
#include <xmlrpc-c/server.h>
#include <xmlrpc-c/server_abyss.h>
#include "Integra/integra_server.h"
#include "Integra/integra_types.h"
#include "debug.h"
#include "memory.h"
Defines | |
#define | HELPSTR_STATEINDEX "Return the current state index from the notification queue\n\\return {'response':'notify.stateindex', 'notify.stateindex':<int>\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
#define | HELPSTR_UPDATES "Return the contents of the notification queue after a given state index\n\\param <int stateindex>\n\\return {'response':'notify.updates', 'notify.updates':[{'stateindex':<int>, 'command':<string>, 'params':<array>}, ... ]\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
#define | HELPSTR_CLASSLIST "Return a list of classes available for instantiation on the server\n\\return {'response':'query.classlist', 'query.classlist':<array>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
#define | HELPSTR_CLASSINFO "Return info about a class\n\\param <string classname>\n\\return {'response':'query.classinfo', 'classname':<string>, 'query.classinfo':{'id':<int>, 'name':<string>, 'label':<string>, 'instantiable':<int 0-1>, 'core':<int 0-1>, 'system':<int 0-1>, 'description':<string>}}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
#define | HELPSTR_ATTRIBUTES "Return a list of attribute definitions for a class\n\\param <string classname>\n\\return {'response':'query.attributes', 'classname':<string>, 'query.attributes':[{'id':<int>, 'name':<string>, 'description':<string>, 'scope':<string>, 'type':<string>, 'minimum':<float>, 'maximum':<float>, 'undoable':<int 0-1>, 'unit':<string>, 'scale':<string>, 'control':<string>, 'controlgroup':<string>, 'controlattribute':<string>, 'default':<value>}, ... ]\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_NODELIST "Return a list of nodes under the current node using depth-first recursion\n\\param <array path>\n\\return {'response':'query.nodelist', 'query.nodelist':[{classname:<string>, path:<array>}, {classname:<string>, path:<array>}, ... ]}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_GET "Get the value of an attribute\n\\param <array attribute path>\n\\return {'response':'query.get', 'path':<array>, 'value':<value>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_SET "Set the value of an attribute\n\\param <array attribute path>\n\\param <value value>\n\\return {'response':'command.set', 'path':<array>, 'value':<value>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_NEW "Create a command.new instance of a class on the server\n\\param <string class name>\n\\param <string instance name>\n\\param <array parent path>\n\\return {'response':'command.new', 'classname':<string>, 'instancename':<string>, 'parentpath':<array>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_DELETE "Delete an instance of a class from the server\n\\param <array path>\\return {'response':'command.delete', 'path':<array>\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_RENAME "Rename an instance of a class on the server\n\\param <array path>\n\\param <string instance name>\n\\return {'response':'command.rename', 'instancepath':<array path>, 'name':<string name>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_SAVE "Save all nodes including and below a given node on the server to a path on the filesystem\n\\param <array path>\n\\param <string file path>\n\\return {'response':'command.save', 'instancepath':<array path>, 'filepath':<string path>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_LOAD "Load all nodes including and below a given node from the filesystem beneath the path given to the given node on the server\n\\param <string file path>\n\\param <array path>\n\\return {'response':'command.load', 'filepath':<string path>', 'parentpath':<array path>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
#define | HELPSTR_MOVE "Move an instance of a class on the server\n\\param <array instance path>\n\\param <array new instance parent path>\n\\return {'response':'command.move', 'instancepath':<array path>, 'parentpath':<array path>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Functions | |
xmlrpc_value * | ntg_path_get_xmlrpc (xmlrpc_env *env, ntg_path *path) |
void * | ntg_xmlrpc_server_run (void *port) |
#define HELPSTR_ATTRIBUTES "Return a list of attribute definitions for a class\n\\param <string classname>\n\\return {'response':'query.attributes', 'classname':<string>, 'query.attributes':[{'id':<int>, 'name':<string>, 'description':<string>, 'scope':<string>, 'type':<string>, 'minimum':<float>, 'maximum':<float>, 'undoable':<int 0-1>, 'unit':<string>, 'scale':<string>, 'control':<string>, 'controlgroup':<string>, 'controlattribute':<string>, 'default':<value>}, ... ]\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_CLASSINFO "Return info about a class\n\\param <string classname>\n\\return {'response':'query.classinfo', 'classname':<string>, 'query.classinfo':{'id':<int>, 'name':<string>, 'label':<string>, 'instantiable':<int 0-1>, 'core':<int 0-1>, 'system':<int 0-1>, 'description':<string>}}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_CLASSLIST "Return a list of classes available for instantiation on the server\n\\return {'response':'query.classlist', 'query.classlist':<array>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_DELETE "Delete an instance of a class from the server\n\\param <array path>\\return {'response':'command.delete', 'path':<array>\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_GET "Get the value of an attribute\n\\param <array attribute path>\n\\return {'response':'query.get', 'path':<array>, 'value':<value>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_LOAD "Load all nodes including and below a given node from the filesystem beneath the path given to the given node on the server\n\\param <string file path>\n\\param <array path>\n\\return {'response':'command.load', 'filepath':<string path>', 'parentpath':<array path>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_MOVE "Move an instance of a class on the server\n\\param <array instance path>\n\\param <array new instance parent path>\n\\return {'response':'command.move', 'instancepath':<array path>, 'parentpath':<array path>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_NEW "Create a command.new instance of a class on the server\n\\param <string class name>\n\\param <string instance name>\n\\param <array parent path>\n\\return {'response':'command.new', 'classname':<string>, 'instancename':<string>, 'parentpath':<array>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_NODELIST "Return a list of nodes under the current node using depth-first recursion\n\\param <array path>\n\\return {'response':'query.nodelist', 'query.nodelist':[{classname:<string>, path:<array>}, {classname:<string>, path:<array>}, ... ]}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_RENAME "Rename an instance of a class on the server\n\\param <array path>\n\\param <string instance name>\n\\return {'response':'command.rename', 'instancepath':<array path>, 'name':<string name>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_SAVE "Save all nodes including and below a given node on the server to a path on the filesystem\n\\param <array path>\n\\param <string file path>\n\\return {'response':'command.save', 'instancepath':<array path>, 'filepath':<string path>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_SET "Set the value of an attribute\n\\param <array attribute path>\n\\param <value value>\n\\return {'response':'command.set', 'path':<array>, 'value':<value>}\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_STATEINDEX "Return the current state index from the notification queue\n\\return {'response':'notify.stateindex', 'notify.stateindex':<int>\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
Referenced by ntg_xmlrpc_server_run().
#define HELPSTR_UPDATES "Return the contents of the notification queue after a given state index\n\\param <int stateindex>\n\\return {'response':'notify.updates', 'notify.updates':[{'stateindex':<int>, 'command':<string>, 'params':<array>}, ... ]\n\\error {'response':'error', 'errorcode':<int>, 'errortext':<string>}}\n" |
Referenced by ntg_xmlrpc_server_run().
xmlrpc_value* ntg_path_get_xmlrpc | ( | xmlrpc_env * | env, | |
ntg_path * | path | |||
) |
References ntg_path_::elems, and ntg_path_::n_elems.
void* ntg_xmlrpc_server_run | ( | void * | port | ) |
References DB_SERVER, DEBUG_POST(), HELPSTR_ATTRIBUTES, HELPSTR_CLASSINFO, HELPSTR_CLASSLIST, HELPSTR_DELETE, HELPSTR_GET, HELPSTR_LOAD, HELPSTR_MOVE, HELPSTR_NEW, HELPSTR_NODELIST, HELPSTR_RENAME, HELPSTR_SAVE, HELPSTR_SET, HELPSTR_STATEINDEX, and HELPSTR_UPDATES.
Referenced by ntg_server_run().