2009-09-14 [colin] 3.7.2cvs32
[claws.git] / src / matcher.h
index 8b3f1ce984a24b80999f03dc29f3faccd28e2ead..c78edd6fcd7c468dcb4676208a4d1c5c23a441ca 100644 (file)
@@ -4,7 +4,7 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifndef MATCHER_H
 #include "procmsg.h"
 
 /* constants generated by yacc */
-#if !defined(YYBISON) && !defined(MATCHER_ALL)
-#       include "matcher_parser_lex.h"
-#      include "matcher_parser_parse.h"
-#endif
+#include "matcher_parser_lex.h"
+#include "matcher_parser_parse.h"
 
 struct _MatcherProp {
        int matchtype;
@@ -79,9 +77,13 @@ enum {
        MC_(REPLIED), MC_(NOT_REPLIED),
        MC_(FORWARDED), MC_(NOT_FORWARDED),
        MC_(LOCKED), MC_(NOT_LOCKED),
+       MC_(SPAM),MC_(NOT_SPAM),
+       MC_(HAS_ATTACHMENT), MC_(HAS_NO_ATTACHMENT),
+       MC_(SIGNED), MC_(NOT_SIGNED),
        MC_(PARTIAL), MC_(NOT_PARTIAL),
        MC_(COLORLABEL), MC_(NOT_COLORLABEL),
        MC_(IGNORE_THREAD), MC_(NOT_IGNORE_THREAD),
+       MC_(WATCH_THREAD), MC_(NOT_WATCH_THREAD),
        MC_(SUBJECT), MC_(NOT_SUBJECT),
        MC_(FROM), MC_(NOT_FROM),
        MC_(TO), MC_(NOT_TO),
@@ -102,6 +104,9 @@ enum {
        MC_(SIZE_SMALLER),
        MC_(SIZE_EQUAL),
        MC_(FOUND_IN_ADDRESSBOOK),MC_(NOT_FOUND_IN_ADDRESSBOOK),
+       MC_(TAG),MC_(NOT_TAG),
+       MC_(TAGGED),MC_(NOT_TAGGED),
+
        /* match type */
        MT_(MATCHCASE),
        MT_(MATCH),
@@ -119,6 +124,8 @@ enum {
        MA_(UNLOCK),
        MA_(MARK_AS_READ),
        MA_(MARK_AS_UNREAD),
+       MA_(MARK_AS_SPAM),
+       MA_(MARK_AS_HAM),
        MA_(FORWARD),
        MA_(FORWARD_AS_ATTACHMENT),
        MA_(COLOR),
@@ -128,6 +135,11 @@ enum {
        MA_(STOP),
        MA_(HIDE),
        MA_(IGNORE),
+       MA_(WATCH),
+       MA_(ADD_TO_ADDRESSBOOK),
+       MA_(SET_TAG),
+       MA_(UNSET_TAG),
+       MA_(CLEAR_TAGS),
        /* boolean operations */
        MB_(OR),
        MB_(AND)
@@ -141,6 +153,11 @@ MatcherProp *matcherprop_new               (gint            criteria,
                                         gint            matchtype, 
                                         const gchar    *expr,
                                         int             value);
+MatcherProp *matcherprop_new_create    (gint            criteria, 
+                                        const gchar    *header,
+                                        gint            matchtype, 
+                                        const gchar    *expr,
+                                        int             value);
 void matcherprop_free                  (MatcherProp *prop);
 
 MatcherProp *matcherprop_parse         (gchar  **str);