Provides access to a database which holds auxiliary contextual information.
Auxiliary Context Database
The context name is stored as a 224-bit key. The context data is limited to 4096 bytes. Context records automatically expire after two years of their creation or last modification.
Context records can be generated through the Share Coin project suite via the various "shc" utility program commands provided. These context records are automatically saved in the primary system database accessible by the libshare runtime functions described here.
All context records are automatically distributed across the sharenet when the "shared" daemon is running locally.
Although you may over-ride any context record locally, the context records received by a remote host will not over-ride the local system Context Database unless they originate from the same identity that created it.
Certain context name prefixes have been reserved, or at least utilized, for specific purposes;
"id:" Specifies account information similar to the information stored in a structure or recorded via the Share Coin identity management commands. The information is stored in JSON format.
"geo:," Descriptive and metric information relating to a particular geodetic location stored in JSON format.
"loc:" The name of a location which references a particular geodetic location.
(char *name, unsigned char *data, size_t data_len)
Set an auxillary context.
(char *name, char *data)
Set an auxillary string context.
(char *name, shctx_t *ctx)
Get an auxillary context.
(shkey_t *name_key, unsigned char *data, size_t data_len)
Store auxillary context via a share-key.
(shkey_t *name_key, shctx_t *ctx)
Retrieve auxillary context via a share-key.
inform the shared daemon to relay a local context.
A (shr160 / ripemd32) share key referencing the textual name.
An unlimited length literal string.
An un-allocated share-key.
The returned share-key does not need to be freed.