Genivia - curlapi.c File Reference

|  | Home | Documentation | curlapi.c File Reference updated Tue Jan 15 2019 by Robert van Engelen |

- Main Page
- Classes
- Files

- File List
- File Members

Functions | Variables
curlapi.c File Reference
`#include "curlapi.h"`
Include dependency graph for curlapi.c:

## Functions
static int | soap_curl_init (struct soap *soap, struct soap_curl_data *data, CURL *curl)
static void | soap_curl_delete (struct soap *soap, struct soap_plugin *p)
| Deletes plugin data. More...
static int | soap_curl_connect_callback (struct soap *soap, const char *endpoint, const char *host, int port)
| The fconnect callback invokes this function to override connecting to an endpoint. More...
static int | soap_curl_send_callback (struct soap *soap, const char *buf, size_t len)
| The fsend callback invokes this function to override sending data by saving in a blist. More...
static int | soap_curl_prepare_init_recv_callback (struct soap *soap)
| The fprepareinitrecv callback invokes this function to override the start of receiving data and ending of sending. More...
static int | soap_curl_prepare_final_recv_callback (struct soap *soap)
| The fpreparefinalrecv callback resets the recv callback. More...
static size_t | soap_curl_recv_callback (struct soap *soap, char *buf, size_t size)
| The frecv callback invokes this function to override receiving data that is stored in a blist. More...
static size_t | soap_curl_read_callback (void *buffer, size_t size, size_t nitems, void *ptr)
| The CURL read callback invokes this function to read data to send. More...
static size_t | soap_curl_write_callback (void *buffer, size_t size, size_t nitems, void *ptr)
| The CURL write callback invokes this function to write data that was received. More...
SOAP_FMAC1 int SOAP_FMAC2 | soap_curl (struct soap *soap, struct soap_plugin *p, void *arg)
| Plugin registry function, used with soap_register_plugin and soap_register_plugin_arg. More...
SOAP_FMAC1 void SOAP_FMAC2 | soap_curl_reset (struct soap *soap)
| Reset the plugin so gSOAP IO behaves normally. This is an optional API call, not required except when serializing data after an error. More...

## Variables
const char | soap_curl_id [] = SOAP_CURL_ID

## Function Documentation

SOAP_FMAC1 int SOAP_FMAC2 soap_curl | ( | struct soap * | soap,
|  | struct soap_plugin * | p,
|  | void * | arg
| ) |  |

Plugin registry function, used with soap_register_plugin and soap_register_plugin_arg.

Parameters

  | soap | context
  [in,out] | p | plugin created in registry
  [in] | arg | passed from soap_register_plugin_arg

Returns
  SOAP_OK

static int soap_curl_connect_callback | ( | struct soap * | soap,
|  | const char * | endpoint,
|  | const char * | host,
|  | int | port
| ) |  |
| static

The fconnect callback invokes this function to override connecting to an endpoint.

Parameters

  soap | context
  endpoint | URL to connect to, use "" if the CURL handle has a URL assigned with CURLOPT_URL
  host | not used
  port | not used

Returns
  SOAP_OK or error code

static void soap_curl_delete | ( | struct soap * | soap,
|  | struct soap_plugin * | p
| ) |  |
| static

Deletes plugin data.

Parameters

  | soap | context
  [in,out] | p | plugin

static int soap_curl_init | ( | struct soap * | soap,
|  | struct soap_curl_data * | data,
|  | CURL * | curl
| ) |  |
| static

static int soap_curl_prepare_final_recv_callback | ( | struct soap * | soap | ) |
| static

The fpreparefinalrecv callback resets the recv callback.

Parameters

  soap | context

Returns
  SOAP_OK or error code

static int soap_curl_prepare_init_recv_callback | ( | struct soap * | soap | ) |
| static

The fprepareinitrecv callback invokes this function to override the start of receiving data and ending of sending.

Parameters

  soap | context

Returns
  SOAP_OK or error code

static size_t soap_curl_read_callback | ( | void * | buffer,
|  | size_t | size,
|  | size_t | nitems,
|  | void * | ptr
| ) |  |
| static

The CURL read callback invokes this function to read data to send.

Parameters

  buffer | read data into this buffer, buffer is size*nitems large.
  size |
  nitems |
  ptr | points to soap_curl_data plugin data

Returns
  number of bytes read, 0 for end or error

static size_t soap_curl_recv_callback | ( | struct soap * | soap,
|  | char * | buf,
|  | size_t | size
| ) |  |
| static

The frecv callback invokes this function to override receiving data that is stored in a blist.

Parameters

  soap | context
  buf | receive in this buffer
  size | buffer size

Returns
  number of bytes read, 0 for end or error

SOAP_FMAC1 void SOAP_FMAC2 soap_curl_reset | ( | struct soap * | soap | ) |

Reset the plugin so gSOAP IO behaves normally. This is an optional API call, not required except when serializing data after an error.

Parameters

  soap | context

static int soap_curl_send_callback | ( | struct soap * | soap,
|  | const char * | buf,
|  | size_t | len
| ) |  |
| static

The fsend callback invokes this function to override sending data by saving in a blist.

Parameters

  soap | context
  buf | data to send
  len | number of bytes to send

Returns
  SOAP_OK or error code

static size_t soap_curl_write_callback | ( | void * | buffer,
|  | size_t | size,
|  | size_t | nitems,
|  | void * | ptr
| ) |  |
| static

The CURL write callback invokes this function to write data that was received.

Parameters

  buffer | data to write of size*nitems bytes total.
  size |
  nitems |
  ptr | points to soap_curl_data plugin data

Returns
  number of bytes written, 0 for error

## Variable Documentation

const char soap_curl_id[] = SOAP_CURL_ID

Plugin identification for plugin registry