2 * collectd - src/utils_cache.c
3 * Copyright (C) 2007-2010 Florian octo Forster
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; only version 2 of the License is applicable.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 * Florian octo Forster <octo at collectd.org>
25 #include "utils_avltree.h"
26 #include "utils_cache.h"
27 #include "utils_threshold.h"
28 #include "meta_data.h"
33 typedef struct cache_entry_s
35 char name[6 * DATA_MAX_NAME_LEN];
37 gauge_t *values_gauge;
39 /* Time contained in the package
40 * (for calculating rates) */
42 /* Time according to the local clock
43 * (for purging old entries) */
45 /* Interval in which the data is collected
46 * (for purding old entries) */
52 * +-----+-----+-----+-----+-----+-----+-----+-----+-----+----
53 * ! 0 ! 1 ! 2 ! 3 ! 4 ! 5 ! 6 ! 7 ! 8 ! ...
54 * +-----+-----+-----+-----+-----+-----+-----+-----+-----+----
55 * ! ds0 ! ds1 ! ds2 ! ds0 ! ds1 ! ds2 ! ds0 ! ds1 ! ds2 ! ...
56 * +-----+-----+-----+-----+-----+-----+-----+-----+-----+----
57 * ! t = 0 ! t = 1 ! t = 2 ! ...
58 * +-----------------+-----------------+-----------------+----
61 size_t history_index; /* points to the next position to write to. */
62 size_t history_length;
67 static c_avl_tree_t *cache_tree = NULL;
68 static pthread_mutex_t cache_lock = PTHREAD_MUTEX_INITIALIZER;
70 static int cache_compare (const cache_entry_t *a, const cache_entry_t *b)
72 assert ((a != NULL) && (b != NULL));
73 return (strcmp (a->name, b->name));
74 } /* int cache_compare */
76 static cache_entry_t *cache_alloc (int values_num)
80 ce = (cache_entry_t *) malloc (sizeof (cache_entry_t));
83 ERROR ("utils_cache: cache_alloc: malloc failed.");
86 memset (ce, '\0', sizeof (cache_entry_t));
87 ce->values_num = values_num;
89 ce->values_gauge = calloc (values_num, sizeof (*ce->values_gauge));
90 ce->values_raw = calloc (values_num, sizeof (*ce->values_raw));
91 if ((ce->values_gauge == NULL) || (ce->values_raw == NULL))
93 sfree (ce->values_gauge);
94 sfree (ce->values_raw);
96 ERROR ("utils_cache: cache_alloc: calloc failed.");
101 ce->history_length = 0;
105 } /* cache_entry_t *cache_alloc */
107 static void cache_free (cache_entry_t *ce)
112 sfree (ce->values_gauge);
113 sfree (ce->values_raw);
115 if (ce->meta != NULL)
117 meta_data_destroy (ce->meta);
121 } /* void cache_free */
123 __attribute__((unused))
124 static int uc_send_notification (const char *name)
126 cache_entry_t *ce = NULL;
132 char *plugin_instance;
138 name_copy = strdup (name);
139 if (name_copy == NULL)
141 ERROR ("uc_send_notification: strdup failed.");
145 status = parse_identifier (name_copy, &host,
146 &plugin, &plugin_instance,
147 &type, &type_instance);
150 ERROR ("uc_send_notification: Cannot parse name `%s'", name);
154 /* Copy the associative members */
155 notification_init (&n, NOTIF_FAILURE, /* host = */ NULL,
156 host, plugin, plugin_instance, type, type_instance);
159 name_copy = host = plugin = plugin_instance = type = type_instance = NULL;
161 pthread_mutex_lock (&cache_lock);
164 * Set the time _after_ getting the lock because we don't know how long
165 * acquiring the lock takes and we will use this time later to decide
166 * whether or not the state is OKAY.
170 status = c_avl_get (cache_tree, name, (void *) &ce);
173 pthread_mutex_unlock (&cache_lock);
178 /* Check if the entry has been updated in the meantime */
179 if ((n.time - ce->last_update) < (timeout_g * ce->interval))
181 ce->state = STATE_OKAY;
182 pthread_mutex_unlock (&cache_lock);
187 ssnprintf (n.message, sizeof (n.message),
188 "%s has not been updated for %.3f seconds.", name,
189 CDTIME_T_TO_DOUBLE (n.time - ce->last_update));
191 pthread_mutex_unlock (&cache_lock);
193 plugin_dispatch_notification (&n);
196 } /* int uc_send_notification */
198 static void uc_check_range (const data_set_t *ds, cache_entry_t *ce)
202 for (i = 0; i < ds->ds_num; i++)
204 if (isnan (ce->values_gauge[i]))
206 else if (ce->values_gauge[i] < ds->ds[i].min)
207 ce->values_gauge[i] = NAN;
208 else if (ce->values_gauge[i] > ds->ds[i].max)
209 ce->values_gauge[i] = NAN;
211 } /* void uc_check_range */
213 static int uc_insert (const data_set_t *ds, const value_list_t *vl,
220 /* `cache_lock' has been locked by `uc_update' */
222 key_copy = strdup (key);
223 if (key_copy == NULL)
225 ERROR ("uc_insert: strdup failed.");
229 ce = cache_alloc (ds->ds_num);
233 ERROR ("uc_insert: cache_alloc (%i) failed.", ds->ds_num);
237 sstrncpy (ce->name, key, sizeof (ce->name));
239 for (i = 0; i < ds->ds_num; i++)
241 switch (ds->ds[i].type)
243 case DS_TYPE_COUNTER:
244 ce->values_gauge[i] = NAN;
245 ce->values_raw[i].counter = vl->values[i].counter;
249 ce->values_gauge[i] = vl->values[i].gauge;
250 ce->values_raw[i].gauge = vl->values[i].gauge;
254 ce->values_gauge[i] = NAN;
255 ce->values_raw[i].derive = vl->values[i].derive;
258 case DS_TYPE_ABSOLUTE:
259 ce->values_gauge[i] = NAN;
260 if (vl->interval > 0)
261 ce->values_gauge[i] = ((double) vl->values[i].absolute)
262 / CDTIME_T_TO_DOUBLE (vl->interval);
263 ce->values_raw[i].absolute = vl->values[i].absolute;
267 /* This shouldn't happen. */
268 ERROR ("uc_insert: Don't know how to handle data source type %i.",
271 } /* switch (ds->ds[i].type) */
274 /* Prune invalid gauge data */
275 uc_check_range (ds, ce);
277 ce->last_time = vl->time;
278 ce->last_update = cdtime ();
279 ce->interval = vl->interval;
280 ce->state = STATE_OKAY;
282 if (c_avl_insert (cache_tree, key_copy, ce) != 0)
285 ERROR ("uc_insert: c_avl_insert failed.");
289 DEBUG ("uc_insert: Added %s to the cache.", key);
291 } /* int uc_insert */
295 if (cache_tree == NULL)
296 cache_tree = c_avl_create ((int (*) (const void *, const void *))
302 int uc_check_timeout (void)
308 cdtime_t *keys_time = NULL;
309 cdtime_t *keys_interval = NULL;
313 c_avl_iterator_t *iter;
318 pthread_mutex_lock (&cache_lock);
322 /* Build a list of entries to be flushed */
323 iter = c_avl_get_iterator (cache_tree);
324 while (c_avl_iterator_next (iter, (void *) &key, (void *) &ce) == 0)
329 /* If the entry is fresh enough, continue. */
330 if ((now - ce->last_update) < (ce->interval * timeout_g))
333 /* If entry has not been updated, add to `keys' array */
334 tmp = (char **) realloc ((void *) keys,
335 (keys_len + 1) * sizeof (char *));
338 ERROR ("uc_check_timeout: realloc failed.");
343 tmp_time = realloc (keys_time, (keys_len + 1) * sizeof (*keys_time));
344 if (tmp_time == NULL)
346 ERROR ("uc_check_timeout: realloc failed.");
349 keys_time = tmp_time;
351 tmp_time = realloc (keys_interval, (keys_len + 1) * sizeof (*keys_interval));
352 if (tmp_time == NULL)
354 ERROR ("uc_check_timeout: realloc failed.");
357 keys_interval = tmp_time;
359 keys[keys_len] = strdup (key);
360 if (keys[keys_len] == NULL)
362 ERROR ("uc_check_timeout: strdup failed.");
365 keys_time[keys_len] = ce->last_time;
366 keys_interval[keys_len] = ce->interval;
369 } /* while (c_avl_iterator_next) */
371 c_avl_iterator_destroy (iter);
372 pthread_mutex_unlock (&cache_lock);
377 /* Call the "missing" callback for each value. Do this before removing the
378 * value from the cache, so that callbacks can still access the data stored,
379 * including plugin specific meta data, rates, history, …. This must be done
380 * without holding the lock, otherwise we will run into a deadlock if a
381 * plugin calls the cache interface. */
382 for (i = 0; i < keys_len; i++)
384 value_list_t vl = VALUE_LIST_INIT;
390 status = parse_identifier_vl (keys[i], &vl);
393 ERROR ("uc_check_timeout: parse_identifier_vl (\"%s\") failed.", keys[i]);
398 vl.time = keys_time[i];
399 vl.interval = keys_interval[i];
401 plugin_dispatch_missing (&vl);
402 } /* for (i = 0; i < keys_len; i++) */
404 /* Now actually remove all the values from the cache. We don't re-evaluate
405 * the timestamp again, so in theory it is possible we remove a value after
406 * it is updated here. */
407 pthread_mutex_lock (&cache_lock);
408 for (i = 0; i < keys_len; i++)
413 status = c_avl_remove (cache_tree, keys[i],
414 (void *) &key, (void *) &ce);
417 ERROR ("uc_check_timeout: c_avl_remove (\"%s\") failed.", keys[i]);
425 } /* for (i = 0; i < keys_len; i++) */
426 pthread_mutex_unlock (&cache_lock);
430 sfree (keys_interval);
433 } /* int uc_check_timeout */
435 int uc_update (const data_set_t *ds, const value_list_t *vl)
437 char name[6 * DATA_MAX_NAME_LEN];
438 cache_entry_t *ce = NULL;
439 int send_okay_notification = 0;
440 cdtime_t update_delay = 0;
445 if (FORMAT_VL (name, sizeof (name), vl) != 0)
447 ERROR ("uc_update: FORMAT_VL failed.");
451 pthread_mutex_lock (&cache_lock);
453 status = c_avl_get (cache_tree, name, (void *) &ce);
454 if (status != 0) /* entry does not yet exist */
456 status = uc_insert (ds, vl, name);
457 pthread_mutex_unlock (&cache_lock);
462 assert (ce->values_num == ds->ds_num);
464 if (ce->last_time >= vl->time)
466 pthread_mutex_unlock (&cache_lock);
467 NOTICE ("uc_update: Value too old: name = %s; value time = %.3f; "
468 "last cache update = %.3f;",
470 CDTIME_T_TO_DOUBLE (vl->time),
471 CDTIME_T_TO_DOUBLE (ce->last_time));
475 /* Send a notification (after the lock has been released) if we switch the
476 * state from something else to `okay'. */
477 if (ce->state == STATE_MISSING)
479 send_okay_notification = 1;
480 ce->state = STATE_OKAY;
481 update_delay = cdtime () - ce->last_update;
484 for (i = 0; i < ds->ds_num; i++)
486 switch (ds->ds[i].type)
488 case DS_TYPE_COUNTER:
492 /* check if the counter has wrapped around */
493 if (vl->values[i].counter < ce->values_raw[i].counter)
495 if (ce->values_raw[i].counter <= 4294967295U)
496 diff = (4294967295U - ce->values_raw[i].counter)
497 + vl->values[i].counter;
499 diff = (18446744073709551615ULL - ce->values_raw[i].counter)
500 + vl->values[i].counter;
502 else /* counter has NOT wrapped around */
504 diff = vl->values[i].counter - ce->values_raw[i].counter;
507 ce->values_gauge[i] = ((double) diff)
508 / (CDTIME_T_TO_DOUBLE (vl->time - ce->last_time));
509 ce->values_raw[i].counter = vl->values[i].counter;
514 ce->values_raw[i].gauge = vl->values[i].gauge;
515 ce->values_gauge[i] = vl->values[i].gauge;
522 diff = vl->values[i].derive - ce->values_raw[i].derive;
524 ce->values_gauge[i] = ((double) diff)
525 / (CDTIME_T_TO_DOUBLE (vl->time - ce->last_time));
526 ce->values_raw[i].derive = vl->values[i].derive;
530 case DS_TYPE_ABSOLUTE:
531 ce->values_gauge[i] = ((double) vl->values[i].absolute)
532 / (CDTIME_T_TO_DOUBLE (vl->time - ce->last_time));
533 ce->values_raw[i].absolute = vl->values[i].absolute;
537 /* This shouldn't happen. */
538 pthread_mutex_unlock (&cache_lock);
539 ERROR ("uc_update: Don't know how to handle data source type %i.",
542 } /* switch (ds->ds[i].type) */
544 DEBUG ("uc_update: %s: ds[%i] = %lf", name, i, ce->values_gauge[i]);
547 /* Update the history if it exists. */
548 if (ce->history != NULL)
550 assert (ce->history_index < ce->history_length);
551 for (i = 0; i < ce->values_num; i++)
553 size_t hist_idx = (ce->values_num * ce->history_index) + i;
554 ce->history[hist_idx] = ce->values_gauge[i];
557 assert (ce->history_length > 0);
558 ce->history_index = (ce->history_index + 1) % ce->history_length;
561 /* Prune invalid gauge data */
562 uc_check_range (ds, ce);
564 ce->last_time = vl->time;
565 ce->last_update = cdtime ();
566 ce->interval = vl->interval;
568 pthread_mutex_unlock (&cache_lock);
570 if (send_okay_notification == 0)
573 /* Do not send okay notifications for uninteresting values, i. e. values for
574 * which no threshold is configured. */
575 status = ut_check_interesting (name);
579 /* Initialize the notification */
580 memset (&n, '\0', sizeof (n));
581 NOTIFICATION_INIT_VL (&n, vl, ds);
583 n.severity = NOTIF_OKAY;
586 ssnprintf (n.message, sizeof (n.message),
587 "Received a value for %s. It was missing for %u seconds.",
588 name, (unsigned int) update_delay);
590 plugin_dispatch_notification (&n);
593 } /* int uc_update */
595 int uc_get_rate_by_name (const char *name, gauge_t **ret_values, size_t *ret_values_num)
599 cache_entry_t *ce = NULL;
602 pthread_mutex_lock (&cache_lock);
604 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
608 /* remove missing values from getval */
609 if (ce->state == STATE_MISSING)
615 ret_num = ce->values_num;
616 ret = (gauge_t *) malloc (ret_num * sizeof (gauge_t));
619 ERROR ("utils_cache: uc_get_rate_by_name: malloc failed.");
624 memcpy (ret, ce->values_gauge, ret_num * sizeof (gauge_t));
630 DEBUG ("utils_cache: uc_get_rate_by_name: No such value: %s", name);
634 pthread_mutex_unlock (&cache_lock);
639 *ret_values_num = ret_num;
643 } /* gauge_t *uc_get_rate_by_name */
645 gauge_t *uc_get_rate (const data_set_t *ds, const value_list_t *vl)
647 char name[6 * DATA_MAX_NAME_LEN];
652 if (FORMAT_VL (name, sizeof (name), vl) != 0)
654 ERROR ("utils_cache: uc_get_rate: FORMAT_VL failed.");
658 status = uc_get_rate_by_name (name, &ret, &ret_num);
662 /* This is important - the caller has no other way of knowing how many
663 * values are returned. */
664 if (ret_num != (size_t) ds->ds_num)
666 ERROR ("utils_cache: uc_get_rate: ds[%s] has %i values, "
667 "but uc_get_rate_by_name returned %zu.",
668 ds->type, ds->ds_num, ret_num);
674 } /* gauge_t *uc_get_rate */
676 int uc_get_names (char ***ret_names, cdtime_t **ret_times, size_t *ret_number)
678 c_avl_iterator_t *iter;
680 cache_entry_t *value;
683 cdtime_t *times = NULL;
688 if ((ret_names == NULL) || (ret_number == NULL))
691 pthread_mutex_lock (&cache_lock);
693 iter = c_avl_get_iterator (cache_tree);
694 while (c_avl_iterator_next (iter, (void *) &key, (void *) &value) == 0)
698 /* remove missing values when list values */
699 if (value->state == STATE_MISSING)
702 if (ret_times != NULL)
706 tmp_times = (cdtime_t *) realloc (times, sizeof (cdtime_t) * (number + 1));
707 if (tmp_times == NULL)
713 times[number] = value->last_time;
716 temp = (char **) realloc (names, sizeof (char *) * (number + 1));
723 names[number] = strdup (key);
724 if (names[number] == NULL)
730 } /* while (c_avl_iterator_next) */
732 c_avl_iterator_destroy (iter);
733 pthread_mutex_unlock (&cache_lock);
739 for (i = 0; i < number; i++)
749 if (ret_times != NULL)
751 *ret_number = number;
754 } /* int uc_get_names */
756 int uc_get_state (const data_set_t *ds, const value_list_t *vl)
758 char name[6 * DATA_MAX_NAME_LEN];
759 cache_entry_t *ce = NULL;
760 int ret = STATE_ERROR;
762 if (FORMAT_VL (name, sizeof (name), vl) != 0)
764 ERROR ("uc_get_state: FORMAT_VL failed.");
765 return (STATE_ERROR);
768 pthread_mutex_lock (&cache_lock);
770 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
776 pthread_mutex_unlock (&cache_lock);
779 } /* int uc_get_state */
781 int uc_set_state (const data_set_t *ds, const value_list_t *vl, int state)
783 char name[6 * DATA_MAX_NAME_LEN];
784 cache_entry_t *ce = NULL;
787 if (FORMAT_VL (name, sizeof (name), vl) != 0)
789 ERROR ("uc_get_state: FORMAT_VL failed.");
790 return (STATE_ERROR);
793 pthread_mutex_lock (&cache_lock);
795 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
802 pthread_mutex_unlock (&cache_lock);
805 } /* int uc_set_state */
807 int uc_get_history_by_name (const char *name,
808 gauge_t *ret_history, size_t num_steps, size_t num_ds)
810 cache_entry_t *ce = NULL;
814 pthread_mutex_lock (&cache_lock);
816 status = c_avl_get (cache_tree, name, (void *) &ce);
819 pthread_mutex_unlock (&cache_lock);
823 if (((size_t) ce->values_num) != num_ds)
825 pthread_mutex_unlock (&cache_lock);
829 /* Check if there are enough values available. If not, increase the buffer
831 if (ce->history_length < num_steps)
836 tmp = realloc (ce->history, sizeof (*ce->history)
837 * num_steps * ce->values_num);
840 pthread_mutex_unlock (&cache_lock);
844 for (i = ce->history_length * ce->values_num;
845 i < (num_steps * ce->values_num);
850 ce->history_length = num_steps;
851 } /* if (ce->history_length < num_steps) */
853 /* Copy the values to the output buffer. */
854 for (i = 0; i < num_steps; i++)
859 if (i < ce->history_index)
860 src_index = ce->history_index - (i + 1);
862 src_index = ce->history_length + ce->history_index - (i + 1);
863 src_index = src_index * num_ds;
865 dst_index = i * num_ds;
867 memcpy (ret_history + dst_index, ce->history + src_index,
868 sizeof (*ret_history) * num_ds);
871 pthread_mutex_unlock (&cache_lock);
874 } /* int uc_get_history_by_name */
876 int uc_get_history (const data_set_t *ds, const value_list_t *vl,
877 gauge_t *ret_history, size_t num_steps, size_t num_ds)
879 char name[6 * DATA_MAX_NAME_LEN];
881 if (FORMAT_VL (name, sizeof (name), vl) != 0)
883 ERROR ("utils_cache: uc_get_history: FORMAT_VL failed.");
887 return (uc_get_history_by_name (name, ret_history, num_steps, num_ds));
888 } /* int uc_get_history */
890 int uc_get_hits (const data_set_t *ds, const value_list_t *vl)
892 char name[6 * DATA_MAX_NAME_LEN];
893 cache_entry_t *ce = NULL;
894 int ret = STATE_ERROR;
896 if (FORMAT_VL (name, sizeof (name), vl) != 0)
898 ERROR ("uc_get_state: FORMAT_VL failed.");
899 return (STATE_ERROR);
902 pthread_mutex_lock (&cache_lock);
904 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
910 pthread_mutex_unlock (&cache_lock);
913 } /* int uc_get_hits */
915 int uc_set_hits (const data_set_t *ds, const value_list_t *vl, int hits)
917 char name[6 * DATA_MAX_NAME_LEN];
918 cache_entry_t *ce = NULL;
921 if (FORMAT_VL (name, sizeof (name), vl) != 0)
923 ERROR ("uc_get_state: FORMAT_VL failed.");
924 return (STATE_ERROR);
927 pthread_mutex_lock (&cache_lock);
929 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
936 pthread_mutex_unlock (&cache_lock);
939 } /* int uc_set_hits */
941 int uc_inc_hits (const data_set_t *ds, const value_list_t *vl, int step)
943 char name[6 * DATA_MAX_NAME_LEN];
944 cache_entry_t *ce = NULL;
947 if (FORMAT_VL (name, sizeof (name), vl) != 0)
949 ERROR ("uc_get_state: FORMAT_VL failed.");
950 return (STATE_ERROR);
953 pthread_mutex_lock (&cache_lock);
955 if (c_avl_get (cache_tree, name, (void *) &ce) == 0)
959 ce->hits = ret + step;
962 pthread_mutex_unlock (&cache_lock);
965 } /* int uc_inc_hits */
968 * Meta data interface
970 /* XXX: This function will acquire `cache_lock' but will not free it! */
971 static meta_data_t *uc_get_meta (const value_list_t *vl) /* {{{ */
973 char name[6 * DATA_MAX_NAME_LEN];
974 cache_entry_t *ce = NULL;
977 status = FORMAT_VL (name, sizeof (name), vl);
980 ERROR ("utils_cache: uc_get_meta: FORMAT_VL failed.");
984 pthread_mutex_lock (&cache_lock);
986 status = c_avl_get (cache_tree, name, (void *) &ce);
989 pthread_mutex_unlock (&cache_lock);
994 if (ce->meta == NULL)
995 ce->meta = meta_data_create ();
997 if (ce->meta == NULL)
998 pthread_mutex_unlock (&cache_lock);
1001 } /* }}} meta_data_t *uc_get_meta */
1003 /* Sorry about this preprocessor magic, but it really makes this file much
1005 #define UC_WRAP(wrap_function) { \
1006 meta_data_t *meta; \
1008 meta = uc_get_meta (vl); \
1009 if (meta == NULL) return (-1); \
1010 status = wrap_function (meta, key); \
1011 pthread_mutex_unlock (&cache_lock); \
1014 int uc_meta_data_exists (const value_list_t *vl, const char *key)
1015 UC_WRAP (meta_data_exists)
1017 int uc_meta_data_delete (const value_list_t *vl, const char *key)
1018 UC_WRAP (meta_data_delete)
1021 /* We need a new version of this macro because the following functions take
1023 #define UC_WRAP(wrap_function) { \
1024 meta_data_t *meta; \
1026 meta = uc_get_meta (vl); \
1027 if (meta == NULL) return (-1); \
1028 status = wrap_function (meta, key, value); \
1029 pthread_mutex_unlock (&cache_lock); \
1032 int uc_meta_data_add_string (const value_list_t *vl,
1035 UC_WRAP(meta_data_add_string)
1036 int uc_meta_data_add_signed_int (const value_list_t *vl,
1039 UC_WRAP(meta_data_add_signed_int)
1040 int uc_meta_data_add_unsigned_int (const value_list_t *vl,
1043 UC_WRAP(meta_data_add_unsigned_int)
1044 int uc_meta_data_add_double (const value_list_t *vl,
1047 UC_WRAP(meta_data_add_double)
1048 int uc_meta_data_add_boolean (const value_list_t *vl,
1051 UC_WRAP(meta_data_add_boolean)
1053 int uc_meta_data_get_string (const value_list_t *vl,
1056 UC_WRAP(meta_data_get_string)
1057 int uc_meta_data_get_signed_int (const value_list_t *vl,
1060 UC_WRAP(meta_data_get_signed_int)
1061 int uc_meta_data_get_unsigned_int (const value_list_t *vl,
1064 UC_WRAP(meta_data_get_unsigned_int)
1065 int uc_meta_data_get_double (const value_list_t *vl,
1068 UC_WRAP(meta_data_get_double)
1069 int uc_meta_data_get_boolean (const value_list_t *vl,
1072 UC_WRAP(meta_data_get_boolean)
1075 /* vim: set sw=2 ts=8 sts=2 tw=78 : */