Commit 2ca0d5d2 authored by Lukas Appelhans's avatar Lukas Appelhans

On a big split

parent c584dc5e
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(akabei_create_db_SRCS main.cpp createdb.cpp)
set(akabei_create_db_SRCS databaseworker.cpp main.cpp createdb.cpp)
qt4_automoc(${akabei_create_db_SRCS})
......
This diff is collapsed.
......@@ -31,7 +31,6 @@ class CreateDb : public QObject
private:
QString cleanPath(const QString &path);
bool writeArchive(const QString &filename, const QHash<QString,QString> &files);
private:
QString m_db;
......
This diff is collapsed.
/* This file is part of the Chakra project
Copyright (C) 2011 Lukas Appelhans
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; either
version 2 of the License, or (at your option) any later version.
*/
#ifndef DATABASEWORKER_H
#define DATABASEWORKER_H
#include <QtCore/QObject>
#include <akabeibackend.h>
#include <sqlite3.h>
#include <akabeipackage.h>
#include <qtextstream.h>
#include <QStringList>
namespace Akabei {
class Database;
}
bool writeArchive(const QString &filename, const QHash<QString,QString> &files);
QHash<QString, QString> extractArchive(const QString &path);
class DatabaseWorker : public QObject
{
Q_OBJECT
public:
DatabaseWorker(QObject *parent = 0);
virtual ~DatabaseWorker();
bool init(const QString &path);
// bool init(Akabei::Database * db);
bool create();
bool remove(Akabei::Package::List packages);
bool add(const QStringList &targets);
bool finish();
private:
sqlite3 *db;
QTextStream out;
QStringList m_targets;
};
#endif // DATABASEWORKER_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment