Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include "gwlib/gwlib.h"
#include "gwlib/mime.h"
Go to the source code of this file.
Data Structures | |
struct | MIMEEntity |
Definition at line 300 of file mime.c.
References MIMEEntity::headers, http_header_value(), octstr_compare(), octstr_destroy(), octstr_get_cstr, octstr_imm(), octstr_len(), octstr_str_ncompare(), and start.
Referenced by mime_multipart_start_elem(), and mime_something_to_entity().
Definition at line 163 of file mime.c.
References boundary, MIMEEntity::headers, http_get_header_parameter(), http_header_add(), http_header_remove_all(), http_header_value(), octstr_create, octstr_delete(), octstr_destroy(), octstr_format(), octstr_format_append(), octstr_get_char(), octstr_get_cstr, octstr_imm(), and octstr_len().
Referenced by mime_entity_headers(), and mime_entity_to_octstr().
Definition at line 282 of file mime.c.
References content_type, http_get_header_parameter(), octstr_delete(), octstr_get_char(), octstr_imm(), octstr_len(), and start.
Referenced by mime_multipart_start_elem(), and mime_something_to_entity().
void mime_entity_add_part | ( | MIMEEntity * | e, |
MIMEEntity * | part | ||
) |
Definition at line 560 of file mime.c.
References gw_assert(), gwlist_append(), mime_entity_duplicate(), and MIMEEntity::multiparts.
Octstr* mime_entity_body | ( | MIMEEntity * | m | ) |
Definition at line 485 of file mime.c.
References MIMEEntity::body, debug(), gw_assert(), MIMEEntity::headers, mime_entity_create(), mime_entity_destroy(), mime_entity_num_parts(), mime_entity_to_octstr(), octstr_destroy(), octstr_dump, octstr_duplicate, parse_context_create(), parse_context_destroy(), parse_get_rest(), and read_mime_headers().
MIMEEntity* mime_entity_create | ( | void | ) |
Definition at line 87 of file mime.c.
References MIMEEntity::body, gwlist_create, MIMEEntity::headers, http_create_empty_headers(), MIMEEntity::multiparts, and MIMEEntity::start.
Referenced by mime_entity_body(), mime_entity_duplicate(), and mime_something_to_entity().
void mime_entity_destroy | ( | MIMEEntity * | e | ) |
Definition at line 105 of file mime.c.
References MIMEEntity::body, gw_assert(), gwlist_destroy(), MIMEEntity::headers, mime_entity_destroy_item(), MIMEEntity::multiparts, octstr_destroy(), octstr_destroy_item(), and MIMEEntity::start.
Referenced by main(), mime_entity_body(), mime_entity_destroy_item(), mime_entity_remove_part(), mime_entity_replace_part(), and mime_something_to_entity().
|
static |
Definition at line 100 of file mime.c.
References mime_entity_destroy().
Referenced by mime_entity_destroy().
void mime_entity_dump | ( | MIMEEntity * | m | ) |
Definition at line 717 of file mime.c.
References debug(), gw_assert(), MIMEEntity::headers, and mime_entity_dump_real().
Referenced by main().
|
static |
Definition at line 679 of file mime.c.
References MIMEEntity::body, charset, debug(), gw_assert(), gwlist_get(), gwlist_len(), MIMEEntity::headers, http_header_get_content_type(), http_header_value(), MIMEEntity::multiparts, octstr_append_cstr(), octstr_create, octstr_destroy(), octstr_get_cstr, octstr_imm(), octstr_len(), MIMEEntity::start, and type.
Referenced by mime_entity_dump().
MIMEEntity* mime_entity_duplicate | ( | MIMEEntity * | e | ) |
Definition at line 521 of file mime.c.
References MIMEEntity::body, gwlist_append(), gwlist_get(), gwlist_len(), MIMEEntity::headers, mime_entity_create(), mime_entity_duplicate(), mime_replace_headers(), MIMEEntity::multiparts, and octstr_duplicate.
Referenced by mime_entity_add_part(), mime_entity_duplicate(), mime_entity_get_part(), mime_entity_replace_part(), and mime_multipart_start_elem().
MIMEEntity* mime_entity_get_part | ( | MIMEEntity * | e, |
int | i | ||
) |
Definition at line 570 of file mime.c.
References gw_assert(), gwlist_get(), gwlist_len(), mime_entity_duplicate(), and MIMEEntity::multiparts.
List* mime_entity_headers | ( | MIMEEntity * | m | ) |
Definition at line 469 of file mime.c.
References fix_boundary_element(), gw_assert(), MIMEEntity::headers, http_header_duplicate(), and mime_entity_num_parts().
int mime_entity_num_parts | ( | MIMEEntity * | e | ) |
Definition at line 550 of file mime.c.
References gw_assert(), gwlist_len(), and MIMEEntity::multiparts.
Referenced by mime_entity_body(), and mime_entity_headers().
void mime_entity_remove_part | ( | MIMEEntity * | e, |
int | i | ||
) |
Definition at line 584 of file mime.c.
References gw_assert(), gwlist_delete(), gwlist_get(), gwlist_len(), mime_entity_destroy(), MIMEEntity::multiparts, and MIMEEntity::start.
void mime_entity_replace_part | ( | MIMEEntity * | e, |
int | i, | ||
MIMEEntity * | newpart | ||
) |
Definition at line 601 of file mime.c.
References gw_assert(), gwlist_delete(), gwlist_get(), gwlist_insert(), gwlist_len(), mime_entity_destroy(), mime_entity_duplicate(), MIMEEntity::multiparts, and MIMEEntity::start.
void mime_entity_set_body | ( | MIMEEntity * | e, |
Octstr * | body | ||
) |
Definition at line 622 of file mime.c.
References MIMEEntity::body, gw_assert(), octstr_destroy(), and octstr_duplicate.
Octstr* mime_entity_to_octstr | ( | MIMEEntity * | m | ) |
Definition at line 216 of file mime.c.
References MIMEEntity::body, boundary, finished, fix_boundary_element(), gw_assert(), gwlist_get(), gwlist_len(), MIMEEntity::headers, http_destroy_headers(), http_header_duplicate(), mime_entity_to_octstr(), MIMEEntity::multiparts, octstr_append(), octstr_create, octstr_destroy(), and octstr_imm().
Referenced by main(), mime_entity_body(), and mime_entity_to_octstr().
MIMEEntity* mime_http_to_entity | ( | List * | headers, |
Octstr * | body | ||
) |
Definition at line 461 of file mime.c.
References MIMEEntity::body, gw_assert(), MIMEEntity::headers, and mime_something_to_entity().
MIMEEntity* mime_multipart_start_elem | ( | MIMEEntity * | e | ) |
Definition at line 633 of file mime.c.
References cid_matches(), get_start_param(), gw_assert(), gwlist_get(), gwlist_len(), MIMEEntity::headers, http_header_value(), mime_entity_duplicate(), MIMEEntity::multiparts, octstr_destroy(), octstr_imm(), MIMEEntity::start, and start.
MIMEEntity* mime_octstr_to_entity | ( | Octstr * | mime | ) |
Definition at line 453 of file mime.c.
References gw_assert(), and mime_something_to_entity().
Referenced by main(), and mime_something_to_entity().
void mime_replace_headers | ( | MIMEEntity * | e, |
List * | headers | ||
) |
Definition at line 536 of file mime.c.
References gw_assert(), MIMEEntity::headers, http_destroy_headers(), http_header_duplicate(), and MIMEEntity::start.
Referenced by mime_entity_duplicate().
|
static |
Definition at line 332 of file mime.c.
References MIMEEntity::body, boundary, cid_matches(), debug(), get_start_param(), gw_assert(), gwlist_append(), MIMEEntity::headers, http_destroy_headers(), http_get_header_parameter(), http_header_duplicate(), http_header_value(), mime_entity_create(), mime_entity_destroy(), mime_octstr_to_entity(), MIMEEntity::multiparts, octstr_append(), octstr_append_cstr(), octstr_compare(), octstr_create, octstr_delete(), octstr_destroy(), octstr_dump, octstr_get_char(), octstr_get_cstr, octstr_imm(), octstr_len(), parse_context_create(), parse_context_destroy(), parse_get_line(), parse_get_rest(), parse_get_seperated_block(), read_mime_headers(), MIMEEntity::start, and start.
Referenced by mime_http_to_entity(), and mime_octstr_to_entity().
|
static |
Definition at line 129 of file mime.c.
References gwlist_append(), gwlist_get(), gwlist_len(), MIMEEntity::headers, octstr_append(), octstr_destroy(), octstr_get_char(), octstr_len(), and parse_get_line().
Referenced by mime_entity_body(), and mime_something_to_entity().