![]() | ![]() | ![]() | GSK Reference Manual | ![]() |
---|
struct GskMimeMultipartPiece; GskMimeMultipartPiece* gsk_mime_multipart_piece_ref (GskMimeMultipartPiece *piece); void gsk_mime_multipart_piece_unref (GskMimeMultipartPiece *piece); GskMimeMultipartPiece* gsk_mime_multipart_piece_alloc (void); void gsk_mime_multipart_piece_set_description (GskMimeMultipartPiece *piece, const char *description); void gsk_mime_multipart_piece_set_stream (GskMimeMultipartPiece *piece, GskStream *stream); void gsk_mime_multipart_piece_set_type (GskMimeMultipartPiece *piece, const char *type, const char *subtype, const char *charset, const char *const *kv_pairs); void gsk_mime_multipart_piece_set_data (GskMimeMultipartPiece *piece, gconstpointer data, guint len, GDestroyNotify destroy, gpointer destroy_data); void gsk_mime_multipart_piece_set_transfer_encoding (GskMimeMultipartPiece *piece, const char *encoding); void gsk_mime_multipart_piece_set_location (GskMimeMultipartPiece *piece, const char *location); void gsk_mime_multipart_piece_set_id (GskMimeMultipartPiece *piece, const char *id);
struct GskMimeMultipartPiece { char *type; char *subtype; char *id; char *description; char *charset; char *location; char *transfer_encoding; char *disposition; char **other_fields; /* if is_memory */ guint content_length; gconstpointer content_data; };
GskMimeMultipartPiece* gsk_mime_multipart_piece_ref (GskMimeMultipartPiece *piece);
Reference the piece. This piece will only be destroyed when its reference-count hits 0.
piece : | a piece whose reference count should be increased by 1. |
Returns : | the |
void gsk_mime_multipart_piece_unref (GskMimeMultipartPiece *piece);
Unreference the piece. This piece will be destroyed when its reference-count hits 0.
piece : | a piece whose reference count should be decreased by 1. |
GskMimeMultipartPiece* gsk_mime_multipart_piece_alloc (void);
Allocate a new MIME piece.
Returns : | the newly allocated MIME piece. |
void gsk_mime_multipart_piece_set_description (GskMimeMultipartPiece *piece, const char *description);
Set the Content-Description tag for this MIME piece.
piece : | the piece to describe. |
description : | the text description. |
void gsk_mime_multipart_piece_set_stream (GskMimeMultipartPiece *piece, GskStream *stream);
Set the content of a MIME piece to the stream
.
piece : | the piece whose content-stream should be set. |
stream : | the stream to associate with |
void gsk_mime_multipart_piece_set_type (GskMimeMultipartPiece *piece, const char *type, const char *subtype, const char *charset, const char *const *kv_pairs);
Set the content-type for the given MIME piece.
piece : | the piece whose Content-Type header should be affected. |
type : | the major type of this content, eg 'text' or 'image'. |
subtype : | the minor type of this content, if type=='text', then 'plain', 'html', 'wml' are common examples of subtypes. |
charset : | the character set to use for text encodings. |
kv_pairs : | any other key-value pairs are a NULL-terminated array of strings, the even strings are keys, and the odd strings are their values. |
void gsk_mime_multipart_piece_set_data (GskMimeMultipartPiece *piece, gconstpointer data, guint len, GDestroyNotify destroy, gpointer destroy_data);
Set the binary data for a piece of a multipart stream, with destroy notification.
piece : | the piece whose memory content should be set. |
data : | the slab of memory to associate with this part. |
len : | the length of the data in this part. |
destroy : | function to invoke when this piece is destroyed. |
destroy_data : | data to pass to |
void gsk_mime_multipart_piece_set_transfer_encoding (GskMimeMultipartPiece *piece, const char *encoding);
Set the Content-Encoding tag for this MIME piece.
Only three content-encodings are recognized: "identity" (data transfered as binary data; not safe for some mail gateways), "base64" (binary data in 'base-64' encoding); "quoted-printable" uses '=' to escape funny characters as hex.
piece : | the piece to describe. |
encoding : | the transfer-encoding |
void gsk_mime_multipart_piece_set_location (GskMimeMultipartPiece *piece, const char *location);
piece : | |
location : |
|
void gsk_mime_multipart_piece_set_id (GskMimeMultipartPiece *piece, const char *id);
Set the Content-ID tag for this MIME piece.
See: XXX?
piece : | the piece to describe. |
id : | the content-id. |
<<< MIME handling | GskMimeMultipartDecoder >>> |