57 |
57 |
58 QTM_USE_NAMESPACE |
58 QTM_USE_NAMESPACE |
59 class CntSymbianSrvConnection : public RSessionBase |
59 class CntSymbianSrvConnection : public RSessionBase |
60 { |
60 { |
61 public: |
61 public: |
|
62 |
|
63 enum QueryType { |
|
64 CntNotdefined = 0, |
|
65 CntPredictiveSearchList = 98, |
|
66 CntSearchResultList = 99 |
|
67 }; |
|
68 public: |
62 /*Constructor and destructor*/ |
69 /*Constructor and destructor*/ |
63 CntSymbianSrvConnection(QContactManagerEngine* engine); |
70 CntSymbianSrvConnection(QContactManagerEngine* engine); |
64 ~CntSymbianSrvConnection(); |
71 ~CntSymbianSrvConnection(); |
65 |
72 |
66 public: |
73 public: |
67 /* QT like functions */ |
74 /* QT like functions */ |
68 QList<QContactLocalId> searchContacts(const QString& searchQuery, |
75 QList<QContactLocalId> searchContacts(const QString& searchQuery, |
69 QContactManager::Error* error); |
76 QContactManager::Error* error); |
70 QContact searchContactName(QContactLocalId contactId, |
77 QContact searchContactName(QContactLocalId contactId, |
71 QContactManager::Error* error); |
78 QContactManager::Error* error); |
|
79 QList<QContactLocalId> searchOnServer(const QString& searchQuery, |
|
80 QueryType aQueryType, |
|
81 QContactManager::Error* error); |
72 QList<QContact> searchAllContactNames(QContactManager::Error* error); |
82 QList<QContact> searchAllContactNames(QContactManager::Error* error); |
|
83 QList<QPair<QContactLocalId, QString> > searchPhoneNumbers(const QString& searchQuery, |
|
84 QContactManager::Error* error); |
73 |
85 |
74 private: |
86 private: |
75 /* Symbian Leaving functions */ |
87 /* Symbian Leaving functions */ |
76 QList<QContactLocalId> searchContactIdsL(const TDesC& aSqlQuery); |
88 QList<QContactLocalId> searchContactIdsL(const TDesC& aSqlQuery, QueryType aQueryType); |
77 QList<QContact> searchContactNamesL(const TDesC& aSqlQuery); |
89 QList<QContact> searchContactNamesL(const TDesC& aSqlQuery); |
78 void readContactsToBufferL(const TDesC& aSqlQuery); |
90 QList<QPair<QContactLocalId, QString> > searchPhoneNumbersL(const TDesC& aSqlQuery, QueryType aQueryType); |
|
91 void readContactsToBufferL(const TDesC& aSqlQuery, QueryType aQueryType); |
79 void ConnectSrvL(); |
92 void ConnectSrvL(); |
80 void OpenDatabaseL(); |
93 void OpenDatabaseL(); |
81 TVersion Version() const; |
94 TVersion Version() const; |
82 TDes8& GetReceivingBufferL(TInt aSize=0); |
95 TDes8& GetReceivingBufferL(TInt aSize=0); |
83 |
96 |