|
1 /* |
|
2 * Copyright (c) 2007 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: This class handles columns. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_XMPPSETTINGSCOLUMN_H |
|
22 #define C_XMPPSETTINGSCOLUMN_H |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 class CRepository; |
|
27 |
|
28 /** |
|
29 * This class handles columns. |
|
30 * |
|
31 * This class contains all methods needed to read and write columns table. |
|
32 * |
|
33 * |
|
34 * @lib jabbersettings.lib |
|
35 * @since S60 5.0 |
|
36 */ |
|
37 class CXmppSettingsColumn: public CBase |
|
38 { |
|
39 |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @return Instance of this class |
|
45 */ |
|
46 static CXmppSettingsColumn* NewL( CRepository& aRepository ); |
|
47 |
|
48 static CXmppSettingsColumn* NewLC( CRepository& aRepository ); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 virtual ~CXmppSettingsColumn(); |
|
54 |
|
55 /** |
|
56 * This method checks that does this column exist. If it does not, it |
|
57 * creates it (if requested. Otherwise it leaves. |
|
58 * |
|
59 * @since S60 5.0 |
|
60 * @param aAttrName Column name. |
|
61 * @param aCreateColumnIfNotExist Should new column be created if it is |
|
62 * not found. |
|
63 * @param aColKey onn return contains the key of the column. |
|
64 */ |
|
65 void GetColumnKeyL( const TDesC& aAttrName, |
|
66 TBool aCreateColumnIfNotExist, |
|
67 TUint32& aColKey ); |
|
68 |
|
69 /** |
|
70 * Tries to find columns key by it is name (value). |
|
71 * |
|
72 * @since S60 5.0 |
|
73 * @param aColumnName Name of the column. |
|
74 * @param aColumnKey on return contains the columns key. |
|
75 */ |
|
76 void FindByNameL( const TDesC& aColumnName, |
|
77 TUint32& aColumnKey ); |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * Default Contructor |
|
83 */ |
|
84 CXmppSettingsColumn( CRepository& aRepository ); |
|
85 |
|
86 void ConstructL(); |
|
87 |
|
88 /** |
|
89 * This method resolves next free key to be used as column key. |
|
90 * |
|
91 * @since S60 5.0 |
|
92 * @param aColKey On return contains next free column key. |
|
93 */ |
|
94 void NextFreeSlotL( TUint32& aColKey ); |
|
95 |
|
96 private: // data |
|
97 |
|
98 /** |
|
99 * Handle to the Central Repository. Doesnt Own. |
|
100 */ |
|
101 CRepository& iRepository; |
|
102 |
|
103 }; |
|
104 |
|
105 |
|
106 #endif // C_XMPPSETTINGSCOLUMN_H |