aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-08-21 13:18:07 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-08-21 13:18:07 +0000
commit08655d8d5d0ea980227096366c231693198e61d6 (patch)
tree580291c13caa05196681b328a70f4658a91eecfc /include
parent3e5dbac7a2f13de110a5c9244d89901e0a755652 (diff)
Georg Huettenegger's patch curl-7.8.1-pre5-patch-20010819
Diffstat (limited to 'include')
-rw-r--r--include/curl/curl.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 2f64a79df..0c92d7395 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -59,12 +59,15 @@ struct HttpPost {
struct HttpPost *next; /* next entry in the list */
char *name; /* pointer to allocated name */
char *contents; /* pointer to allocated data contents */
+ long contentslength; /* length of contents field */
char *contenttype; /* Content-Type */
struct HttpPost *more; /* if one field name has more than one file, this
link should link to following files */
long flags; /* as defined below */
#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */
#define HTTPPOST_READFILE (1<<1) /* specified content is a file name */
+#define HTTPPOST_PTRCONTENTS (1<<2) /* contents is only stored pointer
+ do not free in formfree */
};
typedef int (*curl_progress_callback)(void *clientp,
@@ -483,6 +486,32 @@ int curl_formparse(char *string,
struct HttpPost **httppost,
struct HttpPost **last_post);
+/* name is uppercase CURLFORM_<name> */
+#ifdef CFINIT
+#undef CFINIT
+#endif
+#define CFINIT(name) CURLFORM_ ## name
+
+typedef enum {
+ CFINIT(NOTHING), /********* the first one is unused ************/
+
+ /* */
+ CFINIT(COPYNAME),
+ CFINIT(COPYCONTENTS),
+ CFINIT(PTRCONTENTS),
+ CFINIT(CONTENTSLENGTH),
+ CFINIT(FILE),
+ CFINIT(CONTENTTYPE),
+ CFINIT(END),
+
+ CURLFORM_LASTENTRY /* the last unusued */
+} CURLformoption;
+
+/* new external form function */
+int curl_formadd(struct HttpPost **httppost,
+ struct HttpPost **last_post,
+ ...);
+
/* cleanup a form: */
void curl_formfree(struct HttpPost *form);
@@ -495,8 +524,8 @@ char *curl_version(void);
/* Escape and unescape URL encoding in strings. The functions return a new
* allocated string or NULL if an error occurred. */
-char *curl_escape(char *string, int length);
-char *curl_unescape(char *string, int length);
+char *curl_escape(const char *string, int length);
+char *curl_unescape(const char *string, int length);
/* curl_global_init() should be invoked exactly once for each application that
uses libcurl */
@@ -507,8 +536,8 @@ CURLcode curl_global_init(long flags);
void curl_global_cleanup(void);
/* This is the version number */
-#define LIBCURL_VERSION "7.8.1"
-#define LIBCURL_VERSION_NUM 0x070801
+#define LIBCURL_VERSION "7.8.2-pre1"
+#define LIBCURL_VERSION_NUM 0x070802
/* linked-list structure for the CURLOPT_QUOTE option (and other) */
struct curl_slist {