blob: 1122e7e3bfb98309fbb656a934ef099ab68d628e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/**
* @file message.h
* Message processing functions and structures
*/
#ifndef RSPAMD_MESSAGE_H
#define RSPAMD_MESSAGE_H
#include "config.h"
struct mime_part {
GMimeContentType *type;
GByteArray *content;
TAILQ_ENTRY (mime_part) next;
};
/**
* Process message with all filters/statfiles, extract mime parts, urls and
* call metrics consolidation functions
* @param task worker_task object
* @return 0 if we have delayed filters to process and 1 if we have finished with processing
*/
int process_message (struct worker_task *task);
/*
* Process message for learning statfile classifier.
* It extract text and html parts and strip tags from html parts
* @param session session that contains message
* @return 0 allways (may be changed in future)
*/
int process_learn (struct controller_session *session);
/**
* Return next text part (or html with stripped tags) for specified list
* @param pool memory pool in which place object
* @param parts current position in list
* @param cur pointer to which we save current position after processing
*/
GByteArray* get_next_text_part (memory_pool_t *pool, GList *parts, GList **cur);
#endif
|