equal
deleted
inserted
replaced
91 * \a sqlQuery An SQL query |
91 * \a sqlQuery An SQL query |
92 * \a error On return, contains the possible error. |
92 * \a error On return, contains the possible error. |
93 * \return the list of matched contact ids |
93 * \return the list of matched contact ids |
94 */ |
94 */ |
95 QList<QContactLocalId> CntSymbianSrvConnection::searchContacts(const QString& sqlQuery, |
95 QList<QContactLocalId> CntSymbianSrvConnection::searchContacts(const QString& sqlQuery, |
96 QContactManager::Error& error) |
96 QContactManager::Error* error) |
97 { |
97 { |
98 QList<QContactLocalId> list; |
98 QList<QContactLocalId> list; |
99 TPtrC queryPtr(reinterpret_cast<const TUint16*>(sqlQuery.utf16())); |
99 TPtrC queryPtr(reinterpret_cast<const TUint16*>(sqlQuery.utf16())); |
100 TRAPD(err, list = searchContactsL(queryPtr)); |
100 TRAPD(err, list = searchContactsL(queryPtr)); |
101 CntSymbianTransformError::transformError(err, error); |
101 CntSymbianTransformError::transformError(err, error); |
150 User::LeaveIfError(server.Create(KCntServerExe,KNullDesC)); |
150 User::LeaveIfError(server.Create(KCntServerExe,KNullDesC)); |
151 |
151 |
152 //Enforce server to be at system default priority EPriorityForeground |
152 //Enforce server to be at system default priority EPriorityForeground |
153 server.SetPriority(EPriorityForeground); |
153 server.SetPriority(EPriorityForeground); |
154 |
154 |
155 // Synchronise with the server. |
155 // Synchronize with the server. |
156 TRequestStatus reqStatus; |
156 TRequestStatus reqStatus; |
157 server.Rendezvous(reqStatus); |
157 server.Rendezvous(reqStatus); |
158 server.Resume(); |
158 server.Resume(); |
159 |
159 |
160 // Server will call the reciprocal static synchronisation call. |
160 // Server will call the reciprocal static synchronization call. |
161 User::WaitForRequest(reqStatus); |
161 User::WaitForRequest(reqStatus); |
162 server.Close(); |
162 server.Close(); |
163 User::LeaveIfError(reqStatus.Int()); |
163 User::LeaveIfError(reqStatus.Int()); |
164 |
164 |
165 // Create the server session. |
165 // Create the server session. |