1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 * camel-signed--multipart.h : class for a signed-multipart
4 * Authors: Michael Zucchi <notzed@ximian.com>
6 * Copyright 2002 Ximian, Inc. (www.ximian.com)
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU Lesser General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
23 /* Should this be a subclass of multipart?
24 No, because we dont have different parts?
25 I'm not really sure yet ... ? */
27 #ifndef CAMEL_MULTIPART_SIGNED_H
28 #define CAMEL_MULTIPART_SIGNED_H 1
30 #include <camel/camel-multipart.h>
32 #define CAMEL_MULTIPART_SIGNED_TYPE (camel_multipart_signed_get_type ())
33 #define CAMEL_MULTIPART_SIGNED(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSigned))
34 #define CAMEL_MULTIPART_SIGNED_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSignedClass))
35 #define CAMEL_IS_MULTIPART_SIGNED(o) (CAMEL_CHECK_TYPE((o), CAMEL_MULTIPART_SIGNED_TYPE))
41 CAMEL_MULTIPART_EMPTY,
42 CAMEL_MULTIPART_CONST,
48 /* 'handy' enums for getting the internal parts of the multipart */
50 CAMEL_MULTIPART_SIGNED_CONTENT,
51 CAMEL_MULTIPART_SIGNED_SIGNATURE,
54 typedef struct _CamelMultipartSigned CamelMultipartSigned;
56 struct _CamelMultipartSigned
58 CamelMultipart parent_object;
60 /* these are the client visible parts, decoded forms of our data wrapper content */
61 CamelMimePart *content;
62 CamelMimePart *signature;
64 /* the raw content which must go over the wire, if we have generated it */
65 /* perhaps this should jsut set data_wrapper->stream and update start1/end1 accordingly, as it is done
66 for other parts, or visa versa? */
67 CamelStream *contentraw;
71 /* just cache some info we use */
75 /* offset pointers of start of boundary in content object */
81 CamelMultipartClass parent_class;
82 } CamelMultipartSignedClass;
84 /* Standard Camel function */
85 CamelType camel_multipart_signed_get_type (void);
88 CamelMultipartSigned *camel_multipart_signed_new (void);
90 CamelStream *camel_multipart_signed_get_content_stream(CamelMultipartSigned *mps, CamelException *ex);
94 #endif /* CAMEL_MULTIPART_SIGNED_H */