|
1 /* |
|
2 * Copyright (c) 2006 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: Interface class of settings data collection |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_IMUMDASETTINGSDATACOLLECTION_H |
|
20 #define M_IMUMDASETTINGSDATACOLLECTION_H |
|
21 |
|
22 #include <msvstd.h> // TMsvId |
|
23 #include <imumdasettingskeys.h> // Settings data keys |
|
24 |
|
25 class MImumDaSettingsDataCollection; |
|
26 |
|
27 /** |
|
28 * Settings data collection for connection settings |
|
29 * |
|
30 * This is an interface to settings data collection. This class is used with |
|
31 * CImumDaSettingsData interface, which always owns any instance of this class. |
|
32 * |
|
33 * @lib imumda.lib |
|
34 * @since S60 v3.2 |
|
35 * @see from ImumDaSettingsKeys.h enum TConnectionKeySet for setting keys |
|
36 * @see from ImumDaErrorCodes.h enum TImumDaErrorCode for error codes |
|
37 * @see from ImumDaSettingsData.h class CImumDaSettingsData for data class |
|
38 */ |
|
39 NONSHARABLE_CLASS( MImumDaSettingsDataCollection ) |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Sets the given value/text to the key |
|
45 * |
|
46 * @since S60 v3.2 |
|
47 * @param aAttributeKey, Id of the setting key |
|
48 * @param aValue/aText, Data to be stored |
|
49 * @return EImumDaNoError, when successful |
|
50 */ |
|
51 virtual TInt SetAttr( |
|
52 const TUint aAttributeKey, |
|
53 const TInt aValue ) = 0; |
|
54 |
|
55 virtual TInt SetAttr( |
|
56 const TUint aAttributeKey, |
|
57 const TInt64 aValue ) = 0; |
|
58 |
|
59 virtual TInt SetAttr( |
|
60 const TUint aAttributeKey, |
|
61 const TMsvId aValue ) = 0; |
|
62 |
|
63 virtual TInt SetAttr( |
|
64 const TUint aAttributeKey, |
|
65 const TDesC& aText ) = 0; |
|
66 |
|
67 virtual TInt SetAttr( |
|
68 const TUint aAttributeKey, |
|
69 const TDesC8& aText ) = 0; |
|
70 |
|
71 /** |
|
72 * Gets the required value/text from the key |
|
73 * |
|
74 * @since S60 v3.2 |
|
75 * @param aAttributeKey, Value of the setting key |
|
76 * @param aValue/aText, Data to be stored |
|
77 * @return EImumDaNoError, when successful |
|
78 */ |
|
79 virtual TInt GetAttr( |
|
80 const TUint aAttributeKey, |
|
81 TInt& aValue ) const = 0; |
|
82 |
|
83 virtual TInt GetAttr( |
|
84 const TUint aAttributeKey, |
|
85 TInt64& aValue ) const = 0; |
|
86 |
|
87 virtual TInt GetAttr( |
|
88 const TUint aAttributeKey, |
|
89 TMsvId& aId ) const = 0; |
|
90 |
|
91 virtual TInt GetAttr( |
|
92 const TUint aAttributeKey, |
|
93 TDes& aText ) const = 0; |
|
94 |
|
95 virtual TInt GetAttr( |
|
96 const TUint aAttributeKey, |
|
97 TDes8& aText ) const = 0; |
|
98 |
|
99 /** |
|
100 * Compares the content of the datas |
|
101 * |
|
102 * @since S60 v3.2 |
|
103 * @param aSettingsData |
|
104 * @return Result of the comparasion |
|
105 */ |
|
106 virtual TBool operator!=( |
|
107 const MImumDaSettingsDataCollection& aSettingsDataCollection ) |
|
108 const = 0; |
|
109 |
|
110 virtual TBool operator==( |
|
111 const MImumDaSettingsDataCollection& aSettingsDataCollection ) |
|
112 const = 0; |
|
113 |
|
114 /** |
|
115 * Resets the default value of the single key |
|
116 * |
|
117 * @since S60 v3.2 |
|
118 * @param aAttributeKey, Id of the setting key |
|
119 * @return EImumDaNoError, when successful |
|
120 */ |
|
121 virtual void Reset( const TUint aAttributeKey ) = 0; |
|
122 |
|
123 /** |
|
124 * Copies the content of the setting data |
|
125 * |
|
126 * @since S60 v3.2 |
|
127 * @param aSettingsData Collection data object to be copied |
|
128 * @return EImumDaNoError, when successful |
|
129 */ |
|
130 virtual TInt Copy( |
|
131 const MImumDaSettingsDataCollection& aSettingsDataCollection ) = 0; |
|
132 }; |
|
133 |
|
134 #endif // M_IMUMDASETTINGSDATACOLLECTION_H |
|
135 |