Settings.h 1.79 KB
 Hugo Beauzée-Luyssen committed Nov 17, 2015 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 /***************************************************************************** * Media Library ***************************************************************************** * Copyright (C) 2015 Hugo Beauzée-Luyssen, Videolabs * * Authors: Hugo Beauzée-Luyssen * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifndef SETTINGS_H #define SETTINGS_H #include "Types.h"  Hugo Beauzée-Luyssen committed Apr 10, 2016 27 #include  Hugo Beauzée-Luyssen committed Nov 17, 2015 28   Hugo Beauzée-Luyssen committed Jun 06, 2016 29 30 31 namespace medialibrary {  Hugo Beauzée-Luyssen committed Nov 07, 2017 32 33 34 35 36 37 namespace sqlite { class Connection; }  Hugo Beauzée-Luyssen committed Nov 17, 2015 38 39 40 class Settings { public:  Hugo Beauzée-Luyssen committed Nov 07, 2017 41 42  Settings( MediaLibrary* ml ); bool load();  Hugo Beauzée-Luyssen committed May 17, 2017 43 44 45 46 47  /** * @brief dbModelVersion returns the current database model version. * * This can be different from the \ref DbModelVersion when upgrading the model */  Hugo Beauzée-Luyssen committed Nov 17, 2015 48 49 50 51  uint32_t dbModelVersion() const; bool save(); void setDbModelVersion( uint32_t dbModelVersion );  Hugo Beauzée-Luyssen committed Dec 07, 2017 52  static void createTable( sqlite::Connection* dbConn );  Hugo Beauzée-Luyssen committed Nov 17, 2015 53   Hugo Beauzée-Luyssen committed May 17, 2017 54 55  static const uint32_t DbModelVersion;  Hugo Beauzée-Luyssen committed Nov 17, 2015 56 private:  Hugo Beauzée-Luyssen committed Nov 07, 2017 57  MediaLibrary* m_ml;  Hugo Beauzée-Luyssen committed Nov 17, 2015 58 59 60 61 62 63  uint32_t m_dbModelVersion; bool m_changed; };  Hugo Beauzée-Luyssen committed Jun 06, 2016 64 65 }  Hugo Beauzée-Luyssen committed Nov 17, 2015 66 #endif // SETTINGS_H