![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
struct CamelMimePart; CamelMimePart* camel_mime_part_new (void); void camel_mime_part_set_description (CamelMimePart *mime_part, const char *description); const char* camel_mime_part_get_description (CamelMimePart *mime_part); void camel_mime_part_set_disposition (CamelMimePart *mime_part, const char *disposition); const char* camel_mime_part_get_disposition (CamelMimePart *mime_part); void camel_mime_part_set_filename (CamelMimePart *mime_part, const char *filename); const char* camel_mime_part_get_filename (CamelMimePart *mime_part); void camel_mime_part_set_content_id (CamelMimePart *mime_part, const char *contentid); const char* camel_mime_part_get_content_id (CamelMimePart *mime_part); void camel_mime_part_set_content_MD5 (CamelMimePart *mime_part, const char *md5sum); const char* camel_mime_part_get_content_MD5 (CamelMimePart *mime_part); void camel_mime_part_set_content_location (CamelMimePart *mime_part, const char *location); const char* 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 char *content_type); CamelContentType* camel_mime_part_get_content_type (CamelMimePart *mime_part); int camel_mime_part_construct_from_parser (CamelMimePart *mime_part, CamelMimeParser *parser); void camel_mime_part_set_content (CamelMimePart *mime_part, const char *content, int length, const char *type); size_t camel_mime_part_get_content_size (CamelMimePart *mime_part);
struct CamelMimePart { CamelMedium parent_object; struct _camel_header_raw *headers; /* mime headers */ /* All fields here are -** PRIVATE **- */ /* TODO: these should be in a camelcontentinfo */ char *description; CamelContentDisposition *disposition; char *content_id; char *content_MD5; char *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 char *description);
Set a description on the MIME part.
|
a CamelMimePart object |
|
description of the MIME part |
const char* 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 char *disposition);
Set a disposition on the MIME part.
|
a CamelMimePart object |
|
disposition of the MIME part |
const char* 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 char *filename);
Set the filename on a MIME part.
|
a CamelMimePart object |
|
filename given to the MIME part |
const char* 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 char *contentid);
Set the content-id field on a MIME part.
|
a CamelMimePart object |
|
content id |
const char* 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 char *md5sum);
Set the content-md5 field of the MIME part.
|
a CamelMimePart object |
|
the md5sum of the MIME part |
const char* 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 char *location);
Set the content-location field of the MIME part.
|
a CamelMimePart object |
|
the content-location value of the MIME part |
const char* 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 char *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 |
int 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 : |
0 on success or -1 on fail
|
void camel_mime_part_set_content (CamelMimePart *mime_part, const char *content, int length, const char *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 |
|
|
|
length of data
|
|
Content-Type of the data |
size_t 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. |