Values are stored in a 'slot' associated with a key. Pointers passed as arguments into set_slot and get_slot are the responsibility of the caller. Pointers returned by get_slot are owned by the kvp_frame. Make copies as needed.
A 'path' is a sequence of keys that can be followed to a value. Paths may be specified as varargs (variable number of arguments to a subrutine, NULL-terminated), as a GSList, or as a standard URL-like path name. The later is parsed and treated in the same way as file paths would be: / separates keys, /./ is treated as / and /../ means backup one level. Repeated slashes are treated as one slash.
Note that although, in principle, keys may contain the / and . and .. characters, doing so may lead to confusion, and will make path-string parsing routines fail. In other words, don't use a key such as 'some/key' or 'some/./other/../key' because you may get unexpected results.
To set a value into a frame, you will want to use one of the kvp_frame_set_xxx() routines. Most of the other routines provide only low-level access that you probably shouldn't use.
Files | |
file | kvp-util-p.h |
misc odd-job kvp utils engine-private routines | |
file | kvp-util.h |
QOF KVP utility functions. | |
file | kvp_frame.h |
A key-value frame system. | |
Defines | |
#define | QOF_MOD_KVP "qof-kvp" |
#define | kvp_frame KvpFrame |
#define | kvp_value KvpValue |
#define | kvp_value_t KvpValueType |
Typedefs | |
typedef _KvpFrame | KvpFrame |
typedef _KvpValue | KvpValue |
Enumerations | |
enum | KvpValueType { KVP_TYPE_GINT64 = 1, KVP_TYPE_DOUBLE, KVP_TYPE_NUMERIC, KVP_TYPE_STRING, KVP_TYPE_GUID, KVP_TYPE_TIMESPEC, KVP_TYPE_BINARY, KVP_TYPE_GLIST, KVP_TYPE_FRAME } |
possible types in the union KvpValue More... |
|
Definition at line 104 of file kvp_frame.h. |
|
Definition at line 106 of file kvp_frame.h. |
|
Definition at line 108 of file kvp_frame.h. |
|
Opaque frame structure Definition at line 71 of file kvp_frame.h. |
|
A KvpValue is a union with possible types enumerated in the KvpValueType enum. Definition at line 75 of file kvp_frame.h. |
|
possible types in the union KvpValue
Definition at line 88 of file kvp_frame.h. 00088 { 00089 KVP_TYPE_GINT64=1, 00090 KVP_TYPE_DOUBLE, 00091 KVP_TYPE_NUMERIC, 00092 KVP_TYPE_STRING, 00093 KVP_TYPE_GUID, 00094 KVP_TYPE_TIMESPEC, 00095 KVP_TYPE_BINARY, 00096 KVP_TYPE_GLIST, 00097 KVP_TYPE_FRAME 00098 } KvpValueType;
|