BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sfiustore.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __SFI_USTORE_H__
3 #define __SFI_USTORE_H__
4 
5 #include <sfi/sfitypes.hh>
6 
7 G_BEGIN_DECLS
8 
9 
10 /* --- typedefs --- */
11 /* typedef struct _SfiUStore SfiUStore; */
12 /* typedef struct _SfiUPool SfiUPool; */
13 typedef gboolean (*SfiUStoreForeach) (gpointer data,
14  gulong unique_id,
15  gpointer value);
16 typedef gboolean (*SfiUPoolForeach) (gpointer data,
17  gulong unique_id);
18 typedef gboolean (*SfiPPoolForeach) (gpointer data,
19  gpointer pointer);
20 
21 
22 /* --- unique ID store --- */
23 SfiUStore* sfi_ustore_new (void);
24 gpointer sfi_ustore_lookup (SfiUStore *store,
25  gulong unique_id);
26 void sfi_ustore_insert (SfiUStore *store,
27  gulong unique_id,
28  gpointer value);
29 void sfi_ustore_remove (SfiUStore *store,
30  gulong unique_id);
31 void sfi_ustore_foreach (SfiUStore *store,
32  SfiUStoreForeach foreach,
33  gpointer data);
34 void sfi_ustore_destroy (SfiUStore *store);
35 
36 
37 /* --- unique ID pool --- */
38 SfiUPool* sfi_upool_new (void);
39 gboolean sfi_upool_lookup (SfiUPool *pool,
40  gulong unique_id);
41 void sfi_upool_set (SfiUPool *pool,
42  gulong unique_id);
43 void sfi_upool_unset (SfiUPool *pool,
44  gulong unique_id);
45 void sfi_upool_foreach (SfiUPool *pool,
46  SfiUPoolForeach foreach,
47  gpointer data);
48 void sfi_upool_destroy (SfiUPool *pool);
49 gulong* sfi_upool_list (SfiUPool *pool,
50  guint *n_ids);
51 
52 
53 /* --- pointer pool --- */
54 SfiPPool* sfi_ppool_new (void);
55 gboolean sfi_ppool_lookup (SfiPPool *pool,
56  gpointer unique_ptr);
57 void sfi_ppool_set (SfiPPool *pool,
58  gpointer unique_ptr);
59 void sfi_ppool_unset (SfiPPool *pool,
60  gpointer unique_ptr);
61 void sfi_ppool_foreach (SfiPPool *pool,
62  SfiPPoolForeach foreach,
63  gpointer data);
64 GSList* sfi_ppool_slist (SfiPPool *pool);
65 void sfi_ppool_destroy (SfiPPool *pool);
66 
67 
68 
69 G_END_DECLS
70 
71 #endif /* __SFI_USTORE_H__ */
72 
73 /* vim:set ts=8 sts=2 sw=2: */