1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2000-2012 Jeffrey Stedfast
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1
8 * of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef __GMIME_MESSAGE_PARTIAL_H__
23 #define __GMIME_MESSAGE_PARTIAL_H__
27 #include <gmime/gmime-part.h>
28 #include <gmime/gmime-message.h>
32 #define GMIME_TYPE_MESSAGE_PARTIAL (g_mime_message_partial_get_type ())
33 #define GMIME_MESSAGE_PARTIAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMIME_TYPE_MESSAGE_PARTIAL, GMimeMessagePartial))
34 #define GMIME_MESSAGE_PARTIAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMIME_TYPE_MESSAGE_PARTIAL, GMimeMessagePartialClass))
35 #define GMIME_IS_MESSAGE_PARTIAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMIME_TYPE_MESSAGE_PARTIAL))
36 #define GMIME_IS_MESSAGE_PARTIAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMIME_TYPE_MESSAGE_PARTIAL))
37 #define GMIME_MESSAGE_PARTIAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMIME_TYPE_MESSAGE_PARTIAL, GMimeMessagePartialClass))
39 typedef struct _GMimeMessagePartial GMimeMessagePartial;
40 typedef struct _GMimeMessagePartialClass GMimeMessagePartialClass;
43 * GMimeMessagePartial:
44 * @parent_object: parent #GMimePart object
45 * @number: the part number
46 * @total: the total number of message/partials that make up the whole message/rfc822
47 * @id: message/partial id
49 * A message/partial MIME part.
51 struct _GMimeMessagePartial {
52 GMimePart parent_object;
59 struct _GMimeMessagePartialClass {
60 GMimePartClass parent_class;
65 GType g_mime_message_partial_get_type (void);
67 GMimeMessagePartial *g_mime_message_partial_new (const char *id, int number, int total);
69 const char *g_mime_message_partial_get_id (GMimeMessagePartial *partial);
71 int g_mime_message_partial_get_number (GMimeMessagePartial *partial);
73 int g_mime_message_partial_get_total (GMimeMessagePartial *partial);
75 GMimeMessage *g_mime_message_partial_reconstruct_message (GMimeMessagePartial **partials, size_t num);
77 GMimeMessage **g_mime_message_partial_split_message (GMimeMessage *message, size_t max_size, size_t *nparts);
81 #endif /* __GMIME_MESSAGE_PARTIAL_H__ */