TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
httppost.h File Reference
#include "stdsoap2.h"
+ Include dependency graph for httppost.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  http_post_handlers
 
struct  http_post_data
 

Macros

#define HTTP_POST_ID   "HTTP-POST-1.1" /* plugin identification */
 

Typedefs

typedef int(* http_handler_t )(struct soap *)
 

Functions

int http_post (struct soap *, struct soap_plugin *, void *)
 
int soap_post_connect (struct soap *, const char *endpoint, const char *action, const char *type)
 
int soap_put_connect (struct soap *, const char *endpoint, const char *action, const char *type)
 
int soap_delete_connect (struct soap *, const char *endpoint, const char *action, const char *type)
 
int soap_http_body (struct soap *, char **buf, size_t *len)
 

Variables

const char http_post_id []
 

Macro Definition Documentation

#define HTTP_POST_ID   "HTTP-POST-1.1" /* plugin identification */

Typedef Documentation

typedef int(* http_handler_t)(struct soap *)

Function Documentation

int http_post ( struct soap ,
struct soap_plugin ,
void *   
)
157 { p->id = http_post_id;
158  p->data = (void*)malloc(sizeof(struct http_post_data));
159  p->fdelete = http_post_delete;
160  if (p->data)
161  if (http_post_init(soap, (struct http_post_data*)p->data, (struct http_post_handlers *)arg))
162  { free(p->data); /* error: could not init */
163  return SOAP_EOM; /* return error */
164  }
165  return SOAP_OK;
166 }
Definition: httppost.h:72
Definition: stdsoap2.h:1933
const char http_post_id[14]
Definition: httppost.cpp:146
static void http_post_delete(struct soap *soap, struct soap_plugin *p)
Definition: httppost.cpp:179
static int http_post_init(struct soap *soap, struct http_post_data *data, struct http_post_handlers *handlers)
Definition: httppost.cpp:168
internal::NamedArg< char > arg(StringRef name, const T &arg)
Definition: format.h:3248
#define SOAP_OK
Definition: stdsoap2.h:1245
Definition: httppost.h:66
void * data[4]
Definition: stdsoap2.h:1972
#define SOAP_EOM
Definition: stdsoap2.h:1265

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int soap_delete_connect ( struct soap ,
const char *  endpoint,
const char *  action,
const char *  type 
)
252 { if (soap_connect_command(soap, SOAP_DEL, endpoint, action)
253  || soap_end_send(soap))
254  return soap_closesock(soap);
255  return soap_closesock(soap);
256 }
Definition: stdsoap2.h:1933
SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap *soap)
Definition: stdsoap2.cpp:8242
SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap *soap, int http_command, const char *endpoints, const char *action)
Definition: stdsoap2.cpp:15698
#define SOAP_DEL
Definition: stdsoap2.h:1319
SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap *soap)
Definition: stdsoap2.cpp:5113

+ Here is the call graph for this function:

int soap_http_body ( struct soap ,
char **  buf,
size_t *  len 
)
259 { char *s = *buf = NULL;
260  *len = 0;
261  /* It is unlikely chunked and/or compressed POST messages are sent by browsers, but we need to handle them */
262  if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK
263 #ifdef WITH_ZLIB
265 #endif
266  )
267  { register size_t k;
268  soap_wchar c = EOF;
269  soap->labidx = 0;
270  do
271  { if (soap_append_lab(soap, NULL, 0))
272  return soap->error;
273  s = soap->labbuf + soap->labidx;
274  k = soap->lablen - soap->labidx;
275  soap->labidx = soap->lablen;
276  while (k--)
277  { if ((c = soap_getchar(soap)) == (int)EOF)
278  break;
279  *s++ = c;
280  }
281  } while (c != (int)EOF);
282  *len = soap->lablen - k - 1;
283  *buf = (char*)soap_malloc(soap, *len + 1);
284  memcpy(*buf, soap->labbuf, *len + 1);
285  }
286  else
287  { if (soap->length)
288  { s = (char*)soap_malloc(soap, soap->length + 1);
289  if (s)
290  { char *t = s;
291  size_t i;
292  for (i = soap->length; i; i--)
293  { soap_wchar c;
294  if ((c = soap_getchar(soap)) == (int)EOF)
295  return soap->error = SOAP_EOF;
296  *t++ = c;
297  }
298  *t = '\0';
299  }
300  }
301  *buf = s;
302  *len = soap->length;
303  }
304  return soap_end_recv(soap);
305 }
size_t lablen
Definition: stdsoap2.h:2064
int error
Definition: stdsoap2.h:2112
soap_mode mode
Definition: stdsoap2.h:1936
Definition: stdsoap2.h:1933
soap_int32 soap_wchar
Definition: stdsoap2.h:1610
#define SOAP_IO
Definition: stdsoap2.h:1342
#define SOAP_ZLIB_NONE
Definition: stdsoap2.h:1333
arena_t NULL
Definition: jemalloc_internal.h:624
#define SOAP_IO_CHUNK
Definition: stdsoap2.h:1346
SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap *soap, const char *s, size_t n)
Definition: stdsoap2.cpp:10592
size_t labidx
Definition: stdsoap2.h:2065
char * labbuf
Definition: stdsoap2.h:2063
short zlib_in
Definition: stdsoap2.h:2201
size_t length
Definition: stdsoap2.h:2062
#define SOAP_EOF
Definition: stdsoap2.h:1243
SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap *soap)
Definition: stdsoap2.cpp:8387
SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap *soap)
Definition: stdsoap2.cpp:1337
SOAP_FMAC1 void *SOAP_FMAC2 soap_malloc(struct soap *soap, size_t n)
Definition: stdsoap2.cpp:7638

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int soap_post_connect ( struct soap ,
const char *  endpoint,
const char *  action,
const char *  type 
)
238 { if ((soap->omode & SOAP_IO) != SOAP_IO_CHUNK) /* not chunking: store in buf */
240  soap->http_content = type;
241  return soap_connect_command(soap, SOAP_POST_FILE, endpoint, action);
242 }
Definition: stdsoap2.h:1933
#define SOAP_IO
Definition: stdsoap2.h:1342
#define SOAP_IO_CHUNK
Definition: stdsoap2.h:1346
const char * http_content
Definition: stdsoap2.h:1943
SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap *soap, int http_command, const char *endpoints, const char *action)
Definition: stdsoap2.cpp:15698
soap_mode omode
Definition: stdsoap2.h:1938
#define SOAP_IO_STORE
Definition: stdsoap2.h:1345
#define SOAP_POST_FILE
Definition: stdsoap2.h:1316

+ Here is the call graph for this function:

int soap_put_connect ( struct soap ,
const char *  endpoint,
const char *  action,
const char *  type 
)
245 { if ((soap->omode & SOAP_IO) != SOAP_IO_CHUNK) /* not chunking: store in buf */
247  soap->http_content = type;
248  return soap_connect_command(soap, SOAP_PUT, endpoint, action);
249 }
Definition: stdsoap2.h:1933
#define SOAP_IO
Definition: stdsoap2.h:1342
#define SOAP_IO_CHUNK
Definition: stdsoap2.h:1346
const char * http_content
Definition: stdsoap2.h:1943
SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap *soap, int http_command, const char *endpoints, const char *action)
Definition: stdsoap2.cpp:15698
soap_mode omode
Definition: stdsoap2.h:1938
#define SOAP_PUT
Definition: stdsoap2.h:1318
#define SOAP_IO_STORE
Definition: stdsoap2.h:1345

+ Here is the call graph for this function:

Variable Documentation

const char http_post_id[]