00001 /********************************************************************** 00002 ** Copyright (C) 2000 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of Qtopia Environment. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00015 ** 00016 ** Contact info@trolltech.com if any conditions of this licensing are 00017 ** not clear to you. 00018 ** 00019 **********************************************************************/ 00020 00021 /* A Class to parse an comma seperated values docment of the form 00022 00023 "Displayed Name", key2name, key 3 name, key name 4 00024 value1, , value 3, "value 4" 00025 value1, , value 3, "value 4" 00026 00027 * '\' is the escape character. Basically \", \' and \\ escape the ", ' or \ 00028 * into the actual value of the field. 00029 * Before any other character will have the effect of dropping the '\'. 00030 * 00031 * Currently there is no support for comments. */ 00032 00033 #ifndef __CSVSOURCE_H__ 00034 #define __CSVSOURCE_H__ 00035 00036 #include <qstring.h> 00037 #include "datacache.h" 00038 #include "common.h" 00039 00040 00041 class DBCsv : public DBAccess 00042 { 00043 public: 00044 /* create connection and either open or initialize */ 00045 DBCsv(DBStore *d); 00046 QString type(); 00047 bool openSource(QIODevice *); 00048 bool saveSource(QIODevice *); 00049 /* does a db write */ 00050 ~DBCsv(); 00051 }; 00052 00053 #endif
1.4.2