GnuCash  5.6-150-g038405b370+
search-string.h
1 /*
2  * Copyright (C) 2002 Derek Atkins
3  *
4  * Authors: Derek Atkins <warlord@MIT.EDU>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef _GNCSEARCH_STRING_H
23 #define _GNCSEARCH_STRING_H
24 
25 #include "search-core-type.h"
26 
27 #define GNC_TYPE_SEARCH_STRING (gnc_search_string_get_type ())
28 G_DECLARE_FINAL_TYPE (GNCSearchString, gnc_search_string, GNC, SEARCH_STRING, GNCSearchCoreType)
29 
30 typedef enum _search_string_how
31 {
32  SEARCH_STRING_CONTAINS,
33  SEARCH_STRING_NOT_CONTAINS,
34  SEARCH_STRING_MATCHES_REGEX,
35  SEARCH_STRING_NOT_MATCHES_REGEX,
36  SEARCH_STRING_EQUAL,
37  SEARCH_STRING_NOT_EQUAL
38 } GNCSearchString_Type;
39 
40 GNCSearchString *gnc_search_string_new (void);
41 
42 /* methods */
43 void gnc_search_string_set_value(GNCSearchString *fi, const char *value);
44 void gnc_search_string_set_how (GNCSearchString *fi, GNCSearchString_Type how);
45 void gnc_search_string_set_case (GNCSearchString *fi, gboolean ignore_case);
46 
47 #endif /* ! _GNCSEARCH_STRING_H */
48