Skip to content
Snippets Groups Projects
Commit 74ac68f5 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

[7021] Add contact abstraction support

parent b3667dd2
No related branches found
No related tags found
No related merge requests found
...@@ -21,8 +21,6 @@ set(GENERIC_LIB_VERSION "0.9.8") ...@@ -21,8 +21,6 @@ set(GENERIC_LIB_VERSION "0.9.8")
INCLUDE_DIRECTORIES ( ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES ( ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
#File to compile #File to compile
set( qtsflphone_LIB_SRCS set( qtsflphone_LIB_SRCS
Call.cpp Call.cpp
...@@ -30,6 +28,7 @@ set( qtsflphone_LIB_SRCS ...@@ -30,6 +28,7 @@ set( qtsflphone_LIB_SRCS
AccountList.cpp AccountList.cpp
CallModel.cpp CallModel.cpp
Contact.cpp Contact.cpp
ContactBackend.cpp
Item.cpp Item.cpp
configurationmanager_interface_singleton.cpp configurationmanager_interface_singleton.cpp
callmanager_interface_singleton.cpp callmanager_interface_singleton.cpp
...@@ -99,6 +98,7 @@ set( qtsflphone_LIB_HDRS ...@@ -99,6 +98,7 @@ set( qtsflphone_LIB_HDRS
Call.h Call.h
CallModel.h CallModel.h
Contact.h Contact.h
ContactBackend.h
Item.h Item.h
configurationmanager_interface_singleton.h configurationmanager_interface_singleton.h
callmanager_interface_singleton.h callmanager_interface_singleton.h
......
#include "ContactBackend.h"
#include "Contact.h"
#include <QHash>
ContactBackend::ContactBackend(QObject* parent) : QObject(parent)
{
}
ContactList ContactBackend::update()
{
return update_slot();
}
#ifndef CONTACT_BACKEND_H
#define CONTACT_BACKEND_H
#include <QObject>
#include <QHash>
#include "typedefs.h"
class Contact;
typedef QList<Contact*> ContactList;
class LIB_EXPORT ContactBackend : public QObject {
Q_OBJECT
public:
ContactBackend(QObject* parent);
virtual Contact* getContactByPhone ( QString phoneNumber ) = 0;
virtual Contact* getContactByUid ( QString uid ) = 0;
virtual void editContact ( Contact* contact ) = 0;
virtual void addNewContact ( Contact* contact ) = 0;
protected:
virtual ContactList update_slot ( ) = 0;
QHash<QString,Contact*> m_pContactByPhone ;
QHash<QString,Contact*> m_pContactByUid ;
public slots:
ContactList update();
private slots:
signals:
};
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment