summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Sinitsyn <ilya.sinitsyn@nokia.com>2011-01-18 10:25:38 +0200
committerIlya Sinitsyn <ilya.sinitsyn@nokia.com>2011-01-18 10:25:38 +0200
commit6b9197b562b348beeca50ca58041ac1b29b4feb3 (patch)
tree3fbc40de46c8c31022d8db54ed226a75bc4719f4
parentf9106898b3ab7d9a38db28944cae97a476650677 (diff)
Updating variation flag names in the symbian contact backends
-rw-r--r--plugins/contacts/symbian/plugin/inc/cntabstractrelationship.h2
-rw-r--r--plugins/contacts/symbian/plugin/inc/cntdisplaylabel.h6
-rw-r--r--plugins/contacts/symbian/plugin/inc/cntrelationship.h2
-rw-r--r--plugins/contacts/symbian/plugin/inc/cntrelationshipgroup.h2
-rw-r--r--plugins/contacts/symbian/plugin/inc/cntsymbiandatabase.h6
-rw-r--r--plugins/contacts/symbian/plugin/inc/cntsymbianengine.h2
-rw-r--r--plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfilterdbms.h4
-rw-r--r--plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfiltersql.h4
-rw-r--r--plugins/contacts/symbian/plugin/inc/transform/cnttransformfavorite.h2
-rw-r--r--plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccount.h4
-rw-r--r--plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccountsimple.h4
-rw-r--r--plugins/contacts/symbian/plugin/inc/transform/cnttransformpresence.h4
-rw-r--r--plugins/contacts/symbian/plugin/src/cntdisplaylabel.cpp12
-rw-r--r--plugins/contacts/symbian/plugin/src/cntrelationship.cpp6
-rw-r--r--plugins/contacts/symbian/plugin/src/cntrelationshipgroup.cpp2
-rw-r--r--plugins/contacts/symbian/plugin/src/cntsymbiandatabase.cpp10
-rw-r--r--plugins/contacts/symbian/plugin/src/cntsymbianengine.cpp23
-rw-r--r--plugins/contacts/symbian/plugin/src/filtering/cntsymbianfilterdbms.cpp2
-rw-r--r--plugins/contacts/symbian/plugin/src/filtering/cntsymbianfiltersql.cpp2
-rw-r--r--plugins/contacts/symbian/plugin/src/filtering/cntsymbiansorterdbms.cpp2
-rw-r--r--plugins/contacts/symbian/plugin/src/transform/cnttransformcontact.cpp4
-rw-r--r--plugins/contacts/symbian/plugin/src/transform/cnttransformfavorite.cpp2
-rw-r--r--plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccount.cpp4
-rw-r--r--plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccountsimple.cpp4
-rw-r--r--plugins/contacts/symbian/plugin/src/transform/cnttransformpresence.cpp4
-rw-r--r--plugins/contacts/symbian/plugin/symbian_defines.pri9
-rw-r--r--plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.cpp8
-rw-r--r--plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.h4
-rw-r--r--plugins/contacts/symbiansim/src/cntsimstoreprivate.cpp11
-rw-r--r--plugins/contacts/symbiansim/symbiansim_defines.pri29
-rw-r--r--plugins/contacts/symbiansim/tsrc/tst_simcm/tst_simcm.cpp9
31 files changed, 69 insertions, 120 deletions
diff --git a/plugins/contacts/symbian/plugin/inc/cntabstractrelationship.h b/plugins/contacts/symbian/plugin/inc/cntabstractrelationship.h
index 9148283a70..3dbebf63d6 100644
--- a/plugins/contacts/symbian/plugin/inc/cntabstractrelationship.h
+++ b/plugins/contacts/symbian/plugin/inc/cntabstractrelationship.h
@@ -59,7 +59,7 @@ public:
virtual QList<QContactRelationship> relationshipsL(const QContactId &participantId, QContactRelationship::Role role, QContactManager::Error *error) = 0;
virtual bool saveRelationshipL(QSet<QContactLocalId> *affectedContactIds, QContactRelationship *relationship, QContactManager::Error *error) = 0;
virtual bool removeRelationshipL(QSet<QContactLocalId> *affectedContactIds, const QContactRelationship &relationship, QContactManager::Error *error) = 0;
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
virtual bool saveRelationshipsL(QSet<QContactLocalId> *affectedContactIds, QList<QContactRelationship> *relationships, QContactManager::Error *error) = 0;
virtual bool removeRelationshipsL(QSet<QContactLocalId> *affectedContactIds, const QList<QContactRelationship> &relationships, QContactManager::Error *error) = 0;
#endif
diff --git a/plugins/contacts/symbian/plugin/inc/cntdisplaylabel.h b/plugins/contacts/symbian/plugin/inc/cntdisplaylabel.h
index 660172dad4..c4f1d45813 100644
--- a/plugins/contacts/symbian/plugin/inc/cntdisplaylabel.h
+++ b/plugins/contacts/symbian/plugin/inc/cntdisplaylabel.h
@@ -58,7 +58,7 @@ QTM_USE_NAMESPACE
class CRepository;
class CntDisplayLabel;
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include <centralrepository.h>
// CONSTANTS
@@ -116,7 +116,7 @@ public:
QList<QPair<QLatin1String, QLatin1String> > contactFilterDetails() const;
QList<QPair<QLatin1String, QLatin1String> > groupFilterDetails() const;
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
void updateNameOrdering();
#endif
@@ -132,7 +132,7 @@ private:
private:
QList<QList<QPair<QLatin1String, QLatin1String> > > m_contactDisplayLabelDetails;
QList<QList<QPair<QLatin1String, QLatin1String> > > m_groupDisplayLabelDetails;
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
CntCenrep* m_settings;
int m_nameOrder;
#endif
diff --git a/plugins/contacts/symbian/plugin/inc/cntrelationship.h b/plugins/contacts/symbian/plugin/inc/cntrelationship.h
index 7f262e308d..5a99af8a39 100644
--- a/plugins/contacts/symbian/plugin/inc/cntrelationship.h
+++ b/plugins/contacts/symbian/plugin/inc/cntrelationship.h
@@ -64,7 +64,7 @@ public:
bool removeRelationship(QSet<QContactLocalId> *affectedContactIds, const QContactRelationship &relationship, QContactManager::Error *error);
bool removeRelationships(QSet<QContactLocalId> *affectedContactIds, const QList<QContactRelationship> &relationships, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error *error);
bool validateRelationship(const QContactRelationship &relationship, QContactManager::Error *error);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
bool validateRelationships(const QList<QContactRelationship> &relationship, QString &relationshipType, QContactManager::Error *error);
#endif
private:
diff --git a/plugins/contacts/symbian/plugin/inc/cntrelationshipgroup.h b/plugins/contacts/symbian/plugin/inc/cntrelationshipgroup.h
index 8ce3990ff7..fd46c665cb 100644
--- a/plugins/contacts/symbian/plugin/inc/cntrelationshipgroup.h
+++ b/plugins/contacts/symbian/plugin/inc/cntrelationshipgroup.h
@@ -55,7 +55,7 @@ public:
QList<QContactRelationship> relationshipsL(const QContactId &participantId, QContactRelationship::Role role, QContactManager::Error *error);
bool saveRelationshipL(QSet<QContactLocalId> *affectedContactIds, QContactRelationship *relationship, QContactManager::Error *error);
bool removeRelationshipL(QSet<QContactLocalId> *affectedContactIds, const QContactRelationship &relationship, QContactManager::Error *error);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
bool saveRelationshipsL(QSet<QContactLocalId> *affectedContactIds, QList<QContactRelationship> *relationships, QContactManager::Error *error);
bool removeRelationshipsL(QSet<QContactLocalId> *affectedContactIds, const QList<QContactRelationship> &relationships, QContactManager::Error *error);
#endif
diff --git a/plugins/contacts/symbian/plugin/inc/cntsymbiandatabase.h b/plugins/contacts/symbian/plugin/inc/cntsymbiandatabase.h
index f9688a28fc..4c3d7a9ded 100644
--- a/plugins/contacts/symbian/plugin/inc/cntsymbiandatabase.h
+++ b/plugins/contacts/symbian/plugin/inc/cntsymbiandatabase.h
@@ -62,7 +62,7 @@ QTM_USE_NAMESPACE
// Constants
class CntSymbianDatabase : public QObject, public MContactDbObserver
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
, public MContactDbObserverV2
#endif
{
@@ -81,7 +81,7 @@ public:
// From MContactDbObserver
void HandleDatabaseEventL(TContactDbObserverEvent aEvent);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// From MContactDbObserverV2
void HandleDatabaseEventV2L(TContactDbObserverEventV2 aEvent);
#endif
@@ -93,7 +93,7 @@ private:
QSet<QContactLocalId> groupMembersL(QContactLocalId groupId);
private:
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
CContactChangeNotifier* m_contactChangeNotifier;
#endif
QContactManagerEngine *m_engine;
diff --git a/plugins/contacts/symbian/plugin/inc/cntsymbianengine.h b/plugins/contacts/symbian/plugin/inc/cntsymbianengine.h
index 35a2a69073..b6e80f8961 100644
--- a/plugins/contacts/symbian/plugin/inc/cntsymbianengine.h
+++ b/plugins/contacts/symbian/plugin/inc/cntsymbianengine.h
@@ -169,7 +169,7 @@ private:
QString m_managerUri;
CntTransformContact *m_transformContact;
CntSymbianFilter *m_contactFilter;
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
CntAbstractContactSorter *m_contactSorter;
#endif
CntRelationship *m_relationship;
diff --git a/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfilterdbms.h b/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfilterdbms.h
index 8230f7e942..3c4c45e612 100644
--- a/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfilterdbms.h
+++ b/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfilterdbms.h
@@ -42,7 +42,7 @@
#ifndef CNTSYMBIANFILTERDBMS_H
#define CNTSYMBIANFILTERDBMS_H
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cntabstractcontactfilter.h"
#include <e32cmn.h>
@@ -100,6 +100,6 @@ private:
#endif
};
-#endif /*SYMBIAN_BACKEND_USE_SQLITE*/
+#endif /*SYMBIAN_BACKEND_USE_CNTMODEL_V2*/
#endif /* CNTSYMBIANFILTERDBMS_H */
diff --git a/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfiltersql.h b/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfiltersql.h
index d0100a3492..6bd69bf58a 100644
--- a/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfiltersql.h
+++ b/plugins/contacts/symbian/plugin/inc/filtering/cntsymbianfiltersql.h
@@ -42,7 +42,7 @@
#ifndef CNT_SYMBIAN_FILTER_SQL_H
#define CNT_SYMBIAN_FILTER_SQL_H
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cntabstractcontactfilter.h"
#include "qcontactmanagerengine.h"
@@ -82,6 +82,6 @@ private:
};
-#endif /* SYMBIAN_BACKEND_USE_SQLITE */
+#endif /* SYMBIAN_BACKEND_USE_CNTMODEL_V2 */
#endif /* CNT_SYMBIAN_FILTER_SQL_H */
diff --git a/plugins/contacts/symbian/plugin/inc/transform/cnttransformfavorite.h b/plugins/contacts/symbian/plugin/inc/transform/cnttransformfavorite.h
index bd76111118..f6330b995e 100644
--- a/plugins/contacts/symbian/plugin/inc/transform/cnttransformfavorite.h
+++ b/plugins/contacts/symbian/plugin/inc/transform/cnttransformfavorite.h
@@ -41,7 +41,7 @@
#ifndef TRANSFORMFAVORITE_H
#define TRANSFORMFAVORITE_H
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cnttransformcontactdata.h"
diff --git a/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccount.h b/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccount.h
index e9ee464774..f4241bf38b 100644
--- a/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccount.h
+++ b/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccount.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#ifndef TRANSFORMONLINEACCOUNT_H
#define TRANSFORMONLINEACCOUNT_H
@@ -70,4 +70,4 @@ private:
#endif // TRANSFORMONLINEACCOUNT_H
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
diff --git a/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccountsimple.h b/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccountsimple.h
index fb7a1416bc..6520c76583 100644
--- a/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccountsimple.h
+++ b/plugins/contacts/symbian/plugin/inc/transform/cnttransformonlineaccountsimple.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#ifndef TRANSFORMONLINEACCOUNTSIMPLE_H
#define TRANSFORMONLINEACCOUNTSIMPLE_H
@@ -63,4 +63,4 @@ protected:
#endif // TRANSFORMONLINEACCOUNT_H
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
diff --git a/plugins/contacts/symbian/plugin/inc/transform/cnttransformpresence.h b/plugins/contacts/symbian/plugin/inc/transform/cnttransformpresence.h
index 9187ce6294..c0b0364609 100644
--- a/plugins/contacts/symbian/plugin/inc/transform/cnttransformpresence.h
+++ b/plugins/contacts/symbian/plugin/inc/transform/cnttransformpresence.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#ifndef TRANSFORMPRESENCE_H
#define TRANSFORMPRESENCE_H
@@ -73,4 +73,4 @@ private:
#endif // TRANSFORMPRESENCE_H
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
diff --git a/plugins/contacts/symbian/plugin/src/cntdisplaylabel.cpp b/plugins/contacts/symbian/plugin/src/cntdisplaylabel.cpp
index 3ce3f5d179..ce11673a79 100644
--- a/plugins/contacts/symbian/plugin/src/cntdisplaylabel.cpp
+++ b/plugins/contacts/symbian/plugin/src/cntdisplaylabel.cpp
@@ -48,7 +48,7 @@
CntDisplayLabel::CntDisplayLabel()
{
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
m_settings = new CntCenrep(KCntNameOrdering, *this);
m_nameOrder = m_settings->getValue();
#endif
@@ -60,7 +60,7 @@ CntDisplayLabel::CntDisplayLabel()
*/
CntDisplayLabel::~CntDisplayLabel()
{
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
delete m_settings;
#endif
}
@@ -86,7 +86,7 @@ void CntDisplayLabel::setDisplayLabelDetails()
QLatin1String firstLatin(QContactName::FieldFirstName);
QLatin1String secondLatin(QContactName::FieldLastName);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
if (m_nameOrder == CntOrderLastFirst || m_nameOrder == CntOrderLastCommaFirst) {
firstLatin = QLatin1String(QContactName::FieldLastName);
secondLatin = QLatin1String(QContactName::FieldFirstName);
@@ -114,7 +114,7 @@ QString CntDisplayLabel::synthesizedDisplayLabel(const QContact& contact, QConta
QString displayLabel;
*error = QContactManager::NoError;
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
int value = m_settings->getValue();
if (value != -1 && value != m_nameOrder) {
m_nameOrder = value;
@@ -169,7 +169,7 @@ QString CntDisplayLabel::generateDisplayLabel( const QContact &contact, const QL
if(!label.isEmpty())
{
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// Inlcude a comma if needed in the display label
if (m_nameOrder == CntOrderLastCommaFirst)
displayLabel.append(comma());
@@ -219,7 +219,7 @@ QString CntDisplayLabel::comma() const
return ",";
}
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
void CntDisplayLabel::updateNameOrdering()
{
diff --git a/plugins/contacts/symbian/plugin/src/cntrelationship.cpp b/plugins/contacts/symbian/plugin/src/cntrelationship.cpp
index af5aea1a3f..71a63f276f 100644
--- a/plugins/contacts/symbian/plugin/src/cntrelationship.cpp
+++ b/plugins/contacts/symbian/plugin/src/cntrelationship.cpp
@@ -215,7 +215,7 @@ bool CntRelationship::saveRelationships(QSet<QContactLocalId> *affectedContactId
*error = QContactManager::NoError;
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
TInt symbianError = KErrNone;
QString relationshipType;
@@ -298,7 +298,7 @@ bool CntRelationship::removeRelationships(QSet<QContactLocalId> *affectedContact
*error = QContactManager::NoError;
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
TInt symbianError = KErrNone;
QString relationshipType;
@@ -395,7 +395,7 @@ bool CntRelationship::validateRelationship(const QContactRelationship &relations
return abstractRelationship->validateRelationship(relationship, error);
}
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
/*
* Validates the relationships. If all valid relationships are of the same type,
* the type will be passed back in relationshipType. Otherwise it will be empty.
diff --git a/plugins/contacts/symbian/plugin/src/cntrelationshipgroup.cpp b/plugins/contacts/symbian/plugin/src/cntrelationshipgroup.cpp
index c5f6200cfb..e4137a7499 100644
--- a/plugins/contacts/symbian/plugin/src/cntrelationshipgroup.cpp
+++ b/plugins/contacts/symbian/plugin/src/cntrelationshipgroup.cpp
@@ -114,7 +114,7 @@ bool CntRelationshipGroup::removeRelationshipL(QSet<QContactLocalId> *affectedCo
return true;
}
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
/*!
* Save many relationships
*
diff --git a/plugins/contacts/symbian/plugin/src/cntsymbiandatabase.cpp b/plugins/contacts/symbian/plugin/src/cntsymbiandatabase.cpp
index 8b302705cf..7a0cbb344c 100644
--- a/plugins/contacts/symbian/plugin/src/cntsymbiandatabase.cpp
+++ b/plugins/contacts/symbian/plugin/src/cntsymbiandatabase.cpp
@@ -66,7 +66,7 @@ void CntSymbianDatabase::initializeL()
{
User::LeaveIfNull(m_engine);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// 10.x platforms do not need some of CContactDatabase's concepts, so
// they use the optimized OpenV2 and CreateV2.
TRAPD(err, m_contactDatabase = CContactDatabase::OpenV2L());
@@ -87,7 +87,7 @@ void CntSymbianDatabase::initializeL()
}
#endif
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// In pre 10.1 platforms the AddObserverL & RemoveObserver functions are not
// exported so we need to use CContactChangeNotifier.
TRAP(err, m_contactChangeNotifier = CContactChangeNotifier::NewL(*m_contactDatabase, this));
@@ -110,7 +110,7 @@ void CntSymbianDatabase::initializeL()
// EContactDbObserverEventGroupMembersAdded and
// EContactDbObserverEventGroupMembersRemoved need to be added to
// MContactDbObserver.
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
updateGroupMembershipsL();
#endif
}
@@ -118,7 +118,7 @@ void CntSymbianDatabase::initializeL()
CntSymbianDatabase::~CntSymbianDatabase()
{
m_engine = NULL;
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
delete m_contactChangeNotifier;
#else
if (m_contactDatabase != 0) {
@@ -347,7 +347,7 @@ void CntSymbianDatabase::HandleDatabaseEventL(TContactDbObserverEvent aEvent)
changeSet.emitSignals(m_engine);
}
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
/*!
* Respond to a contacts database extended event, delegating this event to
* an appropriate signal as required.
diff --git a/plugins/contacts/symbian/plugin/src/cntsymbianengine.cpp b/plugins/contacts/symbian/plugin/src/cntsymbianengine.cpp
index 6b56672ffa..2754a17c96 100644
--- a/plugins/contacts/symbian/plugin/src/cntsymbianengine.cpp
+++ b/plugins/contacts/symbian/plugin/src/cntsymbianengine.cpp
@@ -82,7 +82,7 @@ CntSymbianEngine::CntSymbianEngine(const QMap<QString, QString>& parameters, QCo
m_srvConnection(0),
m_transformContact(0),
m_contactFilter(0),
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
m_contactSorter(0),
#endif
m_relationship(0),
@@ -97,7 +97,7 @@ CntSymbianEngine::CntSymbianEngine(const QMap<QString, QString>& parameters, QCo
m_managerUri = QContactManager::buildUri(CNT_SYMBIAN_MANAGER_NAME, parameters);
m_transformContact = new CntTransformContact;
m_srvConnection = new CntSymbianSrvConnection(this);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
m_contactFilter = new CntSymbianFilter(*this, *m_dataBase->contactDatabase(), *m_srvConnection, *m_transformContact);
#else
m_contactFilter = new CntSymbianFilter(*m_dataBase->contactDatabase());
@@ -105,7 +105,7 @@ CntSymbianEngine::CntSymbianEngine(const QMap<QString, QString>& parameters, QCo
#endif
m_relationship = new CntRelationship(m_dataBase->contactDatabase(), m_managerUri);
m_displayLabel = new CntDisplayLabel();
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
connect(m_displayLabel, SIGNAL(displayLabelChanged()), this, SIGNAL(dataChanged()));
#endif
}
@@ -117,7 +117,7 @@ CntSymbianEngine::~CntSymbianEngine()
delete m_dataBase;
delete m_srvConnection;
delete m_transformContact;
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
delete m_contactSorter;
#endif
delete m_relationship;
@@ -140,7 +140,7 @@ QList<QContactLocalId> CntSymbianEngine::contactIds(
bool filterSupported(true);
result = m_contactFilter->contacts(filter, sortOrders, filterSupported, error);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// Remove possible false positives
if(!filterSupported && *error == QContactManager::NotSupportedError)
@@ -630,17 +630,6 @@ void CntSymbianEngine::removeContactL(QContactLocalId id)
//TODO: add code to remove all relationships.
m_dataBase->contactDatabase()->DeleteContactL(cId);
-#ifdef SYMBIAN_BACKEND_S60_VERSION_32
- // In S60 3.2 hardware (observerd with N96) there is a problem when saving and
- // deleting contacts in quick successive manner. At some point the database
- // starts leaving with KErrNotReady (-18). This happens randomly at either
- // DeleteContactL() or AddNewContactL(). The only only thing that seems to
- // help is to compress the database after deleting a contact.
- //
- // Needles to say that this will have a major negative effect on performance!
- // TODO: A better solution must be found.
- m_dataBase->contactDatabase()->CompactL();
-#endif
}
bool CntSymbianEngine::removeContact(const QContactLocalId& contactId, QContactManager::Error* error)
@@ -686,7 +675,7 @@ bool CntSymbianEngine::removeContacts(const QList<QContactLocalId>& contactIds,
QContactManager::Error selfContactError;
QContactLocalId selfCntId = selfContactId(&selfContactError); // selfContactError ignored
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// try to batch remove all contacts
TRAPD(err,
CContactIdArray* idList = CContactIdArray::NewLC();
diff --git a/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfilterdbms.cpp b/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfilterdbms.cpp
index db732af8c9..65c048cde9 100644
--- a/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfilterdbms.cpp
+++ b/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfilterdbms.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include <qcontactdetail.h>
#include <QSet>
diff --git a/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfiltersql.cpp b/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfiltersql.cpp
index e6c4fe2ad0..f07fb75556 100644
--- a/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfiltersql.cpp
+++ b/plugins/contacts/symbian/plugin/src/filtering/cntsymbianfiltersql.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cntsymbianfiltersql.h"
#include "qcontactdetailfilter.h"
diff --git a/plugins/contacts/symbian/plugin/src/filtering/cntsymbiansorterdbms.cpp b/plugins/contacts/symbian/plugin/src/filtering/cntsymbiansorterdbms.cpp
index 539799635c..fd1f53b97a 100644
--- a/plugins/contacts/symbian/plugin/src/filtering/cntsymbiansorterdbms.cpp
+++ b/plugins/contacts/symbian/plugin/src/filtering/cntsymbiansorterdbms.cpp
@@ -123,7 +123,7 @@ bool CntSymbianSorterDbms::sortOrderSupported(const QList<QContactSortOrder>& so
if( s.caseSensitivity() != Qt::CaseSensitive )
return false;
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// NOTE:
// Seems that there is a bug in cntmodel which causes that sorting
// is working correctly only if the direction is the same for all
diff --git a/plugins/contacts/symbian/plugin/src/transform/cnttransformcontact.cpp b/plugins/contacts/symbian/plugin/src/transform/cnttransformcontact.cpp
index 52bf100188..08e8b0668d 100644
--- a/plugins/contacts/symbian/plugin/src/transform/cnttransformcontact.cpp
+++ b/plugins/contacts/symbian/plugin/src/transform/cnttransformcontact.cpp
@@ -116,7 +116,7 @@ void CntTransformContact::initializeCntTransformContactData()
m_transformContactData.insert(Ringtone, new CntTransformRingtone);
m_transformContactData.insert(Avatar, new CntTransformAvatar);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// variated transform classes
m_transformContactData.insert(Anniversary, new CntTransformAnniversary);
@@ -237,7 +237,7 @@ void CntTransformContact::transformPostSaveDetailsL(
detailTimestamp = 0;
}
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
// In 10.1 onwards, copies of contact images are created after a contact
// is saved. The path of the image field is updated and needs to be updated
// in the QContact avatar detail
diff --git a/plugins/contacts/symbian/plugin/src/transform/cnttransformfavorite.cpp b/plugins/contacts/symbian/plugin/src/transform/cnttransformfavorite.cpp
index ea328c3e3a..3bd8333ce4 100644
--- a/plugins/contacts/symbian/plugin/src/transform/cnttransformfavorite.cpp
+++ b/plugins/contacts/symbian/plugin/src/transform/cnttransformfavorite.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cnttransformfavorite.h"
diff --git a/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccount.cpp b/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccount.cpp
index 2ba0eca0a5..5c7c1441eb 100644
--- a/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccount.cpp
+++ b/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccount.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cnttransformonlineaccount.h"
#include "cntmodelextuids.h"
@@ -315,6 +315,6 @@ void CntTransformOnlineAccount::reset()
m_detailCounter = 0;
}
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
// End of file
diff --git a/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccountsimple.cpp b/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccountsimple.cpp
index 8dcf1d12ba..29bc356a85 100644
--- a/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccountsimple.cpp
+++ b/plugins/contacts/symbian/plugin/src/transform/cnttransformonlineaccountsimple.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef SYMBIAN_BACKEND_USE_SQLITE
+#ifndef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cnttransformonlineaccountsimple.h"
@@ -211,4 +211,4 @@ void CntTransformOnlineAccount::detailDefinitions(QMap<QString, QContactDetailDe
}
}
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
diff --git a/plugins/contacts/symbian/plugin/src/transform/cnttransformpresence.cpp b/plugins/contacts/symbian/plugin/src/transform/cnttransformpresence.cpp
index 6397dac9fd..67133e990d 100644
--- a/plugins/contacts/symbian/plugin/src/transform/cnttransformpresence.cpp
+++ b/plugins/contacts/symbian/plugin/src/transform/cnttransformpresence.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
#include "cnttransformpresence.h"
#include "cntmodelextuids.h"
@@ -256,6 +256,6 @@ QContactPresence::PresenceState CntTransformPresence::decodePresence(QString pre
return QContactPresence::PresenceUnknown;
}
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
// End of file
diff --git a/plugins/contacts/symbian/plugin/symbian_defines.pri b/plugins/contacts/symbian/plugin/symbian_defines.pri
index 5ac5fa2a0d..b2e09bc674 100644
--- a/plugins/contacts/symbian/plugin/symbian_defines.pri
+++ b/plugins/contacts/symbian/plugin/symbian_defines.pri
@@ -1,19 +1,14 @@
symbian: {
exists($${EPOCROOT}epoc32/data/z/system/install/productid_helen.sis) {
message("S^3 1.11 or later platform")
- DEFINES += SYMBIAN_BACKEND_USE_SQLITE
+ DEFINES += SYMBIAN_BACKEND_USE_CNTMODEL_V2
# This will enable signals to be emitted sychronously with every
# operation instead of them beeing emitted when database event observer
# interface if called (HandleDatabaseEventL). This is an optimization
- # for S^3 1.11+ platform. However enabling this will cause some problems
- # with signals concerning adding/removing groups/group participants.
+ # for S^3 1.11+ platform.
DEFINES += SYMBIAN_BACKEND_SIGNAL_EMISSION_TWEAK
} else {
message("S^3 PS2 or older platform")
}
-
- contains(S60_VERSION, 3.2) {
- DEFINES += SYMBIAN_BACKEND_S60_VERSION_32
- }
}
diff --git a/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.cpp b/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.cpp
index 1d4755fc6b..f62a7e3ff5 100644
--- a/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.cpp
+++ b/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.cpp
@@ -151,7 +151,7 @@ void TestCntTransformContactData::executeCntTransformBithday()
QVERIFY(err == 0);
}
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
void TestCntTransformContactData::executeCntTransformOnlineAccount()
{
@@ -175,7 +175,7 @@ void TestCntTransformContactData::executeCntTransformPresence()
QVERIFY(err == 0);
}
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
void TestCntTransformContactData::executeCntTransformOrganisation()
{
@@ -1070,7 +1070,7 @@ void TestCntTransformContactData::validateCntTransformBirthdayL(TTime field, QDa
delete transformBirthday;
}
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
void TestCntTransformContactData::validateCntTransformOnlineAccountL(
TPtrC16 sipField, QString sipDetail,
@@ -1311,7 +1311,7 @@ void TestCntTransformContactData::validateCntTransformPresenceL(TPtrC16 presence
delete transformPresence;
}
-#endif // SYMBIAN_BACKEND_USE_SQLITE
+#endif // SYMBIAN_BACKEND_USE_CNTMODEL_V2
void TestCntTransformContactData::validateCntTransformOrganisationL(TPtrC16 companyField, QString companyDetail,
TPtrC16 departmentField, QStringList departmentDetail,
diff --git a/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.h b/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.h
index b5dd0f6ff5..dc91df6b35 100644
--- a/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.h
+++ b/plugins/contacts/symbian/plugin/tsrc/ut_symbian/ut_transformcontactdata.h
@@ -60,7 +60,7 @@ private slots:
void executeCntTransformAddress();
void executeCntTransformUrl();
void executeCntTransformBithday();
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
void executeCntTransformOnlineAccount();
void executeCntTransformPresence();
#endif
@@ -92,7 +92,7 @@ private:
TPtrC16 postOfficeBoxField, QString postOfficeBoxDetail);
void validateCntTransformUrlL(TPtrC16 field, QString detail);
void validateCntTransformBirthdayL(TTime field, QDate detail);
-#ifdef SYMBIAN_BACKEND_USE_SQLITE
+#ifdef SYMBIAN_BACKEND_USE_CNTMODEL_V2
void validateCntTransformOnlineAccountL(
TPtrC16 sipField, QString sipDetail,
TPtrC16 providerField, QString providerDetail);
diff --git a/plugins/contacts/symbiansim/src/cntsimstoreprivate.cpp b/plugins/contacts/symbiansim/src/cntsimstoreprivate.cpp
index d506825fa6..27345de1b2 100644
--- a/plugins/contacts/symbiansim/src/cntsimstoreprivate.cpp
+++ b/plugins/contacts/symbiansim/src/cntsimstoreprivate.cpp
@@ -783,16 +783,6 @@ void CntSimStorePrivate::removeL(int index)
void CntSimStorePrivate::updateStoreInfoL()
{
-#ifdef SYMBIANSIM_BACKEND_PHONEBOOKINFOV1
- TRequestStatus status;
- RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info;
- RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg infoPckg(info);
- m_etelStore.GetInfo(status, infoPckg);
- User::WaitForRequest(status);
- User::LeaveIfError(status.Int());
- m_storeInfo.m_totalEntries = info.iTotalEntries;
- m_storeInfo.m_usedEntries = info.iUsedEntries;
-#else
// Get info
TRequestStatus status;
if (m_storeInfo.m_storeName == KParameterValueSimStoreNameOn) {
@@ -817,7 +807,6 @@ void CntSimStorePrivate::updateStoreInfoL()
m_storeInfo.m_totalEntries = info.iTotalEntries;
m_storeInfo.m_usedEntries = info.iUsedEntries;
}
-#endif
#ifdef SYMBIANSIM_BACKEND_TEST_EXTRADETAILS
// Check if store supports the extra details
diff --git a/plugins/contacts/symbiansim/symbiansim_defines.pri b/plugins/contacts/symbiansim/symbiansim_defines.pri
index c5863caa60..48424e3303 100644
--- a/plugins/contacts/symbiansim/symbiansim_defines.pri
+++ b/plugins/contacts/symbiansim/symbiansim_defines.pri
@@ -14,38 +14,23 @@ symbian: {
-letelmm
}
- contains(S60_VERSION, 3.1) {
-
- # In S60 3.1 we need to use TMobilePhoneBookInfoV1 instead of TMobilePhoneBookInfoV5.
- # Note: Etel testsserver uses V5 always.
- !contains(DEFINES, SYMBIANSIM_BACKEND_USE_ETEL_TESTSERVER) {
- DEFINES += SYMBIANSIM_BACKEND_PHONEBOOKINFOV1
- }
- }
-
# Enable checking the existence of a contact before trying to remove it.
# This is needed because a contact backend is supposed to give an error
# when trying to remove a nonexistent contact, but SIM store does not
# give an error in such situations.
- # In S60 3.1 devices the consequences are even worse; the device will
- # reboot when trying to remove several nonexistent contacts in a row.
- # The first remove operation will succeed but right after the second
- # remove operation has completed the device reboots.
DEFINES += SYMBIANSIM_BACKEND_CHECK_BEFORE_REMOVE
- contains(S60_VERSION, 3.1) | contains(S60_VERSION, 3.2) | contains(S60_VERSION, 5.0) {
-
- # In pre 10.1 platforms we need a small delay between requests to prevent
- # S60 3.2 devices from rebooting and S60 5.0 devices from reporting a
- # server busy error. Not sure if this is really needed for S60 3.1 but
- # it does not hurt.
+ contains(S60_VERSION, 5.0) {
+ # We need a small delay between requests to prevent S60 5.0 devices
+ # from reporting a server busy error.
DEFINES += SYMBIANSIM_BACKEND_USE_DELAY
- # In pre 10.1 platforms we need to check extra detail support
+ # In 5.0 platform we need to check extra detail support
# (nickname/additional number/email) by trying to write them to sim card.
# This is because when using RMobilePhoneStore::GetInfo() it does not
- # report them correctly. There is another API for checking this but
- # it cannot be used as it is not public on these platforms.
+ # report them correctly.
+ # TODO: Check it in 9.2, there is another API for checking this but
+ # it is not public - could it be used?
DEFINES += SYMBIANSIM_BACKEND_TEST_EXTRADETAILS
}
}
diff --git a/plugins/contacts/symbiansim/tsrc/tst_simcm/tst_simcm.cpp b/plugins/contacts/symbiansim/tsrc/tst_simcm/tst_simcm.cpp
index bbb7991afc..c628b242cd 100644
--- a/plugins/contacts/symbiansim/tsrc/tst_simcm/tst_simcm.cpp
+++ b/plugins/contacts/symbiansim/tsrc/tst_simcm/tst_simcm.cpp
@@ -131,13 +131,8 @@ private:
private:
QContactManager* m_cm;
-#ifdef SYMBIANSIM_BACKEND_PHONEBOOKINFOV1
- RMobilePhoneBookStore::TMobilePhoneBookInfoV1 m_etelStoreInfo;
- RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg m_etelStoreInfoPckg;
-#else
RMobilePhoneBookStore::TMobilePhoneBookInfoV5 m_etelStoreInfo;
RMobilePhoneBookStore::TMobilePhoneBookInfoV5Pckg m_etelStoreInfoPckg;
-#endif
};
tst_SimCM::tst_SimCM() :
@@ -1725,9 +1720,6 @@ void tst_SimCM::dumpStoreInfo()
<< "\nLocation " << m_etelStoreInfo.iLocation
<< "\nChangeCounter " << m_etelStoreInfo.iChangeCounter
<< "\nIdentity " << QString::fromUtf8((const char*)identity.Ptr(), identity.Length())
-#ifdef SYMBIANSIM_BACKEND_PHONEBOOKINFOV1
- ;
-#else
<< "\nMaxSecondNames " << m_etelStoreInfo.iMaxSecondNames
<< "\nMaxTextLengthSecondName " << m_etelStoreInfo.iMaxTextLengthSecondName
<< "\nMaxAdditionalNumbers " << m_etelStoreInfo.iMaxAdditionalNumbers
@@ -1737,7 +1729,6 @@ void tst_SimCM::dumpStoreInfo()
<< "\nMaxTextLengthGroupName " << m_etelStoreInfo.iMaxTextLengthGroupName
<< "\nMaxEmailAddr " << m_etelStoreInfo.iMaxEmailAddr
<< "\nMaxTextLengthEmailAddr " << m_etelStoreInfo.iMaxTextLengthEmailAddr;
-#endif
}
bool tst_SimCM::compareContactLists(QList<QContact> lista, QList<QContact> listb)