Extending test-client-custom-summary to try e_book_client_get_contacts_uids()
[platform/upstream/evolution-data-server.git] / camel / camel-object-bag.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2008 Novell, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU Lesser General Public
7  * License as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 /* Manages bags of weakly-referenced GObjects. */
21
22 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
23 #error "Only <camel/camel.h> can be included directly."
24 #endif
25
26 #ifndef CAMEL_OBJECT_BAG_H
27 #define CAMEL_OBJECT_BAG_H
28
29 #include <glib.h>
30
31 G_BEGIN_DECLS
32
33 typedef struct _CamelObjectBag CamelObjectBag;
34 typedef gpointer (*CamelCopyFunc) (gconstpointer object);
35
36 CamelObjectBag *camel_object_bag_new            (GHashFunc key_hash_func,
37                                                  GEqualFunc key_equal_func,
38                                                  CamelCopyFunc key_copy_func,
39                                                  GFreeFunc key_free_func);
40 gpointer        camel_object_bag_get            (CamelObjectBag *bag,
41                                                  gconstpointer key);
42 gpointer        camel_object_bag_peek           (CamelObjectBag *bag,
43                                                  gconstpointer key);
44 gpointer        camel_object_bag_reserve        (CamelObjectBag *bag,
45                                                  gconstpointer key);
46 void            camel_object_bag_add            (CamelObjectBag *bag,
47                                                  gconstpointer key,
48                                                  gpointer object);
49 void            camel_object_bag_abort          (CamelObjectBag *bag,
50                                                  gconstpointer key);
51 void            camel_object_bag_rekey          (CamelObjectBag *bag,
52                                                  gpointer object,
53                                                  gconstpointer new_key);
54 GPtrArray *     camel_object_bag_list           (CamelObjectBag *bag);
55 void            camel_object_bag_remove         (CamelObjectBag *bag,
56                                                  gpointer object);
57 void            camel_object_bag_destroy        (CamelObjectBag *bag);
58
59 G_END_DECLS
60
61 #endif /* CAMEL_OBJECT_BAG_H */