00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef GUID_H
00025 #define GUID_H
00026
00027 #include <stddef.h>
00028 #include <glib-object.h>
00029
00053 #define GUID_DATA_SIZE 16
00054 typedef union GNC_INTERNAL_GUID
00055 {
00056 guchar data[GUID_DATA_SIZE];
00057
00058 gint __align_me;
00059
00060 } GncGUID;
00061
00062
00063 #define GNC_TYPE_GUID (gnc_guid_get_type())
00064 #define GNC_VALUE_HOLDS_GUID(value) G_VALUE_HOLDS(value, GNC_TYPE_GUID)
00065
00066 GType gnc_guid_get_type (void);
00067 G_CONST_RETURN GncGUID* gnc_value_get_guid (const GValue *value);
00068
00071 #define GUID_ENCODING_LENGTH 32
00072
00073
00082 void guid_init(void);
00083
00087 void guid_shutdown (void);
00088
00103 void guid_new(GncGUID *guid);
00104
00111 GncGUID guid_new_return(void);
00112
00115 const GncGUID * guid_null (void);
00116
00118 GncGUID * guid_malloc (void);
00119
00120
00121 void guid_free (GncGUID *guid);
00122
00123 GncGUID *guid_copy (const GncGUID *guid);
00124
00140 const gchar * guid_to_string (const GncGUID * guid);
00141
00155 gchar * guid_to_string_buff (const GncGUID * guid, gchar *buff);
00156
00157
00163 gboolean string_to_guid(const gchar * string, GncGUID * guid);
00164
00165
00168 gboolean guid_equal(const GncGUID *guid_1, const GncGUID *guid_2);
00169 gint guid_compare(const GncGUID *g1, const GncGUID *g2);
00170
00172 guint guid_hash_to_guint(gconstpointer ptr);
00173
00175 gint guid_g_hash_table_equal (gconstpointer guid_a, gconstpointer guid_b);
00176
00179 GHashTable *guid_hash_table_new(void);
00180
00181
00182
00183 #endif