@@ -71,6 +71,61 @@ namespace lsp
7171 */
7272 void init_value (value_t *dst);
7373
74+ /* *
75+ * Init value as NULL
76+ * @param dst target to set
77+ */
78+ void init_value_null (value_t *dst);
79+
80+ /* *
81+ * Init value as UNDEF
82+ * @param dst target to set
83+ */
84+ void init_value_undef (value_t *dst);
85+
86+ /* *
87+ * Init value as integer
88+ * @param dst target to set
89+ * @param value integer value to set
90+ */
91+ void init_value_int (value_t *dst, ssize_t value);
92+
93+ /* *
94+ * Init value as floating point
95+ * @param dst target to set
96+ * @param value floating-point value to set
97+ */
98+ void init_value_float (value_t *dst, double value);
99+
100+ /* *
101+ * Init value as boolean
102+ * @param dst target to set
103+ * @param value boolean value to set
104+ */
105+ void init_value_bool (value_t *dst, bool value);
106+
107+ /* *
108+ * Init value as string
109+ * @param dst target to set
110+ * @param value string value to set
111+ */
112+ status_t init_value_string (value_t *dst, const LSPString *value);
113+
114+ /* *
115+ * Init value as string
116+ * @param dst target to set
117+ * @param value UTF-8 string to set
118+ */
119+ status_t init_value_string (value_t *dst, const char *value);
120+
121+ /* *
122+ * Init value as string
123+ * @param dst target to set
124+ * @param value native string to set
125+ * @param charset native charset name
126+ */
127+ status_t init_value_string (value_t *dst, const char *value, const char *charset);
128+
74129 /* *
75130 * Initialize value with another value by copying contents
76131 * @param dst destination value
@@ -79,6 +134,14 @@ namespace lsp
79134 */
80135 status_t init_value (value_t *dst, const value_t *src);
81136
137+ /* *
138+ * Initialize value with move. Moves contents of source value to destination value
139+ * and resets source value to undef
140+ * @param dst destination value to perform copy
141+ * @param src source value to take data from
142+ */
143+ void init_value_move (value_t *dst, value_t *src);
144+
82145 /* *
83146 * Copy value. Frees previously used value if it was set
84147 * @param dst destination value to perform copy
@@ -87,6 +150,21 @@ namespace lsp
87150 */
88151 status_t copy_value (value_t *dst, const value_t *src);
89152
153+ /* *
154+ * Move value. Moves contents of source value to destination value
155+ * and resets source value to undef
156+ * @param dst destination value to perform copy
157+ * @param src source value to take data from
158+ */
159+ void move_value (value_t *dst, value_t *src);
160+
161+ /* *
162+ * Swap value. Swaps contents of source value and destination value
163+ * @param dst destination value to perform copy
164+ * @param src source value to take data from
165+ */
166+ void swap_value (value_t *dst, value_t *src);
167+
90168 /* *
91169 * Set value to NULL
92170 * @param dst target to set
@@ -125,7 +203,7 @@ namespace lsp
125203 * @param dst target to set
126204 * @param value string value to set
127205 */
128- status_t set_value_string (value_t *dst, LSPString *value);
206+ status_t set_value_string (value_t *dst, const LSPString *value);
129207
130208 /* *
131209 * Set value to string
@@ -134,6 +212,15 @@ namespace lsp
134212 */
135213 status_t set_value_string (value_t *dst, const char *value);
136214
215+ /* *
216+ * Set value to string
217+ * @param dst target to set
218+ * @param value native string to set
219+ * @param charset character set to use
220+ */
221+ status_t set_value_string (value_t *dst, const char *value, const char *charset);
222+
223+
137224 /* *
138225 * Destroy value and all internal contents associated with it
139226 * The value remains valid and available for further operations but set to UNDEF
0 commit comments