2 * collectd - src/utils_cache.c
3 * Copyright (C) 2007-2010 Florian octo Forster
4 * Copyright (C) 2016 Sebastian tokkee Harl
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
25 * Florian octo Forster <octo at collectd.org>
26 * Sebastian tokkee Harl <sh at tokkee.org>
33 #include "utils_avltree.h"
34 #include "utils_cache.h"
35 #include "meta_data.h"
39 typedef struct cache_entry_s
41 char name[6 * DATA_MAX_NAME_LEN];
43 gauge_t *values_gauge;
45 /* Time contained in the package
46 * (for calculating rates) */
48 /* Time according to the local clock
49 * (for purging old entries) */
51 /* Interval in which the data is collected
52 * (for purging old entries) */
58 * +-----+-----+-----+-----+-----+-----+-----+-----+-----+----
59 * ! 0 ! 1 ! 2 ! 3 ! 4 ! 5 ! 6 ! 7 ! 8 ! ...
60 * +-----+-----+-----+-----+-----+-----+-----+-----+-----+----
61 * ! ds0 ! ds1 ! ds2 ! ds0 ! ds1 ! ds2 ! ds0 ! ds1 ! ds2 ! ...
62 * +-----+-----+-----+-----+-----+-----+-----+-----+-----+----
63 * ! t = 0 ! t = 1 ! t = 2 ! ...
64 * +-----------------+-----------------+-----------------+----
67 size_t history_index; /* points to the next position to write to. */
68 size_t history_length;
74 c_avl_iterator_t *iter;
80 static c_avl_tree_t *cache_tree = NULL;
81 static pthread_mutex_t cache_lock = PTHREAD_MUTEX_INITIALIZER;
83 static int cache_compare (const cache_entry_t *a, const cache_entry_t *b)
86 assert ((a != NULL) && (b != NULL));
88 return (strcmp (a->name, b->name));
89 } /* int cache_compare */
91 static cache_entry_t *cache_alloc (size_t values_num)
95 ce = calloc (1, sizeof (*ce));
98 ERROR ("utils_cache: cache_alloc: calloc failed.");
101 ce->values_num = values_num;
103 ce->values_gauge = calloc (values_num, sizeof (*ce->values_gauge));
104 ce->values_raw = calloc (values_num, sizeof (*ce->values_raw));
105 if ((ce->values_gauge == NULL) || (ce->values_raw == NULL))
107 sfree (ce->values_gauge);
108 sfree (ce->values_raw);
110 ERROR ("utils_cache: cache_alloc: calloc failed.");
115 ce->history_length = 0;
119 } /* cache_entry_t *cache_alloc */
121 static void cache_free (cache_entry_t *ce)
126 sfree (ce->values_gauge);
127 sfree (ce->values_raw);
129 if (ce->meta != NULL)
131 meta_data_destroy (ce->meta);
135 } /* void cache_free */
137 static void uc_check_range (const data_set_t *ds, cache_entry_t *ce)
139 for (size_t i = 0; i < ds->ds_num; i++)
141 if (isnan (ce->values_gauge[i]))
143 else if (ce->values_gauge[i] < ds->ds[i].min)
144 ce->values_gauge[i] = NAN;
145 else if (ce->values_gauge[i] > ds->ds[i].max)
146 ce->values_gauge[i] = NAN;
148 } /* void uc_check_range */
150 static int uc_insert (const data_set_t *ds, const value_list_t *vl,
156 /* `cache_lock' has been locked by `uc_update' */
158 key_copy = strdup (key);
159 if (key_copy == NULL)
161 ERROR ("uc_insert: strdup failed.");
165 ce = cache_alloc (ds->ds_num);
169 ERROR ("uc_insert: cache_alloc (%zu) failed.", ds->ds_num);
173 sstrncpy (ce->name, key, sizeof (ce->name));
175 for (size_t i = 0; i < ds->ds_num; i++)
177 switch (ds->ds[i].type)
179 case DS_TYPE_COUNTER:
180 ce->values_gauge[i] = NAN;
181 ce->values_raw[i].counter = vl->values[i].counter;
185 ce->values_gauge[i] = vl->values[i].gauge;
186 ce->values_raw[i].gauge = vl->values[i].gauge;
190 ce->values_gauge[i] = NAN;
191 ce->values_raw[i].derive = vl->values[i].derive;
194 case DS_TYPE_ABSOLUTE:
195 ce->values_gauge[i] = NAN;
196 if (vl->interval > 0)
197 ce->values_gauge[i] = ((double) vl->values[i].absolute)
198 / CDTIME_T_TO_DOUBLE (vl->interval);
199 ce->values_raw[i].absolute = vl->values[i].absolute;
203 /* This shouldn't happen. */
204 ERROR ("uc_insert: Don't know how to handle data source type %i.",
209 } /* switch (ds->ds[i].type) */
212 /* Prune invalid gauge data */
213 uc_check_range (ds, ce);
215 ce->last_time = vl->time;
216 ce->last_update = cdtime ();
217 ce->interval = vl->interval;
218 ce->state = STATE_OKAY;
220 if (c_avl_insert (cache_tree, key_copy, ce) != 0)
223 ERROR ("uc_insert: c_avl_insert failed.");
227 DEBUG ("uc_insert: Added %s to the cache.", key);
229 } /* int uc_insert */
233 if (cache_tree == NULL)
234 cache_tree = c_avl_create ((int (*) (const void *, const void *))
240 int uc_check_timeout (void)
242 cdtime_t now = cdtime();
249 size_t expired_num = 0;
251 pthread_mutex_lock (&cache_lock);
253 /* Build a list of entries to be flushed */
254 c_avl_iterator_t *iter = c_avl_get_iterator (cache_tree);
256 cache_entry_t *ce = NULL;
257 while (c_avl_iterator_next (iter, (void *) &key, (void *) &ce) == 0)
259 /* If the entry is fresh enough, continue. */
260 if ((now - ce->last_update) < (ce->interval * timeout_g))
263 void *tmp = realloc (expired, (expired_num + 1) * sizeof (*expired));
266 ERROR ("uc_check_timeout: realloc failed.");
271 expired[expired_num].key = strdup (key);
272 expired[expired_num].time = ce->last_time;
273 expired[expired_num].interval = ce->interval;
275 if (expired[expired_num].key == NULL)
277 ERROR ("uc_check_timeout: strdup failed.");
282 } /* while (c_avl_iterator_next) */
284 c_avl_iterator_destroy (iter);
285 pthread_mutex_unlock (&cache_lock);
287 if (expired_num == 0)
293 /* Call the "missing" callback for each value. Do this before removing the
294 * value from the cache, so that callbacks can still access the data stored,
295 * including plugin specific meta data, rates, history, …. This must be done
296 * without holding the lock, otherwise we will run into a deadlock if a
297 * plugin calls the cache interface. */
298 for (size_t i = 0; i < expired_num; i++)
301 .time = expired[i].time,
302 .interval = expired[i].interval,
305 if (parse_identifier_vl (expired[i].key, &vl) != 0)
307 ERROR ("uc_check_timeout: parse_identifier_vl (\"%s\") failed.", expired[i].key);
311 plugin_dispatch_missing (&vl);
312 } /* for (i = 0; i < expired_num; i++) */
314 /* Now actually remove all the values from the cache. We don't re-evaluate
315 * the timestamp again, so in theory it is possible we remove a value after
316 * it is updated here. */
317 pthread_mutex_lock (&cache_lock);
318 for (size_t i = 0; i < expired_num; i++)
321 cache_entry_t *value = NULL;
323 if (c_avl_remove (cache_tree, expired[i].key, (void *) &key, (void *) &value) != 0)
325 ERROR ("uc_check_timeout: c_avl_remove (\"%s\") failed.", expired[i].key);
326 sfree (expired[i].key);
332 sfree (expired[i].key);
333 } /* for (i = 0; i < expired_num; i++) */
334 pthread_mutex_unlock (&cache_lock);
338 } /* int uc_check_timeout */
340 int uc_update (const data_set_t *ds, const value_list_t *vl)
342 char name[6 * DATA_MAX_NAME_LEN];
343 cache_entry_t *ce = NULL;
346 if (FORMAT_VL (name, sizeof (name), vl) != 0)
348 ERROR ("uc_update: FORMAT_VL failed.");
352 pthread_mutex_lock (&cache_lock);
354 status = c_avl_get (cache_tree, name, (void *) &ce);
355 if (status != 0) /* entry does not yet exist */
357 status = uc_insert (ds, vl, name);
358 pthread_mutex_unlock (&cache_lock);
363 assert (ce->values_num == ds->ds_num);
365 if (ce->last_time >= vl->time)
367 pthread_mutex_unlock (&cache_lock);
368 NOTICE ("uc_update: Value too old: name = %s; value time = %.3f; "
369 "last cache update = %.3f;",
371 CDTIME_T_TO_DOUBLE (vl->time),
372 CDTIME_T_TO_DOUBLE (ce->last_time));
376 for (size_t i = 0; i < ds->ds_num; i++)
378 switch (ds->ds[i].type)
380 case DS_TYPE_COUNTER:
382 counter_t diff = counter_diff (ce->values_raw[i].counter, vl->values[i].counter);
383 ce->values_gauge[i] = ((double) diff)
384 / (CDTIME_T_TO_DOUBLE (vl->time - ce->last_time));
385 ce->values_raw[i].counter = vl->values[i].counter;
390 ce->values_raw[i].gauge = vl->values[i].gauge;
391 ce->values_gauge[i] = vl->values[i].gauge;
396 derive_t diff = vl->values[i].derive - ce->values_raw[i].derive;
398 ce->values_gauge[i] = ((double) diff)
399 / (CDTIME_T_TO_DOUBLE (vl->time - ce->last_time));
400 ce->values_raw[i].derive = vl->values[i].derive;
404 case DS_TYPE_ABSOLUTE:
405 ce->values_gauge[i] = ((double) vl->values[i].absolute)
406 / (CDTIME_T_TO_DOUBLE (vl->time - ce->last_time));
407 ce->values_raw[i].absolute = vl->values[i].absolute;
411 /* This shouldn't happen. */
412 pthread_mutex_unlock (&cache_lock);
413 ERROR ("uc_update: Don't know how to handle data source type %i.",
416 } /* switch (ds->ds[i].type) */
418 DEBUG ("uc_update: %s: ds[%zu] = %lf", name, i, ce->values_gauge[i]);
421 /* Update the history if it exists. */
422 if (ce->history != NULL)
424 assert (ce->history_index < ce->history_length);
425 for (size_t i = 0; i < ce->values_num; i++)
427 size_t hist_idx = (ce->values_num * ce->history_index) + i;
428 ce->history[hist_idx] = ce->values_gauge[i];
431 assert (ce->history_length > 0);
432 ce->history_index = (ce->history_index + 1) % ce->history_length;
435 /* Prune invalid gauge data */
436 uc_check_range (ds, ce);
438 ce->last_time = vl->time;
439 ce->last_update = cdtime ();
440 ce->interval = vl->interval;
442 pthread_mutex_unlock (&cache_lock);
445 } /* int uc_update */
447 int uc_get_rate_by_name (const char *name, gauge_t **ret_values, size_t *ret_values_num)
451 cache_entry_t *ce = NULL;
454 pthread_mutex_lock (&cache_lock);
456 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
460 /* remove missing values from getval */
461 if (ce->state == STATE_MISSING)
467 ret_num = ce->values_num;
468 ret = malloc (ret_num * sizeof (*ret));
471 ERROR ("utils_cache: uc_get_rate_by_name: malloc failed.");
476 memcpy (ret, ce->values_gauge, ret_num * sizeof (gauge_t));
482 DEBUG ("utils_cache: uc_get_rate_by_name: No such value: %s", name);
486 pthread_mutex_unlock (&cache_lock);
491 *ret_values_num = ret_num;
495 } /* gauge_t *uc_get_rate_by_name */
497 gauge_t *uc_get_rate (const data_set_t *ds, const value_list_t *vl)
499 char name[6 * DATA_MAX_NAME_LEN];
504 if (FORMAT_VL (name, sizeof (name), vl) != 0)
506 ERROR ("utils_cache: uc_get_rate: FORMAT_VL failed.");
510 status = uc_get_rate_by_name (name, &ret, &ret_num);
514 /* This is important - the caller has no other way of knowing how many
515 * values are returned. */
516 if (ret_num != (size_t) ds->ds_num)
518 ERROR ("utils_cache: uc_get_rate: ds[%s] has %zu values, "
519 "but uc_get_rate_by_name returned %zu.",
520 ds->type, ds->ds_num, ret_num);
526 } /* gauge_t *uc_get_rate */
528 size_t uc_get_size (void) {
529 size_t size_arrays = 0;
531 pthread_mutex_lock (&cache_lock);
532 size_arrays = (size_t) c_avl_size (cache_tree);
533 pthread_mutex_unlock (&cache_lock);
535 return (size_arrays);
538 int uc_get_names (char ***ret_names, cdtime_t **ret_times, size_t *ret_number)
540 c_avl_iterator_t *iter;
542 cache_entry_t *value;
545 cdtime_t *times = NULL;
547 size_t size_arrays = 0;
551 if ((ret_names == NULL) || (ret_number == NULL))
554 pthread_mutex_lock (&cache_lock);
556 size_arrays = (size_t) c_avl_size (cache_tree);
559 /* Handle the "no values" case here, to avoid the error message when
560 * calloc() returns NULL. */
561 pthread_mutex_unlock (&cache_lock);
565 names = calloc (size_arrays, sizeof (*names));
566 times = calloc (size_arrays, sizeof (*times));
567 if ((names == NULL) || (times == NULL))
569 ERROR ("uc_get_names: calloc failed.");
572 pthread_mutex_unlock (&cache_lock);
576 iter = c_avl_get_iterator (cache_tree);
577 while (c_avl_iterator_next (iter, (void *) &key, (void *) &value) == 0)
579 /* remove missing values when list values */
580 if (value->state == STATE_MISSING)
583 /* c_avl_size does not return a number smaller than the number of elements
584 * returned by c_avl_iterator_next. */
585 assert (number < size_arrays);
587 if (ret_times != NULL)
588 times[number] = value->last_time;
590 names[number] = strdup (key);
591 if (names[number] == NULL)
598 } /* while (c_avl_iterator_next) */
600 c_avl_iterator_destroy (iter);
601 pthread_mutex_unlock (&cache_lock);
605 for (size_t i = 0; i < number; i++)
616 if (ret_times != NULL)
620 *ret_number = number;
623 } /* int uc_get_names */
625 int uc_get_state (const data_set_t *ds, const value_list_t *vl)
627 char name[6 * DATA_MAX_NAME_LEN];
628 cache_entry_t *ce = NULL;
629 int ret = STATE_ERROR;
631 if (FORMAT_VL (name, sizeof (name), vl) != 0)
633 ERROR ("uc_get_state: FORMAT_VL failed.");
634 return (STATE_ERROR);
637 pthread_mutex_lock (&cache_lock);
639 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
645 pthread_mutex_unlock (&cache_lock);
648 } /* int uc_get_state */
650 int uc_set_state (const data_set_t *ds, const value_list_t *vl, int state)
652 char name[6 * DATA_MAX_NAME_LEN];
653 cache_entry_t *ce = NULL;
656 if (FORMAT_VL (name, sizeof (name), vl) != 0)
658 ERROR ("uc_set_state: FORMAT_VL failed.");
659 return (STATE_ERROR);
662 pthread_mutex_lock (&cache_lock);
664 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
671 pthread_mutex_unlock (&cache_lock);
674 } /* int uc_set_state */
676 int uc_get_history_by_name (const char *name,
677 gauge_t *ret_history, size_t num_steps, size_t num_ds)
679 cache_entry_t *ce = NULL;
682 pthread_mutex_lock (&cache_lock);
684 status = c_avl_get (cache_tree, name, (void *) &ce);
687 pthread_mutex_unlock (&cache_lock);
691 if (((size_t) ce->values_num) != num_ds)
693 pthread_mutex_unlock (&cache_lock);
697 /* Check if there are enough values available. If not, increase the buffer
699 if (ce->history_length < num_steps)
703 tmp = realloc (ce->history, sizeof (*ce->history)
704 * num_steps * ce->values_num);
707 pthread_mutex_unlock (&cache_lock);
711 for (size_t i = ce->history_length * ce->values_num;
712 i < (num_steps * ce->values_num);
717 ce->history_length = num_steps;
718 } /* if (ce->history_length < num_steps) */
720 /* Copy the values to the output buffer. */
721 for (size_t i = 0; i < num_steps; i++)
726 if (i < ce->history_index)
727 src_index = ce->history_index - (i + 1);
729 src_index = ce->history_length + ce->history_index - (i + 1);
730 src_index = src_index * num_ds;
732 dst_index = i * num_ds;
734 memcpy (ret_history + dst_index, ce->history + src_index,
735 sizeof (*ret_history) * num_ds);
738 pthread_mutex_unlock (&cache_lock);
741 } /* int uc_get_history_by_name */
743 int uc_get_history (const data_set_t *ds, const value_list_t *vl,
744 gauge_t *ret_history, size_t num_steps, size_t num_ds)
746 char name[6 * DATA_MAX_NAME_LEN];
748 if (FORMAT_VL (name, sizeof (name), vl) != 0)
750 ERROR ("utils_cache: uc_get_history: FORMAT_VL failed.");
754 return (uc_get_history_by_name (name, ret_history, num_steps, num_ds));
755 } /* int uc_get_history */
757 int uc_get_hits (const data_set_t *ds, const value_list_t *vl)
759 char name[6 * DATA_MAX_NAME_LEN];
760 cache_entry_t *ce = NULL;
761 int ret = STATE_ERROR;
763 if (FORMAT_VL (name, sizeof (name), vl) != 0)
765 ERROR ("uc_get_hits: FORMAT_VL failed.");
766 return (STATE_ERROR);
769 pthread_mutex_lock (&cache_lock);
771 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
777 pthread_mutex_unlock (&cache_lock);
780 } /* int uc_get_hits */
782 int uc_set_hits (const data_set_t *ds, const value_list_t *vl, int hits)
784 char name[6 * DATA_MAX_NAME_LEN];
785 cache_entry_t *ce = NULL;
788 if (FORMAT_VL (name, sizeof (name), vl) != 0)
790 ERROR ("uc_set_hits: FORMAT_VL failed.");
791 return (STATE_ERROR);
794 pthread_mutex_lock (&cache_lock);
796 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
803 pthread_mutex_unlock (&cache_lock);
806 } /* int uc_set_hits */
808 int uc_inc_hits (const data_set_t *ds, const value_list_t *vl, int step)
810 char name[6 * DATA_MAX_NAME_LEN];
811 cache_entry_t *ce = NULL;
814 if (FORMAT_VL (name, sizeof (name), vl) != 0)
816 ERROR ("uc_inc_hits: FORMAT_VL failed.");
817 return (STATE_ERROR);
820 pthread_mutex_lock (&cache_lock);
822 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
826 ce->hits = ret + step;
829 pthread_mutex_unlock (&cache_lock);
832 } /* int uc_inc_hits */
837 uc_iter_t *uc_get_iterator (void)
841 iter = (uc_iter_t *) calloc(1, sizeof (*iter));
845 pthread_mutex_lock (&cache_lock);
847 iter->iter = c_avl_get_iterator (cache_tree);
848 if (iter->iter == NULL)
855 } /* uc_iter_t *uc_get_iterator */
857 int uc_iterator_next (uc_iter_t *iter, char **ret_name)
864 while ((status = c_avl_iterator_next (iter->iter,
865 (void *) &iter->name, (void *) &iter->entry)) == 0)
867 if (iter->entry->state == STATE_MISSING)
878 if (ret_name != NULL)
879 *ret_name = iter->name;
882 } /* int uc_iterator_next */
884 void uc_iterator_destroy (uc_iter_t *iter)
889 c_avl_iterator_destroy (iter->iter);
890 pthread_mutex_unlock (&cache_lock);
893 } /* void uc_iterator_destroy */
895 int uc_iterator_get_time (uc_iter_t *iter, cdtime_t *ret_time)
897 if ((iter == NULL) || (iter->entry == NULL) || (ret_time == NULL))
900 *ret_time = iter->entry->last_time;
902 } /* int uc_iterator_get_name */
904 int uc_iterator_get_values (uc_iter_t *iter, value_t **ret_values, size_t *ret_num)
906 if ((iter == NULL) || (iter->entry == NULL)
907 || (ret_values == NULL) || (ret_num == NULL))
910 *ret_values = calloc (iter->entry->values_num, sizeof(*iter->entry->values_raw));
911 if (*ret_values == NULL)
913 for (size_t i = 0; i < iter->entry->values_num; ++i)
914 *ret_values[i] = iter->entry->values_raw[i];
916 *ret_num = iter->entry->values_num;
919 } /* int uc_iterator_get_values */
921 int uc_iterator_get_interval (uc_iter_t *iter, cdtime_t *ret_interval)
923 if ((iter == NULL) || (iter->entry == NULL) || (ret_interval == NULL))
926 *ret_interval = iter->entry->interval;
928 } /* int uc_iterator_get_name */
931 * Meta data interface
933 /* XXX: This function will acquire `cache_lock' but will not free it! */
934 static meta_data_t *uc_get_meta (const value_list_t *vl) /* {{{ */
936 char name[6 * DATA_MAX_NAME_LEN];
937 cache_entry_t *ce = NULL;
940 status = FORMAT_VL (name, sizeof (name), vl);
943 ERROR ("utils_cache: uc_get_meta: FORMAT_VL failed.");
947 pthread_mutex_lock (&cache_lock);
949 status = c_avl_get (cache_tree, name, (void *) &ce);
952 pthread_mutex_unlock (&cache_lock);
957 if (ce->meta == NULL)
958 ce->meta = meta_data_create ();
960 if (ce->meta == NULL)
961 pthread_mutex_unlock (&cache_lock);
964 } /* }}} meta_data_t *uc_get_meta */
966 /* Sorry about this preprocessor magic, but it really makes this file much
968 #define UC_WRAP(wrap_function) { \
971 meta = uc_get_meta (vl); \
972 if (meta == NULL) return (-1); \
973 status = wrap_function (meta, key); \
974 pthread_mutex_unlock (&cache_lock); \
977 int uc_meta_data_exists (const value_list_t *vl, const char *key)
978 UC_WRAP (meta_data_exists)
980 int uc_meta_data_delete (const value_list_t *vl, const char *key)
981 UC_WRAP (meta_data_delete)
984 /* We need a new version of this macro because the following functions take
986 #define UC_WRAP(wrap_function) { \
989 meta = uc_get_meta (vl); \
990 if (meta == NULL) return (-1); \
991 status = wrap_function (meta, key, value); \
992 pthread_mutex_unlock (&cache_lock); \
995 int uc_meta_data_add_string (const value_list_t *vl,
998 UC_WRAP(meta_data_add_string)
999 int uc_meta_data_add_signed_int (const value_list_t *vl,
1002 UC_WRAP(meta_data_add_signed_int)
1003 int uc_meta_data_add_unsigned_int (const value_list_t *vl,
1006 UC_WRAP(meta_data_add_unsigned_int)
1007 int uc_meta_data_add_double (const value_list_t *vl,
1010 UC_WRAP(meta_data_add_double)
1011 int uc_meta_data_add_boolean (const value_list_t *vl,
1014 UC_WRAP(meta_data_add_boolean)
1016 int uc_meta_data_get_string (const value_list_t *vl,
1019 UC_WRAP(meta_data_get_string)
1020 int uc_meta_data_get_signed_int (const value_list_t *vl,
1023 UC_WRAP(meta_data_get_signed_int)
1024 int uc_meta_data_get_unsigned_int (const value_list_t *vl,
1027 UC_WRAP(meta_data_get_unsigned_int)
1028 int uc_meta_data_get_double (const value_list_t *vl,
1031 UC_WRAP(meta_data_get_double)
1032 int uc_meta_data_get_boolean (const value_list_t *vl,
1035 UC_WRAP(meta_data_get_boolean)
1038 /* vim: set sw=2 ts=8 sts=2 tw=78 : */