1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* camel-signed--multipart.h : class for a signed-multipart 3 * 4 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 5 * 6 * This library is free software: you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published by 8 * the Free Software Foundation. 9 * 10 * This library is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 13 * for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this library. If not, see <http://www.gnu.org/licenses/>. 17 * 18 * Authors: Michael Zucchi <notzed@ximian.com> 19 */ 20 21 /* Should this be a subclass of multipart? 22 * No, because we dont have different parts? 23 * I'm not really sure yet ... ? */ 24 25 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION) 26 #error "Only <camel/camel.h> can be included directly." 27 #endif 28 29 #ifndef CAMEL_MULTIPART_SIGNED_H 30 #define CAMEL_MULTIPART_SIGNED_H 31 32 #include <camel/camel-multipart.h> 33 34 /* Standard GObject macros */ 35 #define CAMEL_TYPE_MULTIPART_SIGNED \ 36 (camel_multipart_signed_get_type ()) 37 #define CAMEL_MULTIPART_SIGNED(obj) \ 38 (G_TYPE_CHECK_INSTANCE_CAST \ 39 ((obj), CAMEL_TYPE_MULTIPART_SIGNED, CamelMultipartSigned)) 40 #define CAMEL_MULTIPART_SIGNED_CLASS(cls) \ 41 (G_TYPE_CHECK_CLASS_CAST \ 42 ((cls), CAMEL_TYPE_MULTIPART_SIGNED, CamelMultipartSignedClass)) 43 #define CAMEL_IS_MULTIPART_SIGNED(obj) \ 44 (G_TYPE_CHECK_INSTANCE_TYPE \ 45 ((obj), CAMEL_TYPE_MULTIPART_SIGNED)) 46 #define CAMEL_IS_MULTIPART_SIGNED_CLASS(cls) \ 47 (G_TYPE_CHECK_CLASS_TYPE \ 48 ((cls), CAMEL_TYPE_MULTIPART_SIGNED)) 49 #define CAMEL_MULTIPART_SIGNED_GET_CLASS(obj) \ 50 (G_TYPE_INSTANCE_GET_CLASS \ 51 ((obj), CAMEL_TYPE_MULTIPART_SIGNED, CamelMultipartSignedClass)) 52 53 G_BEGIN_DECLS 54 55 /* 'handy' enums for getting the internal parts of the multipart */ 56 enum { 57 CAMEL_MULTIPART_SIGNED_CONTENT, 58 CAMEL_MULTIPART_SIGNED_SIGNATURE 59 }; 60 61 typedef struct _CamelMultipartSigned CamelMultipartSigned; 62 typedef struct _CamelMultipartSignedClass CamelMultipartSignedClass; 63 typedef struct _CamelMultipartSignedPrivate CamelMultipartSignedPrivate; 64 65 struct _CamelMultipartSigned { 66 CamelMultipart parent; 67 CamelMultipartSignedPrivate *priv; 68 }; 69 70 struct _CamelMultipartSignedClass { 71 CamelMultipartClass parent_class; 72 73 /* Padding for future expansion */ 74 gpointer reserved[20]; 75 }; 76 77 GType camel_multipart_signed_get_type (void) G_GNUC_CONST; 78 CamelMultipartSigned * 79 camel_multipart_signed_new (void); 80 CamelStream * camel_multipart_signed_get_content_stream 81 (CamelMultipartSigned *mps, 82 GError **error); 83 void camel_multipart_signed_set_content_stream 84 (CamelMultipartSigned *mps, 85 CamelStream *content_stream); 86 void camel_multipart_signed_set_signature 87 (CamelMultipartSigned *mps, 88 CamelMimePart *signature); 89 90 G_END_DECLS 91 92 #endif /* CAMEL_MULTIPART_SIGNED_H */ 93