WockyCapsCache

## WockyCapsCache WockyCapsCache |

## Synopsis

    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);

## Object Hierarchy

      GObject
       +----WockyCapsCache

## Properties

      "path"                     gchar*                : Read / Write / Construct Only

## Description

## Details

### struct WockyCapsCache

    struct WockyCapsCache;

An object providing a permanent cache for capabilities.

### struct WockyCapsCacheClass

    struct WockyCapsCacheClass {
    };

The class of a WockyCapsCache.

### wocky_caps_cache_lookup ()

    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.

`self` : | a WockyCapsCache
`node` : | 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

### wocky_caps_cache_insert ()

    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`.

`self` : | a WockyCapsCache
`node` : | the capability node
`query_node` : | the query WockyNodeTree associated with `node`

### wocky_caps_cache_new ()

    WockyCapsCache *    wocky_caps_cache_new                (const gchar *path);

Convenience function to create a new WockyCapsCache.

`path` : | full path to where the cache SQLite database should be stored
Returns : | a new WockyCapsCache.

### wocky_caps_cache_dup_shared ()

    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.

### wocky_caps_cache_free_shared ()

    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.

## Property Details

### The `"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