Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / install / acquire / cabinet-memory.h
1 /* $Id$
2  * Include file for cabextract memory allocation for acquiration installation utility
3  * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; exactly version 2 of June 1991 is required
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
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19
20 #ifndef _CAPTIVE_INSTALL_ACQUIRE_CABINET_MEMORY_H
21 #define _CAPTIVE_INSTALL_ACQUIRE_CABINET_MEMORY_H 1
22
23
24 #include <glib/gtypes.h>
25 #include <glib-object.h>
26
27
28 G_BEGIN_DECLS
29
30 #define CAPTIVE_ACQUIRE_CABINET_MEMORY_TYPE_OBJECT            (captive_acquire_cabinet_memory_object_get_type())
31 #define CAPTIVE_ACQUIRE_CABINET_MEMORY_OBJECT(object)         (G_TYPE_CHECK_INSTANCE_CAST((object),CAPTIVE_ACQUIRE_CABINET_MEMORY_TYPE_OBJECT,CaptiveAcquireCabinetMemoryObject))
32 #define CAPTIVE_ACQUIRE_CABINET_MEMORY_OBJECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),CAPTIVE_ACQUIRE_CABINET_MEMORY_TYPE_OBJECT,CaptiveAcquireCabinetMemoryObjectClass))
33 #define CAPTIVE_ACQUIRE_CABINET_MEMORY_IS_OBJECT(object)      (G_TYPE_CHECK_INSTANCE_TYPE((object),CAPTIVE_ACQUIRE_CABINET_MEMORY_TYPE_OBJECT))
34 #define CAPTIVE_ACQUIRE_CABINET_MEMORY_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),CAPTIVE_ACQUIRE_CABINET_MEMORY_TYPE_OBJECT))
35 #define CAPTIVE_ACQUIRE_CABINET_MEMORY_OBJECT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),CAPTIVE_ACQUIRE_CABINET_MEMORY_TYPE_OBJECT,CaptiveAcquireCabinetMemoryObjectClass))
36 typedef struct _CaptiveAcquireCabinetMemoryObject      CaptiveAcquireCabinetMemoryObject;
37 typedef struct _CaptiveAcquireCabinetMemoryObjectClass CaptiveAcquireCabinetMemoryObjectClass;
38
39
40 GType captive_acquire_cabinet_memory_object_get_type(void);
41
42 CaptiveAcquireCabinetMemoryObject *acquire_cabinet_memory_object_new(void);
43
44 void acquire_cabinet_memory_object_push(CaptiveAcquireCabinetMemoryObject *memory);
45 void acquire_cabinet_memory_object_pop(CaptiveAcquireCabinetMemoryObject *memory);
46
47 gpointer acquire_cabinet_memory_malloc (gulong n_bytes);
48 gpointer acquire_cabinet_memory_malloc0(gulong n_bytes);
49 gpointer acquire_cabinet_memory_realloc(gpointer mem,gulong n_bytes);
50 void     acquire_cabinet_memory_free   (gpointer mem);
51
52 gpointer acquire_cabinet_memory_data_get(gsize size);
53
54 G_END_DECLS
55
56
57 #endif /* _CAPTIVE_INSTALL_ACQUIRE_CABINET_MEMORY_H */