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 OSRTSOCKET socket;
00040 OSSoapVersion soapVersion;
00041 const char* endpoint;
00042 char* host;
00043 int port;
00044 const char* path;
00045 const char* soapAction;
00046 OSBOOL keepAlive;
00047 OSBOOL chunked;
00048 OSOCTET spare[2];
00049 size_t contentLength;
00050 } OSSOAPCONN;
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00065 EXTERNRT int rtxSoapInitConn
00066 (OSSOAPCONN* pSoapConn, OSCTXT* pctxt, OSSoapVersion soapv, const char* url);
00067
00076 EXTERNRT int rtxSoapAcceptConn
00077 (OSRTSOCKET listenSocket, OSSOAPCONN* pSoapConn);
00078
00087 EXTERNRT int rtxSoapConnect (OSSOAPCONN* pSoapConn);
00088
00098 EXTERNRT int rtxSoapRecvHttp (OSSOAPCONN* pSoapConn);
00099
00113 EXTERNRT int rtxSoapRecvHttpContent
00114 (OSSOAPCONN* pSoapConn, OSOCTET** ppbuf);
00115
00116 EXTERNRT int rtxSoapRecvHttpLine
00117 (OSSOAPCONN* pSoapConn, char* lbuf, size_t lbufsiz);
00118
00129 EXTERNRT int rtxSoapSendHttp
00130 (OSSOAPCONN* pSoapConn, const OSUTF8CHAR* soapMsg);
00131
00132 EXTERNRT int rtxHttpParseHdr
00133 (OSSOAPCONN* pSoapConn, const char* key, const char* value);
00134
00135 EXTERNRT int rtxHttpPost (OSSOAPCONN* pSoapConn, size_t count);
00136
00137 EXTERNRT int rtxHttpPostHdr
00138 (OSSOAPCONN* pSoapConn, const char* key, const char* value);
00139
00140 EXTERNRT int rtxHttpTagCmp (const char *s, const char *t);
00141
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145
00146 #endif