#include <stdsoap2.h>Go to the source code of this file.
Data Structures | |
| struct | jasperserver_attachment |
Typedefs | |
| typedef jasperserver_attachment | jasperserver_attachment_t |
Functions | |
| int | jasperserver_attach_file (struct soap *soapPtr, const char *fileName) |
| Attach a file to a soap struct previously created and initiated. | |
| void * | jasperserver_dime_read_open (struct soap *soap, void *handle, const char *id, const char *type, const char *options) |
| Callback function to open a file to read. | |
| void | jasperserver_dime_read_close (struct soap *soap, void *handle) |
| Callback function to close the attached file. | |
| size_t | jasperserver_dime_read (struct soap *soap, void *handle, char *buf, size_t len) |
| Callback function to read bytes from a file. | |
| int | jasperserver_read_file (const char *fileName, char **dataPtr, size_t *sizePtr) |
| Allocate a buffer and put into that the content of a file. | |
| typedef struct jasperserver_attachment jasperserver_attachment_t |
| int jasperserver_attach_file | ( | struct soap * | soapPtr, | |
| const char * | fileName | |||
| ) |
Attach a file to a soap struct previously created and initiated.
This function provides an easy way to add an attachment to a SOAP request. The file is streamed using the mechanism provided by gSOAP. A struct jasperserver_attachment is created to keep track of the FILE* opened. That structure will be passed to the callback functions to open, read and close the file.
| soapPtr | A pointer to the struct soap | |
| fileName | The file name to attach |
Definition at line 25 of file attachment.c.
| size_t jasperserver_dime_read | ( | struct soap * | soap, | |
| void * | handle, | |||
| char * | buf, | |||
| size_t | len | |||
| ) |
Callback function to read bytes from a file.
This function is used as callback for the gSoap file streaming mechanism. This funcion is used by jasperserver_attach_file and it should not be called directly by the user.
| soap | A pointer to the struct soap | |
| handle | It is a ready FILE pointer | |
| buf | Buffer to store the read bytes | |
| len | Number of bytes to read |
Definition at line 90 of file attachment.c.
| void jasperserver_dime_read_close | ( | struct soap * | soap, | |
| void * | handle | |||
| ) |
Callback function to close the attached file.
This function is used as callback for the gSoap file streaming mechanism. This funcion is used by jasperserver_attach_file and it should not be called directly by the user.
| soap | A pointer to the struct soap | |
| handle | It is a FILE pointer | |
| id | Not used | |
| type | Not used | |
| options | Not used |
Definition at line 83 of file attachment.c.
| void* jasperserver_dime_read_open | ( | struct soap * | soap, | |
| void * | handle, | |||
| const char * | id, | |||
| const char * | type, | |||
| const char * | options | |||
| ) |
Callback function to open a file to read.
This function is used as callback for the gSoap file streaming mechanism. This funcion is used by jasperserver_attach_file and it should not be called directly by the user.
| soap | A pointer to the struct soap | |
| handle | It is a ready FILE pointer | |
| id | Not used | |
| type | Not used | |
| options | Not used |
Definition at line 76 of file attachment.c.
| int jasperserver_read_file | ( | const char * | fileName, | |
| char ** | dataPtr, | |||
| size_t * | sizePtr | |||
| ) |
Allocate a buffer and put into that the content of a file.
This function is currently not used. The user is responsible to free the data allocated to read the file with free(*dataPtr)
| fileName | A file to read | |
| dataPtr | A pointer to a data pointer (char **). | |
| sizePtr | Pointer to a size_t to save the size of the allocated buffer |
Definition at line 99 of file attachment.c.
1.5.2