Alexandre Lision | 392ee72 | 2015-01-23 16:27:10 -0500 | [diff] [blame] | 1 | /************************************************************************************ |
Alexandre Lision | 4a7b95e | 2015-02-20 10:06:43 -0500 | [diff] [blame] | 2 | * Copyright (C) 2014-2015 by Savoir-Faire Linux * |
Alexandre Lision | 392ee72 | 2015-01-23 16:27:10 -0500 | [diff] [blame] | 3 | * Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> * |
| 4 | * * |
| 5 | * This library is free software; you can redistribute it and/or * |
| 6 | * modify it under the terms of the GNU Lesser General Public * |
| 7 | * License as published by the Free Software Foundation; either * |
| 8 | * version 2.1 of the License, or (at your option) any later version. * |
| 9 | * * |
| 10 | * This library is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
| 13 | * Lesser General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU Lesser General Public * |
| 16 | * License along with this library; if not, write to the Free Software * |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
| 18 | ***********************************************************************************/ |
| 19 | #ifndef MINIMALHISTORYBACKEND_H |
| 20 | #define MINIMALHISTORYBACKEND_H |
| 21 | |
Alexandre Lision | 91d11e5 | 2015-03-20 17:42:05 -0400 | [diff] [blame] | 22 | #import <collectioninterface.h> |
| 23 | #import <collectioneditor.h> |
Alexandre Lision | 392ee72 | 2015-01-23 16:27:10 -0500 | [diff] [blame] | 24 | |
Alexandre Lision | 4a7b95e | 2015-02-20 10:06:43 -0500 | [diff] [blame] | 25 | class Call; |
| 26 | |
| 27 | template<typename T> class CollectionMediator; |
| 28 | |
| 29 | class LIB_EXPORT MinimalHistoryBackend : public CollectionInterface |
Alexandre Lision | 392ee72 | 2015-01-23 16:27:10 -0500 | [diff] [blame] | 30 | { |
| 31 | public: |
Alexandre Lision | 6e81714 | 2015-03-13 11:07:53 -0400 | [diff] [blame] | 32 | explicit MinimalHistoryBackend(CollectionMediator<Call>* mediator); |
| 33 | virtual ~MinimalHistoryBackend(); |
Alexandre Lision | 4a7b95e | 2015-02-20 10:06:43 -0500 | [diff] [blame] | 34 | |
Alexandre Lision | 6e81714 | 2015-03-13 11:07:53 -0400 | [diff] [blame] | 35 | virtual bool load() override; |
| 36 | virtual bool reload() override; |
| 37 | virtual bool clear() override; |
| 38 | virtual QString name () const override; |
| 39 | virtual QString category () const override; |
| 40 | virtual QVariant icon () const override; |
| 41 | virtual bool isEnabled() const override; |
| 42 | virtual QByteArray id () const override; |
| 43 | virtual SupportedFeatures supportedFeatures() const override; |
Alexandre Lision | 4a7b95e | 2015-02-20 10:06:43 -0500 | [diff] [blame] | 44 | |
| 45 | private: |
Alexandre Lision | 6e81714 | 2015-03-13 11:07:53 -0400 | [diff] [blame] | 46 | CollectionMediator<Call>* m_pMediator; |
Alexandre Lision | 4a7b95e | 2015-02-20 10:06:43 -0500 | [diff] [blame] | 47 | }; |
| 48 | |
Alexandre Lision | 392ee72 | 2015-01-23 16:27:10 -0500 | [diff] [blame] | 49 | #endif |