X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Flibcollectdclient%2Fcollectd%2Fclient.h;h=47462a6ba7884b70385f45d1e275cfed064448e6;hb=da612fa9c6a3343b43789569d64197d7c690be52;hp=1494c8d6cd66125885f725fe8d4d6bf98f7bade3;hpb=582ae3f47ec0459778c6d793ee2131e437b6131b;p=collectd.git diff --git a/src/libcollectdclient/collectd/client.h b/src/libcollectdclient/collectd/client.h index 1494c8d6..47462a6b 100644 --- a/src/libcollectdclient/collectd/client.h +++ b/src/libcollectdclient/collectd/client.h @@ -1,22 +1,27 @@ /** - * libcollectdclient - src/libcollectdclient/client.h - * Copyright (C) 2008 Florian octo Forster + * libcollectdclient - src/libcollectdclient/collectd/client.h + * Copyright (C) 2008-2012 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 LIBCOLLECTD_COLLECTDCLIENT_H @@ -24,6 +29,13 @@ #include "lcc_features.h" +/* COLLECTD_TRACE is the environment variable used to control trace output. When + * set to something non-zero, all lines sent to / received from the daemon are + * printed to STDOUT. */ +#ifndef LCC_TRACE_ENV +# define LCC_TRACE_ENV "COLLECTD_TRACE" +#endif + /* * Includes (for data types) */ @@ -79,8 +91,8 @@ struct lcc_value_list_s value_t *values; int *values_types; size_t values_len; - time_t time; - int interval; + double time; + double interval; lcc_identifier_t identifier; }; typedef struct lcc_value_list_s lcc_value_list_t; @@ -119,8 +131,10 @@ int lcc_string_to_identifier (lcc_connection_t *c, /* Compares the identifiers "i0" and "i1" and returns less than zero or greater * than zero if "i0" is smaller than or greater than "i1", respectively. If * "i0" and "i1" are identical, zero is returned. */ -int lcc_identifier_compare (const lcc_identifier_t *i0, - const lcc_identifier_t *i1); +int lcc_identifier_compare (const void *i0, + const void *i1); +int lcc_sort_identifiers (lcc_connection_t *c, + lcc_identifier_t *idents, size_t idents_num); LCC_END_DECLS