mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Removing deprecated #define
kvp_value should not be used, but rather the standard KvpValue. Using the deprecated value just adds one more variation on this typename.
This commit is contained in:
parent
010cf541f9
commit
b109c94f2c
@ -492,7 +492,7 @@ set_guid_val( gpointer pObject, /*@ null @*/ gpointer pValue )
|
||||
case KVP_TYPE_GLIST:
|
||||
{
|
||||
slot_info_t *newInfo = slot_info_copy( pInfo, (GncGUID*)pValue );
|
||||
kvp_value *pValue = NULL;
|
||||
KvpValue *pValue = NULL;
|
||||
gchar *key = get_key_from_path( pInfo->path );
|
||||
|
||||
newInfo->context = LIST;
|
||||
@ -684,7 +684,7 @@ save_slot( const gchar* key, KvpValue* value, gpointer data )
|
||||
g_return_if_fail( pSlot_info->is_ok );
|
||||
for (cursor = kvp_value_get_glist(value); cursor; cursor = cursor->next)
|
||||
{
|
||||
kvp_value *val = (kvp_value*)cursor->data;
|
||||
KvpValue *val = (KvpValue*)cursor->data;
|
||||
save_slot("", val, pNewInfo);
|
||||
}
|
||||
kvp_value_delete( pSlot_info->pKvpValue );
|
||||
|
@ -435,7 +435,7 @@ gnc_is_xml_data_file(const gchar *filename)
|
||||
static void
|
||||
kvp_value_result_cleanup(sixtp_child_result *cr)
|
||||
{
|
||||
kvp_value *v = (kvp_value *) cr->data;;
|
||||
KvpValue *v = (KvpValue *) cr->data;;
|
||||
if (v) kvp_value_delete(v);
|
||||
}
|
||||
|
||||
@ -476,7 +476,7 @@ simple_kvp_value_parser_new(sixtp_end_handler end_handler)
|
||||
{ \
|
||||
gchar *txt = NULL; \
|
||||
TYPE val; \
|
||||
kvp_value *kvpv; \
|
||||
KvpValue *kvpv; \
|
||||
gboolean ok; \
|
||||
\
|
||||
txt = concatenate_child_result_chars(data_from_children); \
|
||||
@ -559,7 +559,7 @@ string_kvp_value_end_handler(gpointer data_for_children,
|
||||
const gchar *tag)
|
||||
{
|
||||
gchar *txt = NULL;
|
||||
kvp_value *kvpv;
|
||||
KvpValue *kvpv;
|
||||
|
||||
txt = concatenate_child_result_chars(data_from_children);
|
||||
g_return_val_if_fail(txt, FALSE);
|
||||
@ -591,7 +591,7 @@ guid_kvp_value_end_handler(gpointer data_for_children,
|
||||
{
|
||||
gchar *txt = NULL;
|
||||
GncGUID val;
|
||||
kvp_value *kvpv;
|
||||
KvpValue *kvpv;
|
||||
gboolean ok;
|
||||
|
||||
txt = concatenate_child_result_chars(data_from_children);
|
||||
@ -644,13 +644,13 @@ glist_kvp_value_end_handler(gpointer data_for_children,
|
||||
{
|
||||
GSList *lp;
|
||||
GList *result_glist;
|
||||
kvp_value *kvp_result;
|
||||
KvpValue *kvp_result;
|
||||
|
||||
result_glist = NULL;
|
||||
for (lp = data_from_children; lp; lp = lp->next)
|
||||
{
|
||||
sixtp_child_result *cr = (sixtp_child_result *) lp->data;
|
||||
kvp_value *kvp = (kvp_value *) cr->data;
|
||||
KvpValue *kvp = (KvpValue *) cr->data;
|
||||
|
||||
/* children are in reverse chron order, so this fixes it. */
|
||||
result_glist = g_list_prepend(result_glist, kvp);
|
||||
@ -764,7 +764,7 @@ kvp_frame_slot_end_handler(gpointer data_for_children,
|
||||
guint64 key_node_count;
|
||||
gchar *key = NULL;
|
||||
sixtp_child_result *value_cr = NULL;
|
||||
kvp_value *value = NULL;
|
||||
KvpValue *value = NULL;
|
||||
gboolean delete_value = FALSE;
|
||||
|
||||
g_return_val_if_fail(f, FALSE);
|
||||
|
@ -264,7 +264,7 @@ static void
|
||||
add_kvp_slot(gpointer key, gpointer value, gpointer data);
|
||||
|
||||
static void
|
||||
add_kvp_value_node(xmlNodePtr node, gchar *tag, kvp_value* val)
|
||||
add_kvp_value_node(xmlNodePtr node, gchar *tag, KvpValue* val)
|
||||
{
|
||||
xmlNodePtr val_node;
|
||||
kvp_value_t kvp_type;
|
||||
@ -333,7 +333,7 @@ add_kvp_value_node(xmlNodePtr node, gchar *tag, kvp_value* val)
|
||||
xmlSetProp(val_node, BAD_CAST "type", BAD_CAST "list");
|
||||
for (cursor = kvp_value_get_glist(val); cursor; cursor = cursor->next)
|
||||
{
|
||||
kvp_value *val = (kvp_value*)cursor->data;
|
||||
KvpValue *val = (KvpValue*)cursor->data;
|
||||
add_kvp_value_node(val_node, "slot:value", val);
|
||||
}
|
||||
}
|
||||
@ -369,7 +369,7 @@ add_kvp_slot(gpointer key, gpointer value, gpointer data)
|
||||
xmlNewTextChild(slot_node, NULL, BAD_CAST "slot:key",
|
||||
checked_char_cast (newkey));
|
||||
g_free (newkey);
|
||||
add_kvp_value_node(slot_node, "slot:value", (kvp_value*)value);
|
||||
add_kvp_value_node(slot_node, "slot:value", (KvpValue*)value);
|
||||
}
|
||||
|
||||
xmlNodePtr
|
||||
|
@ -78,12 +78,12 @@ dom_tree_to_guid(xmlNodePtr node)
|
||||
}
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_integer_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gchar *text;
|
||||
gint64 daint;
|
||||
kvp_value* ret = NULL;
|
||||
KvpValue* ret = NULL;
|
||||
|
||||
text = dom_tree_to_text(node);
|
||||
|
||||
@ -161,12 +161,12 @@ dom_tree_to_boolean(xmlNodePtr node, gboolean* b)
|
||||
}
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_double_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gchar *text;
|
||||
double dadoub;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
text = dom_tree_to_text(node);
|
||||
|
||||
@ -180,11 +180,11 @@ dom_tree_to_double_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_numeric_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gnc_numeric *danum;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
danum = dom_tree_to_gnc_numeric(node);
|
||||
|
||||
@ -198,11 +198,11 @@ dom_tree_to_numeric_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_string_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gchar *datext;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
datext = dom_tree_to_text(node);
|
||||
if (datext)
|
||||
@ -215,11 +215,11 @@ dom_tree_to_string_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_guid_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
GncGUID *daguid;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
daguid = dom_tree_to_guid(node);
|
||||
if (daguid)
|
||||
@ -232,11 +232,11 @@ dom_tree_to_guid_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_timespec_kvp_value (xmlNodePtr node)
|
||||
{
|
||||
Timespec ts;
|
||||
kvp_value * ret = NULL;
|
||||
KvpValue * ret = NULL;
|
||||
|
||||
ts = dom_tree_to_timespec (node);
|
||||
if (ts.tv_sec || ts.tv_nsec)
|
||||
@ -246,11 +246,11 @@ dom_tree_to_timespec_kvp_value (xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_gdate_kvp_value (xmlNodePtr node)
|
||||
{
|
||||
GDate *date;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
date = dom_tree_to_gdate(node);
|
||||
|
||||
@ -303,16 +303,16 @@ string_to_binary(const gchar *str, void **v, guint64 *data_len)
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_list_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
GList *list = NULL;
|
||||
xmlNodePtr mark;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
for (mark = node->xmlChildrenNode; mark; mark = mark->next)
|
||||
{
|
||||
kvp_value *new_val;
|
||||
KvpValue *new_val;
|
||||
|
||||
if (g_strcmp0 ((char*)mark->name, "text") == 0)
|
||||
continue;
|
||||
@ -329,11 +329,11 @@ dom_tree_to_list_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_frame_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
kvp_frame *frame;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
frame = dom_tree_to_kvp_frame(node);
|
||||
|
||||
@ -351,7 +351,7 @@ dom_tree_to_frame_kvp_value(xmlNodePtr node)
|
||||
struct kvp_val_converter
|
||||
{
|
||||
gchar *tag;
|
||||
kvp_value* (*converter)(xmlNodePtr node);
|
||||
KvpValue* (*converter)(xmlNodePtr node);
|
||||
};
|
||||
|
||||
struct kvp_val_converter val_converters[] =
|
||||
@ -368,13 +368,13 @@ struct kvp_val_converter val_converters[] =
|
||||
{ 0, 0 },
|
||||
};
|
||||
|
||||
kvp_value*
|
||||
KvpValue*
|
||||
dom_tree_to_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
xmlChar *xml_type;
|
||||
gchar *type;
|
||||
struct kvp_val_converter *mark;
|
||||
kvp_value *ret = NULL;
|
||||
KvpValue *ret = NULL;
|
||||
|
||||
xml_type = xmlGetProp(node, BAD_CAST "type");
|
||||
if (xml_type)
|
||||
@ -417,7 +417,7 @@ dom_tree_to_kvp_frame_given(xmlNodePtr node, kvp_frame *frame)
|
||||
{
|
||||
xmlNodePtr mark2;
|
||||
gchar *key = NULL;
|
||||
kvp_value *val = NULL;
|
||||
KvpValue *val = NULL;
|
||||
|
||||
for (mark2 = mark->xmlChildrenNode; mark2; mark2 = mark2->next)
|
||||
{
|
||||
|
@ -50,17 +50,17 @@ gboolean string_to_binary(const gchar *str, void **v, guint64 *data_len);
|
||||
gboolean dom_tree_to_kvp_frame_given(xmlNodePtr node, kvp_frame *frame);
|
||||
|
||||
kvp_frame* dom_tree_to_kvp_frame(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_integer_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_double_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_numeric_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_string_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_guid_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_timespec_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_binary_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_list_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_frame_kvp_value(xmlNodePtr node);
|
||||
kvp_value* dom_tree_to_gdate_kvp_value (xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_integer_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_double_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_numeric_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_string_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_guid_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_timespec_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_binary_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_list_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_frame_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_gdate_kvp_value (xmlNodePtr node);
|
||||
|
||||
gboolean dom_tree_to_integer(xmlNodePtr node, gint64 *daint);
|
||||
gboolean dom_tree_to_guint16(xmlNodePtr node, guint16 *i);
|
||||
|
@ -16,10 +16,10 @@ const gchar *gnc_v2_xml_version_string = GNC_V2_STRING;
|
||||
|
||||
static void
|
||||
test_kvp_get_slot(int run,
|
||||
kvp_frame *test_frame1, const kvp_value *test_val1,
|
||||
kvp_frame *test_frame1, const KvpValue *test_val1,
|
||||
const gchar *test_key)
|
||||
{
|
||||
const kvp_value *test_val2;
|
||||
const KvpValue *test_val2;
|
||||
test_val2 = kvp_frame_get_slot(test_frame1, test_key);
|
||||
if (kvp_value_compare(test_val1, test_val2) == 0)
|
||||
{
|
||||
@ -37,7 +37,7 @@ test_kvp_get_slot(int run,
|
||||
|
||||
static void
|
||||
test_kvp_copy_compare(int run,
|
||||
kvp_frame *test_frame1, const kvp_value *test_val1,
|
||||
kvp_frame *test_frame1, const KvpValue *test_val1,
|
||||
const gchar *test_key)
|
||||
{
|
||||
kvp_frame *test_frame2;
|
||||
@ -70,11 +70,11 @@ test_kvp_copy_compare(int run,
|
||||
|
||||
static void
|
||||
test_kvp_copy_get_slot(int run,
|
||||
kvp_frame *test_frame1, const kvp_value *test_val1,
|
||||
kvp_frame *test_frame1, const KvpValue *test_val1,
|
||||
const gchar *test_key)
|
||||
{
|
||||
kvp_frame *test_frame2;
|
||||
const kvp_value *test_val2;
|
||||
const KvpValue *test_val2;
|
||||
|
||||
test_frame2 = kvp_frame_copy(test_frame1);
|
||||
test_val2 = kvp_frame_get_slot(test_frame2, test_key);
|
||||
@ -126,7 +126,7 @@ test_kvp_frames1(void)
|
||||
{
|
||||
kvp_frame *test_frame1;
|
||||
gchar *test_key;
|
||||
kvp_value *test_val1;
|
||||
KvpValue *test_val1;
|
||||
|
||||
test_val1 = get_random_kvp_value(i % KVP_TYPE_FRAME);
|
||||
|
||||
|
@ -847,15 +847,15 @@ exchange.
|
||||
To meet this need for varying data storage, the GnuCash accounting
|
||||
entities use Key-Value Pair Frames (hereafter referred to as the
|
||||
datatype @code{kvp_frame}). A @code{kvp_frame} is a set of associations
|
||||
between character strings (keys) and @code{kvp_value} structures. A
|
||||
@code{kvp_value} is a union with possible types enumerated in the
|
||||
between character strings (keys) and @code{KvpValue} structures. A
|
||||
@code{KvpValue} is a union with possible types enumerated in the
|
||||
@code{kvp_value_t} enum which indicates the type of data stored in a
|
||||
@code{kvp_value} object.
|
||||
@code{KvpValue} object.
|
||||
|
||||
@menu
|
||||
* Key-Value Policy::
|
||||
* kvp_frame::
|
||||
* kvp_value::
|
||||
* KvpValue::
|
||||
* kvp_list::
|
||||
@end menu
|
||||
|
||||
@ -910,12 +910,12 @@ same basic purpose.
|
||||
@end itemize
|
||||
|
||||
|
||||
@node kvp_frame, kvp_value, Key-Value Policy, Key-Value Pair Frames
|
||||
@node kvp_frame, KvpValue, Key-Value Policy, Key-Value Pair Frames
|
||||
@subsection kvp_frame
|
||||
@tindex kvp_frame
|
||||
|
||||
A @code{kvp_frame} is the datatype used to associate key strings with
|
||||
@code{kvp_value} objects (@pxref{kvp_value}).
|
||||
@code{KvpValue} objects (@pxref{KvpValue}).
|
||||
|
||||
@deftypefun kvp_frame* kvp_frame_new (void)
|
||||
Create and initialize a new @code{kvp_frame} object and return
|
||||
@ -930,40 +930,40 @@ Free all memory associated with @var{frame}.
|
||||
Return a deep copy of @var{frame}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void kvp_frame_set_slot (kvp_frame * @var{frame}, const char * @var{key}, const kvp_value * @var{value})
|
||||
@deftypefun void kvp_frame_set_slot (kvp_frame * @var{frame}, const char * @var{key}, const KvpValue * @var{value})
|
||||
Associate @var{key} with @var{value} in @var{frame}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void kvp_frame_set_slot_nc (kvp_frame * @var{frame}, const char * @var{key}, kvp_value * @var{value})
|
||||
@deftypefun void kvp_frame_set_slot_nc (kvp_frame * @var{frame}, const char * @var{key}, KvpValue * @var{value})
|
||||
Same as @code{kvp_frame_set_slot}, except that @var{value} is used
|
||||
directly, instead of being copied. This call transfers 'ownership'
|
||||
of @var{value} to @var{frame}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_value* kvp_frame_get_slot (kvp_frame * @var{frame}, const char * @var{key})
|
||||
Return the @code{kvp_value} object associated with @var{key}
|
||||
@deftypefun KvpValue* kvp_frame_get_slot (kvp_frame * @var{frame}, const char * @var{key})
|
||||
Return the @code{KvpValue} object associated with @var{key}
|
||||
in @var{frame} or return @code{NULL} if there is no association
|
||||
for @var{key}. The value returned is not a copy.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void kvp_frame_set_slot_path (kvp_frame * @var{frame}, const kvp_value * @var{value}, const char * @var{first_key}, ...)
|
||||
@deftypefun void kvp_frame_set_slot_path (kvp_frame * @var{frame}, const KvpValue * @var{value}, const char * @var{first_key}, ...)
|
||||
Associate @var{value} with the ``key path'' specified by the variable
|
||||
argument list. Each key in the path except the last denotes a sub-frame
|
||||
which is associated with the given key. The variable list must be
|
||||
terminated with NULL.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void kvp_frame_set_slot_path_gslist (kvp_frame * @var{frame}, const kvp_value * @var{value}, GSList * @var{key_path})
|
||||
@deftypefun void kvp_frame_set_slot_path_gslist (kvp_frame * @var{frame}, const KvpValue * @var{value}, GSList * @var{key_path})
|
||||
The same as @code{kvp_frame_set_slot_path}, except that the key path is
|
||||
specified using a GSList. All the keys in the list should be non-NULL.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {kvp_value *} kvp_frame_get_slot_path (kvp_frame * @var{frame}, const char * @var{first_key}, ...)
|
||||
@deftypefun {KvpValue *} kvp_frame_get_slot_path (kvp_frame * @var{frame}, const char * @var{first_key}, ...)
|
||||
Return the value associated with the key path, or @code{NULL} if none.
|
||||
The path is specified as in @code{kvp_frame_set_slot_path}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {kvp_value *} kvp_frame_get_slot_path_gslist (kvp_frame * @var{frame}, GSList * @var{key_path})
|
||||
@deftypefun {KvpValue *} kvp_frame_get_slot_path_gslist (kvp_frame * @var{frame}, GSList * @var{key_path})
|
||||
Return the value associated with the key path, or @code{NULL} if none.
|
||||
The path is specified as in @code{kvp_frame_set_slot_path_gslist}.
|
||||
@end deftypefun
|
||||
@ -990,23 +990,23 @@ is arguably a bug that needs fixing).
|
||||
@end deftypefun
|
||||
|
||||
|
||||
@node kvp_value, kvp_list, kvp_frame, Key-Value Pair Frames
|
||||
@subsection kvp_value
|
||||
@tindex kvp_value
|
||||
@node KvpValue, kvp_list, kvp_frame, Key-Value Pair Frames
|
||||
@subsection KvpValue
|
||||
@tindex KvpValue
|
||||
@tindex kvp_value_t
|
||||
|
||||
The @code{kvp_value} object stores the 'value' part of a key-value
|
||||
The @code{KvpValue} object stores the 'value' part of a key-value
|
||||
association in a @code{kvp_frame} object.
|
||||
|
||||
@deftypefun void kvp_value_delete (kvp_value * @var{value})
|
||||
@deftypefun void kvp_value_delete (KvpValue * @var{value})
|
||||
Free all of the memory associated with @var{value}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_value* kvp_value_copy (const kvp_value * @var{value})
|
||||
@deftypefun KvpValue* kvp_value_copy (const KvpValue * @var{value})
|
||||
Return a deep copy of @var{value}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_value_t kvp_value_get_type (const kvp_value * @var{value})
|
||||
@deftypefun kvp_value_t kvp_value_get_type (const KvpValue * @var{value})
|
||||
Return the type of value stored in @var{value}.
|
||||
@end deftypefun
|
||||
|
||||
@ -1033,7 +1033,7 @@ A @code{GUID} value. @xref{Globally Unique Identifiers}.
|
||||
Arbitrary binary data.
|
||||
|
||||
@item KVP_TYPE_LIST
|
||||
A @code{kvp_list} item which contains a list of @code{kvp_value} items.
|
||||
A @code{kvp_list} item which contains a list of @code{KvpValue} items.
|
||||
|
||||
@item KVP_TYPE_FRAME
|
||||
A @code{kvp_frame} object. Thus, frames may contain other frames in a
|
||||
@ -1043,53 +1043,53 @@ recursive manner.
|
||||
|
||||
@subsubsection Value Constructors
|
||||
|
||||
The following functions create and return @code{kvp_value} objects with
|
||||
The following functions create and return @code{KvpValue} objects with
|
||||
particular values. In the case of pointer arguments, deep copies are
|
||||
performed.
|
||||
|
||||
@deftypefun kvp_value* kvp_value_new_int64 (gint64 @var{value})
|
||||
@deftypefun KvpValue* kvp_value_new_int64 (gint64 @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_value* kvp_value_new_float64 (double @var{value})
|
||||
@deftypefun KvpValue* kvp_value_new_float64 (double @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_value* kvp_value_new_string (const char * @var{value})
|
||||
@deftypefun KvpValue* kvp_value_new_string (const char * @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_value* kvp_value_new_guid (const GUID * @var{guid})
|
||||
@deftypefun KvpValue* kvp_value_new_guid (const GUID * @var{guid})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_value* kvp_value_new_binary (const void * @var{data}, int @var{datasize})
|
||||
@deftypefun KvpValue* kvp_value_new_binary (const void * @var{data}, int @var{datasize})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_value* kvp_value_new_list (const kvp_list * @var{value})
|
||||
@deftypefun KvpValue* kvp_value_new_list (const kvp_list * @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_value* kvp_value_new_frame (const kvp_frame * @var{value});
|
||||
@deftypefun KvpValue* kvp_value_new_frame (const kvp_frame * @var{value});
|
||||
@end deftypefun
|
||||
|
||||
@subsubsection Value Accessors
|
||||
|
||||
The following functions access the value of a given @code{kvp_value}
|
||||
The following functions access the value of a given @code{KvpValue}
|
||||
object. If the type of the object does not correspond to that named
|
||||
in the function, @code{NULL}, @code{0}, or @code{0.0} is returned
|
||||
as appropriate.
|
||||
|
||||
@deftypefun gint64 kvp_value_get_int64 (const kvp_value * @var{value})
|
||||
@deftypefun gint64 kvp_value_get_int64 (const KvpValue * @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun double kvp_value_get_float64 (const kvp_value * @var{value})
|
||||
@deftypefun double kvp_value_get_float64 (const KvpValue * @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun char* kvp_value_get_string (const kvp_value * @var{value})
|
||||
@deftypefun char* kvp_value_get_string (const KvpValue * @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun GUID* kvp_value_get_guid (const kvp_value * @var{value})
|
||||
@deftypefun GUID* kvp_value_get_guid (const KvpValue * @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun void* kvp_value_get_binary (const kvp_value * @var{value}, int * @var{size_return})
|
||||
@deftypefun void* kvp_value_get_binary (const KvpValue * @var{value}, int * @var{size_return})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_list* kvp_value_get_list (const kvp_value * @var{value})
|
||||
@deftypefun kvp_list* kvp_value_get_list (const KvpValue * @var{value})
|
||||
@end deftypefun
|
||||
@deftypefun kvp_frame* kvp_value_get_frame (const kvp_value * @var{value})
|
||||
@deftypefun kvp_frame* kvp_value_get_frame (const KvpValue * @var{value})
|
||||
@end deftypefun
|
||||
|
||||
|
||||
@node kvp_list, , kvp_value, Key-Value Pair Frames
|
||||
@node kvp_list, , KvpValue, Key-Value Pair Frames
|
||||
@subsection kvp_list
|
||||
@tindex kvp_list
|
||||
|
||||
A @code{kvp_list} object abstract a list of @code{kvp_value} objects.
|
||||
A @code{kvp_list} object abstract a list of @code{KvpValue} objects.
|
||||
|
||||
@deftypefun kvp_list* kvp_list_new ()
|
||||
Return a newly allocated @code{kvp_list} object.
|
||||
@ -1097,7 +1097,7 @@ Return a newly allocated @code{kvp_list} object.
|
||||
|
||||
@deftypefun void kvp_list_delete (kvp_list * @var{list})
|
||||
Free all memory associated with @var{list}, including the
|
||||
@code{kvp_value} objects in @var{list}.
|
||||
@code{KvpValue} objects in @var{list}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_list* kvp_list_copy (const kvp_list * @var{list})
|
||||
@ -1108,9 +1108,9 @@ Return a deep copy of @var{list}.
|
||||
Return @code{TRUE} if @var{list} is the empty list.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_value* kvp_list_car (kvp_list * @var{list})
|
||||
@deftypefun KvpValue* kvp_list_car (kvp_list * @var{list})
|
||||
If @var{list} is @code{NULL} or the empty list, return @code{NULL}.
|
||||
Otherwise, return the first @code{kvp_value} object in the list.
|
||||
Otherwise, return the first @code{KvpValue} object in the list.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_list* kvp_list_cdr (kvp_list * @var{list})
|
||||
@ -1119,7 +1119,7 @@ Otherwise, return a @code{kvp_list} object consisting of @var{list}
|
||||
with the first value removed. NOTE: the returned list is not a copy!
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun kvp_list* kvp_list_cons (kvp_value * @var{car}, kvp_list * @var{cdr})
|
||||
@deftypefun kvp_list* kvp_list_cons (KvpValue * @var{car}, kvp_list * @var{cdr})
|
||||
If either @var{car} or @var{cdr} is @code{NULL}, return @code{NULL}. Otherwise,
|
||||
return a @code{kvp_list} object consisting of the value of @var{car} followed
|
||||
by the values of @var{cdr}. This function uses 'hand-over' semantics, i.e.,
|
||||
@ -2074,12 +2074,12 @@ Return the Transaction associated with @var{GUID}, or @code{NULL} if
|
||||
there is no such Transaction.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun {kvp_value *} xaccTransGetSlot (Transaction * @var{trans}, const char * @var{key})
|
||||
Return the @code{kvp_value} associated with @var{key} in @var{trans}.
|
||||
@deftypefun {KvpValue *} xaccTransGetSlot (Transaction * @var{trans}, const char * @var{key})
|
||||
Return the @code{KvpValue} associated with @var{key} in @var{trans}.
|
||||
If there is none, @code{NULL} is returned.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void xaccTransSetSlot (Split * @var{trans}, const char * @var{key}, const kvp_value * @var{value})
|
||||
@deftypefun void xaccTransSetSlot (Split * @var{trans}, const char * @var{key}, const KvpValue * @var{value})
|
||||
Associate a copy of @var{value} with @var{key} in @var{trans}.
|
||||
@end deftypefun
|
||||
|
||||
|
@ -5047,7 +5047,7 @@ gnc_imap_find_account (GncImportMatchMap *imap,
|
||||
const char *category,
|
||||
const char *key)
|
||||
{
|
||||
kvp_value *value;
|
||||
KvpValue *value;
|
||||
GncGUID * guid;
|
||||
|
||||
if (!imap || !key) return NULL;
|
||||
@ -5072,7 +5072,7 @@ gnc_imap_add_account (GncImportMatchMap *imap,
|
||||
const char *key,
|
||||
Account *acc)
|
||||
{
|
||||
kvp_value *value;
|
||||
KvpValue *value;
|
||||
|
||||
if (!imap || !key || !acc || (strlen (key) == 0)) return;
|
||||
if (!category)
|
||||
@ -5120,7 +5120,7 @@ struct token_accounts_info
|
||||
* \note Can always assume that keys are unique, reduces code in this function
|
||||
*/
|
||||
static void
|
||||
buildTokenInfo(const char *key, kvp_value *value, gpointer data)
|
||||
buildTokenInfo(const char *key, KvpValue *value, gpointer data)
|
||||
{
|
||||
struct token_accounts_info *tokenInfo = (struct token_accounts_info*)data;
|
||||
struct account_token_count* this_account;
|
||||
@ -5242,7 +5242,7 @@ gnc_imap_find_account_bayes (GncImportMatchMap *imap, GList *tokens)
|
||||
GHashTable *final_probabilities = g_hash_table_new(g_str_hash,
|
||||
g_str_equal);
|
||||
struct account_info account_i;
|
||||
kvp_value* value;
|
||||
KvpValue* value;
|
||||
kvp_frame* token_frame;
|
||||
|
||||
ENTER(" ");
|
||||
@ -5407,10 +5407,10 @@ gnc_imap_add_account_bayes(GncImportMatchMap *imap,
|
||||
Account *acc)
|
||||
{
|
||||
GList *current_token;
|
||||
kvp_value *value;
|
||||
KvpValue *value;
|
||||
gint64 token_count;
|
||||
char* account_fullname;
|
||||
kvp_value *new_value; /* the value that will be added back into
|
||||
KvpValue *new_value; /* the value that will be added back into
|
||||
* the kvp tree */
|
||||
|
||||
ENTER(" ");
|
||||
|
@ -2553,7 +2553,7 @@ Transaction *
|
||||
xaccTransReverse (Transaction *orig)
|
||||
{
|
||||
Transaction *trans;
|
||||
kvp_value *kvp_val;
|
||||
KvpValue *kvp_val;
|
||||
g_return_val_if_fail(orig, NULL);
|
||||
|
||||
trans = xaccTransClone(orig);
|
||||
|
@ -170,7 +170,7 @@ get_random_list_element (GList *list)
|
||||
g_list_length (list) - 1));
|
||||
}
|
||||
|
||||
static kvp_value* get_random_kvp_value_depth (int type, gint depth);
|
||||
static KvpValue* get_random_kvp_value_depth (int type, gint depth);
|
||||
|
||||
static GList*
|
||||
get_random_glist_depth (gint depth)
|
||||
|
@ -17,7 +17,7 @@ Timespec* get_random_timespec(void);
|
||||
void random_timespec_zero_nsec (gboolean zero_nsec);
|
||||
void random_timespec_usec_resolution (gboolean usec_resolution);
|
||||
|
||||
kvp_value* get_random_kvp_value(int type);
|
||||
KvpValue* get_random_kvp_value(int type);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -130,7 +130,7 @@ GList *
|
||||
gnc_ab_get_book_template_list(QofBook *b)
|
||||
{
|
||||
kvp_frame *frame = gnc_ab_get_book_kvp(b, FALSE);
|
||||
kvp_value *value = kvp_frame_get_slot(frame, AB_TEMPLATES);
|
||||
KvpValue *value = kvp_frame_get_slot(frame, AB_TEMPLATES);
|
||||
return kvp_value_get_glist(value);
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ void
|
||||
gnc_ab_set_book_template_list(QofBook *b, GList *template_list)
|
||||
{
|
||||
kvp_frame *frame = gnc_ab_get_book_kvp(b, TRUE);
|
||||
kvp_value *value = kvp_value_new_glist_nc(template_list);
|
||||
KvpValue *value = kvp_value_new_glist_nc(template_list);
|
||||
kvp_frame_set_slot_nc(frame, AB_TEMPLATES, value);
|
||||
qof_instance_set_dirty_flag(QOF_INSTANCE(b), TRUE);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ gnc_ab_trans_templ_list_new_from_kvp_list(GList *v)
|
||||
|
||||
for (iter = v; iter; iter = iter->next)
|
||||
{
|
||||
kvp_frame *frame = kvp_value_get_frame((kvp_value*) iter->data);
|
||||
kvp_frame *frame = kvp_value_get_frame((KvpValue*) iter->data);
|
||||
res = g_list_prepend(res, gnc_ab_trans_templ_new_from_kvp(frame));
|
||||
}
|
||||
res = g_list_reverse(res);
|
||||
@ -171,7 +171,7 @@ gnc_ab_trans_templ_list_to_kvp_list(GList *k)
|
||||
for (iter = k; iter; iter = iter->next)
|
||||
{
|
||||
GncABTransTempl *t = (GncABTransTempl*) iter->data;
|
||||
kvp_value *value = kvp_value_new_frame_nc(gnc_ab_trans_templ_to_kvp(t));
|
||||
KvpValue *value = kvp_value_new_frame_nc(gnc_ab_trans_templ_to_kvp(t));
|
||||
res = g_list_prepend(res, value);
|
||||
}
|
||||
res = g_list_reverse(res);
|
||||
|
@ -110,8 +110,6 @@ do \b not use these in new code.
|
||||
*/
|
||||
#define kvp_frame KvpFrame
|
||||
/** \deprecated Deprecated backwards compat token */
|
||||
#define kvp_value KvpValue
|
||||
/** \deprecated Deprecated backwards compat token */
|
||||
#define kvp_value_t KvpValueType
|
||||
|
||||
/** @name KvpFrame Constructors
|
||||
|
@ -862,7 +862,7 @@ gboolean qof_book_uses_autoreadonly (const QofBook *book)
|
||||
|
||||
gint qof_book_get_num_days_autoreadonly (const QofBook *book)
|
||||
{
|
||||
kvp_value *kvp_val;
|
||||
KvpValue *kvp_val;
|
||||
double tmp = 0;
|
||||
KvpFrame *frame = qof_instance_get_slots (QOF_INSTANCE (book));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user