[videodb] Remove nested transaction when saving state after stopping PVR playback
[xbmc.git] / xbmc / view / ViewDatabase.h
blob701d1f67e0860c2f431e45f25e82fc32422b2355
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "dbwrappers/Database.h"
13 #include <string>
15 class CViewState;
17 class CViewDatabase : public CDatabase
19 public:
20 CViewDatabase();
21 ~CViewDatabase() override;
22 bool Open() override;
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);
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"; }