aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-28 14:30:13 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-28 14:30:13 +0100
commit388c08c712c8279a52ad82caa213191352639ca9 (patch)
tree9f12bba4be9b9772044928949c920175fa89d072 /src/libmime/message.h
parent61dbbe0eca5291b1329393a5fe1903fde415a243 (diff)
downloadrspamd-388c08c712c8279a52ad82caa213191352639ca9.tar.gz
rspamd-388c08c712c8279a52ad82caa213191352639ca9.zip
[Feature] Stop using of GLists for headers, improve performance
Diffstat (limited to 'src/libmime/message.h')
-rw-r--r--src/libmime/message.h35
1 files changed, 4 insertions, 31 deletions
diff --git a/src/libmime/message.h b/src/libmime/message.h
index b6f7062dc..2a9201be8 100644
--- a/src/libmime/message.h
+++ b/src/libmime/message.h
@@ -98,7 +98,6 @@ struct raw_header {
gboolean empty_separator;
gchar *separator;
gchar *decoded;
- struct raw_header *prev, *next;
};
/**
@@ -109,17 +108,6 @@ struct raw_header {
gboolean rspamd_message_parse (struct rspamd_task *task);
/**
- * Get a list of header's values with specified header's name using raw headers
- * @param task worker task structure
- * @param field header's name
- * @param strong if this flag is TRUE header's name is case sensitive, otherwise it is not
- * @return A list of header's values or NULL. Unlike previous function it is NOT required to free list or values. I should rework one of these functions some time.
- */
-GList * rspamd_message_get_header (struct rspamd_task *task,
- const gchar *field,
- gboolean strong);
-
-/**
* Get an array of header's values with specified header's name using raw headers
* @param task worker task structure
* @param field header's name
@@ -141,30 +129,15 @@ GPtrArray *rspamd_message_get_mime_header_array (struct rspamd_task *task,
gboolean strong);
/**
- * Get array of all headers from the list specified
- * @param task
- * @param h1
- * @return An array of headers (should not be freed as well)
- */
-GPtrArray *rspamd_message_get_headers_array (struct rspamd_task *task, ...);
-
-/**
- * Get an array of header's values with specified header's name returning decoded strings as values
- * @param task worker task structure
+ * Get an array of header's values with specified header's name using raw headers
+ * @param htb hash table indexed by header name (caseless) with ptr arrays as elements
* @param field header's name
* @param strong if this flag is TRUE header's name is case sensitive, otherwise it is not
* @return An array of header's values or NULL. It is NOT permitted to free array or values.
*/
-GPtrArray *rspamd_message_get_header_array_str (struct rspamd_task *task,
+GPtrArray *rspamd_message_get_header_from_hash (GHashTable *htb,
+ rspamd_mempool_t *pool,
const gchar *field,
gboolean strong);
-/**
- * Get array of all headers from the list specified returning decoded strings as values
- * @param task
- * @param h1
- * @return An array of headers (should not be freed as well)
- */
-GPtrArray *rspamd_message_get_headers_array_str (struct rspamd_task *task, ...);
-
#endif