57 QTM_USE_NAMESPACE |
58 QTM_USE_NAMESPACE |
58 class CntSymbianSrvConnection : public RSessionBase |
59 class CntSymbianSrvConnection : public RSessionBase |
59 { |
60 { |
60 public: |
61 public: |
61 /*Constructor and destructor*/ |
62 /*Constructor and destructor*/ |
62 CntSymbianSrvConnection(); |
63 CntSymbianSrvConnection(QContactManagerEngine* engine); |
63 ~CntSymbianSrvConnection(); |
64 ~CntSymbianSrvConnection(); |
64 |
65 |
65 public: |
66 public: |
66 /* QT like functions */ |
67 /* QT like functions */ |
67 QList<QContactLocalId> searchContacts(const QString& searchQuery, |
68 QList<QContactLocalId> searchContacts(const QString& searchQuery, |
68 QContactManager::Error* error); |
69 QContactManager::Error* error); |
|
70 QContact searchContactName(QContactLocalId contactId, |
|
71 QContactManager::Error* error); |
|
72 QList<QContact> searchAllContactNames(QContactManager::Error* error); |
69 |
73 |
70 private: |
74 private: |
71 /* Symbian Leaving functions */ |
75 /* Symbian Leaving functions */ |
72 QList<QContactLocalId> searchContactsL(const TDesC& aSearchQuery); |
76 QList<QContactLocalId> searchContactIdsL(const TDesC& aSqlQuery); |
|
77 QList<QContact> searchContactNamesL(const TDesC& aSqlQuery); |
|
78 void readContactsToBufferL(const TDesC& aSqlQuery); |
73 void ConnectSrvL(); |
79 void ConnectSrvL(); |
74 void OpenDatabaseL(); |
80 void OpenDatabaseL(); |
75 TVersion Version() const; |
81 TVersion Version() const; |
76 TDes8& GetReceivingBufferL(TInt aSize=0); |
82 TDes8& GetReceivingBufferL(TInt aSize=0); |
77 QList<QContactLocalId> UnpackCntIdArrayL(); |
|
78 |
83 |
79 private: |
84 private: |
80 /* member varibles */ |
85 /* member varibles */ |
|
86 QContactManagerEngine* m_manager; |
81 CBufFlat* m_buffer; |
87 CBufFlat* m_buffer; |
82 TInt m_maxBufferSize; |
88 TInt m_maxBufferSize; |
83 TPtr8 m_bufPtr; |
89 TPtr8 m_bufPtr; |
84 bool m_isInitialized; |
90 bool m_isInitialized; |
85 |
91 |