1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* Tidbit
* Copyright (C) 2010 Charlie Brej tidbit@brej.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _TIDBIT_GUID_H_
#define _TIDBIT_GUID_H_
struct _TidbitGuid{
int ref_count;
char* string;
};
struct _TidbitGuidSet{
int ref_count;
GPtrArray *data;
};
typedef void (*TidbitGuidFunc) (PtrTidbitGuid guid, gpointer user_data);
PtrTidbitGuid tidbit_guid_new (char* string);
PtrTidbitGuid tidbit_guid_ref (PtrTidbitGuid guid);
void tidbit_guid_unref (PtrTidbitGuid guid);
int tidbit_guid_cmp (PtrTidbitGuid guid_a, PtrTidbitGuid guid_b); //FIXME determine the user visible functions
const char* tidbit_guid_get_string (PtrTidbitGuid guid);
PtrTidbitGuidSet tidbit_guid_set_new (void);
PtrTidbitGuidSet tidbit_guid_set_ref (PtrTidbitGuidSet guid);
void tidbit_guid_set_unref (PtrTidbitGuidSet guid);
unsigned int tidbit_guid_set_get_count (PtrTidbitGuidSet guid_set);
gboolean tidbit_guid_set_find (PtrTidbitGuidSet guid_set, PtrTidbitGuid guid);
void tidbit_guid_set_append (PtrTidbitGuidSet guid_set, PtrTidbitGuid guid);
PtrTidbitGuidSet tidbit_guid_set_merge (PtrTidbitGuidSet guid_set_a, PtrTidbitGuidSet guid_set_b);
void tidbit_guid_set_foreach (PtrTidbitGuidSet guid_set, TidbitGuidFunc func, gpointer user_data);
#endif
|