1
/************************************************************************************
2
* Copyright (C) 2014 by Savoir-Faire Linux *
3
* Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
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. *
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. *
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 LEGACYHISTORYBACKEND_H
20
#define LEGACYHISTORYBACKEND_H
22
#include "abstractitembackend.h"
24
class LIB_EXPORT LegacyHistoryBackend : public AbstractHistoryBackend
27
explicit LegacyHistoryBackend(QObject* parent = nullptr);
28
virtual ~LegacyHistoryBackend();
31
virtual bool reload();
32
virtual bool save(const Call* call);
33
virtual bool append(const Call* item);
35
virtual QString name () const;
36
virtual QVariant icon() const;
37
virtual bool isEnabled() const;
38
virtual QByteArray id() const;
40
virtual SupportedFeatures supportedFeatures() const;
42
virtual QList<Call*> items() const override;
44
///Edit 'item', the implementation may be a GUI or somehting else
45
virtual bool edit( Call* call);
46
///Add a new item to the backend
47
virtual bool addNew( Call* call);
49
///Add a new phone number to an existing item
50
virtual bool addPhoneNumber( Call* call , PhoneNumber* number );