X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmeta_data.h;h=fa48df326ebf90dc45ef4d237dcd7e889eefa124;hb=be0a3a6eeb3655d5559abe768c4027889d1ae979;hp=8e5a7852544a43e235919250ccf464de973b05e0;hpb=19a08d266f623d3697b5ca55689bd57eeaae46a6;p=collectd.git diff --git a/src/meta_data.h b/src/meta_data.h index 8e5a7852..fa48df32 100644 --- a/src/meta_data.h +++ b/src/meta_data.h @@ -1,22 +1,27 @@ /** * collectd - src/meta_data.h - * Copyright (C) 2008,2009 Florian octo Forster + * Copyright (C) 2008-2011 Florian octo Forster * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; only version 2 of the License is applicable. + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * Authors: - * Florian octo Forster + * Florian octo Forster **/ #ifndef META_DATA_H @@ -24,13 +29,25 @@ #include "collectd.h" +/* + * Defines + */ +#define MD_TYPE_STRING 1 +#define MD_TYPE_SIGNED_INT 2 +#define MD_TYPE_UNSIGNED_INT 3 +#define MD_TYPE_DOUBLE 4 +#define MD_TYPE_BOOLEAN 5 + struct meta_data_s; typedef struct meta_data_s meta_data_t; meta_data_t *meta_data_create (void); +meta_data_t *meta_data_clone (meta_data_t *orig); void meta_data_destroy (meta_data_t *md); int meta_data_exists (meta_data_t *md, const char *key); +int meta_data_type (meta_data_t *md, const char *key); +int meta_data_toc (meta_data_t *md, char ***toc); int meta_data_delete (meta_data_t *md, const char *key); int meta_data_add_string (meta_data_t *md,