⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stdsoap2.h

📁 SOAP协议的C版本
💻 H
📖 第 1 页 / 共 4 页
字号:
# endif#endif#ifdef SOAP_DEBUG# ifndef SOAP_MESSAGE#  define SOAP_MESSAGE fprintf# endif# ifndef DBGLOG#  define DBGLOG(DBGFILE, CMD) \{ if (soap)\  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\      CMD;\      fflush(fdebug);\    }\  }\}# endif# ifndef DBGMSG#  define DBGMSG(DBGFILE, MSG, LEN) \{ if (soap)\  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\    }\  }\}# endif#else# define DBGLOG(DBGFILE, CMD)# define DBGMSG(DBGFILE, MSG, LEN)#endiftypedef long wchar; /* for compatibility */struct Namespace{ const char *id;  const char *ns;  const char *in;  char *out;};struct soap_nlist{ struct soap_nlist *next;  unsigned int level;  short index; /* corresponding entry in ns mapping table */  char *ns; /* only set when parsed ns URI is not in the ns mapping table */  char id[1]; /* the actual string value overflows into allocated region below this struct */};struct soap_blist{ struct soap_blist *next;  char *ptr;  size_t size;};struct soap_array{ void *__ptr;  int __size;};struct soap_plist{ struct soap_plist *next;  const void *ptr;  const struct soap_array *array;  int type;  int id;  char mark1;  char mark2;};struct soap_clist{ struct soap_clist *next;  void *ptr;  int type;  int size;  void (*fdelete)(struct soap_clist*);};struct soap_ilist{ struct soap_ilist *next;  int type;  size_t size;  void *link;  void *copy;  struct soap_clist *clist;  void *ptr;  unsigned int level;  char id[1]; /* the actual id string value overflows into allocated region below this struct */};struct soap_attribute{ struct soap_attribute *next;  short visible;  char *value;  size_t size;  char *ns;  char name[1]; /* the actual name string overflows into allocated region below this struct */};struct soap_cookie{ struct soap_cookie *next;  char *name;  char *value;  char *domain;  char *path;  long expire;		/* client-side: local time to expire; server-side: seconds to expire */  unsigned int version;  short secure;  short session;	/* server-side */  short env;		/* server-side: got cookie from client */  short modified;	/* server-side: client cookie was modified */};struct soap_dom_attribute{ struct soap_dom_attribute *next;  const char *nstr;  char *name;  char *data;  wchar_t *wide;  struct soap *soap;#ifdef __cplusplus  struct soap_dom_attribute &set(const char *nstr, const char *name);	// set namespace and name  struct soap_dom_attribute &set(const char *data);		// set data  void unlink();  soap_dom_attribute();  soap_dom_attribute(struct soap *soap);  soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data);  ~soap_dom_attribute();#endif};#ifdef __cplusplusclass soap_dom_iterator{ public:  struct soap_dom_element *elt;  const char *nstr;  const char *name;  int type;  bool operator==(const soap_dom_iterator&) const;  bool operator!=(const soap_dom_iterator&) const;  struct soap_dom_element &operator*() const;  soap_dom_iterator &operator++();  soap_dom_iterator();  soap_dom_iterator(struct soap_dom_element*);  ~soap_dom_iterator();};#endifstruct soap_dom_element{ struct soap_dom_element *next;	/* next sibling */  struct soap_dom_element *prnt;	/* parent */  struct soap_dom_element *elts;	/* first child element */  struct soap_dom_attribute *atts;	/* first child attribute */  const char *nstr;			/* namespace string */  char *name;				/* element tag name */  char *data;				/* element content data (with SOAP_C_UTFSTRING flag set) */  wchar_t *wide;			/* element content data */  int type;				/* optional: serialized C/C++ data type */  void *node;				/* optional: pointer to serialized C/C++ data */  struct soap *soap;#ifdef __cplusplus  typedef soap_dom_iterator iterator;  struct soap_dom_element &set(const char *nstr, const char *name);  struct soap_dom_element &set(const char *data);  struct soap_dom_element &set(void *node, int type);  struct soap_dom_element &add(struct soap_dom_element*);  struct soap_dom_element &add(struct soap_dom_element&);  struct soap_dom_element &add(struct soap_dom_attribute*);  struct soap_dom_element &add(struct soap_dom_attribute&);  soap_dom_iterator begin();  soap_dom_iterator end();  soap_dom_iterator find(const char *nstr, const char *name);  soap_dom_iterator find(int type);  void unlink();  soap_dom_element();  soap_dom_element(struct soap *soap);  soap_dom_element(struct soap *soap, const char *nstr, const char *name);  soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data);  soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type);  ~soap_dom_element();#endif};#ifdef __cplusplus}extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);extern std::istream &operator>>(std::istream&, struct soap_dom_element&);extern "C" {#endifstruct soap{ short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */  unsigned int mode;  unsigned int imode;  unsigned int omode;  short copy;			/* 1 = copy of another soap struct */  const char *float_format;	/* points to user-definable format string for floats (<1024 chars) */  const char *double_format;	/* points to user-definable format string for doubles (<1024 chars) */  const char *dime_id_format;	/* points to user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */  const char *http_version;	/* default = "1.0" */  const char *http_content;	/* optional custom response content type (with SOAP_FILE) */  const char *encodingStyle;	/* default = NULL which means that SOAP encoding is used */  const char *actor;  int recv_timeout;		/* when > 0, gives socket recv timeout in seconds, < 0 in usec */  int send_timeout;		/* when > 0, gives socket send timeout in seconds, < 0 in usec */  int connect_timeout;		/* when > 0, gives socket connect() timeout in seconds, < 0 in usec */  int accept_timeout;		/* when > 0, gives socket accept() timeout in seconds, < 0 in usec */  int socket_flags;		/* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */  int connect_flags;		/* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */  int bind_flags;		/* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */  int accept_flags;		/* accept() SOL_SOCKET sockopt flags */  struct Namespace *namespaces;	/* Pointer to global namespace mapping table */  struct Namespace *local_namespaces;	/* Local namespace mapping table */  struct soap_nlist *nlist;	/* namespace stack */  struct soap_blist *blist;	/* block allocation stack */  struct soap_clist *clist;	/* class instance allocation list */  void *alist;			/* memory allocation list */  struct soap_ilist *iht[SOAP_IDHASH];  struct soap_plist *pht[SOAP_PTRHASH];  struct SOAP_ENV__Header *header;  struct SOAP_ENV__Fault *fault;  void *user;			/* to pass user-defined data */  struct soap_plugin *plugins;	/* linked list of plug-in data */  char *userid;			/* HTTP Basic authorization userid */  char *passwd;			/* HTTP Basic authorization passwd */  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);  int (*fget)(struct soap*, const char*, const char*, const char*, const char*, size_t);  int (*fposthdr)(struct soap*, const char*, const char*);  int (*fresponse)(struct soap*, int, size_t);  int (*fparse)(struct soap*);  int (*fparsehdr)(struct soap*, const char*, const char*);  int (*fconnect)(struct soap*, const char*, const char*, int);  int (*fdisconnect)(struct soap*);  int (*fopen)(struct soap*, const char*, const char*, int);  int (*faccept)(struct soap*, int, struct sockaddr*, int *n);  int (*fclose)(struct soap*);  int (*fsend)(struct soap*, const char*, size_t);  size_t (*frecv)(struct soap*, char*, size_t);  int (*fprepare)(struct soap*, const char*, size_t);  int (*fignore)(struct soap*, const char*);  void *(*fplugin)(struct soap*, const char*);  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);  void (*fdimereadclose)(struct soap*, void*);  void (*fdimewriteclose)(struct soap*, void*);  size_t (*fdimeread)(struct soap*, void*, char*, size_t);  int (*fdimewrite)(struct soap*, void*, const char*, size_t);  int master;  int socket;#if defined(__cplusplus) && !defined(UNDER_CE)  std::ostream *os;  std::istream *is;#else  void *os;	/* preserve alignment */  void *is;	/* preserve alignment */#endif#ifndef UNDER_CE  int sendfd;  int recvfd;#else  FILE *sendfd;  FILE *recvfd;  char errorstr[256];  wchar_t werrorstr[256];#endif  size_t bufidx;  size_t buflen;  wchar ahead;  short cdata;  short body;  unsigned int level;  size_t count;		/* message length counter */  size_t length;	/* message length as set by HTTP header */  char buf[SOAP_BUFLEN];/* send and receive buffer */  char msgbuf[1024];	/* output buffer for (error) messages >=1024 bytes */  char tmpbuf[1024];	/* output buffer for HTTP headers and DIME >=1024 bytes */  char tag[SOAP_TAGLEN];  char id[SOAP_TAGLEN];  char href[SOAP_TAGLEN];  char type[SOAP_TAGLEN];  char arrayType[SOAP_TAGLEN];  char arraySize[SOAP_TAGLEN];  char arrayOffset[SOAP_TAGLEN];  short other;  short root;  short position;  int positions[SOAP_MAXDIMS];  struct soap_attribute *attributes;	/* attribute list */  short encoding;  short mustUnderstand;  short null;  short ns;  short part;  short alloced;  short peeked;  short dot_net_bug;  size_t chunksize;  size_t chunkbuflen;  char endpoint[SOAP_TAGLEN];  char path[SOAP_TAGLEN];  char host[SOAP_TAGLEN];  char *action;  int port;  short keep_alive;  const char *proxy_host;	/* Proxy Server host name */  int proxy_port;		/* Proxy Server port (default = 8080) */  const char *proxy_userid;	/* Proxy Authorization user name */  const char *proxy_passwd;	/* Proxy Authorization password */  int status;			/* -1 when request, else error code to be returned by server */  int error;  int errmode;  int errnum;  unsigned long idnum;  unsigned long ip;  size_t dime_count;  int dime_flags;  size_t dime_size;  size_t dime_chunksize;  size_t dime_buflen;  char *dime_ptr;  char *dime_id;  char *dime_type;  char *dime_options;  struct soap_dom_element *dom;#ifndef WITH_LEAN  const char *logfile[SOAP_MAXLOGS];  FILE *fdebug[SOAP_MAXLOGS];  struct soap_cookie *cookies;  const char *cookie_domain;  const char *cookie_path;  int cookie_max;#endif#ifdef WITH_OPENSSL  int (*fsslauth)(struct soap*);  int (*fsslverify)(int, X509_STORE_CTX*);  BIO *bio;  SSL *ssl;  SSL_CTX *ctx;  short require_server_auth;  short require_client_auth;  short rsa;			/* when set, use RSA instead of DH */  const char *keyfile;  const char *password;  const char *dhfile;  const char *cafile;  const char *capath;  const char *randfile;  SSL_SESSION *session;  char session_host[SOAP_TAGLEN];  int session_port;#endif#ifdef WITH_ZLIB  short zlib_in;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE or SOAP_ZLIB_GZIP */  short zlib_out;		/* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE or SOAP_ZLIB_GZIP */  z_stream d_stream;		/* decompression stream */  char z_buf[SOAP_BUFLEN];	/* buffer */  size_t z_buflen;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -