1 /** |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
298 RSqlDatabase& iDatabase; |
300 RSqlDatabase& iDatabase; |
299 }; |
301 }; |
300 |
302 |
301 |
303 |
302 /** |
304 /** |
|
305 The CPplPredictiveSearchTable class contains numeric representation of the |
|
306 fields that are checked in predictive search. |
|
307 */ |
|
308 NONSHARABLE_CLASS(CPplPredictiveSearchTable) : public CPplTableBase |
|
309 { |
|
310 public: |
|
311 static CPplPredictiveSearchTable* NewL(RSqlDatabase& aDatabase); |
|
312 static CPplPredictiveSearchTable* NewLC(RSqlDatabase& aDatabase); |
|
313 ~CPplPredictiveSearchTable(); |
|
314 |
|
315 public: // From CPplTableBase |
|
316 void CreateInDbL(CContactItem& aItem); |
|
317 void UpdateL(const CContactItem& aItem); |
|
318 void DeleteL(const CContactItem& aItem, TBool& aLowDiskErrorOccurred); |
|
319 void CreateTableL(); |
|
320 |
|
321 private: |
|
322 void ConstructL(); |
|
323 CPplPredictiveSearchTable(RSqlDatabase& aDatabase); |
|
324 void WriteToDbL(const CContactItem& aItem, CCntSqlStatement* aStatement); |
|
325 HBufC* ConvertToNumericRepresentationLC( const TDesC& aString /*, key map */ ); |
|
326 |
|
327 private: |
|
328 // Owned |
|
329 CCntSqlStatement* iInsertStmnt; |
|
330 // Owned |
|
331 CCntSqlStatement* iUpdateStmnt; |
|
332 // Owned |
|
333 CCntSqlStatement* iDeleteStmnt; |
|
334 // Owned |
|
335 CPcsKeyMap* iKeyMap; |
|
336 |
|
337 RSqlDatabase& iDatabase; |
|
338 |
|
339 // For unit testing |
|
340 friend class UT_CPplPredictiveSearchTable; |
|
341 }; |
|
342 |
|
343 NONSHARABLE_CLASS(CPplPresenceTable) : public CPplTableBase |
|
344 { |
|
345 public: |
|
346 static CPplPresenceTable* NewL(RSqlDatabase& aDatabase); |
|
347 static CPplPresenceTable* NewLC(RSqlDatabase& aDatabase); |
|
348 ~CPplPresenceTable(); |
|
349 private: |
|
350 void ConstructL(); |
|
351 CPplPresenceTable(RSqlDatabase& aDatabase); |
|
352 public: // From CPplTableBase |
|
353 void CreateTableL(); |
|
354 void CreateInDbL(CContactItem& aItem); |
|
355 void UpdateL(const CContactItem& aItem); |
|
356 void DeleteL(const CContactItem& aItem, TBool& aLowDiskErrorOccurred); |
|
357 private: |
|
358 RSqlDatabase& iDatabase; |
|
359 }; |
|
360 /** |
303 This class holds a set of contact database preferences and is used in conjunction |
361 This class holds a set of contact database preferences and is used in conjunction |
304 with the CPplPreferencesPersistor class. |
362 with the CPplPreferencesPersistor class. |
305 */ |
363 */ |
306 NONSHARABLE_CLASS(RCntPreferences) |
364 NONSHARABLE_CLASS(RCntPreferences) |
307 { |
365 { |