2001-05-06 06:27:28 +02:00
|
|
|
#ifndef SCORING_H
|
|
|
|
|
|
|
|
#define SCORING_H
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include "matcher.h"
|
|
|
|
#include "procmsg.h"
|
|
|
|
|
2001-05-11 01:00:27 +02:00
|
|
|
#define MAX_SCORE 9999
|
|
|
|
#define MIN_SCORE -9999
|
2001-05-06 06:27:28 +02:00
|
|
|
|
|
|
|
struct _ScoringProp {
|
|
|
|
MatcherList * matchers;
|
|
|
|
int score;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _ScoringProp ScoringProp;
|
|
|
|
|
2001-06-01 13:06:33 +02:00
|
|
|
extern GSList * global_scoring;
|
|
|
|
extern gint global_kill_score;
|
|
|
|
extern gint global_important_score;
|
2001-05-06 06:27:28 +02:00
|
|
|
|
|
|
|
ScoringProp * scoringprop_new(MatcherList * matchers, int score);
|
|
|
|
void scoringprop_free(ScoringProp * prop);
|
|
|
|
gint scoringprop_score_message(ScoringProp * scoring, MsgInfo * info);
|
|
|
|
|
|
|
|
ScoringProp * scoringprop_parse(gchar ** str);
|
2002-11-08 22:17:39 +01:00
|
|
|
ScoringProp * scoringprop_copy(ScoringProp *src);
|
2001-05-06 06:27:28 +02:00
|
|
|
|
|
|
|
gint score_message(GSList * scoring_list, MsgInfo * info);
|
|
|
|
|
2001-05-11 01:00:27 +02:00
|
|
|
void prefs_scoring_write_config(void);
|
2001-05-06 06:27:28 +02:00
|
|
|
void prefs_scoring_read_config(void);
|
2001-05-11 01:00:27 +02:00
|
|
|
gchar * scoringprop_to_string(ScoringProp * prop);
|
2001-05-06 06:27:28 +02:00
|
|
|
|
2003-05-13 13:54:19 +02:00
|
|
|
void prefs_scoring_clear(void);
|
2003-06-10 19:02:05 +02:00
|
|
|
void prefs_scoring_clear_folder(Folder *folder);
|
|
|
|
|
2001-06-01 13:06:33 +02:00
|
|
|
void prefs_scoring_free(GSList * prefs_scoring);
|
|
|
|
|
2001-05-06 06:27:28 +02:00
|
|
|
#endif
|