summaryrefslogtreecommitdiffstats
path: root/libcsoap/soap-ctx.h
diff options
context:
space:
mode:
authorGravatar snowdrop2004-11-01 15:16:22 +0000
committerGravatar snowdrop2004-11-01 15:16:22 +0000
commitc28397f760d22a1e8be126725ff7784b2d8fec23 (patch)
treed1d09522031049fda25d5d98deb9a6aa6b7bcfc7 /libcsoap/soap-ctx.h
parent581c961c5b8e511a89addca064f372103d2400ee (diff)
downloadcsoap-c28397f760d22a1e8be126725ff7784b2d8fec23.tar.gz
csoap-c28397f760d22a1e8be126725ff7784b2d8fec23.tar.bz2
added soap_ctx_add_file()
Diffstat (limited to 'libcsoap/soap-ctx.h')
-rwxr-xr-xlibcsoap/soap-ctx.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/libcsoap/soap-ctx.h b/libcsoap/soap-ctx.h
index 0aa8520..a55f18f 100755
--- a/libcsoap/soap-ctx.h
+++ b/libcsoap/soap-ctx.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-ctx.h,v 1.3 2004/10/29 09:27:05 snowdrop Exp $
+ * $Id: soap-ctx.h,v 1.4 2004/11/01 15:16:26 snowdrop Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -28,6 +28,10 @@
#include <libcsoap/soap-env.h>
#include <nanohttp/nanohttp-common.h>
+
+#define SOAP_ERROR_NO_FILE_ATTACHED 4001
+#define SOAP_ERROR_EMPTY_ATTACHMENT 4002
+
#define MAX_HREF_SIZE 150
typedef struct _SoapCtx
@@ -39,6 +43,21 @@ typedef struct _SoapCtx
SoapCtx* soap_ctx_new(SoapEnv *env); /* should only be used internally */
+/**
+ Returns the attached file if any found.
+ @param ctx the SoapCtx object which should contain the part
+ @param 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.
+
+*/
+part_t *soap_ctx_get_file(SoapCtx* ctx, xmlNodePtr node);
+
+/**
+ Creates a new soap context object.
+*/
+herror_t soap_ctx_new_with_method(const char *urn, const char *method, SoapCtx **out);
+
/* Size of destination dest_href should be MAX_HREF_SIZE */
herror_t soap_ctx_add_file(SoapCtx* ctx, const char* filename, const char* content_type, char *dest_href);
/*