1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 2008 Red Hat, Inc. 4 */ 5 6 #ifndef __SOUP_MULTIPART_H__ 7 #define __SOUP_MULTIPART_H__ 1 8 9 #include <libsoup/soup-types.h> 10 #include <libsoup/soup-message-body.h> 11 #include <libsoup/soup-message-headers.h> 12 13 G_BEGIN_DECLS 14 15 typedef struct SoupMultipart SoupMultipart; 16 17 SOUP_AVAILABLE_IN_2_26 18 GType soup_multipart_get_type (void); 19 #define SOUP_TYPE_MULTIPART (soup_multipart_get_type ()) 20 21 SOUP_AVAILABLE_IN_2_26 22 SoupMultipart *soup_multipart_new (const char *mime_type); 23 SOUP_AVAILABLE_IN_2_26 24 SoupMultipart *soup_multipart_new_from_message (SoupMessageHeaders *headers, 25 SoupMessageBody *body); 26 27 SOUP_AVAILABLE_IN_2_26 28 int soup_multipart_get_length (SoupMultipart *multipart); 29 SOUP_AVAILABLE_IN_2_26 30 gboolean soup_multipart_get_part (SoupMultipart *multipart, 31 int part, 32 SoupMessageHeaders **headers, 33 SoupBuffer **body); 34 35 SOUP_AVAILABLE_IN_2_26 36 void soup_multipart_append_part (SoupMultipart *multipart, 37 SoupMessageHeaders *headers, 38 SoupBuffer *body); 39 40 SOUP_AVAILABLE_IN_2_26 41 void soup_multipart_append_form_string (SoupMultipart *multipart, 42 const char *control_name, 43 const char *data); 44 SOUP_AVAILABLE_IN_2_26 45 void soup_multipart_append_form_file (SoupMultipart *multipart, 46 const char *control_name, 47 const char *filename, 48 const char *content_type, 49 SoupBuffer *body); 50 51 SOUP_AVAILABLE_IN_2_26 52 void soup_multipart_to_message (SoupMultipart *multipart, 53 SoupMessageHeaders *dest_headers, 54 SoupMessageBody *dest_body); 55 56 SOUP_AVAILABLE_IN_2_26 57 void soup_multipart_free (SoupMultipart *multipart); 58 59 G_END_DECLS 60 61 #endif /* __SOUP_MULTIPART_H__ */ 62