Add missing files
[gmpc-magnatune.git] / src / axl / axl_hash.h
blobc9a1ec7b0d21edb4787ec59de2761018e76878f2
1 /*
2 * LibAxl: Another XML library
3 * Copyright (C) 2006 Advanced Software Production Line, S.L.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1 of
8 * the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free
17 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 * 02111-1307 USA
20 * You may find a copy of the license under this software is released
21 * at COPYING file. This is LGPL software: you are welcome to
22 * develop proprietary applications using this library without any
23 * royalty or fee but returning back any change, improvement or
24 * addition in the form of source code, project image, documentation
25 * patches, etc.
27 * For commercial support on build XML enabled solutions contact us:
29 * Postal address:
30 * Advanced Software Production Line, S.L.
31 * C/ Dr. Michavila NÂș 14
32 * Coslada 28820 Madrid
33 * Spain
35 * Email address:
36 * info@aspl.es - http://fact.aspl.es
38 #ifndef __AXL_HASH_H__
39 #define __AXL_HASH_H__
41 #include <axl_decl.h>
43 BEGIN_C_DECLS
45 axlHash * axl_hash_new (axlHashFunc hash,
46 axlEqualFunc equal);
48 axlHash * axl_hash_new_full (axlHashFunc hash,
49 axlEqualFunc equal,
50 int step);
52 unsigned int axl_hash_string (axlPointer key);
54 int axl_hash_equal_string (axlPointer keya,
55 axlPointer keyb);
57 unsigned int axl_hash_int (axlPointer key);
59 int axl_hash_equal_int (axlPointer keya,
60 axlPointer keyb);
62 void axl_hash_insert (axlHash * hash,
63 axlPointer key,
64 axlPointer data);
66 void axl_hash_insert_full (axlHash * hash,
67 axlPointer key,
68 axlDestroyFunc destroy_key,
69 axlPointer data,
70 axlDestroyFunc destroy_data);
72 void axl_hash_remove (axlHash * hash,
73 axlPointer key);
75 void axl_hash_delete (axlHash * hash,
76 axlPointer key);
78 bool axl_hash_exists (axlHash * hash,
79 axlPointer key);
81 axlPointer axl_hash_get (axlHash * hash,
82 axlPointer key);
84 void axl_hash_foreach (axlHash * hash,
85 axlHashForeachFunc func,
86 axlPointer user_data);
88 void axl_hash_foreach2 (axlHash * hash,
89 axlHashForeachFunc2 func,
90 axlPointer user_data,
91 axlPointer user_data2);
93 void axl_hash_foreach3 (axlHash * hash,
94 axlHashForeachFunc3 func,
95 axlPointer user_data,
96 axlPointer user_data2,
97 axlPointer user_data3);
99 void axl_hash_foreach4 (axlHash * hash,
100 axlHashForeachFunc4 func,
101 axlPointer user_data,
102 axlPointer user_data2,
103 axlPointer user_data3,
104 axlPointer user_data4);
106 int axl_hash_items (axlHash * hash);
108 axlHash * axl_hash_copy (axlHash * hash,
109 axlHashItemCopy key_copy,
110 axlHashItemCopy value_copy);
113 void axl_hash_show_status (axlHash * hash);
115 typedef void (*axlHashPrintKeyData) (axlPointer key, axlPointer data);
117 void axl_hash_show_status_full (axlHash * hash,
118 axlHashPrintKeyData show_item);
121 void axl_hash_free (axlHash * hash);
123 /* cursor interface */
124 axlHashCursor * axl_hash_cursor_new (axlHash * hash);
126 void axl_hash_cursor_first (axlHashCursor * cursor);
128 void axl_hash_cursor_last (axlHashCursor * cursor);
130 void axl_hash_cursor_next (axlHashCursor * cursor);
132 bool axl_hash_cursor_has_next (axlHashCursor * cursor);
134 bool axl_hash_cursor_has_item (axlHashCursor * cursor);
136 void axl_hash_cursor_remove (axlHashCursor * cursor);
138 axlPointer axl_hash_cursor_get_key (axlHashCursor * cursor);
140 axlPointer axl_hash_cursor_get_value (axlHashCursor * cursor);
142 axlHash * axl_hash_cursor_hash (axlHashCursor * cursor);
144 void axl_hash_cursor_free (axlHashCursor * cursor);
147 END_C_DECLS
149 #endif