Functions for manipulating Content-Type objects | |
mm_content * | mm_content_new (void) |
void | mm_content_free (struct mm_content *ct) |
int | mm_content_attachparam (struct mm_content *ct, struct mm_param *param) |
char * | mm_content_getparambyname (struct mm_content *ct, const char *name) |
mm_param * | mm_content_getparamobjbyname (struct mm_content *ct, const char *name) |
int | mm_content_setmaintype (struct mm_content *ct, char *value, int copy) |
char * | mm_content_getmaintype (struct mm_content *ct) |
char * | mm_content_getsubtype (struct mm_content *ct) |
char * | mm_content_gettype (struct mm_content *ct) |
int | mm_content_setsubtype (struct mm_content *ct, char *value, int copy) |
int | mm_content_settype (struct mm_content *ct, const char *fmt,...) |
int | mm_content_iscomposite (struct mm_content *ct) |
int | mm_content_isvalidencoding (const char *encoding) |
int | mm_content_setencoding (struct mm_content *ct, const char *encoding) |
int | mm_content_getencoding (struct mm_content *ct, const char *encoding) |
char * | mm_content_paramstostring (struct mm_content *ct) |
char * | mm_content_tostring (struct mm_content *ct) |
Variables | |
int | mm_encoding_mappings::type |
int mm_content_attachparam | ( | struct mm_content * | ct, | |
struct mm_param * | param | |||
) |
Attaches a parameter to a Content-Type object
ct | The target Content-Type object | |
param | The Content-Type parameter which to attach |
void mm_content_free | ( | struct mm_content * | ct | ) |
Releases all memory associated with an Content-Type object
ct | A Content-Type object |
int mm_content_getencoding | ( | struct mm_content * | ct, | |
const char * | encoding | |||
) |
Gets the numerical ID of a content encoding identifier
ct | A valid Content Type object | |
encoding | A string representing the content encoding identifier |
char* mm_content_getmaintype | ( | struct mm_content * | ct | ) |
Retrieves the main MIME type stored in a Content-Type object
ct | A valid Content-Type object |
char* mm_content_getparambyname | ( | struct mm_content * | ct, | |
const char * | name | |||
) |
Gets a parameter value from a Content-Type object.
ct | the Content-Type object | |
name | the name of the parameter to retrieve |
char* mm_content_getsubtype | ( | struct mm_content * | ct | ) |
Retrieves the sub MIME type stored in a Content-Type object
ct | A valid Content-Type object |
int mm_content_iscomposite | ( | struct mm_content * | ct | ) |
Checks whether the Content-Type represents a composite message or not
ct | A valid Content-Type object |
int mm_content_isvalidencoding | ( | const char * | encoding | ) |
Verifies whether a string represents a valid encoding or not.
encoding | The string to verify |
struct mm_content* mm_content_new | ( | void | ) |
Creates a new object to hold a Content-Type representation. The allocated memory must later be freed using mm_content_free()
char* mm_content_paramstostring | ( | struct mm_content * | ct | ) |
Constructs a MIME conform string of Content-Type parameters.
ct | A valid Content Type object |
int mm_content_setencoding | ( | struct mm_content * | ct, | |
const char * | encoding | |||
) |
Set the encoding of a MIME entitity according to a mapping table
ct | A valid content type object | |
encoding | A string representing the content encoding |
int mm_content_setmaintype | ( | struct mm_content * | ct, | |
char * | value, | |||
int | copy | |||
) |
Sets the MIME main type for a MIME Content-Type object
ct | The MIME Content-Type object | |
value | The value which to set the main type to | |
copy | Whether to make a copy of the value (original value must be freed afterwards to prevent memory leaks). |
int mm_content_setsubtype | ( | struct mm_content * | ct, | |
char * | value, | |||
int | copy | |||
) |
Sets the MIME sub type for a MIME Content-Type object
ct | The MIME Content-Type object | |
value | The value which to set the sub type to | |
copy | Whether to make a copy of the value (original value must be freed afterwards to prevent memory leaks). |
char* mm_content_tostring | ( | struct mm_content * | ct | ) |
Creates a Content-Type header according to the object given
ct | A valid Content-Type object |