|
Data Structures |
struct | filter |
struct | filter_property |
| The following struct is used to hold the state information of filter properties. More...
|
struct | filter_result |
| This is used to hold the result of a filter. More...
|
struct | rule |
| Definition of a filter rule. More...
|
Defines |
#define | RULE_FLAG_NEGATE (1 << 0) |
#define | RULE_FLAG_VALID (1 << 1) /**< rule has valid target */ |
| rule has valid target
|
#define | RULE_FLAG_ACTIVE (1 << 2) |
#define | RULE_FLAG_SOFT (1 << 3) |
#define | RULE_FLAG_SHADOW (1 << 4) /**< rule is not yet committed */ |
| rule is not yet committed
|
#define | FILTER_FLAG_ACTIVE (1 << 0) |
#define | FILTER_FLAG_SHADOW (1 << 4) /**< filter is not yet committed */ |
| filter is not yet committed
|
#define | RULE_IS_VALID(r) ((r != NULL) && (r->flags & RULE_FLAG_VALID)) |
#define | RULE_IS_NEGATED(r) ((r != NULL) && (r->flags & RULE_FLAG_NEGATE)) |
#define | RULE_IS_ACTIVE(r) ((r != NULL) && (r->flags & RULE_FLAG_ACTIVE)) |
#define | RULE_IS_SOFT(r) ((r != NULL) && (r->flags & RULE_FLAG_SOFT)) |
#define | RULE_IS_SHADOWED(r) ((r != NULL) && (r->flags & RULE_FLAG_SHADOW)) |
#define | filter_is_active(f) ((f != NULL) && (f->flags & FILTER_FLAG_ACTIVE)) |
#define | filter_is_bound(f) (f->search != NULL) |
#define | filter_is_shadowed(f) ((f != NULL) && (f->flags & FILTER_FLAG_SHADOW)) |
#define | FILTER_EXISTS 1 |
| Some error codes (0 means 'no error').
|
Typedefs |
typedef filter | filter_t |
typedef filter_property | filter_property_t |
| The following struct is used to hold the state information of filter properties.
|
typedef filter_result | filter_result_t |
| This is used to hold the result of a filter.
|
typedef rule | rule_t |
| Definition of a filter rule.
|
Functions |
filter_t * | filter_new (const gchar *) |
| Create a new filter with the given name.
|
filter_result_t * | filter_record (struct search *, const struct record *) |
gchar * | filter_rule_condition_to_string (const rule_t *r) |
| Convert a rule condition to a human readable string.
|
gchar * | filter_rule_to_string (const rule_t *f) |
| Convert the filter to a human readable string.
|
gboolean | filter_is_builtin (const filter_t *f) |
gboolean | filter_is_global (const filter_t *f) |
void | filter_reset_stats (filter_t *filter) |
| Reset the stats for a given filter.
|
void | filter_rule_reset_stats (rule_t *rule) |
| Reset the rule stats for a given rule.
|
rule_t * | filter_duplicate_rule (const rule_t *rule) |
| returns a new rule created with information based on the given rule with the appropriate filter_new_*_rule call.
|
rule_t * | filter_new_ip_rule (const host_addr_t addr, guint8 mask, filter_t *, guint16) |
rule_t * | filter_new_jump_rule (filter_t *, guint16) |
rule_t * | filter_new_size_rule (filesize_t, filesize_t, filter_t *, guint16) |
rule_t * | filter_new_text_rule (const gchar *, gint, gboolean, filter_t *, guint16) |
rule_t * | filter_new_sha1_rule (const gchar *, const gchar *, filter_t *, guint16) |
rule_t * | filter_new_flag_rule (enum rule_flag_action stable, enum rule_flag_action busy, enum rule_flag_action push, filter_t *target, guint16 flags) |
rule_t * | filter_new_state_rule (enum filter_prop_state display, enum filter_prop_state download, filter_t *target, guint16 flags) |
void | filter_adapt_order (void) |
| Reorders the filter according to the order in the user's table in the gui.
|
void | filter_append_rule (filter_t *f, rule_t *const r) |
| Append a new rule to a filter.
|
void | filter_append_rule_to_session (filter_t *f, rule_t *const r) |
| Append a new rule to the filter shadow.
|
void | filter_revert_changes (void) |
| Free the ressources for all added filters and forget all shadows.
|
void | filter_apply_changes (void) |
| Go through all the shadow filters, and commit the recorded changes to the associated filter.
|
void | filter_close_dialog (gboolean) |
| Close the filter dialog.
|
void | filter_close_search (struct search *) |
void | filter_add_to_session (filter_t *f) |
| Add a filter to the current editing session.
|
void | filter_remove_from_session (filter_t *f) |
| Mark the given filter as removed and delete it when the dialog changes are committed.
|
void | filter_init (void) |
| Initialize global filters.
|
void | filter_new_for_search (struct search *s) |
void | filter_open_dialog (void) |
| Open and initialize the filter dialog.
|
void | filter_remove_rule_from_session (filter_t *, rule_t *const ) |
| Remove rule from a filter shadow.
|
void | filter_replace_rule_in_session (filter_t *, rule_t *const , rule_t *const ) |
| Replaces filter rule A with filter rule B in filter .
|
void | filter_set (filter_t *) |
| Start working on the given filter.
|
void | filter_set_enabled (filter_t *filter, gboolean active) |
| Change the "enabled" flag of a filter.
|
void | filter_shutdown (void) |
| Free global filters and save state.
|
void | filter_timer (void) |
| Periodically update the filter display with current data.
|
void | filter_update_targets (void) |
| Trigger a rebuild of the target combos.
|
void | filter_free_result (filter_result_t *) |
| Free a filter_result returned by filter_record after it has been processed.
|
void | filter_free_rule (rule_t *rule) |
| Free memory reserved by rule respecting the type of the rule.
|
filter_t * | filter_find_by_name_in_session (const gchar *name) |
| Returns the filter with the given name in the session if it exists, otherwise returns NULL.
|
gboolean | filter_is_valid_in_session (const filter_t *f) |
| Checks wether a filter is existant in a filter editing session.
|
filter_t * | filter_get_drop_target (void) |
filter_t * | filter_get_show_target (void) |
filter_t * | filter_get_download_target (void) |
filter_t * | filter_get_nodownload_target (void) |
filter_t * | filter_get_return_target (void) |
filter_t * | filter_get_global_pre (void) |
filter_t * | filter_get_global_post (void) |
void | filter_add_drop_sha1_rule (const struct record *rec, filter_t *filter) |
| Adds a drop SHA1 rule to specified filter.
|
void | filter_add_drop_name_rule (const struct record *rec, filter_t *filter) |
| Adds a drop filename rule to specified filter.
|
void | filter_add_drop_host_rule (const struct record *rec, filter_t *filter) |
| Adds a drop host rule to specified filter.
|
void | filter_add_download_sha1_rule (const struct record *rec, filter_t *filter) |
| Adds a download SHA1 rule to specified filter.
|
void | filter_add_download_name_rule (const struct record *rec, filter_t *filter) |
| Adds a download filename rule to specified filter.
|
Variables |
filter_t * | work_filter |
| Public variables.
|