1 /* 2 * gnote 3 * 4 * Copyright (C) 2014,2019-2020 Aurimas Cernius 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #include "ignote.hpp" 21 #include "notemanagerbase.hpp" 22 #include "notebooks/notebookmanager.hpp" 23 #include "test/testtagmanager.hpp" 24 25 26 namespace test { 27 28 class NoteManager 29 : public gnote::NoteManagerBase 30 { 31 public: 32 static Glib::ustring test_notes_dir(); 33 34 NoteManager(const Glib::ustring & notes_dir, gnote::IGnote & g); 35 virtual ~NoteManager(); 36 notebook_manager()37 virtual gnote::notebooks::NotebookManager & notebook_manager() override 38 { 39 return m_notebook_manager; 40 } note_archiver()41 virtual gnote::NoteArchiver & note_archiver() override 42 { 43 return m_note_archiver; 44 } tag_manager() const45 virtual const gnote::ITagManager & tag_manager() const override 46 { 47 return m_tag_manager; 48 } tag_manager()49 virtual gnote::ITagManager & tag_manager() override 50 { 51 return m_tag_manager; 52 } 53 protected: 54 virtual gnote::NoteBase::Ptr note_create_new(const Glib::ustring & title, const Glib::ustring & file_name) override; 55 virtual gnote::NoteBase::Ptr note_load(const Glib::ustring & file_name) override; 56 private: 57 gnote::notebooks::NotebookManager m_notebook_manager; 58 gnote::NoteArchiver m_note_archiver; 59 TagManager m_tag_manager; 60 }; 61 62 } 63