mirror of
https://github.com/Team-Resurgent/XBMC4Xbox.git
synced 2026-08-15 11:18:13 -07:00
If ever adding the XBMC4Xbox source to GitHub use "git add -f -A" or it wont add all the files.
70 lines
2.9 KiB
C++
70 lines
2.9 KiB
C++
#pragma once
|
|
/*
|
|
* Copyright (C) 2005-2013 Team XBMC
|
|
* http://xbmc.org
|
|
*
|
|
* 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, or (at your option)
|
|
* any later version.
|
|
*
|
|
* This Program 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with XBMC; see the file COPYING. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
#include "Database.h"
|
|
|
|
typedef std::vector<CStdString> VECPROGRAMPATHS;
|
|
|
|
#define COMPARE_PERCENTAGE 0.90f // 90%
|
|
#define COMPARE_PERCENTAGE_MIN 0.50f // 50%
|
|
|
|
#define PROGRAM_DATABASE_NAME "MyPrograms6.db"
|
|
|
|
class CFileItem;
|
|
|
|
class CProgramDatabase : public CDatabase
|
|
{
|
|
public:
|
|
CProgramDatabase(void);
|
|
virtual ~CProgramDatabase(void);
|
|
bool AddTrainer(int iTitleId, const CStdString& strText);
|
|
bool RemoveTrainer(const CStdString& strText);
|
|
bool GetTrainers(unsigned int iTitleId, std::vector<CStdString>& vecTrainers);
|
|
bool GetAllTrainers(std::vector<CStdString>& vecTrainers);
|
|
bool SetTrainerOptions(const CStdString& strTrainerPath, unsigned int iTitleId, unsigned char* data, int numOptions);
|
|
bool GetTrainerOptions(const CStdString& strTrainerPath, unsigned int iTitleId, unsigned char* data, int numOptions);
|
|
void SetTrainerActive(const CStdString& strTrainerPath, unsigned int iTitleId, bool bActive);
|
|
CStdString GetActiveTrainer(unsigned int iTitleId);
|
|
bool HasTrainer(const CStdString& strTrainerPath);
|
|
bool ItemHasTrainer(unsigned int iTitleId);
|
|
|
|
int GetRegion(const CStdString& strFilenameAndPath);
|
|
bool SetRegion(const CStdString& strFilenameAndPath, int iRegion=-1);
|
|
|
|
int GetTitleId(const CStdString& strFilenameAndPath);
|
|
bool SetTitleId(const CStdString& strFilenameAndPath, int idTitle);
|
|
bool IncTimesPlayed(const CStdString& strFileName1);
|
|
bool SetDescription(const CStdString& strFileName1, const CStdString& strDescription);
|
|
bool GetXBEPathByTitleId(const int idTitle, CStdString& strPathAndFilename);
|
|
|
|
int GetProgramInfo(CFileItem *item);
|
|
bool AddProgramInfo(CFileItem *item, unsigned int titleID);
|
|
|
|
bool GetArbitraryQuery(const CStdString& strQuery, const CStdString& strOpenRecordSet, const CStdString& strCloseRecordSet,
|
|
const CStdString& strOpenRecord, const CStdString& strCloseRecord, const CStdString& strOpenField, const CStdString& strCloseField, CStdString& strResult);
|
|
|
|
protected:
|
|
virtual bool CreateTables();
|
|
virtual bool UpdateOldVersion(int version);
|
|
virtual int GetMinVersion() const { return 3; };
|
|
|
|
FILETIME TimeStampToLocalTime( unsigned __int64 timeStamp );
|
|
};
|