~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/itemset.h

  • Committer: Package Import Robot
  • Author(s): bojo42
  • Date: 2012-03-29 14:17:21 UTC
  • mfrom: (1.3.9) (3.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120329141721-tbfopcrc5797wxt7
Tags: 1.8.3-0.1ubuntu1
* New upstream release (LP: #290666, #371754, #741543, #716688)
* Merge from Debian unstable (LP: #935147), remaining changes:
* debian/patches:
  - drop gtk-status-icon.patch & notification-append as in upstream
  - drop fix_systray_behavior as mostly upstreamed and rest seems unused
  - 01_ubuntu_feedlists: update & rename, move planets to "Open Source"  
  - add_X-Ubuntu-Gettext-Domain: rebase
  - libunity.patch: rebase, apply before indicator patch (liferea_shell.c)
  - libindicate_increase_version.patch: exclude from libindicate.patch
  - deactivate libindicate.patch, seems partly upstreamed and needs rework
* debian/control: libindicate-dev, libindicate-gtk-dev & libunity-dev
* debian/liferea.indicate & liferea.install: ship indicator desktop file
* debian/rules: enable libindicate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * @file itemset.h  interface to handle sets of items
3
3
 * 
4
 
 * Copyright (C) 2005-2008 Lars Lindner <lars.lindner@gmail.com>
 
4
 * Copyright (C) 2005-2011 Lars Lindner <lars.lindner@gmail.com>
5
5
 * Copyright (C) 2005-2006 Nathan J. Conrad <t98502@users.sourceforge.net>
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify
23
23
#define _ITEMSET_H
24
24
 
25
25
#include <libxml/tree.h>
 
26
 
26
27
#include "item.h"
 
28
#include "rule.h"
27
29
 
28
30
/**
29
31
 * The itemset interface processes item list actions
32
34
 */
33
35
 
34
36
typedef struct itemSet {
 
37
        GSList          *rules;         /**< list of rules each item matches */
 
38
        gboolean        anyMatch;       /**< TRUE means only one of the rules must match for item inclusion */
 
39
        
35
40
        GList           *ids;           /**< the list of item ids */
36
41
        gchar           *nodeId;        /**< the feed list node id this item set belongs to */
37
42
} *itemSetPtr;
62
67
guint itemset_merge_items(itemSetPtr itemSet, GList *items, gboolean allowUpdates, gboolean markAsRead);
63
68
 
64
69
/**
 
70
 * Checks if the given item matches the rules of the given item set.
 
71
 *
 
72
 * @param itemSet       the itemSet
 
73
 * @param item          the item
 
74
 *
 
75
 * @returns TRUE if the item matches the rules of the item set
 
76
 */
 
77
gboolean itemset_check_item (itemSetPtr itemSet, itemPtr item);
 
78
 
 
79
/**
 
80
 * Checks wether the given item id is in the given item set.
 
81
 *
 
82
 * @param itemSet       the itemSet
 
83
 * @param id            the item id
 
84
 *
 
85
 * @returns TRUE if item id is in item set
 
86
 */
 
87
gboolean itemset_has_item_id (itemSetPtr itemSet, gulong id);
 
88
 
 
89
/**
 
90
 * Method that creates and adds a rule to an item set. To be used
 
91
 * on loading time, when creating searches or when editing
 
92
 * search folder properties.
 
93
 *
 
94
 * @param itemSet       the item set
 
95
 * @param ruleId        id string for this rule type
 
96
 * @param value         argument string for this rule
 
97
 * @param additive      indicates positive or negative logic
 
98
 */
 
99
void itemset_add_rule (itemSetPtr itemSet, const gchar *ruleId, const gchar *value, gboolean additive);
 
100
 
 
101
/**
65
102
 * Frees the given item set and all items it contains.
66
103
 *
67
104
 * @param itemSet       the item set to free