35#include "libical_ical_export.h"
41 SSPM_IMAGE_MAJOR_TYPE,
42 SSPM_AUDIO_MAJOR_TYPE,
43 SSPM_VIDEO_MAJOR_TYPE,
44 SSPM_APPLICATION_MAJOR_TYPE,
45 SSPM_MULTIPART_MAJOR_TYPE,
46 SSPM_MESSAGE_MAJOR_TYPE,
47 SSPM_UNKNOWN_MAJOR_TYPE
54 SSPM_PLAIN_MINOR_TYPE,
55 SSPM_RFC822_MINOR_TYPE,
56 SSPM_DIGEST_MINOR_TYPE,
57 SSPM_CALENDAR_MINOR_TYPE,
58 SSPM_MIXED_MINOR_TYPE,
59 SSPM_RELATED_MINOR_TYPE,
60 SSPM_ALTERNATIVE_MINOR_TYPE,
61 SSPM_PARALLEL_MINOR_TYPE,
62 SSPM_UNKNOWN_MINOR_TYPE
68 SSPM_QUOTED_PRINTABLE_ENCODING,
79 SSPM_UNEXPECTED_BOUNDARY_ERROR,
80 SSPM_WRONG_BOUNDARY_ERROR,
81 SSPM_NO_BOUNDARY_ERROR,
83 SSPM_MALFORMED_HEADER_ERROR
90 enum sspm_major_type major;
91 enum sspm_minor_type minor;
93 char **content_type_params;
95 enum sspm_encoding encoding;
98 enum sspm_error error;
112 enum sspm_major_type major;
113 enum sspm_minor_type minor;
114 void *(*new_part) (void);
115 void (*add_line) (
void *part,
struct sspm_header * header,
const char *line,
size_t size);
116 void *(*end_part) (
void *part);
117 void (*free_part) (
void *part);
120LIBICAL_ICAL_EXPORT
const char *sspm_major_type_string(
enum sspm_major_type type);
122LIBICAL_ICAL_EXPORT
const char *sspm_minor_type_string(
enum sspm_minor_type type);
124LIBICAL_ICAL_EXPORT
const char *sspm_encoding_string(
enum sspm_encoding type);
126LIBICAL_ICAL_EXPORT
int sspm_parse_mime(
struct sspm_part *parts,
129 char *(*get_string) (
char *s,
size_t size,
void *data),
130 void *get_string_data,
struct sspm_header *first_header);
132LIBICAL_ICAL_EXPORT
void sspm_free_parts(
struct sspm_part *parts,
size_t max_parts);
134LIBICAL_ICAL_EXPORT
char *decode_quoted_printable(
char *dest,
char *src,
size_t *size);
136LIBICAL_ICAL_EXPORT
char *decode_base64(
char *dest,
char *src,
size_t *size);
138LIBICAL_ICAL_EXPORT
int sspm_write_mime(
struct sspm_part *parts,
size_t num_parts,
139 char **output_string,
const char *header);