vf_get_property(3)
π vf_get_property(3) π
okay bestie, settle in, because we're reading a page straight out of the Library Functions Manual and it's genuinely a whole vibe β¨
β¨ NAME β¨
vf_get_property β literally vf_get_property(), that's it, that's the name π
πΈ SYNOPSIS πΈ
#include <../vformat/vf_iface.h>
extern bool_t vf_get_property
(
VF_PROP_T **pp_prop,
VF_OBJECT_T *p_object,
vf_get_t ops,
const char *p_group,
const char *p_name,
const char *p_qualifier,
...
);
π¦ PARAMETERS π¦
VF_PROP_T **pp_propβ the output pointer, where your prize gets handed back to you πVF_OBJECT_T *p_objectβ the object we're adding to, bestievf_get_t opsβ the search flags, aka your little mood ring for this callconst char *p_groupβ group name, if there even is oneconst char *p_nameβ name of the tagconst char *p_qualifierβ first qualifier, if any...β subsequent qualifiers (yes there's more, keep reading π)
π DESCRIPTION π
So this is the basic searching function, and what it does is locate elements of the VOBJECT by qualified name. It's a varargs function, like sprintf, which means the argument list must be NULL terminated β and that is exactly why p_qualifier shows up in the arglist like that. no cap.
Valid calls might be:
vf_get_property(&p_out, p_object, VFGP_FIND, NULL, "N", NULL);
- Find and return
"N"properties. If there are none, returnFALSE.
Vf_get_property(&p_out, p_object, VFGP_FIND, NULL, "TEL", "WORK", NULL);
- Find and return
"TEL"entries qualified by the"work"attribute (ie. work phone numbers). If there are none, returnFALSE.
Vf_get_property(&p_out, p_object, VFGP_GET, NULL, "TEL", "WORK", NULL);
- Find and return work phone number. The entry is automatically added if not pre-existing.
Vf_get_property(&p_out, p_object, VFGP_GET, NULL, "TEL", "WORK", NULL);
- Find and return work phone numbers in the group identifier by the
"ME"identifier. The entry is automatically added if not pre-existing.
Vf_get_property(&p_out, p_object, VFGP_FIND, "ME", "*", NULL);
- Effectively enumerates all entries in the
"ME"group.
A pointer to the first property matching the search criteria comes back to you through the pp_prop argument π«Ά. The search actually locates all such matches, and a pointer to the subsequent entries (if there are more than one, iykyk) may be found by calling the vf_get_next_property() function.
The tags may occur in any order except that the p_name must be first. periodt.
Note that theVF_PROP_Treturned bypp_propis an opaque type, so the functionsvf_get_prop_xxxx()etc. must be used to locate the real"values". no peeking behind the curtain, bestie π
β οΈ Cached search results (the list enumerated by subsequent calls to the vf_get_next_property() function) are maintained through the use of a single internal pointer, therefore this method is not thread safe. π be so careful.
π RETURNS π
TRUE iff found/added successfully. Ptr to prop returned via pp_prop. slay. β¨
π SEE ALSO π
vf_parse_init(3), vf_parse_text(3), vf_parse_end(3), vf_read_file(3), vf_write_file(3), vf_get_next_object(3), vf_create_object(3), vf_get_object_type(3), vf_get_property_ex(3), vf_get_next_property(3), vf_get_prop_value(3), vf_set_prop_value(3), vf_get_prop_value_string(3), vf_get_prop_name_string(3), vf_set_prop_name_string(3), vf_get_prop_name(3), vf_get_prop_value_object(3), vf_set_prop_value_object(3), vf_set_prop_value_string(3), vf_set_prop_value_base64(3), vf_get_prop_value_base64(3), vf_set_property_from_file(3), vf_delete_object(3), vf_delete_prop(3), vf_find_prop_qual_index(3), vf_is_modified(3), vf_find_charset(3), vf_date_string_to_time(3), vf_period_string_to_time(3), vf_period_time_to_string(3), vf_set_prop_value_time(3), vf_get_prop_value_time(3)
mwah π that's the whole page, and before you go: this little masterpiece was generated by c2man from vf_iface.h, dated 30 April 2003 β a true vintage icon, main character energy since '03 ππ β¨
π¦ where this page comes from
- debian bookworm: libvformat-dev 1.13-12 Β· LGPL-2.1-or-later
- ubuntu jammy: libvformat-dev 1.13-12build2 Β· LGPL-2.1-or-later
- ubuntu noble: libvformat-dev 1.13-12.1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms