Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / servers / groupwise / e-gw-filter.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* 
3  * Authors : 
4  * Sivaiah Nallagatla <snallagatla@novell.com> 
5  * 
6  *
7  * Copyright 2003, Novell, Inc.
8  *
9  * This program is free software; you can redistribute it and/or 
10  * modify it under the terms of version 2 of the GNU Lesser General Public 
11  * License as published by the Free Software Foundation.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
21  * USA
22  */
23
24 #ifndef E_GW_FILTER_H
25 #define E_GW_FILTER_H
26
27
28 #include <libsoup/soup-soap-message.h>
29 #include <libsoup/soup-soap-response.h>
30
31 G_BEGIN_DECLS
32
33 #define E_TYPE_GW_FILTER           (e_gw_filter_get_type ())
34 #define E_GW_FILTER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_GW_FILTER, EGwFilter))
35 #define E_GW_FILTER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_GW_FILTER, EGwFilterClass))
36 #define E_IS_GW_FILTER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_GW_FILTER))
37 #define E_IS_GW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_GW_FILTER))
38
39 typedef struct _EGwFilter        EGwFilter;
40 typedef struct _EGwFilterClass   EGwFilterClass;
41 typedef struct _EGwFilterPrivate EGwFilterPrivate;
42
43
44 typedef enum {
45         E_GW_FILTER_OP_AND,
46         E_GW_FILTER_OP_OR,
47         E_GW_FILTER_OP_NOT,
48         E_GW_FILTER_OP_EQUAL,
49         E_GW_FILTER_OP_NOTEQUAL,
50         E_GW_FILTER_OP_GREATERTHAN,
51         E_GW_FILTER_OP_LESSTHAN,
52         E_GW_FILTER_OP_GREATERTHAN_OR_EQUAL,
53         E_GW_FILTER_OP_LESSTHAN_OR_EQUAL,
54         E_GW_FILTER_OP_CONTAINS,
55         E_GW_FILTER_OP_CONTAINSWORD,
56         E_GW_FILTER_OP_BEGINS,
57         E_GW_FILTER_OP_EXISTS,
58         E_GW_FILTER_OP_NOTEXISTS
59         
60 } EGwFilterOpType;
61
62 struct _EGwFilter {
63         GObject parent;
64         EGwFilterPrivate *priv;
65 };
66
67 struct _EGwFilterClass {
68         GObjectClass parent_class;
69 };
70
71 GType       e_gw_filter_get_type (void);
72 EGwFilter*  e_gw_filter_new(void);
73 void        e_gw_filter_add_filter_component (EGwFilter *filter, EGwFilterOpType operation, const char *field_name, const char *field_value);
74 void        e_gw_filter_append_to_soap_message (EGwFilter *filter, SoupSoapMessage *msg);
75 void        e_gw_filter_group_conditions (EGwFilter *filter, EGwFilterOpType operation, int num_of_condtions);
76
77 G_END_DECLS
78
79 #endif