| Wocky Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct WockyCapsCache; struct WockyCapsCacheClass; WockyNodeTree * wocky_caps_cache_lookup (WockyCapsCache *self,const gchar *node); void wocky_caps_cache_insert (WockyCapsCache *self,const gchar *node,WockyNodeTree *query_node); WockyCapsCache * wocky_caps_cache_new (const gchar *path); WockyCapsCache * wocky_caps_cache_dup_shared (void); void wocky_caps_cache_free_shared (void);
struct WockyCapsCache;
An object providing a permanent cache for capabilities.
WockyNodeTree * wocky_caps_cache_lookup (WockyCapsCache *self,const gchar *node);
Look up node in the caps cache self. The caller is responsible
for unreffing the returned WockyNodeTree.
|
a WockyCapsCache |
|
the node to look up in the cache |
Returns : |
a WockyNodeTree if node was found in the cache, or NULL
if a match was not found |
void wocky_caps_cache_insert (WockyCapsCache *self,const gchar *node,WockyNodeTree *query_node);
Adds a new item to the caps cache. node is associated with
query_node so that subsequent calls to wocky_caps_cache_lookup()
with the same node value will return query_node.
|
a WockyCapsCache |
|
the capability node |
|
the query WockyNodeTree associated with node
|
WockyCapsCache * wocky_caps_cache_new (const gchar *path);
Convenience function to create a new WockyCapsCache.
|
full path to where the cache SQLite database should be stored |
Returns : |
a new WockyCapsCache. |
WockyCapsCache * wocky_caps_cache_dup_shared (void);
Returns a new or existing WockyCapsCache object.
The returned WockyCapsCache is cached; the same WockyCapsCache
object will be returned by this function repeatedly in the same
process. At the end of the process, the caller should call
wocky_caps_cache_free_shared() to shared the shared WockyCapsCache
object.
Returns : |
a new, or cached, WockyCapsCache. |
void wocky_caps_cache_free_shared (void);
Free the shared WockyCapsCache instance which was created by
calling wocky_caps_cache_dup_shared(), or do nothing if said
function was not called.
"path" property"path" gchar* : Read / Write / Construct Only
The path on disk to the SQLite database where this WockyCapsCache stores its information.
Default value: NULL