![]() | ![]() | ![]() | GMime Reference Manual | ![]() |
---|
gmime-disposition —
#define GMIME_DISPOSITION_ATTACHMENT #define GMIME_DISPOSITION_INLINE struct GMimeDisposition; GMimeDisposition* g_mime_disposition_new (const char *disposition); void g_mime_disposition_destroy (GMimeDisposition *disposition); void g_mime_disposition_set (GMimeDisposition *disposition, const char *value); const char* g_mime_disposition_get (GMimeDisposition *disposition); void g_mime_disposition_add_parameter (GMimeDisposition *disposition, const char *attribute, const char *value); const char* g_mime_disposition_get_parameter (GMimeDisposition *disposition, const char *attribute); char* g_mime_disposition_header (GMimeDisposition *disposition, gboolean fold);
#define GMIME_DISPOSITION_ATTACHMENT "attachment"
Standard attachment disposition.
struct GMimeDisposition { char *disposition; GMimeParam *params; GHashTable *param_hash; };
GMimeDisposition* g_mime_disposition_new (const char *disposition);
Creates a new GMimeDisposition object.
disposition : | disposition header (and params) |
Returns : | a new disposition object |
void g_mime_disposition_destroy (GMimeDisposition *disposition);
Destroy the disposition object.
disposition : | disposition object |
void g_mime_disposition_set (GMimeDisposition *disposition, const char *value);
Sets the disposition to value
which may be one of
GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE or, by your
choice, any other string which would indicate how the MIME part
should be displayed by the MUA.
disposition : | disposition object |
value : | disposition value |
const char* g_mime_disposition_get (GMimeDisposition *disposition);
Gets the disposition or NULL
on fail.
disposition : | disposition object |
Returns : | the disposition string which is probably one of GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE. |
void g_mime_disposition_add_parameter (GMimeDisposition *disposition, const char *attribute, const char *value);
Adds a new parameter of name name
and value value
to the
disposition.
disposition : | disposition object |
attribute : | parameter name |
value : | parameter value |
const char* g_mime_disposition_get_parameter (GMimeDisposition *disposition, const char *attribute);
Gets the value of the parameter attribute
, or NULL
on fail.
disposition : | disposition object |
attribute : | parameter name |
Returns : | the value of the parameter of name attribute .
|
char* g_mime_disposition_header (GMimeDisposition *disposition, gboolean fold);
Allocates a string buffer containing the Content-Disposition header
represented by the disposition object disposition
.
disposition : | disposition object |
fold : | fold header if needed |
Returns : | a string containing the disposition header |
<< gmime-content-type | gmime-param >> |