1.1 --- a/epoc32/include/stdapis/glib-2.0/glib/ghash.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/glib-2.0/glib/ghash.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,117 @@
1.4 -ghash.h
1.5 +/* GLIB - Library of useful routines for C programming
1.6 + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
1.7 + * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
1.8 + *
1.9 + * This library is free software; you can redistribute it and/or
1.10 + * modify it under the terms of the GNU Lesser General Public
1.11 + * License as published by the Free Software Foundation; either
1.12 + * version 2 of the License, or (at your option) any later version.
1.13 + *
1.14 + * This library is distributed in the hope that it will be useful,
1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.17 + * Lesser General Public License for more details.
1.18 + *
1.19 + * You should have received a copy of the GNU Lesser General Public
1.20 + * License along with this library; if not, write to the
1.21 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1.22 + * Boston, MA 02111-1307, USA.
1.23 + */
1.24 +
1.25 +/*
1.26 + * Modified by the GLib Team and others 1997-2000. See the AUTHORS
1.27 + * file for a list of people on the GLib Team. See the ChangeLog
1.28 + * files for a list of changes. These files are distributed with
1.29 + * GLib at ftp://ftp.gtk.org/pub/gtk/.
1.30 + */
1.31 +
1.32 +#ifndef __G_HASH_H__
1.33 +#define __G_HASH_H__
1.34 +
1.35 +#include <_ansi.h>
1.36 +#include <glib/gtypes.h>
1.37 +
1.38 +G_BEGIN_DECLS
1.39 +
1.40 +typedef struct _GHashTable GHashTable;
1.41 +
1.42 +typedef gboolean (*GHRFunc) (gpointer key,
1.43 + gpointer value,
1.44 + gpointer user_data);
1.45 +
1.46 +/* Hash tables
1.47 + */
1.48 +IMPORT_C GHashTable* g_hash_table_new (GHashFunc hash_func,
1.49 + GEqualFunc key_equal_func);
1.50 +IMPORT_C GHashTable* g_hash_table_new_full (GHashFunc hash_func,
1.51 + GEqualFunc key_equal_func,
1.52 + GDestroyNotify key_destroy_func,
1.53 + GDestroyNotify value_destroy_func);
1.54 +IMPORT_C void g_hash_table_destroy (GHashTable *hash_table);
1.55 +IMPORT_C void g_hash_table_insert (GHashTable *hash_table,
1.56 + gpointer key,
1.57 + gpointer value);
1.58 +IMPORT_C void g_hash_table_replace (GHashTable *hash_table,
1.59 + gpointer key,
1.60 + gpointer value);
1.61 +IMPORT_C gboolean g_hash_table_remove (GHashTable *hash_table,
1.62 + gconstpointer key);
1.63 +IMPORT_C gboolean g_hash_table_steal (GHashTable *hash_table,
1.64 + gconstpointer key);
1.65 +IMPORT_C gpointer g_hash_table_lookup (GHashTable *hash_table,
1.66 + gconstpointer key);
1.67 +IMPORT_C gboolean g_hash_table_lookup_extended (GHashTable *hash_table,
1.68 + gconstpointer lookup_key,
1.69 + gpointer *orig_key,
1.70 + gpointer *value);
1.71 +IMPORT_C void g_hash_table_foreach (GHashTable *hash_table,
1.72 + GHFunc func,
1.73 + gpointer user_data);
1.74 +IMPORT_C gpointer g_hash_table_find (GHashTable *hash_table,
1.75 + GHRFunc predicate,
1.76 + gpointer user_data);
1.77 +IMPORT_C guint g_hash_table_foreach_remove (GHashTable *hash_table,
1.78 + GHRFunc func,
1.79 + gpointer user_data);
1.80 +IMPORT_C guint g_hash_table_foreach_steal (GHashTable *hash_table,
1.81 + GHRFunc func,
1.82 + gpointer user_data);
1.83 +IMPORT_C guint g_hash_table_size (GHashTable *hash_table);
1.84 +
1.85 +/* keeping hash tables alive */
1.86 +IMPORT_C GHashTable* g_hash_table_ref (GHashTable *hash_table);
1.87 +IMPORT_C void g_hash_table_unref (GHashTable *hash_table);
1.88 +
1.89 +#ifndef G_DISABLE_DEPRECATED
1.90 +
1.91 +/* The following two functions are deprecated and will be removed in
1.92 + * the next major release. They do no good. */
1.93 +#define g_hash_table_freeze(hash_table) ((void)0)
1.94 +#define g_hash_table_thaw(hash_table) ((void)0)
1.95 +
1.96 +#endif /* G_DISABLE_DEPRECATED */
1.97 +
1.98 +/* Hash Functions
1.99 + */
1.100 +IMPORT_C gboolean g_str_equal (gconstpointer v1,
1.101 + gconstpointer v2);
1.102 +IMPORT_C guint g_str_hash (gconstpointer v);
1.103 +
1.104 +IMPORT_C gboolean g_int_equal (gconstpointer v1,
1.105 + gconstpointer v2);
1.106 +IMPORT_C guint g_int_hash (gconstpointer v);
1.107 +
1.108 +/* This "hash" function will just return the key's address as an
1.109 + * unsigned integer. Useful for hashing on plain addresses or
1.110 + * simple integer values.
1.111 + * Passing NULL into g_hash_table_new() as GHashFunc has the
1.112 + * same effect as passing g_direct_hash().
1.113 + */
1.114 +IMPORT_C guint g_direct_hash (gconstpointer v) G_GNUC_CONST;
1.115 +IMPORT_C gboolean g_direct_equal (gconstpointer v1,
1.116 + gconstpointer v2) G_GNUC_CONST;
1.117 +
1.118 +G_END_DECLS
1.119 +
1.120 +#endif /* __G_HASH_H__ */
1.121 +