|
|
#ifndef METHOD_H_INCLUDED |
|
|
#define METHOD_H_INCLUDED |
|
|
|
|
|
#include "xmlrpc-c/base.h" |
|
|
|
|
|
struct xmlrpc_signature { |
|
|
struct xmlrpc_signature * nextP; |
|
|
const char * retType; |
|
|
|
|
|
|
|
|
|
|
|
unsigned int argCount; |
|
|
|
|
|
unsigned int argListSpace; |
|
|
|
|
|
|
|
|
|
|
|
const char ** argList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
typedef struct xmlrpc_signatureList { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct xmlrpc_signature * firstSignatureP; |
|
|
} xmlrpc_signatureList; |
|
|
|
|
|
struct xmlrpc_registry { |
|
|
bool introspectionEnabled; |
|
|
struct xmlrpc_methodList * methodListP; |
|
|
xmlrpc_default_method defaultMethodFunction; |
|
|
void * defaultMethodUserData; |
|
|
xmlrpc_preinvoke_method preinvokeFunction; |
|
|
void * preinvokeUserData; |
|
|
xmlrpc_server_shutdown_fn * shutdownServerFn; |
|
|
|
|
|
|
|
|
|
|
|
void * shutdownContext; |
|
|
|
|
|
|
|
|
|
|
|
xmlrpc_dialect dialect; |
|
|
}; |
|
|
|
|
|
typedef struct { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xmlrpc_method1 methodFnType1; |
|
|
|
|
|
xmlrpc_method2 methodFnType2; |
|
|
|
|
|
void * userData; |
|
|
|
|
|
size_t stackSize; |
|
|
|
|
|
|
|
|
|
|
|
struct xmlrpc_signatureList * signatureListP; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char * helpText; |
|
|
|
|
|
} xmlrpc_methodInfo; |
|
|
|
|
|
typedef struct xmlrpc_methodNode { |
|
|
struct xmlrpc_methodNode * nextP; |
|
|
const char * methodName; |
|
|
xmlrpc_methodInfo * methodP; |
|
|
} xmlrpc_methodNode; |
|
|
|
|
|
typedef struct xmlrpc_methodList { |
|
|
xmlrpc_methodNode * firstMethodP; |
|
|
xmlrpc_methodNode * lastMethodP; |
|
|
} xmlrpc_methodList; |
|
|
|
|
|
void |
|
|
xmlrpc_methodCreate(xmlrpc_env * const envP, |
|
|
xmlrpc_method1 methodFnType1, |
|
|
xmlrpc_method2 methodFnType2, |
|
|
void * const userData, |
|
|
const char * const signatureString, |
|
|
const char * const helpText, |
|
|
size_t const stackSize, |
|
|
xmlrpc_methodInfo ** const methodPP); |
|
|
|
|
|
void |
|
|
xmlrpc_methodDestroy(xmlrpc_methodInfo * const methodP); |
|
|
|
|
|
void |
|
|
xmlrpc_methodListCreate(xmlrpc_env * const envP, |
|
|
xmlrpc_methodList ** const methodListPP); |
|
|
|
|
|
void |
|
|
xmlrpc_methodListDestroy(xmlrpc_methodList * methodListP); |
|
|
|
|
|
void |
|
|
xmlrpc_methodListLookupByName(xmlrpc_methodList * const methodListP, |
|
|
const char * const methodName, |
|
|
xmlrpc_methodInfo ** const methodPP); |
|
|
|
|
|
void |
|
|
xmlrpc_methodListAdd(xmlrpc_env * const envP, |
|
|
xmlrpc_methodList * const methodListP, |
|
|
const char * const methodName, |
|
|
xmlrpc_methodInfo * const methodP); |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|