![]() |
![]() |
![]() |
![]() |
GMimeContentType * g_mime_content_type_new (const char *type
,const char *subtype
);
Creates a Content-Type object with type type
and subtype subtype
.
GMimeContentType * g_mime_content_type_parse (GMimeParserOptions *options
,const char *str
);
Parses the input string into a GMimeContentType object.
options |
a GMimeParserOptions or |
[nullable] |
str |
input string containing a content-type (and params) |
char *
g_mime_content_type_get_mime_type (GMimeContentType *content_type
);
Allocates a string buffer containing the type and subtype defined
by the content_type
.
char * g_mime_content_type_encode (GMimeContentType *content_type
,GMimeFormatOptions *options
);
Encodes the Content-Disposition header.
gboolean g_mime_content_type_is_type (GMimeContentType *content_type
,const char *type
,const char *subtype
);
Compares the given type and subtype with that of the given mime type object.
const char *
g_mime_content_type_get_media_type (GMimeContentType *content_type
);
Gets the Content-Type's media type.
void g_mime_content_type_set_media_type (GMimeContentType *content_type
,const char *type
);
Sets the Content-Type's media type.
const char *
g_mime_content_type_get_media_subtype (GMimeContentType *content_type
);
Gets the Content-Type's media sub-type.
void g_mime_content_type_set_media_subtype (GMimeContentType *content_type
,const char *subtype
);
Sets the Content-Type's media subtype.
GMimeParamList *
g_mime_content_type_get_parameters (GMimeContentType *content_type
);
Gets the Content-Type's parameter list.
const char * g_mime_content_type_get_parameter (GMimeContentType *content_type
,const char *name
);
Gets the parameter value specified by name
if it's available.
the value of the requested parameter or NULL
if the
parameter is not set. If the parameter is set, the returned string
will be in UTF-8.
void g_mime_content_type_set_parameter (GMimeContentType *content_type
,const char *name
,const char *value
);
Sets a parameter on the Content-Type.
Note: The name
should be in US-ASCII while the value
should be in
UTF-8.
struct GMimeContentType { GObject parent_object; char *type, *subtype; GMimeParamList *params; };
A data structure representing a Content-Type.
GObject |
parent GObject |
|
char * |
media type |
|
char * |
media subtype |
|
GMimeParamList * |
a GMimeParam list |