pseudoana.h

Go to the documentation of this file.
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 DBALLE_DB_PSEUDOANA_H
00023 #define DBALLE_DB_PSEUDOANA_H
00024 
00025 #ifdef  __cplusplus
00026 extern "C" {
00027 #endif
00028 
00035 #include <dballe/db/internals.h>
00036 
00037 struct _dba_db;
00038     
00042 struct _dba_db_pseudoana
00043 {
00045     struct _dba_db* db;
00047     SQLHSTMT sfstm;
00049     SQLHSTMT smstm;
00051     SQLHSTMT sstm;
00053     SQLHSTMT istm;
00055     SQLHSTMT ustm;
00057     SQLHSTMT dstm;
00058 
00060     DBALLE_SQL_C_SINT_TYPE id;
00062     DBALLE_SQL_C_SINT_TYPE lat;
00064     DBALLE_SQL_C_SINT_TYPE lon;
00066     char ident[64];
00068     SQLLEN ident_ind;
00069 };
00071 typedef struct _dba_db_pseudoana* dba_db_pseudoana;
00072 
00083 dba_err dba_db_pseudoana_create(dba_db db, dba_db_pseudoana* ins);
00084 
00091 void dba_db_pseudoana_delete(dba_db_pseudoana ins);
00092 
00101 void dba_db_pseudoana_set_ident(dba_db_pseudoana ins, const char* ident);
00102 
00113 dba_err dba_db_pseudoana_get_id(dba_db_pseudoana ins, int *id);
00114 
00125 dba_err dba_db_pseudoana_get_data(dba_db_pseudoana ins, int id);
00126 
00137 dba_err dba_db_pseudoana_insert(dba_db_pseudoana ins, int *id);
00138 
00147 dba_err dba_db_pseudoana_update(dba_db_pseudoana ins);
00148 
00158 dba_err dba_db_pseudoana_remove(dba_db_pseudoana ins);
00159 
00160 #ifdef  __cplusplus
00161 }
00162 #endif
00163 
00164 /* vim:set ts=4 sw=4: */
00165 #endif

Generated on Fri Jun 22 14:45:48 2007 for libdballe-db by  doxygen 1.5.2