soap-ctx.c File Reference

#include <libxml/tree.h>
#include <nanohttp/nanohttp-error.h>
#include <nanohttp/nanohttp-common.h>
#include <nanohttp/nanohttp-logging.h>
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"

Go to the source code of this file.

Functions

SoapCtxsoap_ctx_new (struct SoapEnv *env)
void soap_ctx_add_files (struct SoapCtx *ctx, struct attachments_t *attachments)
herror_t soap_ctx_add_file (struct SoapCtx *ctx, const char *filename, const char *content_type, char *dest_href)
part_tsoap_ctx_get_file (struct SoapCtx *ctx, xmlNodePtr node)
void soap_ctx_free (struct SoapCtx *ctx)
herror_t soap_ctx_new_with_method (const char *urn, const char *method, struct SoapCtx **out)


Function Documentation

herror_t soap_ctx_add_file struct SoapCtx ctx,
const char *  filename,
const char *  content_type,
char *  dest_href
 

Size of destination dest_href should be MAX_HREF_SIZE

Definition at line 91 of file soap-ctx.c.

References SoapCtx::attachments, attachments_add_part(), attachments_new(), FILE_ERROR_OPEN, H_OK, herror_new(), and part_new().

Referenced by soap_ctx_add_files().

void soap_ctx_add_files struct SoapCtx ctx,
struct attachments_t attachments
 

Used internally. Will switch the deleteOnExit flag from the given one to the added part.

Definition at line 72 of file soap-ctx.c.

References part_t::content_type, part_t::filename, MAX_HREF_SIZE, part_t::next, attachments_t::parts, and soap_ctx_add_file().

void soap_ctx_free struct SoapCtx ctx  ) 
 

Definition at line 160 of file soap-ctx.c.

References SoapCtx::attachments, attachments_free(), SoapCtx::env, and soap_env_free().

Referenced by soap_nudp_server_run().

struct part_t* soap_ctx_get_file struct SoapCtx ctx,
xmlNodePtr  node
 

Returns the attached file if any found.

Parameters:
ctx the SoapCtx object which should contain the part
node the xml node which points to a file via the "href" xml attribute
Returns:
a part_t object of attachment was found, NULL otherwise.

Definition at line 120 of file soap-ctx.c.

References SoapCtx::attachments, part_t::id, part_t::location, MAX_HREF_SIZE, part_t::next, and attachments_t::parts.

struct SoapCtx* soap_ctx_new struct SoapEnv env  ) 
 

should only be used internally

Definition at line 55 of file soap-ctx.c.

References SoapCtx::attachments, SoapCtx::env, and log_error2.

Referenced by soap_ctx_new_with_method(), soap_nudp_server_run(), and soap_server_process().

herror_t soap_ctx_new_with_method const char *  urn,
const char *  method,
struct SoapCtx **  out
 

Creates a new soap context object.

Definition at line 177 of file soap-ctx.c.

References H_OK, soap_ctx_new(), and soap_env_new_with_method().


Generated on Thu Jan 25 23:36:04 2007 for csoap by  doxygen 1.4.6