Create a unified base class to access the database.
Moved the default database class to QListDB and disallow leaking CMAObjects outside this class. Rewrote QListDB and CMAEvent to use the new internal API. Moved the file format constants to the base database class. Moved the metadata loading methods to the base database class.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef SQLITEDB_H
|
||||
#define SQLITEDB_H
|
||||
|
||||
#include "database.h"
|
||||
|
||||
#include <vitamtp.h>
|
||||
|
||||
#include <QObject>
|
||||
@@ -25,7 +27,7 @@
|
||||
|
||||
#define OBJECT_APPLICATION 0x00080000
|
||||
|
||||
class SQLiteDB : public QObject
|
||||
class SQLiteDB : public Database
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -51,6 +53,8 @@ public:
|
||||
uint insertSavedataEntry(const QString &path, int type, int parent);
|
||||
uint insertApplicationEntry(const QString &path, int type, int parent, int app_type);
|
||||
|
||||
bool getObjectMetadata(int ohfi, metadata_t &metadata);
|
||||
|
||||
private:
|
||||
int recursiveScanRootDirectory(const QString &base_path, int parent, int type);
|
||||
uint insertDirectoryEntry(const QString &path, int type, int parent);
|
||||
|
Reference in New Issue
Block a user