20 #include <sys/types.h>
PGconn * pgConn
Database connection.
FUNCTION void lrcache_print(cacheroot_t *pcroot)
Print the contents of the hash table.
FUNCTION void lrcache_free(cacheroot_t *pcroot)
Free the hash table.
FUNCTION long lrcache_lookup(cacheroot_t *pcroot, char *rf_shortname)
Lookup rf_pk in the license_ref cache rf_shortname is the key.
FUNCTION long add2license_ref(PGconn *pgConn, char *licenseName)
FUNCTION int lrcache_add(cacheroot_t *pcroot, long rf_pk, char *rf_shortname)
Add a rf_shortname, rf_pk to the license_ref cache rf_shortname is the key.
FUNCTION long get_rfpk(PGconn *pgConn, cacheroot_t *pcroot, char *rf_shortname)
Get the rf_pk for rf_shortname.
FUNCTION int lrcache_init(PGconn *pgConn, cacheroot_t *pcroot)
Build a cache the license ref db table.
FUNCTION long lrcache_hash(cacheroot_t *pcroot, char *rf_shortname)
Calculate the hash of an rf_shortname rf_shortname is the key.
long rf_pk
License id from database.
char * rf_shortname
License shortname.
int maxnodes
No. of nodes in the list.
cachenode_t * nodes
Array of nodes.