dbox-attachment.c revision b22f7b9ba85a8484b11da6220f51274e9624336c
/* Copyright (c) 2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "istream-concat.h"
#include "str.h"
#include "istream-attachment.h"
#include "istream-base64-encoder.h"
#include "dbox-file.h"
#include "dbox-save.h"
#include "dbox-attachment.h"
};
{
const struct mail_attachment_extref *extref;
unsigned int startpos;
return;
if (!add_space)
else
if (extref->base64_have_crlf)
if (extref->base64_blocks_per_line > 0) {
}
/* make it clear there are no options */
}
}
}
static bool
parse_extref_decode_options(const char *str,
struct mail_attachment_extref *extref)
{
unsigned int num;
if (*str == DBOX_ATTACHMENT_DECODE_OPTION_NONE)
while (*str != '\0') {
switch (*str) {
str++;
}
return FALSE;
break;
str++;
break;
default:
return FALSE;
}
}
return TRUE;
}
static bool
{
struct mail_attachment_extref extref;
const char *const *args;
unsigned int i, len;
if ((len % 4) != 0)
return FALSE;
last_voffset = 0;
const char *start_offset_str = args[i+0];
return FALSE;
}
return TRUE;
}
{
bool ret;
T_BEGIN {
} T_END;
return ret;
}
static int
const char *ext_refs,
{
const struct mail_attachment_extref *extref;
const char *path, *path_suffix;
unsigned int i;
int ret = 1;
&extrefs_arr))
return 0;
/* extrefs point outside message */
ret = 0;
}
}
if (extref->base64_blocks_per_line > 0) {
}
}
/* extrefs point outside message */
ret = 0;
} else {
(void)array_append_space(&streams);
}
}
i_stream_unref(&inputs[i]);
return ret;
}
{
const char *ext_refs;
int ret;
/* need to read metadata in case there are external references */
return ret;
return 1;
/* we have external references. */
T_BEGIN {
stream);
} T_END;
if (ret == 0) {
ext_refs);
}
return ret;
}