dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
pureimagecache.h
Go to the documentation of this file.
1 
13 /*
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, see <http://www.gnu.org/licenses/>
26 */
27 #ifndef PUREIMAGECACHE_H
28 #define PUREIMAGECACHE_H
29 
30 #include <QtSql/QSqlDatabase>
31 #include <QString>
32 #include <QDir>
33 #include <QDebug>
34 #include <QFileInfo>
35 #include <QtSql/QSqlQuery>
36 #include <QtSql/QSqlError>
37 #include <QBuffer>
38 #include "maptype.h"
39 #include "point.h"
40 #include <QVariant>
41 #include "pureimage.h"
42 #include <QList>
43 #include <QMutex>
44 #include <QReadWriteLock>
45 namespace core {
47  {
48 
49  public:
51  static bool CreateEmptyDB(const QString &file);
52  bool PutImageToCache(const QByteArray &tile,const MapType::Types &type,const core::Point &pos, const int &zoom);
53  QByteArray GetImageFromCache(MapType::Types type, core::Point pos, int zoom);
54  QString GtileCache();
55  void setGtileCache(const QString &value);
56  static bool ExportMapDataToDB(QString sourceFile, QString destFile);
57  void deleteOlderTiles(int const& days);
58  private:
59  QString gtilecache;
60  QMutex Mcounter;
61  QReadWriteLock lock;
62  static qlonglong ConnCounter;
63 
64  };
65 
66 }
67 #endif // PUREIMAGECACHE_H
QByteArray GetImageFromCache(MapType::Types type, core::Point pos, int zoom)
static bool CreateEmptyDB(const QString &file)
Parse log file
void setGtileCache(const QString &value)
void deleteOlderTiles(int const &days)
static bool ExportMapDataToDB(QString sourceFile, QString destFile)
bool PutImageToCache(const QByteArray &tile, const MapType::Types &type, const core::Point &pos, const int &zoom)