| 1 |
/* |
| 2 |
* Copyright (C) 2005-2018 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "dbwrappers/Database.h" |
| 12 |
|
| 13 |
#include <string> |
| 14 |
|
| 15 |
class CViewState; |
| 16 |
|
| 17 |
class CViewDatabase : public CDatabase |
| 18 |
{ |
| 19 |
public: |
| 20 |
CViewDatabase(); |
| 21 |
~CViewDatabase() override; |
| 22 |
bool Open() override; |
| 23 |
|
| 24 |
bool GetViewState(const std::string &path, int windowID, CViewState &state, const std::string &skin); |
| 25 |
bool SetViewState(const std::string &path, int windowID, const CViewState &state, const std::string &skin); |
| 26 |
bool ClearViewStates(int windowID); |
| 27 |
|
| 28 |
protected: |
| 29 |
void CreateTables() override; |
| 30 |
void CreateAnalytics() override; |
| 31 |
void UpdateTables(int version) override; |
| 32 |
int GetSchemaVersion() const override { return 6; } |
| 33 |
const char *GetBaseDBName() const override { return "ViewModes"; } |
| 34 |
}; |