📄 xmlrpc.h
字号:
/* This file is part of libXMLRPC - a C library for xml-encoded function calls. Author: Dan Libby (dan@libby.com) Epinions.com may be contacted at feedback@epinions-inc.com*//* Copyright 2000 Epinions, Inc. Subject to the following 3 conditions, Epinions, Inc. permits you, free of charge, to (a) use, copy, distribute, modify, perform and display this software and associated documentation files (the "Software"), and (b) permit others to whom the Software is furnished to do so as well. 1) The above copyright notice and this permission notice shall be included without modification in all copies or substantial portions of the Software. 2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. 3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH DAMAGES. */#ifndef XMLRPC_ALREADY_INCLUDED#define XMLRPC_ALREADY_INCLUDED 1/* includes */#include "xml_element.h"#include <time.h> /* for time_t */#ifdef __cplusplusextern "C" {#endif/* allow version to be specified via compile line define */#ifndef XMLRPC_LIB_VERSION #define XMLRPC_LIB_VERSION "0.51"#endif/* this number, representing the date, must be increased each time the API changes */#define XMLRPC_API_NO 20020623/* this string should be changed with each packaged release */#define XMLRPC_VERSION_STR "xmlrpc-epi v. " XMLRPC_LIB_VERSION/* where to find more info. shouldn't need to change much */#define XMLRPC_HOME_PAGE_STR "http://xmlprc-epi.sourceforge.net/"/****d* VALUE/XMLRPC_VALUE_TYPE * NAME * XMLRPC_VALUE_TYPE * NOTES * Defines data types for XMLRPC_VALUE * Deprecated for public use. See XMLRPC_VALUE_TYPE_EASY * SEE ALSO * XMLRPC_VECTOR_TYPE * XMLRPC_REQUEST_TYPE * SOURCE */typedef enum _XMLRPC_VALUE_TYPE { xmlrpc_none, /* not a value */ xmlrpc_empty, /* empty value, eg NULL */ xmlrpc_base64, /* base64 value, eg binary data */ xmlrpc_boolean, /* boolean [0 | 1] */ xmlrpc_datetime, /* datetime [ISO8601 | time_t] */ xmlrpc_double, /* double / floating point */ xmlrpc_int, /* integer */ xmlrpc_string, /* string */ xmlrpc_vector /* vector, aka list, array */} XMLRPC_VALUE_TYPE;/*******//****d* VALUE/XMLRPC_VECTOR_TYPE * NAME * XMLRPC_VECTOR_TYPE * NOTES * Defines data types for XMLRPC_VECTOR. * Deprecated for public use. See XMLRPC_VALUE_TYPE_EASY * SEE ALSO * XMLRPC_VALUE_TYPE * XMLRPC_REQUEST_TYPE * SOURCE */typedef enum _XMLRPC_VECTOR_TYPE { xmlrpc_vector_none, /* not an array */ xmlrpc_vector_array, /* no values may have key names */ xmlrpc_vector_mixed, /* some values may have key names */ xmlrpc_vector_struct /* all values must have key names */} XMLRPC_VECTOR_TYPE;/*******//****d* VALUE/XMLRPC_VALUE_TYPE_EASY * NAME * XMLRPC_VALUE_TYPE_EASY * NOTES * Defines data types for XMLRPC_VALUE, including vector types. * SEE ALSO * XMLRPC_VECTOR_TYPE * XMLRPC_REQUEST_TYPE * SOURCE */typedef enum _XMLRPC_VALUE_TYPE_EASY { xmlrpc_type_none, /* not a value */ xmlrpc_type_empty, /* empty value, eg NULL */ xmlrpc_type_base64, /* base64 value, eg binary data */ xmlrpc_type_boolean, /* boolean [0 | 1] */ xmlrpc_type_datetime, /* datetime [ISO8601 | time_t] */ xmlrpc_type_double, /* double / floating point */ xmlrpc_type_int, /* integer */ xmlrpc_type_string, /* string *//* -- IMPORTANT: identical to XMLRPC_VALUE_TYPE to this point. -- */ xmlrpc_type_array, /* vector array */ xmlrpc_type_mixed, /* vector mixed */ xmlrpc_type_struct /* vector struct */} XMLRPC_VALUE_TYPE_EASY;/*******//****d* VALUE/XMLRPC_REQUEST_TYPE * NAME * XMLRPC_REQUEST_TYPE * NOTES * Defines data types for XMLRPC_REQUEST * SEE ALSO * XMLRPC_VALUE_TYPE * XMLRPC_VECTOR_TYPE * SOURCE */typedef enum _xmlrpc_request_type { xmlrpc_request_none, /* not a valid request */ xmlrpc_request_call, /* calling/invoking a method */ xmlrpc_request_response, /* responding to a method call */} XMLRPC_REQUEST_TYPE;/*******//****d* VALUE/XMLRPC_ERROR_CODE * NAME * XMLRPC_ERROR_CODE * NOTES * All existing error codes * SEE ALSO * XMLRPC_REQUEST_ERROR * SOURCE */typedef enum _xmlrpc_error_code { xmlrpc_error_none = 0, /* not an error */ xmlrpc_error_parse_xml_syntax = -32700, xmlrpc_error_parse_unknown_encoding = -32701, xmlrpc_error_parse_bad_encoding = -32702, xmlrpc_error_invalid_xmlrpc = -32600, xmlrpc_error_unknown_method = -32601, xmlrpc_error_invalid_params = -32602, xmlrpc_error_internal_server = -32603, xmlrpc_error_application = -32500, xmlrpc_error_system = -32400, xmlrpc_error_transport = -32300} XMLRPC_ERROR_CODE;/******/#define xmlrpc_error_parse_xml_syntax_str "parse error. not well formed."#define xmlrpc_error_parse_unknown_encoding_str "parse error. unknown encoding"#define xmlrpc_error_parse_bad_encoding_str "parse error. invalid character for encoding"#define xmlrpc_error_invalid_xmlrpc_str "server error. xml-rpc not conforming to spec"#define xmlrpc_error_unknown_method_str "server error. method not found."#define xmlrpc_error_invalid_params_str "server error. invalid method parameters"#define xmlrpc_error_internal_server_str "server error. internal xmlrpc library error"#define xmlrpc_error_application_str "application error."#define xmlrpc_error_system_str "system error."#define xmlrpc_error_transport_str "transport error."/****d* VALUE/XMLRPC_VERSION * NAME * XMLRPC_VERSION * NOTES * Defines xml vocabulary used for generated xml * SEE ALSO * XMLRPC_REQUEST_OUTPUT_OPTIONS * XMLRPC_REQUEST_To_XML () * SOURCE */typedef enum _xmlrpc_version { xmlrpc_version_none = 0, /* not a recognized vocabulary */ xmlrpc_version_1_0 = 1, /* xmlrpc 1.0 standard vocab */ xmlrpc_version_simple = 2, /* alt more readable vocab */ xmlrpc_version_danda = 2, /* same as simple. legacy */ xmlrpc_version_soap_1_1 = 3 /* SOAP. version 1.1 */} XMLRPC_VERSION;/******//****s* VALUE/XMLRPC_REQUEST_OUTPUT_OPTIONS * NAME * XMLRPC_REQUEST_OUTPUT_OPTIONS * NOTES * Defines output options for generated xml * SEE ALSO * XMLRPC_VERSION * XML_ELEM_OUTPUT_OPTIONS * XMLRPC_REQUEST_To_XML () * SOURCE */typedef struct _xmlrpc_request_output_options { STRUCT_XML_ELEM_OUTPUT_OPTIONS xml_elem_opts; /* xml_element specific output options */ XMLRPC_VERSION version; /* xml vocabulary to use */} STRUCT_XMLRPC_REQUEST_OUTPUT_OPTIONS, *XMLRPC_REQUEST_OUTPUT_OPTIONS;/******//****s* VALUE/XMLRPC_REQUEST_INPUT_OPTIONS * NAME * XMLRPC_REQUEST_INPUT_OPTIONS * NOTES * Defines options for reading in xml data * SEE ALSO * XMLRPC_VERSION * XML_ELEM_INPUT_OPTIONS * XMLRPC_REQUEST_From_XML () * SOURCE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -