|  |  |  | Camel Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
struct CamelMimePart; CamelMimePart * camel_mime_part_new (void); void camel_mime_part_set_description (CamelMimePart *mime_part, const gchar *description); const gchar * camel_mime_part_get_description (CamelMimePart *mime_part); void camel_mime_part_set_disposition (CamelMimePart *mime_part, const gchar *disposition); const gchar * camel_mime_part_get_disposition (CamelMimePart *mime_part); void camel_mime_part_set_filename (CamelMimePart *mime_part, const gchar *filename); const gchar * camel_mime_part_get_filename (CamelMimePart *mime_part); void camel_mime_part_set_content_id (CamelMimePart *mime_part, const gchar *contentid); const gchar * camel_mime_part_get_content_id (CamelMimePart *mime_part); void camel_mime_part_set_content_MD5 (CamelMimePart *mime_part, const gchar *md5sum); const gchar * camel_mime_part_get_content_MD5 (CamelMimePart *mime_part); void camel_mime_part_set_content_location (CamelMimePart *mime_part, const gchar *location); const gchar * camel_mime_part_get_content_location (CamelMimePart *mime_part); void camel_mime_part_set_encoding (CamelMimePart *mime_part, CamelTransferEncoding encoding); CamelTransferEncoding camel_mime_part_get_encoding (CamelMimePart *mime_part); void camel_mime_part_set_content_languages (CamelMimePart *mime_part, GList *content_languages); const GList * camel_mime_part_get_content_languages (CamelMimePart *mime_part); void camel_mime_part_set_content_type (CamelMimePart *mime_part, const gchar *content_type); CamelContentType * camel_mime_part_get_content_type (CamelMimePart *mime_part); gint camel_mime_part_construct_from_parser (CamelMimePart *mime_part, CamelMimeParser *parser); void camel_mime_part_set_content (CamelMimePart *mime_part, const gchar *data, gint length, const gchar *type); gsize camel_mime_part_get_content_size (CamelMimePart *mime_part); void camel_mime_part_construct_content_from_parser (CamelMimePart *, CamelMimeParser *mp); gboolean camel_mime_message_build_preview (CamelMimePart *msg, CamelMessageInfo *info);
struct CamelMimePart {
	CamelMedium parent_object;
	struct _camel_header_raw *headers; /* mime headers */
	/* All fields here are -** PRIVATE **- */
	/* TODO: these should be in a camelcontentinfo */
	gchar *description;
	CamelContentDisposition *disposition;
	gchar *content_id;
	gchar *content_MD5;
	gchar *content_location;
	GList *content_languages;
	CamelTransferEncoding encoding;
};
CamelMimePart * camel_mime_part_new (void);
Create a new MIME part.
| Returns : | a new CamelMimePart object | 
void camel_mime_part_set_description (CamelMimePart *mime_part, const gchar *description);
Set a description on the MIME part.
| 
 | a CamelMimePart object | 
| 
 | description of the MIME part | 
const gchar * camel_mime_part_get_description (CamelMimePart *mime_part);
Get the description of the MIME part.
| 
 | a CamelMimePart object | 
| Returns : | the description | 
void camel_mime_part_set_disposition (CamelMimePart *mime_part, const gchar *disposition);
Set a disposition on the MIME part.
| 
 | a CamelMimePart object | 
| 
 | disposition of the MIME part | 
const gchar * camel_mime_part_get_disposition (CamelMimePart *mime_part);
Get the disposition of the MIME part.
| 
 | a CamelMimePart object | 
| Returns : | the dispisition | 
void camel_mime_part_set_filename (CamelMimePart *mime_part, const gchar *filename);
Set the filename on a MIME part.
| 
 | a CamelMimePart object | 
| 
 | filename given to the MIME part | 
const gchar * camel_mime_part_get_filename (CamelMimePart *mime_part);
Get the filename of a MIME part.
| 
 | a CamelMimePart object | 
| Returns : | the filename of the MIME part | 
void camel_mime_part_set_content_id (CamelMimePart *mime_part, const gchar *contentid);
Set the content-id field on a MIME part.
| 
 | a CamelMimePart object | 
| 
 | content id | 
const gchar * camel_mime_part_get_content_id (CamelMimePart *mime_part);
Get the content-id field of a MIME part.
| 
 | a CamelMimePart object | 
| Returns : | the content-id field of the MIME part | 
void camel_mime_part_set_content_MD5 (CamelMimePart *mime_part, const gchar *md5sum);
Set the content-md5 field of the MIME part.
| 
 | a CamelMimePart object | 
| 
 | the md5sum of the MIME part | 
const gchar * camel_mime_part_get_content_MD5 (CamelMimePart *mime_part);
Get the content-md5 field of the MIME part.
| 
 | a CamelMimePart object | 
| Returns : | the content-md5 field of the MIME part | 
void                camel_mime_part_set_content_location
                                                        (CamelMimePart *mime_part,
                                                         const gchar *location);
Set the content-location field of the MIME part.
| 
 | a CamelMimePart object | 
| 
 | the content-location value of the MIME part | 
const gchar * camel_mime_part_get_content_location (CamelMimePart *mime_part);
Get the content-location field of a MIME part.
| 
 | a CamelMimePart object | 
| Returns : | the content-location field of a MIME part | 
void camel_mime_part_set_encoding (CamelMimePart *mime_part, CamelTransferEncoding encoding);
Set the Content-Transfer-Encoding to use on a MIME part.
| 
 | a CamelMimePart object | 
| 
 | a CamelTransferEncoding | 
CamelTransferEncoding camel_mime_part_get_encoding (CamelMimePart *mime_part);
Get the Content-Transfer-Encoding of a MIME part.
| 
 | a CamelMimePart object | 
| Returns : | a CamelTransferEncoding | 
void                camel_mime_part_set_content_languages
                                                        (CamelMimePart *mime_part,
                                                         GList *content_languages);
Set the Content-Languages field of a MIME part.
| 
 | a CamelMimePart object | 
| 
 | list of languages | 
const GList * camel_mime_part_get_content_languages (CamelMimePart *mime_part);
Get the Content-Languages set on the MIME part.
| 
 | a CamelMimePart object | 
| Returns : | a GList of languages | 
void camel_mime_part_set_content_type (CamelMimePart *mime_part, const gchar *content_type);
Set the content-type on a MIME part.
| 
 | a CamelMimePart object | 
| 
 | content-type string | 
CamelContentType * camel_mime_part_get_content_type (CamelMimePart *mime_part);
Get the Content-Type of a MIME part.
| 
 | a CamelMimePart object | 
| Returns : | the parsed CamelContentType of the MIME part | 
gint camel_mime_part_construct_from_parser (CamelMimePart *mime_part, CamelMimeParser *parser);
Constructs a MIME part from a parser.
| 
 | a CamelMimePart object | 
| 
 | a CamelMimeParser object | 
| Returns : | 0on success or-1on fail | 
void camel_mime_part_set_content (CamelMimePart *mime_part, const gchar *data, gint length, const gchar *type);
Utility function used to set the content of a mime part object to
be the provided data. If length is 0, this routine can be used as
a way to remove old content (in which case data and type are
ignored and may be NULL).
| 
 | a CamelMimePart object | 
| 
 | data to put into the part | 
| 
 | length of data | 
| 
 | Content-Type of the data | 
gsize camel_mime_part_get_content_size (CamelMimePart *mime_part);
Get the decoded size of the MIME part's content.
| 
 | a CamelMimePart object | 
| Returns : | the size of the MIME part's content in bytes. | 
void                camel_mime_part_construct_content_from_parser
                                                        (CamelMimePart *,
                                                         CamelMimeParser *mp);
| 
 | |
| 
 | 
gboolean camel_mime_message_build_preview (CamelMimePart *msg, CamelMessageInfo *info);
| 
 | |
| 
 | |
| Returns : |