Files
evolution/camel/camel-search-private.h
3 1ecc7068f5 Added MATCH_NEWLINE flag, -> REG_NEWLINE.
2001-10-03    <NotZed@Ximian.com>

	* camel-search-private.c (camel_search_build_match_regex): Added
	MATCH_NEWLINE flag, -> REG_NEWLINE.

	* camel-lock-helper.c: Include <string.h> to kill some warnings.

	* camel-filter-search.c (get_full_header): Put \n's between each
	line we generate.
	(header_full_regex): Dont drop the first argument to the command
	-> empty matches!
	(header_full_regex): Set match_newline for building regex.
	(body_regex): And here too.  These all fix #9877.

svn path=/trunk/; revision=13392
2001-10-03 22:17:10 +00:00

55 lines
2.0 KiB
C

/*
* Copyright (C) 2001 Ximian Inc.
*
* Authors: Michael Zucchi <notzed@ximian.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _CAMEL_SEARCH_PRIVATE_H
#define _CAMEL_SEARCH_PRIVATE_H
typedef enum {
CAMEL_SEARCH_MATCH_START = 1<<0,
CAMEL_SEARCH_MATCH_END = 1<<1,
CAMEL_SEARCH_MATCH_REGEX = 1<<2, /* disables the first 2 */
CAMEL_SEARCH_MATCH_ICASE = 1<<3,
CAMEL_SEARCH_MATCH_NEWLINE = 1<<4,
} camel_search_flags_t;
typedef enum {
CAMEL_SEARCH_MATCH_EXACT,
CAMEL_SEARCH_MATCH_CONTAINS,
CAMEL_SEARCH_MATCH_STARTS,
CAMEL_SEARCH_MATCH_ENDS,
CAMEL_SEARCH_MATCH_SOUNDEX,
} camel_search_match_t;
typedef enum {
CAMEL_SEARCH_TYPE_ASIS,
CAMEL_SEARCH_TYPE_ENCODED,
CAMEL_SEARCH_TYPE_ADDRESS,
CAMEL_SEARCH_TYPE_ADDRESS_ENCODED,
} camel_search_t;
/* builds a regex that represents a string search */
int camel_search_build_match_regex(regex_t *pattern, camel_search_flags_t type, int argc, struct _ESExpResult **argv, CamelException *ex);
gboolean camel_search_message_body_contains(CamelDataWrapper *object, regex_t *pattern);
gboolean camel_search_header_match(const char *value, const char *match, camel_search_match_t how, camel_search_t type, const char *default_charset);
gboolean camel_search_header_soundex(const char *header, const char *match);
#endif /* ! _CAMEL_SEARCH_PRIVATE_H */