|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: IETF SIMPLE Protocol implementation for XIMP Framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPRESENCEPLUGINLOCALSTORE_H |
|
20 #define C_CPRESENCEPLUGINLOCALSTORE_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <d32dbms.h> |
|
25 #include <s32file.h> |
|
26 |
|
27 |
|
28 /** |
|
29 * Service contacts local store reader |
|
30 * |
|
31 * @lib presenceplugin.dll |
|
32 * @since S60 v5.0 |
|
33 */ |
|
34 class CPresencePluginLocalstore : public CBase |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aServiceName Service name |
|
42 */ |
|
43 static CPresencePluginLocalstore* NewL( const TDesC& aServiceName ); |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * @param aServiceName Service name |
|
48 */ |
|
49 static CPresencePluginLocalstore* NewLC( const TDesC& aServiceName ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CPresencePluginLocalstore(); |
|
55 |
|
56 /** |
|
57 * Seeks given id at contact column |
|
58 * |
|
59 * @since S60 v5.0 |
|
60 * @param aIdentifier Id. to search |
|
61 * @return ETrue if found |
|
62 */ |
|
63 TBool SeekRowAtContactColL( TInt32& aIdentifier ); |
|
64 |
|
65 private: |
|
66 |
|
67 CPresencePluginLocalstore(); |
|
68 |
|
69 void ConstructL( const TDesC& aServiceName ); |
|
70 |
|
71 TBool DbExists(); |
|
72 |
|
73 void OpenDbL(); |
|
74 |
|
75 private: // data |
|
76 |
|
77 /** |
|
78 * File stream |
|
79 */ |
|
80 RFs iFs; |
|
81 |
|
82 /** |
|
83 * Store database |
|
84 */ |
|
85 RDbStoreDatabase iDb; |
|
86 |
|
87 /** |
|
88 * Table |
|
89 */ |
|
90 RDbTable iTable; |
|
91 |
|
92 /** |
|
93 * Column definitions |
|
94 * Own. |
|
95 */ |
|
96 CDbColSet* iColset; |
|
97 |
|
98 /** |
|
99 * DB Store |
|
100 * Own. |
|
101 */ |
|
102 CPermanentFileStore* iFileStore; |
|
103 |
|
104 /** |
|
105 * Local database name |
|
106 * Own. |
|
107 */ |
|
108 HBufC* iLocalDBName; |
|
109 |
|
110 }; |
|
111 |
|
112 |
|
113 #endif // C_CPRESENCEPLUGINLOCALSTORE_H |