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

Go to the source code of this file.

Classes

struct  http_get_data
 

Macros

#define HTTP_GET_ID   "HTTP-GET-1.1" /* plugin identification */
 

Functions

int http_get (struct soap *, struct soap_plugin *, void *)
 
int soap_get_connect (struct soap *, const char *, const char *)
 
char * query (struct soap *)
 
char * query_key (struct soap *, char **)
 
char * query_val (struct soap *, char **)
 
int soap_encode_string (const char *, char *, size_t)
 
const char * soap_decode_string (char *, size_t, const char *)
 

Variables

const char http_get_id []
 

Macro Definition Documentation

#define HTTP_GET_ID   "HTTP-GET-1.1" /* plugin identification */

Function Documentation

int http_get ( struct soap ,
struct soap_plugin ,
void *   
)
155 { p->id = http_get_id;
156  p->data = (void*)malloc(sizeof(struct http_get_data));
157  /* p->fcopy = http_get_copy; obsolete, see note with http_get_copy() */
158  p->fdelete = http_get_delete;
159  if (p->data)
160  if (http_get_init(soap, (struct http_get_data*)p->data, (int (*)(struct soap*))arg))
161  { free(p->data); /* error: could not init */
162  return SOAP_EOM; /* return error */
163  }
164  return SOAP_OK;
165 }
Definition: httpget.h:63
Definition: stdsoap2.h:1933
static void http_get_delete(struct soap *soap, struct soap_plugin *p)
Definition: httpget.cpp:187
static int http_get_init(struct soap *soap, struct http_get_data *data, int(*handler)(struct soap *))
Definition: httpget.cpp:167
const char http_get_id[13]
Definition: httpget.cpp:148
internal::NamedArg< char > arg(StringRef name, const T &arg)
Definition: format.h:3248
#define SOAP_OK
Definition: stdsoap2.h:1245
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:

char* query ( struct soap )
245 { return strchr(soap->path, '?');
246 }
Definition: stdsoap2.h:1933
char path[SOAP_TAGLEN]
Definition: stdsoap2.h:2093

+ Here is the caller graph for this function:

char* query_key ( struct soap ,
char **   
)
249 { char *t = *s;
250  if (t && *t)
251  { *s = (char*)soap_decode_string(t, strlen(t), t + 1);
252  return t;
253  }
254  return *s = NULL;
255 }
const char * soap_decode_string(char *buf, size_t len, const char *val)
Definition: httpget.cpp:294
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the call graph for this function:

char* query_val ( struct soap ,
char **   
)
258 { char *t = *s;
259  if (t && *t == '=')
260  { *s = (char*)soap_decode_string(t, strlen(t), t + 1);
261  return t;
262  }
263  return NULL;
264 }
const char * soap_decode_string(char *buf, size_t len, const char *val)
Definition: httpget.cpp:294
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the call graph for this function:

const char* soap_decode_string ( char *  ,
size_t  ,
const char *   
)
295 { const char *s;
296  char *t;
297  for (s = val; *s; s++)
298  if (*s != ' ' && *s != '=')
299  break;
300  if (*s == '"')
301  { t = buf;
302  s++;
303  while (*s && *s != '"' && --len)
304  *t++ = *s++;
305  *t = '\0';
306  do s++;
307  while (*s && *s != '&' && *s != '=');
308  }
309  else
310  { t = buf;
311  while (*s && *s != '&' && *s != '=' && --len)
312  { switch (*s)
313  { case '+':
314  *t++ = ' ';
315  case ' ':
316  s++;
317  break;
318  case '%':
319  *t++ = ((s[1] >= 'A' ? (s[1]&0x7) + 9 : s[1] - '0') << 4) + (s[2] >= 'A' ? (s[2]&0x7) + 9 : s[2] - '0');
320  s += 3;
321  break;
322  default:
323  *t++ = *s++;
324  }
325  }
326  *t = '\0';
327  }
328  return s;
329 }

+ Here is the caller graph for this function:

int soap_encode_string ( const char *  ,
char *  ,
size_t   
)
267 { register int c;
268  register size_t n = len;
269  while ((c = *s++) && n-- > 1)
270  { if (c == ' ')
271  *t++ = '+';
272  else if (c == '!'
273  || c == '$'
274  || (c >= '(' && c <= '.')
275  || (c >= '0' && c <= '9')
276  || (c >= 'A' && c <= 'Z')
277  || c == '_'
278  || (c >= 'a' && c <= 'z'))
279  *t++ = (char)c;
280  else if (n > 2)
281  { *t++ = '%';
282  *t++ = (char)((c >> 4) + (c > 159 ? '7' : '0'));
283  c &= 0xF;
284  *t++ = (char)(c + (c > 9 ? '7' : '0'));
285  n -= 2;
286  }
287  else
288  break;
289  }
290  *t = '\0';
291  return len - n;
292 }
int soap_get_connect ( struct soap ,
const char *  ,
const char *   
)
241 { return soap_connect_command(soap, SOAP_GET, endpoint, action);
242 }
Definition: stdsoap2.h:1933
#define SOAP_GET
Definition: stdsoap2.h:1317
SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap *soap, int http_command, const char *endpoints, const char *action)
Definition: stdsoap2.cpp:15698

+ Here is the call graph for this function:

Variable Documentation

const char http_get_id[]