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
13G_BEGIN_DECLS
14
15typedef struct SoupMultipart SoupMultipart;
16
17SOUP_AVAILABLE_IN_2_26
18GType soup_multipart_get_type (void);
19#define SOUP_TYPE_MULTIPART (soup_multipart_get_type ())
20
21SOUP_AVAILABLE_IN_2_26
22SoupMultipart *soup_multipart_new (const char *mime_type);
23SOUP_AVAILABLE_IN_2_26
24SoupMultipart *soup_multipart_new_from_message (SoupMessageHeaders *headers,
25 SoupMessageBody *body);
26
27SOUP_AVAILABLE_IN_2_26
28int soup_multipart_get_length (SoupMultipart *multipart);
29SOUP_AVAILABLE_IN_2_26
30gboolean soup_multipart_get_part (SoupMultipart *multipart,
31 int part,
32 SoupMessageHeaders **headers,
33 SoupBuffer **body);
34
35SOUP_AVAILABLE_IN_2_26
36void soup_multipart_append_part (SoupMultipart *multipart,
37 SoupMessageHeaders *headers,
38 SoupBuffer *body);
39
40SOUP_AVAILABLE_IN_2_26
41void soup_multipart_append_form_string (SoupMultipart *multipart,
42 const char *control_name,
43 const char *data);
44SOUP_AVAILABLE_IN_2_26
45void 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
51SOUP_AVAILABLE_IN_2_26
52void soup_multipart_to_message (SoupMultipart *multipart,
53 SoupMessageHeaders *dest_headers,
54 SoupMessageBody *dest_body);
55
56SOUP_AVAILABLE_IN_2_26
57void soup_multipart_free (SoupMultipart *multipart);
58
59G_END_DECLS
60
61#endif /* __SOUP_MULTIPART_H__ */
62