/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Copyright (C) 2000 Ximian Inc. * * Authors: Michael Zucchi * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * 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 * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef _CAMEL_FOLDER_SEARCH_H #define _CAMEL_FOLDER_SEARCH_H #ifdef __cplusplus extern "C" { #pragma } #endif /* __cplusplus */ #include #include #include #include #define CAMEL_FOLDER_SEARCH_TYPE (camel_folder_search_get_type ()) #define CAMEL_FOLDER_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_folder_search_get_type (), CamelFolderSearch) #define CAMEL_FOLDER_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_folder_search_get_type (), CamelFolderSearchClass) #define CAMEL_IS_FOLDER_SEARCH(obj) CAMEL_CHECK_TYPE (obj, camel_folder_search_get_type ()) typedef struct _CamelFolderSearchClass CamelFolderSearchClass; struct _CamelFolderSearch { CamelObject parent; struct _CamelFolderSearchPrivate *priv; ESExp *sexp; /* s-exp evaluator */ char *last_search; /* last searched expression */ /* these are only valid during the search, and are reset afterwards */ CamelFolder *folder; /* folder for current search */ GPtrArray *summary; /* summary array for current search */ GHashTable *summary_hash; /* hashtable of summary items */ CamelMessageInfo *current; /* current message info, when searching one by one */ CamelMessageInfo *match1; /* message info, when searching a single message only */ CamelMimeMessage *current_message; /* cache of current message, if required */ CamelIndex *body_index; }; struct _CamelFolderSearchClass { CamelObjectClass parent_class; /* general bool/comparison options, usually these wont need to be set, unless it is compiling into another language */ ESExpResult * (*and)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s); ESExpResult * (*or)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s); ESExpResult * (*not)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); ESExpResult * (*lt)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s); ESExpResult * (*gt)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s); ESExpResult * (*eq)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s); /* search options */ /* (match-all [boolean expression]) Apply match to all messages */ ESExpResult * (*match_all)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s); /* (body-contains "string1" "string2" ...) Returns a list of matches, or true if in single-message mode */ ESExpResult * (*body_contains)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (header-contains "headername" "string1" ...) List of matches, or true if in single-message mode */ ESExpResult * (*header_contains)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (header-matches "headername" "string") */ ESExpResult * (*header_matches)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (header-starts-with "headername" "string") */ ESExpResult * (*header_starts_with)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (header-ends-with "headername" "string") */ ESExpResult * (*header_ends_with)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (header-exists "headername") */ ESExpResult * (*header_exists)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (user-flag "flagname" "flagname" ...) If one of user-flag set */ ESExpResult * (*user_flag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (user-tag "flagname") Returns the value of a user tag. Can only be used in match-all */ ESExpResult * (*user_tag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (system-flag "flagname") Returns the value of a system flag. Can only be used in match-all */ ESExpResult * (*system_flag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (get-sent-date) Retrieve the date that the message was sent on as a time_t */ ESExpResult * (*get_sent_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (get-received-date) Retrieve the date that the message was received on as a time_t */ ESExpResult * (*get_received_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (get-current-date) Retrieve 'now' as a time_t */ ESExpResult * (*get_current_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); /* (uid "uid" ...) True if the uid is in the list */ ESExpResult * (*uid)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s); }; CamelType camel_folder_search_get_type (void); CamelFolderSearch *camel_folder_search_new (void); void camel_folder_search_construct (CamelFolderSearch *search); void camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder); void camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary); void camel_folder_search_set_body_index(CamelFolderSearch *search, CamelIndex *index); GPtrArray *camel_folder_search_execute_expression(CamelFolderSearch *search, const char *expr, CamelException *ex); gboolean camel_folder_search_match_expression(CamelFolderSearch *search, const char *expr, const CamelMessageInfo *info, CamelException *ex); void camel_folder_search_free_result(CamelFolderSearch *search, GPtrArray *); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! _CAMEL_FOLDER_SEARCH_H */ t' value='search'/>
Commit message (Expand)AuthorAgeFilesLines
* - Upgrade to version 10.5.4.olgeni2013-10-074-32/+35
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1
* Upgrade to version 10.5.3.olgeni2013-08-243-6/+4
* Do not mute installation commands.olgeni2013-05-231-12/+12
* Upgrade to version 10.5.0; fix PORTEXAMPLES support and cleanup.olgeni2013-05-234-59/+58
* Register conflicts with lang/newlisp-devel.olgeni2013-03-101-0/+3
* Add support for the extended FFI, thus enabling the optional useolgeni2013-03-108-27/+86
* Upgrade to version 10.4.5.olgeni2012-11-224-11/+11
* Upgrade to version 10.4.4.olgeni2012-11-044-29/+30
* Convert to OptionsNG.olgeni2012-10-071-22/+15
* - Remove version specific MySQL options. [1]olgeni2012-01-012-20/+7
* - Take maintainership from ports@olgeni2011-12-222-1/+7
* - Update to 10.3.3crees2011-11-224-13/+40
* - Return my ports back to the pool. I was unable to make any fixes tostas2011-10-241-1/+1
* - remove MD5ohauer2011-07-031-1/+0
* - Update to 10.2.8.stas2010-06-033-7/+8
* Switch to use newer GMP version.ale2010-04-191-2/+2
* - Update to 10.2.1.stas2010-03-193-5/+5
* - Update to 10.1.7.stas2009-12-152-4/+4
* - Update to 10.1.5.stas2009-09-273-4/+5
* - Fix some more SF URLs, including ones in PATCH_SITES and comments (for cons...amdmi32009-08-281-2/+1
* - Update to 10.1.1.stas2009-08-113-6/+18
* - Update to 10.1.0.stas2009-07-037-44/+61
* Chase libgmp and bump PORTREVISION.ale2009-05-131-1/+1
* - Update to 10.0.2.stas2009-04-074-16/+11
* - Update to 9.4.5.stas2008-08-082-4/+4
* - Update to 9.4.3.stas2008-07-283-20/+9
* - Update to 9.3.0.stas2008-05-153-12/+31
* - Fix install with GuiServ.stas2008-04-081-1/+1
* - Use INSTALL_SCRIPT instead of INSTALL_PROGRAM to avoid stripping.stas2007-09-111-2/+1
* - Update to 9.2.0.stas2007-09-103-104/+115
* - Set --mandir and --infodir in CONFIGURE_ARGS if the configure scriptrafan2007-07-231-1/+0
* - Update to 9.1.1.stas2007-03-283-5/+6
* - COPYTREE_* are now part of bsd.port.mkpav2007-03-241-7/+0
* - Remove redundant substitutionsstas2007-02-221-6/+2
* - Update to 9.1.0stas2007-02-224-24/+19
* - Handle dependencies properlystas2006-11-082-54/+196
* - Update to 9.0.0stas2006-11-023-6/+10
* The newLISP is a scripting language for developing web applications andmiwi2006-09-137-0/+169