|
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: Encapsulates ICE related software settings. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_CNATFWICESETTINGS_H |
|
22 #define C_CNATFWICESETTINGS_H |
|
23 |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <mnatfwicesettings.h> |
|
27 #include "tnatfwicepreferences.h" |
|
28 |
|
29 class CNATFWCenRepHandler; |
|
30 |
|
31 |
|
32 /** |
|
33 * Class instance encapsulates ICE related software settings. |
|
34 * |
|
35 * @lib natfwnatsettings.dll |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class CNATFWIceSettings : public CBase, public MNATFWIceSettings |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CNATFWIceSettings* NewL(); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CNATFWIceSettings* NewLC(); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CNATFWIceSettings(); |
|
57 |
|
58 /** |
|
59 * Sets preference values. |
|
60 * |
|
61 * @since S60 v3.2 |
|
62 * @param aPreferences Preferences |
|
63 */ |
|
64 void SetPreferences( const TNATFWIcePreferences& aPreferences ); |
|
65 |
|
66 /** |
|
67 * Sets preference value for a specified setting. |
|
68 * |
|
69 * @since S60 v3.2 |
|
70 * @param aSetting Setting for which to set value |
|
71 * @param aValue Preference value |
|
72 * @return KErrNotSupported if setting is not known, KErrNone otherwise |
|
73 */ |
|
74 TInt SetPrefValue( TPrefSetting aSetting, TInt aValue ); |
|
75 |
|
76 /** |
|
77 * Returns preference values. |
|
78 * |
|
79 * @since S60 v3.2 |
|
80 * @return Preferences |
|
81 */ |
|
82 const TNATFWIcePreferences& Preferences() const; |
|
83 |
|
84 /** |
|
85 * Sets utility plugins. |
|
86 * |
|
87 * @since S60 v3.2 |
|
88 * @param aUtilityPlugins Utility plugins |
|
89 */ |
|
90 void SetUtilityPluginsL( const CDesC8Array& aUtilityPlugins ); |
|
91 |
|
92 /** |
|
93 * Reads settings values from Central Repository |
|
94 * |
|
95 * @since S60 v3.2 |
|
96 * @param aDomainKey Key for the domain specific settings |
|
97 * @param aRepHandler Central Repository handler |
|
98 */ |
|
99 void ReadSettingsL( TUint32 aDomainKey, |
|
100 const CNATFWCenRepHandler& aRepHandler ); |
|
101 |
|
102 // from base class MNATFWIceSettings |
|
103 |
|
104 /** |
|
105 * From MNATFWIceSettings. |
|
106 * Returns preference value for a specifed setting. |
|
107 * |
|
108 * @since S60 v3.2 |
|
109 * @param aSetting Setting for which to return preference value |
|
110 * @param aValue Preference value if query was valid |
|
111 * @return KErrNotSupported if setting is not known, KErrNone otherwise |
|
112 */ |
|
113 TInt GetPrefValue( TPrefSetting aSetting, TInt& aValue ) const; |
|
114 |
|
115 /** |
|
116 * From MNATFWIceSettings. |
|
117 * Returns array of identifiers of utility plugins available for ICE. |
|
118 * |
|
119 * @since S60 v3.2 |
|
120 * @return Utilities available for ICE |
|
121 */ |
|
122 const CDesC8Array& NatUtilityPlugins() const; |
|
123 |
|
124 private: |
|
125 |
|
126 CNATFWIceSettings(); |
|
127 |
|
128 void ConstructL(); |
|
129 |
|
130 private: // data |
|
131 |
|
132 /** |
|
133 * ICE preferences for candidate prioritization. |
|
134 */ |
|
135 TNATFWIcePreferences iPreferences; |
|
136 |
|
137 /** |
|
138 * NAT utility plugins for ICE. |
|
139 * Own. |
|
140 */ |
|
141 CDesC8Array* iUtilityPlugins; |
|
142 }; |
|
143 |
|
144 #endif // C_CNATFWICESETTINGS_H |