Extending test-client-custom-summary to try e_book_client_get_contacts_uids()
[platform/upstream/evolution-data-server.git] / camel / camel-memchunk.h
1 /*
2  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
3  *
4  * Authors: Michael Zucchi <notzed@ximian.com>
5  *          Jacob Berkman <jacob@ximian.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
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
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19  * USA
20  */
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_MEMCHUNK_H
27 #define CAMEL_MEMCHUNK_H
28
29 #include <glib.h>
30
31 G_BEGIN_DECLS
32
33 /* memchunks - allocate/free fixed-size blocks of memory */
34 /* this is like gmemchunk, only faster and less overhead (only 4 bytes for every atomcount allocations) */
35 typedef struct _CamelMemChunk CamelMemChunk;
36
37 CamelMemChunk * camel_memchunk_new              (gint atomcount,
38                                                  gint atomsize);
39 gpointer        camel_memchunk_alloc            (CamelMemChunk *memchunk);
40 gpointer        camel_memchunk_alloc0           (CamelMemChunk *memchunk);
41 void            camel_memchunk_free             (CamelMemChunk *memchunk,
42                                                  gpointer mem);
43 void            camel_memchunk_empty            (CamelMemChunk *memchunk);
44 void            camel_memchunk_clean            (CamelMemChunk *memchunk);
45 void            camel_memchunk_destroy          (CamelMemChunk *memchunk);
46
47 G_END_DECLS
48
49 #endif /* CAMEL_MEMCHUNK_H */