Defines functions and structs for mime part handling. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <assert.h>
#include <libgen.h>
#include <ctype.h>
#include <errno.h>
#include "cmime_list.h"
Go to the source code of this file.
Data Structures | |
struct | CMimePart_T |
A mime part. More... | |
Macros | |
#define | cmime_part_get_content(part) (part->content); |
#define | cmime_part_get_postface(part) (part->postface); |
Functions | |
CMimePart_T * | cmime_part_new (void) |
Creates a new CMimePart_T object. More... | |
void | cmime_part_free (CMimePart_T *part) |
Frees a CMimePart_T object. More... | |
void | cmime_part_set_content_type (CMimePart_T *part, const char *s) |
Set the content type for a mime part. More... | |
char * | cmime_part_get_content_type (CMimePart_T *part) |
Return content type of mime part. More... | |
void | cmime_part_set_content_disposition (CMimePart_T *part, const char *s) |
Set content disposition for mime part. More... | |
char * | cmime_part_get_content_disposition (CMimePart_T *part) |
Return content disposition of mime part. More... | |
void | cmime_part_set_content_transfer_encoding (CMimePart_T *part, const char *s) |
Set content transfer encoding for mime part. More... | |
char * | cmime_part_get_content_transfer_encoding (CMimePart_T *part) |
Return content transfer encoding of mime part. More... | |
void | cmime_part_set_content_id (CMimePart_T *part, const char *s) |
Set content id for mime part. More... | |
char * | cmime_part_get_content_id (CMimePart_T *part) |
Return content id of mime part. More... | |
void | cmime_part_set_content (CMimePart_T *part, const char *s) |
Set content for mime part. More... | |
void | cmime_part_set_postface (CMimePart_T *part, const char *s) |
Set mime parts postface. More... | |
char * | cmime_part_to_string (CMimePart_T *part, const char *nl) |
Return complete mime part as string, inclusive all mime headers. More... | |
int | cmime_part_from_file (CMimePart_T **part, char *filename, const char *nl) |
Create a CMimePart_T object from file. More... | |
int | cmime_part_to_file (CMimePart_T *part, char *filename) |
Create a file from CMimePart_T object. More... | |
int | cmime_part_from_string (CMimePart_T **part, const char *content) |
Parse given string and create a new CMimePart_T object. More... | |
Defines functions and structs for mime part handling.
#define cmime_part_get_content | ( | part | ) | (part->content); |
#define cmime_part_get_postface | ( | part | ) | (part->postface); |
void cmime_part_free | ( | CMimePart_T * | part | ) |
Frees a CMimePart_T object.
part | a CMimePart_T object |
int cmime_part_from_file | ( | CMimePart_T ** | part, |
char * | filename, | ||
const char * | nl | ||
) |
Create a CMimePart_T object from file.
part | out param to return the new part |
filename | path to file |
nl | newline character which should be used. If NULL newline character will be determined automatically. |
int cmime_part_from_string | ( | CMimePart_T ** | part, |
const char * | content | ||
) |
Parse given string and create a new CMimePart_T object.
part | out param to return the new mime part object |
content | mime part string to parse |
char* cmime_part_get_content_disposition | ( | CMimePart_T * | part | ) |
Return content disposition of mime part.
part | a CMimePart_T object |
char* cmime_part_get_content_id | ( | CMimePart_T * | part | ) |
Return content id of mime part.
part | a CMimePart_T object |
char* cmime_part_get_content_transfer_encoding | ( | CMimePart_T * | part | ) |
Return content transfer encoding of mime part.
part | a CMimePart_T object |
char* cmime_part_get_content_type | ( | CMimePart_T * | part | ) |
Return content type of mime part.
part | a CMimePart_T object |
CMimePart_T* cmime_part_new | ( | void | ) |
Creates a new CMimePart_T object.
void cmime_part_set_content | ( | CMimePart_T * | part, |
const char * | s | ||
) |
Set content for mime part.
part | a CMimePart_T object |
s | mime part content |
void cmime_part_set_content_disposition | ( | CMimePart_T * | part, |
const char * | s | ||
) |
Set content disposition for mime part.
part | a CMimePart_T object |
s | content disosition string |
void cmime_part_set_content_id | ( | CMimePart_T * | part, |
const char * | s | ||
) |
Set content id for mime part.
part | a CMimePart_T object |
s | content id string |
void cmime_part_set_content_transfer_encoding | ( | CMimePart_T * | part, |
const char * | s | ||
) |
Set content transfer encoding for mime part.
part | a CMimePart_T object |
s | content transfer encoding string |
void cmime_part_set_content_type | ( | CMimePart_T * | part, |
const char * | s | ||
) |
Set the content type for a mime part.
part | a CMimePart_T object |
s | content type string |
void cmime_part_set_postface | ( | CMimePart_T * | part, |
const char * | s | ||
) |
Set mime parts postface.
part | a CMimePart_T object |
s | postface string |
int cmime_part_to_file | ( | CMimePart_T * | part, |
char * | filename | ||
) |
Create a file from CMimePart_T object.
part | CMimePart_T object |
filename | path to out file |
char* cmime_part_to_string | ( | CMimePart_T * | part, |
const char * | nl | ||
) |
Return complete mime part as string, inclusive all mime headers.
part | a CMimePart_T object |
nl | newline character which should be used. If NULL newline character will be determined automatically. |