minimal build
[platform/upstream/gcr.git] / gcr / gcr-filter-collection.h
1 /*
2  * gnome-keyring
3  *
4  * Copyright (C) 2011 Collabora Ltd.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as
8  * published by the Free Software Foundation; either version 2.1 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, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19  * 02111-1307, USA.
20  *
21  * Author: Stef Walter <stefw@collabora.co.uk>
22  */
23
24 #ifndef __GCR_FILTER_COLLECTION_H__
25 #define __GCR_FILTER_COLLECTION_H__
26
27 #include "gcr-collection.h"
28
29 #include <glib-object.h>
30
31 G_BEGIN_DECLS
32
33 #define GCR_TYPE_FILTER_COLLECTION               (gcr_filter_collection_get_type ())
34 #define GCR_FILTER_COLLECTION(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCR_TYPE_FILTER_COLLECTION, GcrFilterCollection))
35 #define GCR_FILTER_COLLECTION_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GCR_TYPE_FILTER_COLLECTION, GcrFilterCollectionClass))
36 #define GCR_IS_FILTER_COLLECTION(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCR_TYPE_FILTER_COLLECTION))
37 #define GCR_IS_FILTER_COLLECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GCR_TYPE_FILTER_COLLECTION))
38 #define GCR_FILTER_COLLECTION_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GCR_TYPE_FILTER_COLLECTION, GcrFilterCollectionClass))
39
40 typedef struct _GcrFilterCollection GcrFilterCollection;
41 typedef struct _GcrFilterCollectionClass GcrFilterCollectionClass;
42 typedef struct _GcrFilterCollectionPrivate GcrFilterCollectionPrivate;
43
44 struct _GcrFilterCollection {
45         GObject parent;
46
47         /*< private >*/
48         GcrFilterCollectionPrivate *pv;
49 };
50
51 struct _GcrFilterCollectionClass {
52         GObjectClass parent_class;
53 };
54
55 GType               gcr_filter_collection_get_type                (void);
56
57 typedef gboolean    (* GcrFilterCollectionFunc)                   (GObject *object,
58                                                                    gpointer user_data);
59
60 GcrCollection *     gcr_filter_collection_new_with_callback       (GcrCollection *underlying,
61                                                                    GcrFilterCollectionFunc callback,
62                                                                    gpointer user_data,
63                                                                    GDestroyNotify destroy_func);
64
65 void                gcr_filter_collection_set_callback            (GcrFilterCollection *self,
66                                                                    GcrFilterCollectionFunc callback,
67                                                                    gpointer user_data,
68                                                                    GDestroyNotify destroy_func);
69
70 void                gcr_filter_collection_refilter                (GcrFilterCollection *self);
71
72 GcrCollection *     gcr_filter_collection_get_underlying          (GcrFilterCollection *self);
73
74 G_END_DECLS
75
76 #endif /* __GCR_FILTER_COLLECTION_H__ */