00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00027 #ifndef _RTXSOAP_H_
00028 #define _RTXSOAP_H_
00029
00030 #include "rtxsrc/rtxCommon.h"
00031 #include "rtxsrc/rtxSocket.h"
00032
00033 #define HTTP_VERSION "1.1"
00034
00035 typedef enum { OSSOAPV1, OSSOAPV2 } OSSoapVersion;
00036
00037 typedef struct OSSOAPCONN {
00038 OSCTXT* pctxt;
00039 OSSoapVersion soapVersion;
00040 const char* endpoint;
00041 char* host;
00042 int port;
00043 const char* path;
00044 OSBOOL keepAlive;
00045 OSBOOL chunked;
00046 OSOCTET spare[2];
00047 size_t contentLength;
00048 } OSSOAPCONN;
00049
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053
00063 EXTERNRTX int rtxSoapInitConn
00064 (OSSOAPCONN* pSoapConn, OSCTXT* pctxt, OSSoapVersion soapv, const char* url);
00065
00074 EXTERNRTX int rtxSoapAcceptConn
00075 (OSRTSOCKET listenSocket, OSSOAPCONN* pSoapConn);
00076
00085 EXTERNRTX int rtxSoapConnect (OSSOAPCONN* pSoapConn);
00086
00096 EXTERNRTX int rtxSoapRecvHttp (OSSOAPCONN* pSoapConn);
00097
00111 EXTERNRTX int rtxSoapRecvHttpContent
00112 (OSSOAPCONN* pSoapConn, OSOCTET** ppbuf);
00113
00114 EXTERNRTX int rtxSoapRecvHttpLine
00115 (OSSOAPCONN* pSoapConn, char* lbuf, size_t lbufsiz);
00116
00127 EXTERNRTX int rtxSoapSendHttp
00128 (OSSOAPCONN* pSoapConn, const OSUTF8CHAR* soapMsg);
00129
00130 EXTERNRTX int rtxHttpParseHdr
00131 (OSSOAPCONN* pSoapConn, const char* key, const char* value);
00132
00133 EXTERNRTX int rtxHttpPost (OSSOAPCONN* pSoapConn, size_t count);
00134
00135 EXTERNRTX int rtxHttpPostHdr
00136 (OSSOAPCONN* pSoapConn, const char* key, const char* value);
00137
00138 EXTERNRTX int rtxHttpTagCmp (const char *s, const char *t);
00139
00140 #ifdef __cplusplus
00141 }
00142 #endif
00143
00144 #endif