2015-06-18 17:33:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <collection.h>
|
|
|
|
|
#include <ppltasks.h>
|
|
|
|
|
#include "ROMDBEntry.h"
|
|
|
|
|
#include "Database.h"
|
|
|
|
|
#include "ROMDBEntry.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using namespace Windows::Foundation;
|
|
|
|
|
using namespace Windows::Foundation::Collections;
|
|
|
|
|
using namespace Platform;
|
|
|
|
|
using namespace Platform::Collections;
|
|
|
|
|
using namespace Concurrency;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace VBA10
|
|
|
|
|
{
|
|
|
|
|
namespace WFC = Windows::Foundation::Collections;
|
|
|
|
|
namespace PC = Platform::Collections;
|
|
|
|
|
|
|
|
|
|
ref class ROMDatabase sealed
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ROMDatabase();
|
|
|
|
|
internal:
|
|
|
|
|
task<void> Initialize(void);
|
2015-06-19 23:04:52 +00:00
|
|
|
task<void> AddAsync(ROMDBEntry^ entry);
|
2015-06-18 17:33:07 +00:00
|
|
|
task<Vector<ROMDBEntry^>^> RetrieveQuerry();
|
2015-06-24 23:02:09 +00:00
|
|
|
task<void> UpdateAsync(ROMDBEntry^ entry);
|
2015-07-15 05:02:33 +00:00
|
|
|
ROMDBEntry^ GetEntryFromName(Platform::String^ name);
|
2015-08-01 03:49:59 +00:00
|
|
|
task<void> RemoveAsync(ROMDBEntry^ entry);
|
2015-06-23 13:41:49 +00:00
|
|
|
|
2015-06-18 22:29:52 +00:00
|
|
|
property PC::Vector<ROMDBEntry^>^ AllROMDBEntries
|
2015-06-18 17:33:07 +00:00
|
|
|
{
|
2015-06-18 22:29:52 +00:00
|
|
|
PC::Vector<ROMDBEntry^>^ get()
|
2015-06-18 17:33:07 +00:00
|
|
|
{
|
|
|
|
|
return _allROMDBEntries;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
//static ROMDatabase^ singleton;
|
|
|
|
|
|
|
|
|
|
SQLiteWinRT::Database^ db;
|
|
|
|
|
SQLiteWinRT::Statement^ statement; //temporary pointer to store statement
|
|
|
|
|
|
2015-06-18 22:29:52 +00:00
|
|
|
PC::Vector<ROMDBEntry^>^ _allROMDBEntries;
|
2015-06-23 13:41:49 +00:00
|
|
|
task<void> LoadSnapshotImage();
|
2015-08-11 16:59:47 +00:00
|
|
|
Platform::String^ ReplaceSingleQuote(Platform::String^ pstr);
|
2015-08-28 03:13:48 +00:00
|
|
|
bool initialized;
|
2015-06-18 17:33:07 +00:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|