| Camel Reference Manual | ||||
|---|---|---|---|---|
struct CamelMimePart; CamelMimePart* camel_mime_part_new (void);void camel_mime_part_set_description (CamelMimePart *mime_part, constchar *description); constchar * camel_mime_part_get_description (CamelMimePart *mime_part);void camel_mime_part_set_disposition (CamelMimePart *mime_part, constchar *disposition); constchar * camel_mime_part_get_disposition (CamelMimePart *mime_part);void camel_mime_part_set_filename (CamelMimePart *mime_part, constchar *filename); constchar * camel_mime_part_get_filename (CamelMimePart *mime_part);void camel_mime_part_set_content_id (CamelMimePart *mime_part, constchar *contentid); constchar * camel_mime_part_get_content_id (CamelMimePart *mime_part);void camel_mime_part_set_content_MD5 (CamelMimePart *mime_part, constchar *md5sum); constchar * camel_mime_part_get_content_MD5 (CamelMimePart *mime_part);void camel_mime_part_set_content_location (CamelMimePart *mime_part, constchar *location); constchar * 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); constGList * camel_mime_part_get_content_languages (CamelMimePart *mime_part);void camel_mime_part_set_content_type (CamelMimePart *mime_part, constchar *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, constchar *content,int length, constchar *type);
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, constchar *description);
Set a description on the MIME part.
mime_part : |
a CamelMimePart object |
description : |
description of the MIME part |
constchar * camel_mime_part_get_description (CamelMimePart *mime_part);
Get the description of the MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | the description |
void camel_mime_part_set_disposition (CamelMimePart *mime_part, constchar *disposition);
Set a disposition on the MIME part.
mime_part : |
a CamelMimePart object |
disposition : |
disposition of the MIME part |
constchar * camel_mime_part_get_disposition (CamelMimePart *mime_part);
Get the disposition of the MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | the dispisition |
void camel_mime_part_set_filename (CamelMimePart *mime_part, constchar *filename);
Set the filename on a MIME part.
mime_part : |
a CamelMimePart object |
filename : |
filename given to the MIME part |
constchar * camel_mime_part_get_filename (CamelMimePart *mime_part);
Get the filename of a MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | the filename of the MIME part |
void camel_mime_part_set_content_id (CamelMimePart *mime_part, constchar *contentid);
Set the content-id field on a MIME part.
mime_part : |
a CamelMimePart object |
contentid : |
content id |
constchar * camel_mime_part_get_content_id (CamelMimePart *mime_part);
Get the content-id field of a MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | the content-id field of the MIME part |
void camel_mime_part_set_content_MD5 (CamelMimePart *mime_part, constchar *md5sum);
Set the content-md5 field of the MIME part.
mime_part : |
a CamelMimePart object |
md5sum : |
the md5sum of the MIME part |
constchar * camel_mime_part_get_content_MD5 (CamelMimePart *mime_part);
Get the content-md5 field of the MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | the content-md5 field of the MIME part |
void camel_mime_part_set_content_location (CamelMimePart *mime_part, constchar *location);
Set the content-location field of the MIME part.
mime_part : |
a CamelMimePart object |
location : |
the content-location value of the MIME part |
constchar * camel_mime_part_get_content_location (CamelMimePart *mime_part);
Get the content-location field of a MIME part.
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.
mime_part : |
a CamelMimePart object |
encoding : |
a |
CamelTransferEncoding camel_mime_part_get_encoding (CamelMimePart *mime_part);
Get the Content-Transfer-Encoding of a MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | a |
void camel_mime_part_set_content_languages (CamelMimePart *mime_part,GList *content_languages);
Set the Content-Languages field of a MIME part.
mime_part : |
a CamelMimePart object |
content_languages : |
list of languages |
constGList * camel_mime_part_get_content_languages (CamelMimePart *mime_part);
Get the Content-Languages set on the MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | a |
void camel_mime_part_set_content_type (CamelMimePart *mime_part, constchar *content_type);
Set the content-type on a MIME part.
mime_part : |
a CamelMimePart object |
content_type : |
content-type string |
CamelContentType * camel_mime_part_get_content_type (CamelMimePart *mime_part);
Get the Content-Type of a MIME part.
mime_part : |
a CamelMimePart object |
| Returns : | the parsed |
int camel_mime_part_construct_from_parser (CamelMimePart *mime_part, CamelMimeParser *parser);
Constructs a MIME part from a parser.
mime_part : |
a CamelMimePart object |
parser : |
a CamelMimeParser object |
| Returns : |
0-1 |
void camel_mime_part_set_content (CamelMimePart *mime_part, constchar *content,int length, constchar *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
mime_part : |
a CamelMimePart object |
content : |
|
length : |
length of data
|
type : |
Content-Type of the data |