10#include "../nyx_node_internal.h"
18 if(label == NULL || label[0] ==
'\0')
27 nyx_dict_set(result,
"<>", nyx_string_from_dup(
"defText"));
29 nyx_dict_set(result,
"@name", nyx_string_from_dup(name));
30 nyx_dict_set(result,
"@label", nyx_string_from_dup(label));
32 nyx_text_prop_set(result, value);
50 return nyx_dict_set(prop,
"$", nyx_string_from_dup(value));
57 return nyx_string_get((
nyx_string_t *) nyx_dict_get(prop,
"$"));
80 nyx_dict_set(result,
"<>", nyx_string_from_dup(
"defTextVector"));
82 nyx_dict_set(result,
"children", children);
86 nyx_dict_set(result,
"@client", nyx_string_from_dup(
"unknown"));
87 nyx_dict_set(result,
"@device", nyx_string_from_dup(device));
88 nyx_dict_set(result,
"@name", nyx_string_from_dup(name));
90 nyx_dict_set(result,
"@state", nyx_string_from_dup(nyx_state_to_str(state)));
91 nyx_dict_set(result,
"@perm", nyx_string_from_dup(nyx_perm_to_str(perm)));
95 internal_set_opts(result, opts);
99 for(; *props != NULL; props++) nyx_list_push(children, *props);
112 return internal_prop_to_set_vector(vector,
"setTextVector",
"oneText");
#define STR_t
Alias for const char *.
STR_t nyx_text_prop_get(const nyx_dict_t *prop)
Gets the current value of the provided property object.
nyx_perm_t
Vector permission hint.
nyx_state_t
Vector state hint.
Struct describing a JSON dict object.
Struct describing a JSON list object.
Struct describing the options for INDI / Nyx vectors.
Struct describing a JSON string object.