imap-bodystructure.c revision 1215bc4d7e747846f282cf710e61f3768e69238d
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "iobuffer.h"
#include "temp-string.h"
#include "rfc822-tokenize.h"
#include "message-parser.h"
#include "message-content-parser.h"
#include "imap-envelope.h"
#include "imap-bodystructure.h"
#define EMPTY_BODYSTRUCTURE \
"(\"text\" \"plain\" (\"charset\" \"us-ascii\") NIL NIL \"7bit\" 0 0)"
typedef struct {
char *content_type, *content_subtype;
char *content_type_params;
char *content_transfer_encoding;
char *content_id;
char *content_description;
char *content_disposition;
char *content_disposition_params;
char *content_md5;
char *content_language;
int extended);
{
const char *value;
int i;
/* find the content type separator */
for (i = 0; i < count; i++) {
break;
}
}
void *context)
{
const char *str;
}
{
const char *value;
}
{
const char *value;
}
{
const char *value;
if (count <= 0)
return;
/* FIXME: a,b,c -> "a" "b" "c" */
}
const char *value,
{
int parent_rfc822;
return;
/* initialize message part data */
}
t_push();
/* fix the name to be \0-terminated */
} else if (parent_rfc822) {
}
t_pop();
}
{
/* note that we want to parse the header of all
the message parts, multiparts too. */
}
}
int extended)
{
else {
/* no parts in multipart message,
that's not allowed. write a single
}
if (!extended)
return;
/* BODYSTRUCTURE data */
else {
}
else {
}
}
else {
}
}
{
/* there was no content headers, use an empty structure */
}
/* "content type" "subtype" */
/* ("content type param key" "value" ...) */
else {
}
/* text/.. contains line count */
} else if (part->message_rfc822) {
str);
} else {
/* buggy message */
}
}
if (!extended)
return;
/* BODYSTRUCTURE data */
/* "md5" ("content disposition" ("disposition" "params"))
("body" "language" "params") */
else {
}
}
else {
}
}
int extended)
{
else
}
}
{
}
{
else
}