libdballe 4.0.18
|
00001 /* 00002 * DB-ALLe - Archive for punctual meteorological data 00003 * 00004 * Copyright (C) 2005,2006 ARPA-SIM <urpsim@smr.arpa.emr.it> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 * 00019 * Author: Enrico Zini <enrico@enricozini.com> 00020 */ 00021 00022 #ifndef DBA_DB_QUERYBUF_H 00023 #define DBA_DB_QUERYBUF_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00034 #include <dballe/core/error.h> 00035 00036 struct _dba_querybuf; 00037 00041 typedef struct _dba_querybuf* dba_querybuf; 00042 00054 dba_err dba_querybuf_create(int maxsize, dba_querybuf* buf); 00055 00062 void dba_querybuf_delete(dba_querybuf buf); 00063 00070 void dba_querybuf_reset(dba_querybuf buf); 00071 00080 const char* dba_querybuf_get(dba_querybuf buf); 00081 00091 int dba_querybuf_size(dba_querybuf buf); 00092 00104 dba_err dba_querybuf_start_list(dba_querybuf buf, const char* sep); 00105 00116 dba_err dba_querybuf_append(dba_querybuf buf, const char* str); 00117 00128 dba_err dba_querybuf_appendf(dba_querybuf buf, const char* fmt, ...); 00129 00143 dba_err dba_querybuf_append_list(dba_querybuf buf, const char* str); 00144 00158 dba_err dba_querybuf_append_listf(dba_querybuf buf, const char* fmt, ...); 00159 00160 00161 #ifdef __cplusplus 00162 } 00163 #endif 00164 00165 #endif