static int part_find(struct mail *mail, const struct imap_fetch_body_data *body,
const struct message_part **part_r, const char **section_r)
{
- const struct message_part *part;
+ struct message_part *part;
const char *path;
unsigned int num;
static int
message_search_msg_real(struct message_search_context *ctx,
- struct istream *input, const struct message_part *parts)
+ struct istream *input, struct message_part *parts)
{
const enum message_header_parser_flags hdr_parser_flags =
MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE;
message_search_reset(ctx);
if (parts != NULL) {
- parser_ctx = message_parser_init_from_parts(
- (struct message_part *)parts,
+ parser_ctx = message_parser_init_from_parts(parts,
input, hdr_parser_flags, 0);
} else {
parser_ctx = message_parser_init(pool_datastack_create(),
}
int message_search_msg(struct message_search_context *ctx,
- struct istream *input, const struct message_part *parts)
+ struct istream *input, struct message_part *parts)
{
int ret;
/* Search a full message. Returns 1 if match was found, 0 if not,
-1 if error (if stream_error == 0, the parts contained broken data) */
int message_search_msg(struct message_search_context *ctx,
- struct istream *input, const struct message_part *parts);
+ struct istream *input, struct message_part *parts);
#endif
return &data->keyword_indexes;
}
-int index_mail_get_parts(struct mail *_mail,
- const struct message_part **parts_r)
+int index_mail_get_parts(struct mail *_mail, struct message_part **parts_r)
{
struct index_mail *mail = (struct index_mail *)_mail;
struct index_mail_data *data = &mail->data;
const char *const *index_mail_get_keywords(struct mail *_mail);
const ARRAY_TYPE(keyword_indexes) *
index_mail_get_keyword_indexes(struct mail *_mail);
-int index_mail_get_parts(struct mail *_mail,
- const struct message_part **parts_r);
+int index_mail_get_parts(struct mail *_mail, struct message_part **parts_r);
int index_mail_get_received_date(struct mail *_mail, time_t *date_r);
int index_mail_get_save_date(struct mail *_mail, time_t *date_r);
int index_mail_get_date(struct mail *_mail, time_t *date_r, int *timezone_r);
struct search_body_context {
struct index_search_context *index_ctx;
struct istream *input;
- const struct message_part *part;
+ struct message_part *part;
};
static const enum message_header_parser_flags hdr_parser_flags =
uint64_t (*get_modseq)(struct mail *mail);
int (*get_parts)(struct mail *mail,
- const struct message_part **parts_r);
+ struct message_part **parts_r);
int (*get_date)(struct mail *mail, time_t *date_r, int *timezone_r);
int (*get_received_date)(struct mail *mail, time_t *date_r);
int (*get_save_date)(struct mail *mail, time_t *date_r);
uint64_t mail_get_modseq(struct mail *mail);
/* Returns message's MIME parts */
-int mail_get_parts(struct mail *mail, const struct message_part **parts_r);
+int mail_get_parts(struct mail *mail, struct message_part **parts_r);
/* Get the Date-header of the mail. Timezone is in minutes. date=0 if it
wasn't found or it was invalid. */
return p->v.get_keyword_indexes(mail);
}
-int mail_get_parts(struct mail *mail, const struct message_part **parts_r)
+int mail_get_parts(struct mail *mail, struct message_part **parts_r)
{
struct mail_private *p = (struct mail_private *)mail;
static int
test_mail_get_parts(struct mail *mail ATTR_UNUSED,
- const struct message_part **parts_r ATTR_UNUSED)
+ struct message_part **parts_r ATTR_UNUSED)
{
return -1;
}
}
static int
-virtual_mail_get_parts(struct mail *mail, const struct message_part **parts_r)
+virtual_mail_get_parts(struct mail *mail, struct message_part **parts_r)
{
struct virtual_mail *vmail = (struct virtual_mail *)mail;