|  | Home | Documentation | curlapi.c File Reference updated by Robert van Engelen |

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.
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.
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.
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.
static int | soap_curl_prepare_final_recv_callback (struct soap *soap)
| The fpreparefinalrecv callback resets the recv callback.
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.
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.
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.
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.
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.

## Variables

const char | soap_curl_id [] = SOAP_CURL_ID

## Function Documentation

## ◆ soap_curl()

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

## ◆ soap_curl_connect_callback()

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

## ◆ soap_curl_delete()

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

static

Deletes plugin data.

Parameters

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

## ◆ soap_curl_init()

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

static

## ◆ soap_curl_prepare_final_recv_callback()

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

## ◆ soap_curl_prepare_init_recv_callback()

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

## ◆ soap_curl_read_callback()

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

## ◆ soap_curl_recv_callback()

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_curl_reset()

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

## ◆ soap_curl_send_callback()

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

## ◆ soap_curl_write_callback()

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

## ◆ soap_curl_id

const char soap_curl_id[] = SOAP_CURL_ID

Plugin identification for plugin registry