summaryrefslogtreecommitdiff
path: root/lib/mime.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-09-05 11:45:21 +0200
committerPatrick Monnerat <patrick@monnerat.net>2017-09-05 17:33:16 +0100
commit9926357b428a6ecba27cadbe5b31675130ca8fb3 (patch)
tree4d94733bd2a1a2fdfa0ff2f27560dfa042c408c0 /lib/mime.h
parent295ce716a2eb874e938bb4791b6e53703c56db7e (diff)
downloadcurl-9926357b428a6ecba27cadbe5b31675130ca8fb3.tar.gz
mime: unified to use the typedef'd mime structs everywhere
... and slightly edited to follow our code style better.
Diffstat (limited to 'lib/mime.h')
-rw-r--r--lib/mime.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/lib/mime.h b/lib/mime.h
index 4d52b72fb..369f9774d 100644
--- a/lib/mime.h
+++ b/lib/mime.h
@@ -63,56 +63,56 @@ enum mimestrategy {
/* Mime readback state. */
struct mime_state {
enum mimestate state; /* Current state token. */
- void * ptr; /* State-dependent pointer. */
- size_t offset; /* State-dependent offset. */
+ void *ptr; /* State-dependent pointer. */
+ size_t offset; /* State-dependent offset. */
};
/* A mime context. */
-struct Curl_mime {
- struct Curl_easy * easy; /* The associated easy handle. */
- struct Curl_mimepart * parent; /* Parent part. */
- struct Curl_mimepart * firstpart; /* First part. */
- struct Curl_mimepart * lastpart; /* Last part. */
- char * boundary; /* The part boundary. */
- struct mime_state state; /* Current readback state. */
+struct curl_mime_s {
+ struct Curl_easy *easy; /* The associated easy handle. */
+ curl_mimepart *parent; /* Parent part. */
+ curl_mimepart *firstpart; /* First part. */
+ curl_mimepart *lastpart; /* Last part. */
+ char *boundary; /* The part boundary. */
+ struct mime_state state; /* Current readback state. */
};
/* A mime part. */
-struct Curl_mimepart {
- struct Curl_easy * easy; /* The associated easy handle. */
- struct Curl_mime * parent; /* Parent mime structure. */
- struct Curl_mimepart * nextpart; /* Forward linked list. */
- enum mimekind kind; /* The part kind. */
- char * data; /* Memory data or file name. */
- curl_read_callback readfunc; /* Read function. */
- curl_seek_callback seekfunc; /* Seek function. */
- curl_free_callback freefunc; /* Argument free function. */
- void * arg; /* Argument to callback functions. */
- FILE * namedfp; /* Named file pointer. */
- struct curl_slist * curlheaders; /* Part headers. */
- struct curl_slist * userheaders; /* Part headers. */
- char * mimetype; /* Part mime type. */
- char * filename; /* Remote file name. */
- char * name; /* Data name. */
- size_t namesize; /* Data name size. */
- curl_off_t origin; /* Origin file offset. */
- curl_off_t datasize; /* Expected data size. */
- unsigned int flags; /* Flags. */
- struct mime_state state; /* Current readback state. */
+struct curl_mimepart_s {
+ struct Curl_easy *easy; /* The associated easy handle. */
+ curl_mime *parent; /* Parent mime structure. */
+ curl_mimepart *nextpart; /* Forward linked list. */
+ enum mimekind kind; /* The part kind. */
+ char *data; /* Memory data or file name. */
+ curl_read_callback readfunc; /* Read function. */
+ curl_seek_callback seekfunc; /* Seek function. */
+ curl_free_callback freefunc; /* Argument free function. */
+ void *arg; /* Argument to callback functions. */
+ FILE *namedfp; /* Named file pointer. */
+ struct curl_slist *curlheaders; /* Part headers. */
+ struct curl_slist *userheaders; /* Part headers. */
+ char *mimetype; /* Part mime type. */
+ char *filename; /* Remote file name. */
+ char *name; /* Data name. */
+ size_t namesize; /* Data name size. */
+ curl_off_t origin; /* Origin file offset. */
+ curl_off_t datasize; /* Expected data size. */
+ unsigned int flags; /* Flags. */
+ struct mime_state state; /* Current readback state. */
};
/* Prototypes. */
-void Curl_mime_initpart(struct Curl_mimepart *part, struct Curl_easy *easy);
-void Curl_mime_cleanpart(struct Curl_mimepart *part);
-CURLcode Curl_mime_prepare_headers(struct Curl_mimepart *part,
+void Curl_mime_initpart(curl_mimepart *part, struct Curl_easy *easy);
+void Curl_mime_cleanpart(curl_mimepart *part);
+CURLcode Curl_mime_prepare_headers(curl_mimepart *part,
const char *contenttype,
const char *disposition,
enum mimestrategy strategy);
-curl_off_t Curl_mime_size(struct Curl_mimepart *part);
+curl_off_t Curl_mime_size(curl_mimepart *part);
size_t Curl_mime_read(char *buffer, size_t size, size_t nitems,
void *instream);
-CURLcode Curl_mime_rewind(struct Curl_mimepart *part);
+CURLcode Curl_mime_rewind(curl_mimepart *part);
CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...);
CURLcode Curl_mime_file(curl_mimepart *part, FILE *fp, int closewhendone);