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

📄 stdsoap2.h

📁 linux下简单对象应用协议的开发库
💻 H
📖 第 1 页 / 共 5 页
字号:
/* block allocation for pointer serialization management */struct soap_pblk{ struct soap_pblk *next;  struct soap_plist plist[SOAP_PTRBLK];};#ifdef SOAP_MEM_DEBUG/* malloc/free tracking for debugging */struct soap_mlist{ struct soap_mlist *next;  const void *ptr;  const char *file;  int line;  short live;};#endif/* class allocation list */struct soap_clist{ struct soap_clist *next;  void *ptr;  int type;  int size;  int (*fdelete)(struct soap_clist*);};/* attributes */struct soap_attribute{ struct soap_attribute *next;  char *value;  size_t size;  char *ns;  short visible;  char name[1]; /* the actual name string flows into the allocated region below this struct */};#ifndef WITH_LEANstruct soap_cookie{ struct soap_cookie *next;  char *name;  char *value;  char *domain;  char *path;  time_t expire;	/* client-side: local time to expire */  long maxage;		/* server-side: seconds to expire */  unsigned int version;  short secure;  short session;	/* server-side */  short env;		/* server-side: got cookie from client and should not be (re)send */  short modified;	/* server-side: client cookie was modified and should be send */};#endif#ifdef __cplusplusSOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);class soap_multipart_iterator{ public:  struct soap_multipart *content;  bool operator==(const soap_multipart_iterator& iter) const    { return content == iter.content; }  bool operator!=(const soap_multipart_iterator& iter) const    { return content != iter.content; }  struct soap_multipart &operator*() const    { return *content; }  soap_multipart_iterator &operator++()    { content = soap_next_multipart(content); return *this; }  soap_multipart_iterator() : content(NULL)    { }  soap_multipart_iterator(struct soap_multipart *p) : content(p)    { }};#endif#ifndef WITH_LEANERstruct soap_dime{ size_t count;  size_t size;  size_t chunksize;  size_t buflen;  char flags;  char *ptr;  const char *id;  const char *type;  const char *options;  struct soap_multipart *list;		/* list of DIME attachments received */  struct soap_multipart *first, *last;	/* temporary in/out queue */#ifdef __cplusplus  soap_multipart_iterator begin()    { soap_multipart_iterator iter(list); return iter; };  soap_multipart_iterator end()    { soap_multipart_iterator iter(NULL); return iter; };#endif};#endif#ifndef WITH_LEANERstruct soap_mime{ char *boundary;			/* MIME boundary */  const char *start;			/* MIME start ID */  struct soap_multipart *list;		/* list of MIME attachments received */  struct soap_multipart *first, *last;	/* temporary in/out queue */#ifdef __cplusplus  soap_multipart_iterator begin()    { soap_multipart_iterator iter(list); return iter; };  soap_multipart_iterator end()    { soap_multipart_iterator iter(NULL); return iter; };#endif};#endif#ifndef WITH_LEANER/* RFC2045 MIME content transfer encodings */enum soap_mime_encoding{ SOAP_MIME_NONE,  SOAP_MIME_7BIT,  SOAP_MIME_8BIT,  SOAP_MIME_BINARY,  SOAP_MIME_QUOTED_PRINTABLE,  SOAP_MIME_BASE64,  SOAP_MIME_IETF_TOKEN,  SOAP_MIME_X_TOKEN};#endif#ifndef WITH_LEANER/* DIME/MIME multipart list */struct soap_multipart{ struct soap_multipart *next;  char *ptr;				/* points to raw data content */  size_t size;				/* size of data content */  const char *id;			/* DIME/MIME content ID or form data name */  const char *type;			/* DIME/MIME type (MIME type format) */  const char *options;			/* DIME options */  enum soap_mime_encoding encoding;	/* MIME Content-Transfer-Encoding */  const char *location;			/* MIME Content-Location (optional) */  const char *description;		/* MIME Content-Description (optional) */#ifdef __cplusplus  typedef soap_multipart_iterator iterator;#endif};#endif#ifndef WITH_LEANER/* attachment DIME and MTOM XOP forwarding */struct soap_xlist{ struct soap_xlist *next;  unsigned char **ptr;  int *size;  char *id;  char **type;  char **options;};#endif/******************************************************************************/#ifndef WITH_LEANER#ifdef __cplusplusclass soap_dom_attribute_iterator{ public:  struct soap_dom_attribute *att;  const char *nstr;  const char *name;  bool operator==(const soap_dom_attribute_iterator&) const;  bool operator!=(const soap_dom_attribute_iterator&) const;  struct soap_dom_attribute &operator*() const;  soap_dom_attribute_iterator &operator++();  soap_dom_attribute_iterator();  soap_dom_attribute_iterator(struct soap_dom_attribute*);  ~soap_dom_attribute_iterator();};#endif#endif#ifndef WITH_LEANERstruct soap_dom_attribute{ struct soap_dom_attribute *next;  const char *nstr;  char *name;  char *data;  wchar_t *wide;  struct soap *soap;#ifdef __cplusplus  typedef soap_dom_attribute_iterator iterator;  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 */  soap_dom_attribute_iterator begin();  soap_dom_attribute_iterator end();  soap_dom_attribute_iterator find(const char *nstr, const char *name);  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};#endif#ifndef WITH_LEANER#ifdef __cplusplusclass soap_dom_element_iterator{ public:  struct soap_dom_element *elt;  const char *nstr;  const char *name;  int type;  bool operator==(const soap_dom_element_iterator&) const;  bool operator!=(const soap_dom_element_iterator&) const;  struct soap_dom_element &operator*() const;  soap_dom_element_iterator &operator++();  soap_dom_element_iterator();  soap_dom_element_iterator(struct soap_dom_element*);  ~soap_dom_element_iterator();};#endif#endif#ifndef WITH_LEANERstruct soap_dom_element{ struct soap_dom_element *next;	/* next sibling */  struct soap_dom_element *prnt;	/* parent */  struct soap_dom_element *elts;	/* list of child elements */  struct soap_dom_attribute *atts;	/* list of attributes */  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 */  char *head;				/* leading whitespace to start tag */  char *tail;				/* leading whitespace to end tag */  struct soap *soap;			/* soap context that manages this node */#ifdef __cplusplus  typedef soap_dom_element_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_element_iterator begin();  soap_dom_element_iterator end();  soap_dom_element_iterator find(const char *nstr, const char *name);  soap_dom_element_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};SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);#endif#if defined(__cplusplus) && !defined(WITH_LEAN)}extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);extern std::istream &operator>>(std::istream&, struct soap_dom_element&);extern "C" {#endif/******************************************************************************/#ifdef WIN32# ifdef SOAP_STD_EXPORTS#  define SOAP_STD_API __declspec(dllexport)# else#  define SOAP_STD_API# endif#else# define SOAP_STD_API#endifstruct SOAP_STD_API soap{ short state;			/* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */  short version;		/* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */  soap_mode mode;  soap_mode imode;  soap_mode omode;  const char *float_format;	/* user-definable format string for floats (<1024 chars) */  const char *double_format;	/* user-definable format string for doubles (<1024 chars) */  const char *dime_id_format;	/* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */  const char *http_version;	/* HTTP version used "1.0" or "1.1" */  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;		/* SOAP-ENV:actor or role attribute value */  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 */  const 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 (malloc) list */  struct soap_ilist *iht[SOAP_IDHASH];  struct soap_plist *pht[SOAP_PTRHASH];  struct soap_pblk *pblk;	/* plist block allocation */  short pidx;			/* plist block allocation */  struct SOAP_ENV__Header *header;  struct SOAP_ENV__Fault *fault;  int idnum;  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*);  int (*fform)(struct soap*);  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 (*fheader)(struct soap*);  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);  int (*fconnect)(struct soap*, const char*, const char*, int);  int (*fdisconnect)(struct soap*);  int (*fclosesocket)(struct soap*, SOAP_SOCKET);  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);  SOAP_SOCKET (*fopen)(struct soap*, const char*, const char*, int);  SOAP_SOCKET (*faccept)(struct soap*, SOAP_SOCKET, 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 (*fpoll)(struct soap*);  void (*fseterror)(struct soap*, const char **c, const char **s);  int (*fignore)(struct soap*, const char*);  int (*fserveloop)(struct soap*);  void *(*fplugin)(struct soap*, const char*);  void *(*fmalloc)(struct soap*, size_t);#ifndef WITH_LEANER  int (*fprepareinit)(struct soap*);  int (*fpreparesend)(struct soap*, const char*, size_t);  int (*fpreparerecv)(struct soap*, const char*, size_t);  int (*fpreparefinal)(struct soap*);  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);  void *(*fmimereadopen)(struct soap*, void*, const char*, const char*, const char*);  void *(*fmimewriteopen)(struct soap*, void*, const char*, const char*, const char*, enum soap_mime_encoding);  void (*fmimereadclose)(struct soap*, void*);  void (*fmimewriteclose)(struct soap*, void*);  size_t (*fmimeread)(struct soap*, void*, char*, size_t);  int (*fmimewrite)(struct soap*, void*, const char*, size_t);#endif  SOAP_SOCKET master;  SOAP_SOCKET socket;#if defined(__cplusplus) && !defined(WITH_LEAN)  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;#endif  size_t bufidx;	/* index in soap.buf[] */  size_t buflen;	/* length of soap.buf[] content */  soap_wchar ahead;	/* parser lookahead */  short cdata;		/* CDATA parser state */  short body;		/* parsed XML element has a body or not */  unsigned int level;	/* XML nesting level */  size_t count;		/* message length counter */  size_t length;	/* message length as set by HTTP header */  char *labbuf;		/* look-aside buffer */  size_t lablen;	/* look-aside buffer allocated length */  size_t labidx;	/* look-aside buffer index to available part */  char buf[SOAP_BUFLEN];/* send and receive buffer */  char msgbuf[1024];	/* in/output buffer for messages >=1024 bytes */  char tmpbuf[1024];	/* in/output buffer for HTTP/MIME headers, simpleType values, attribute names, and DIME must be >=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 position;  int positions[SOAP_MAXDIMS];  short root;  struct soap_attribute *attributes;	/* attribute list */  short encoding;	/* when set, output encodingStyle */  short mustUnderstand;	/* a mustUnderstand element was parsed or is output */  short null;		/* parsed XML is xsi:nil */  short ns;		/* when not set, output full xmlns bindings */  short part;		/* parsing state */  short alloced;  short peeked;

⌨️ 快捷键说明

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