ERuleContext: Evolution Utilities Reference Manual

## ERuleContext ERuleContext |

## Functions

void | (*ERuleContextRegisterFunc) ()
void | (*ERuleContextPartFunc) ()
void | (*ERuleContextRuleFunc) ()
EFilterPart | (*ERuleContextNextPartFunc) ()
EFilterRule | (*ERuleContextNextRuleFunc) ()
ERuleContext * | e_rule_context_new ()
gint | e_rule_context_load ()
gint | e_rule_context_save ()
gint | e_rule_context_revert ()
void | e_rule_context_add_part ()
EFilterPart * | e_rule_context_find_part ()
EFilterPart * | e_rule_context_create_part ()
EFilterPart * | e_rule_context_next_part ()
EFilterRule * | e_rule_context_next_rule ()
EFilterRule * | e_rule_context_find_rule ()
EFilterRule * | e_rule_context_find_rank_rule ()
void | e_rule_context_add_rule ()
void | e_rule_context_add_rule_gui ()
void | e_rule_context_remove_rule ()
void | e_rule_context_rank_rule ()
gint | e_rule_context_get_rank_rule ()
void | e_rule_context_add_part_set ()
void | e_rule_context_add_rule_set ()
EFilterElement * | e_rule_context_new_element ()
GList * | e_rule_context_delete_uri ()
GList * | e_rule_context_rename_uri ()
void | e_rule_context_free_uri_list ()

## Signals

void | changed | Run Last
void | rule-added | Run Last
void | rule-removed | Run Last

## Types and Values

struct | part_set_map
struct | rule_set_map
struct | ERuleContext

## Object Hierarchy

        GObject
        ╰── ERuleContext

## Description

## Functions

### ERuleContextRegisterFunc ()

    void
    (*ERuleContextRegisterFunc) (ERuleContext *context,
                                 EFilterRule *rule,
                                 gpointer user_data);

### ERuleContextPartFunc ()

    void
    (*ERuleContextPartFunc) (ERuleContext *context,
                             EFilterPart *part);

### ERuleContextRuleFunc ()

    void
    (*ERuleContextRuleFunc) (ERuleContext *context,
                             EFilterRule *part);

### ERuleContextNextPartFunc ()

    EFilterPart
    (*ERuleContextNextPartFunc) (ERuleContext *context,
                                 EFilterPart *part);

### ERuleContextNextRuleFunc ()

    EFilterRule
    (*ERuleContextNextRuleFunc) (ERuleContext *context,
                                 EFilterRule *rule,
                                 const gchar *source);

### e_rule_context_new ()

    ERuleContext *
    e_rule_context_new (void);

Create a new ERuleContext object.

#### Returns

A new ERuleContext object.

### e_rule_context_load ()

    gint
    e_rule_context_load (ERuleContext *context,
                         const gchar *system,
                         const gchar *user);

Load a rule context from a system and user description file.

### e_rule_context_save ()

    gint
    e_rule_context_save (ERuleContext *context,
                         const gchar *user);

Save a rule context to disk.

### e_rule_context_revert ()

    gint
    e_rule_context_revert (ERuleContext *context,
                           const gchar *user);

Reverts a rule context from a user description file. Assumes the system description file is unchanged from when it was loaded.

### e_rule_context_add_part ()

    void
    e_rule_context_add_part (ERuleContext *context,
                             EFilterPart *part);

### e_rule_context_find_part ()

    EFilterPart *
    e_rule_context_find_part (ERuleContext *context,
                              const gchar *name);

### e_rule_context_create_part ()

    EFilterPart *
    e_rule_context_create_part (ERuleContext *context,
                                const gchar *name);

### e_rule_context_next_part ()

    EFilterPart *
    e_rule_context_next_part (ERuleContext *context,
                              EFilterPart *last);

### e_rule_context_next_rule ()

    EFilterRule *
    e_rule_context_next_rule (ERuleContext *context,
                              EFilterRule *last,
                              const gchar *source);

### e_rule_context_find_rule ()

    EFilterRule *
    e_rule_context_find_rule (ERuleContext *context,
                              const gchar *name,
                              const gchar *source);

### e_rule_context_find_rank_rule ()

    EFilterRule *
    e_rule_context_find_rank_rule (ERuleContext *context,
                                   gint rank,
                                   const gchar *source);

### e_rule_context_add_rule ()

    void
    e_rule_context_add_rule (ERuleContext *context,
                             EFilterRule *rule);

### e_rule_context_add_rule_gui ()

    void
    e_rule_context_add_rule_gui (ERuleContext *context,
                                 EFilterRule *rule,
                                 const gchar *title,
                                 const gchar *path);

### e_rule_context_remove_rule ()

    void
    e_rule_context_remove_rule (ERuleContext *context,
                                EFilterRule *rule);

### e_rule_context_rank_rule ()

    void
    e_rule_context_rank_rule (ERuleContext *context,
                              EFilterRule *rule,
                              const gchar *source,
                              gint rank);

### e_rule_context_get_rank_rule ()

    gint
    e_rule_context_get_rank_rule (ERuleContext *context,
                                  EFilterRule *rule,
                                  const gchar *source);

### e_rule_context_add_part_set ()

    void
    e_rule_context_add_part_set (ERuleContext *context,
                                 const gchar *setname,
                                 GType part_type,
                                 ERuleContextPartFunc append,
                                 ERuleContextNextPartFunc next);

### e_rule_context_add_rule_set ()

    void
    e_rule_context_add_rule_set (ERuleContext *context,
                                 const gchar *setname,
                                 GType rule_type,
                                 ERuleContextRuleFunc append,
                                 ERuleContextNextRuleFunc next);

### e_rule_context_new_element ()

    EFilterElement *
    e_rule_context_new_element (ERuleContext *context,
                                const gchar *name);

create a new filter element based on name.

### e_rule_context_delete_uri ()

    GList *
    e_rule_context_delete_uri (ERuleContext *context,
                               const gchar *uri,
                               GCompareFunc compare);

### e_rule_context_rename_uri ()

    GList *
    e_rule_context_rename_uri (ERuleContext *context,
                               const gchar *old_uri,
                               const gchar *new_uri,
                               GCompareFunc compare);

### e_rule_context_free_uri_list ()

    void
    e_rule_context_free_uri_list (ERuleContext *context,
                                  GList *uris);

## Types and Values

### struct part_set_map

    struct part_set_map {
    	gchar *name;
    	GType type;
    	ERuleContextPartFunc append;
    	ERuleContextNextPartFunc next;
    };

### struct rule_set_map

    struct rule_set_map {
    	gchar *name;
    	GType type;
    	ERuleContextRuleFunc append;
    	ERuleContextNextRuleFunc next;
    };

### struct ERuleContext

    struct ERuleContext;

## Signal Details

### The `“changed”` signal

    void
    user_function (ERuleContext *erulecontext,
                   gpointer      user_data)

Flags: Run Last

### The `“rule-added”` signal

    void
    user_function (ERuleContext *erulecontext,
                   gpointer      arg1,
                   gpointer      user_data)

Flags: Run Last

### The `“rule-removed”` signal

    void
    user_function (ERuleContext *erulecontext,
                   gpointer      arg1,
                   gpointer      user_data)

Flags: Run Last