WockyCapsCache

WockyCapsCache

Functions

Properties

gchar * path Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── WockyCapsCache

Description

Functions

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.

Parameters

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 .

Parameters

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.

Parameters

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.

Types and Values

struct WockyCapsCache

struct WockyCapsCache;

An object providing a permanent cache for capabilities.


struct WockyCapsCacheClass

struct WockyCapsCacheClass {
};

The class of a WockyCapsCache.

Property Details

The “path” property

  “path”                     gchar *

The path on disk to the SQLite database where this WockyCapsCache stores its information.

Flags: Read / Write / Construct Only

Default value: NULL