aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-data-wrapper.h
blob: ff4dda649fc98912e1d3cb5d8851a73c29aa5eca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* camel-data-wrapper.h : Abstract class for a data wrapper */

/*
 *
 * Author :
 *  Bertrand Guiheneuf <bertrand@helixcode.com>
 *
 * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */


#ifndef CAMEL_DATA_WRAPPER_H
#define CAMEL_DATA_WRAPPER_H 1


#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus }*/

#include <camel/camel-object.h>
#include <camel/gmime-content-field.h>

#define CAMEL_DATA_WRAPPER_TYPE     (camel_data_wrapper_get_type ())
#define CAMEL_DATA_WRAPPER(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapper))
#define CAMEL_DATA_WRAPPER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapperClass))
#define CAMEL_IS_DATA_WRAPPER(o)    (CAMEL_CHECK_TYPE((o), CAMEL_DATA_WRAPPER_TYPE))

struct _CamelDataWrapper
{
    CamelObject parent_object;

    GMimeContentField *mime_type;
    CamelStream *stream;
};

typedef struct {
    CamelObjectClass parent_class;

    /* Virtual methods */
    void                (*set_output_stream)      (CamelDataWrapper *data_wrapper,
                               CamelStream *stream);
    CamelStream *       (*get_output_stream)      (CamelDataWrapper *data_wrapper);

    void                (*set_mime_type)          (CamelDataWrapper *data_wrapper,
                               const gchar * mime_type);
    gchar *             (*get_mime_type)          (CamelDataWrapper *data_wrapper);
    GMimeContentField * (*get_mime_type_field)    (CamelDataWrapper *data_wrapper);
    void                (*set_mime_type_field)    (CamelDataWrapper *data_wrapper,
                               GMimeContentField *mime_type_field);

    int                 (*write_to_stream)        (CamelDataWrapper *data_wrapper,
                               CamelStream *stream);

    int                 (*construct_from_stream)  (CamelDataWrapper *data_wrapper,
                               CamelStream *);
} CamelDataWrapperClass;

/* Standard Camel function */
CamelType camel_data_wrapper_get_type (void);

/* public methods */
CamelDataWrapper *  camel_data_wrapper_new(void);
int                 camel_data_wrapper_write_to_stream          (CamelDataWrapper *data_wrapper,
                                 CamelStream *stream);
void                camel_data_wrapper_set_mime_type            (CamelDataWrapper *data_wrapper,
                                 const gchar *mime_type);
gchar *             camel_data_wrapper_get_mime_type            (CamelDataWrapper *data_wrapper);
GMimeContentField * camel_data_wrapper_get_mime_type_field      (CamelDataWrapper *data_wrapper);
void                camel_data_wrapper_set_mime_type_field      (CamelDataWrapper *data_wrapper,
                                 GMimeContentField *mime_type);

int                 camel_data_wrapper_construct_from_stream    (CamelDataWrapper *data_wrapper, CamelStream *stream);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* CAMEL_DATA_WRAPPER_H */
p;id=052dc6c6d3d559e5d4a366a55f786c6d6f963ebe'>Fix the build when Bonjour support is not enabled.marcus2008-05-211-0/+1 * * Update distinfo with new checksum. This distfile was re-rolled to fix amarcus2008-05-211-1/+2 * Fix the build with Sametime support is not desired.marcus2008-05-201-0/+1 * - Update to 1.0acm2008-05-193-543/+31 * Update to 2.4.2. See http://developer.pidgin.im/wiki/ChangeLog for the listmarcus2008-05-196-8/+21 * pidgin-twitter is a pidgin plugin to help twittering via pidgin. Thismiwi2008-05-184-0/+36 * - Fix missing file on installjadawin2008-05-172-1/+3 * Chase silc-toolkit update.wxs2008-05-161-2/+2 * - Update to 4.22.5-48-gc8acejadawin2008-05-142-4/+4 * - Update to 0.5apav2008-05-112-4/+4 * - Update to 4.22.5-36-gc1c0miwi2008-05-062-4/+4 * Add a missing dependency on libxml2.marcus2008-05-051-2/+2 * This is Paul Dwerryhouse's standalone version of Artemy Kapitula's manualsizepav2008-05-054-0/+38 * - Mark IGNORE, this version has moved to net/skypebeech2008-05-041-0/+2 * - Update to 0.6rafan2008-05-033-8/+8 * - Update to 2.0.0.68beech2008-05-036-220/+292 * - take over maintainership (mm)mm2008-04-302-2/+2 * - fix pidfile variable for rcmm2008-04-302-2/+3 * - Update to 2.1.24.1mm2008-04-302-5/+4 * - fix IPv6 support [1]mm2008-04-304-8/+62 * - Fix plistmiwi2008-04-301-1/+0 * update to version 0.3.2edwin2008-04-306-30/+234 * Update to 0.7.6.edwin2008-04-306-29/+33 * - Update to 0.9.5.2152miwi2008-04-302-5/+4 * 3dinoex2008-04-301-1/+1 * - Update to 3.5.1 [1]miwi2008-04-294-10/+8 * - Update to 4.22.5-34-g61aamiwi2008-04-293-21/+22 * - Update to 20080323rafan2008-04-276-44/+70 * - Update to 0.10.0.a.20080407rafan2008-04-273-5/+10 * - Chase libtelepathy updatepav2008-04-251-1/+1 * - Fix build after xorg cleanupmiwi2008-04-221-2/+2 * - Fix build after xorg cleanupmiwi2008-04-211-1/+2 * - Fix build after xorg cleanupmiwi2008-04-212-4/+4 * - Minor pkg-plist fixbeech2008-04-201-1/+0 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-2017-45/+39 * - Update to 3.5.0miwi2008-04-193-5/+43 * - Update to 0.9.7sat2008-04-192-6/+5 * - Update to 4.22.5clsung2008-04-182-4/+4 * - Update to latest snapshot release 4.22.5-4-g516eclsung2008-04-182-4/+4 * Fix startup script so openfire_javargs are respected.tmclaugh2008-04-182-2/+3 * - Take advantage of CPAN macro from bsd.sites.mk, change ${MASTER_SITE_PERL_C...araujo2008-04-1710-19/+10 * - Fix pkg-plistbeech2008-04-172-1/+3 * Update to 0.99.14ahze2008-04-164-21/+9 * Update to 0.3.2ahze2008-04-152-4/+4 * - Change master_sitesbeech2008-04-151-1/+2 * - Add dependency for libasound.so.2beech2008-04-152-4/+6 * - Update to 2.0.0.68beech2008-04-154-114/+147 * Change maintainers e-mail address.ehaupt2008-04-111-2/+2 * Add PTHREAD_LIBS to fix the build on < 7.X.marcus2008-04-101-0/+2 * - Move from versioned tcl/tk CATEGORIES to simple tcl and tk categoriespav2008-04-092-2/+2 * Update to 4.65ahze2008-04-092-4/+4 * - Mark as broken with new ocaml.stas2008-04-091-1/+2 * Update to 0.7.6ahze2008-04-082-5/+4 * - Attempt to unbreak INDEX, bsd.ocaml.mk moved to Mk/pav2008-04-071-1/+0 * - Remove use of sqlite3-threadsmnag2008-04-051-1/+2 * Update to 0.22.1.marcus2008-04-053-14/+11 * Update to 2.4.1. See http://developer.pidgin.im/wiki/ChangeLog for a listmarcus2008-04-042-4/+4 * Desupport 5.X for empathy. It doesn't build, and 5.X will be obsolete soonmarcus2008-04-031-1/+7 * Add another missing dependency on gnomepanel.marcus2008-04-031-2/+3 * Fix runtimeahze2008-03-312-0/+10 * - clean X11BASEdinoex2008-03-301-1/+1 * Don't try to remove icon dirs and python dirsahze2008-03-301-20/+2 * Add a missing dependency on libtelepathy.marcus2008-03-291-1/+3 * - Update to 0.9.9.5.trasz2008-03-262-4/+4 * Fix build on 6.X.marcus2008-03-261-3/+11 * Add a missing BUILD_DEPENDS on libxslt.marcus2008-03-261-1/+2 * Add a missing manpage.marcus2008-03-261-1/+3 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-266-6/+0 * Sort plist to fix plistahze2008-03-252-1/+2 * - adjust MASTER_SITES to an other server of mineitetcu2008-03-251-2/+2 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-252-2/+0 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-241-1/+0 * - Mark BROKEN on 5.x due to /usr/include/net/pfavr.hrafan2008-03-241-0/+4 * Add telepathy-mission-control, a Telepathy component which allowsmarcus2008-03-245-0/+159 * Add telepathy-haze, a libpurple connection manager for Telepathy.marcus2008-03-245-0/+41 * Add empathy, a GNOME IM client based around Telepathy.marcus2008-03-245-0/+474 * Update to 0.3.1.marcus2008-03-2418-139/+1175 * Update to 0.15.0.marcus2008-03-243-5/+14 * Update to 0.1.2.marcus2008-03-242-6/+5 * Update to 0.7.5.marcus2008-03-243-55/+61 * Update to 0.7.2.marcus2008-03-244-8/+18 * Update to 0.3.3.marcus2008-03-243-16/+19 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-232-2/+0 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-221-1/+0 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-222-2/+2 * - Remove USE_XLIB in favor of USE_XORGmiwi2008-03-211-1/+0 * - Connect net-im/centerim-develmiwi2008-03-211-0/+1 * - Update to 4.22.3-7-g21d2miwi2008-03-213-9/+11 * - Update to 4.22.3miwi2008-03-213-6/+7 * - Remove ONLY_FOR_ARCHSbeech2008-03-212-4/+2 * - Remove USE_GETOPT_LONG which is a no-op since March 2007pav2008-03-204-4/+0