Alexandre Lision | 392ee72 | 2015-01-23 16:27:10 -0500 | [diff] [blame^] | 1 | /************************************************************************************ |
| 2 | * Copyright (C) 2014 by Savoir-Faire Linux * |
| 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 | |
| 22 | #include "abstractitembackend.h" |
| 23 | |
| 24 | class LIB_EXPORT MinimalHistoryBackend : public AbstractHistoryBackend |
| 25 | { |
| 26 | public: |
| 27 | explicit MinimalHistoryBackend(QObject* parent = nullptr); |
| 28 | virtual ~MinimalHistoryBackend(); |
| 29 | |
| 30 | virtual bool load(); |
| 31 | virtual bool reload(); |
| 32 | virtual bool clear(); |
| 33 | virtual bool save(const Call* call); |
| 34 | virtual bool batchSave(QList<Call*> calls); |
| 35 | virtual bool append(const Call* item); |
| 36 | |
| 37 | virtual QString name () const; |
| 38 | virtual QVariant icon () const; |
| 39 | virtual bool isEnabled() const; |
| 40 | virtual QByteArray id () const; |
| 41 | virtual bool remove ( Call* c ) override; |
| 42 | |
| 43 | virtual SupportedFeatures supportedFeatures() const; |
| 44 | |
| 45 | virtual QList<Call*> items() const override; |
| 46 | |
| 47 | ///Edit 'item', the implementation may be a GUI or somehting else |
| 48 | virtual bool edit( Call* call); |
| 49 | ///Add a new item to the backend |
| 50 | virtual bool addNew( Call* call); |
| 51 | |
| 52 | ///Add a new phone number to an existing item |
| 53 | virtual bool addPhoneNumber( Call* call , PhoneNumber* number ); |
| 54 | }; |
| 55 | |
| 56 | #endif |