Commit a608dee3 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add skeletons for the resource locator and storage classes

parent 7ae38ce8
......@@ -4,9 +4,13 @@ set(kritaresources_LIB_SRCS
KisResourceCacheDb.cpp
KisResourceLoader.cpp
KisResourceLoaderRegistry.cpp
KisResourceLocator.cpp
KisResourceStorage.cpp
KoResource.cpp
KoMD5Generator.cpp
KoHashGeneratorProvider.cpp
)
qt5_add_resources(kritaresources_LIB_SRCS sql.qrc)
......
......@@ -19,7 +19,7 @@
#include "KisResourceLoader.h"
#include <KoResource.h>
class KisResourceLoader::Private
{
......
/*
* Copyright (C) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "KisResourceLocator.h"
class KisResourceLocator::Private {
public:
};
KisResourceLocator::KisResourceLocator()
: d(new Private())
{
}
KisResourceLocator::~KisResourceLocator()
{
}
/*
* Copyright (C) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KISRESOURCELOCATOR_H
#define KISRESOURCELOCATOR_H
#include <QScopedPointer>
#include <kritaresources_export.h>
/**
* The KisResourceLocator class is used to find resources of
* a certain type.
*/
class KRITARESOURCES_EXPORT KisResourceLocator
{
public:
KisResourceLocator();
~KisResourceLocator();
private:
class Private;
QScopedPointer<Private> d;
};
#endif // KISRESOURCELOCATOR_H
/*
* Copyright (C) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "KisResourceStorage.h"
class KisResourceStorage::Private {
public:
};
KisResourceStorage::KisResourceStorage()
: d(new Private())
{
}
KisResourceStorage::~KisResourceStorage()
{
}
/*
* Copyright (C) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KISRESOURCESTORAGE_H
#define KISRESOURCESTORAGE_H
#include <QScopedPointer>
#include <kritaresources_export.h>
/**
* The KisResourceStorage class is the base class for
* places where resources can be stored. Examples are
* folders, bundles or Adobe resource libraries like
* ABR files.
*/
class KRITARESOURCES_EXPORT KisResourceStorage
{
public:
KisResourceStorage();
~KisResourceStorage();
private:
class Private;
QScopedPointer<Private> d;
};
#endif // KISRESOURCESTORAGE_H
......@@ -2,5 +2,6 @@ CREATE TABLE IF NOT EXISTS tags (
id INTEGER PRIMARY KEY
, name TEXT
, storage_id INTEGER
, active INTEGER
, FOREIGN KEY(storage_id) REFERENCES storages(id)
);
......@@ -5,6 +5,8 @@ CREATE TABLE IF NOT EXISTS versioned_resources (
, version INTEGER
, location TEXT
, datestamp TEXT
, deleted INTEGER
, checksum TEXT
, FOREIGN KEY(resource_id) REFERENCES resources(id)
, FOREIGN KEY(storage_id) REFERENCES storages(id)
);
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