2005-11-30 [colin] 1.9.100cvs46
[claws.git] / src / matcher.h
index 4e7f94c3302535da95ffa91903419373c522a382..329ad76c6ac4257a5cf889717e85fef076d3b2bb 100644 (file)
@@ -14,7 +14,7 @@
  *
  * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #ifndef MATCHER_H
@@ -27,6 +27,7 @@
 
 /* constants generated by yacc */
 #if !defined(YYBISON) && !defined(MATCHER_ALL)
+#       include "matcher_parser_lex.h"
 #      include "matcher_parser_parse.h"
 #endif
 
@@ -39,6 +40,7 @@ struct _MatcherProp {
        regex_t *preg;
        int error;
        gboolean result;
+       gboolean done;
 };
 
 typedef struct _MatcherProp MatcherProp;
@@ -77,6 +79,7 @@ enum {
        MC_(REPLIED), MC_(NOT_REPLIED),
        MC_(FORWARDED), MC_(NOT_FORWARDED),
        MC_(LOCKED), MC_(NOT_LOCKED),
+       MC_(PARTIAL), MC_(NOT_PARTIAL),
        MC_(COLORLABEL), MC_(NOT_COLORLABEL),
        MC_(IGNORE_THREAD), MC_(NOT_IGNORE_THREAD),
        MC_(SUBJECT), MC_(NOT_SUBJECT),
@@ -93,7 +96,7 @@ enum {
        MC_(HEADERS_PART), MC_(NOT_HEADERS_PART),
        MC_(MESSAGE), MC_(NOT_MESSAGE),
        MC_(BODY_PART), MC_(NOT_BODY_PART),
-       MC_(EXECUTE), MC_(NOT_EXECUTE),
+       MC_(TEST), MC_(NOT_TEST),
        MC_(SCORE_EQUAL),
        MC_(SIZE_GREATER), 
        MC_(SIZE_SMALLER),
@@ -103,6 +106,8 @@ enum {
        MT_(MATCH),
        MT_(REGEXPCASE),
        MT_(REGEXP),
+       MT_(ANY_IN_ADDRESSBOOK),
+       MT_(ALL_IN_ADDRESSBOOK),
        /* actions */
        MA_(SCORE),
        MA_(EXECUTE),
@@ -111,14 +116,18 @@ enum {
        MA_(DELETE),
        MA_(MARK),
        MA_(UNMARK),
+       MA_(LOCK),
+       MA_(UNLOCK),
        MA_(MARK_AS_READ),
        MA_(MARK_AS_UNREAD),
        MA_(FORWARD),
        MA_(FORWARD_AS_ATTACHMENT),
        MA_(COLOR),
        MA_(REDIRECT),
-       MA_(DELETE_ON_SERVER),
        MA_(CHANGE_SCORE),
+       MA_(SET_SCORE),
+       MA_(STOP),
+       MA_(HIDE),
        /* boolean operations */
        MB_(OR),
        MB_(AND)
@@ -132,11 +141,6 @@ MatcherProp *matcherprop_new               (gint            criteria,
                                         gint            matchtype, 
                                         const gchar    *expr,
                                         int             value);
-MatcherProp *matcherprop_unquote_new   (gint            criteria, 
-                                        const gchar    *header,
-                                        gint            matchtype, 
-                                        const gchar    *expr,
-                                        int             value);
 void matcherprop_free                  (MatcherProp *prop);
 
 MatcherProp *matcherprop_parse         (gchar  **str);
@@ -160,8 +164,6 @@ gint matcher_parse_number           (gchar          **str);
 gboolean matcher_parse_boolean_op      (gchar          **str);
 gchar *matcher_parse_regexp            (gchar          **str);
 gchar *matcher_parse_str               (gchar          **str);
-const gchar *matcher_escape_str                (const gchar    *str);
-gchar *matcher_unescape_str            (gchar          *str);
 gchar *matcherprop_to_string           (MatcherProp    *matcher);
 gchar *matcherlist_to_string           (const MatcherList      *matchers);
 gchar *matching_build_command          (const gchar    *cmd, 
@@ -170,4 +172,6 @@ gchar *matching_build_command               (const gchar    *cmd,
 void prefs_matcher_read_config         (void);
 void prefs_matcher_write_config                (void);
 
+gchar * matcher_quote_str(const gchar * src);
+
 #endif