|
1 /* |
|
2 * Copyright (c) 2002 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: CMPSettingsModel stub |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 2 % |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef MMPSETTINGSMODEL_H |
|
24 #define MMPSETTINGSMODEL_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32std.h> |
|
28 #include <qstring.h> |
|
29 |
|
30 // DATA TYPES |
|
31 // Config file version |
|
32 enum TConfigVersion |
|
33 { |
|
34 EConfigDefault, |
|
35 EConfigUser |
|
36 }; |
|
37 |
|
38 // Bearer type |
|
39 enum TDataBearer |
|
40 { |
|
41 EBearerGPRS, |
|
42 EBearerEGPRS, |
|
43 EBearerWCDMA, |
|
44 EBearerCDMA, |
|
45 EBearerCDMA2000, |
|
46 EBearerWLAN, |
|
47 EBearerHSDPA |
|
48 }; |
|
49 |
|
50 // CLASS DECLARATION |
|
51 |
|
52 /** |
|
53 * CMPSettingsModel |
|
54 * Common API for MMF specific settings models. |
|
55 * |
|
56 * @lib MPSettEngine.dll |
|
57 * @since 2.0 |
|
58 */ |
|
59 class CMPSettingsModel |
|
60 { |
|
61 public: |
|
62 |
|
63 /** |
|
64 * Constructor. Uses ECom to construct an instance of this class. |
|
65 * @param aUid Implementation uid of the object that is to be constructed. |
|
66 */ |
|
67 static CMPSettingsModel* NewL(TUid aUid); |
|
68 |
|
69 /** |
|
70 * Constructor |
|
71 */ |
|
72 CMPSettingsModel(); |
|
73 |
|
74 /** |
|
75 * Destructor. |
|
76 */ |
|
77 virtual ~CMPSettingsModel(); |
|
78 |
|
79 public: // New functions |
|
80 |
|
81 /** |
|
82 * Reads settings from MMF controller. |
|
83 * @since 2.0 |
|
84 * @param aSettingsType Settings value type: |
|
85 * EConfigDefault: Load default values |
|
86 * EConfigUser: Load user values |
|
87 */ |
|
88 void LoadSettingsL(TInt aConfigVersion); |
|
89 |
|
90 /** |
|
91 * Writes settings to MMF controller. |
|
92 * @since 2.0 |
|
93 */ |
|
94 void StoreSettingsL(); |
|
95 |
|
96 /** |
|
97 * Sets proxy mode.. |
|
98 * @since 2.0 |
|
99 * @param aMode Proxy mode. |
|
100 * @return Error value. |
|
101 */ |
|
102 TInt SetProxyMode(TInt aMode); |
|
103 |
|
104 /** |
|
105 * Returns proxy mode. |
|
106 * @since 2.0 |
|
107 * @param aMode Proxy mode: |
|
108 * 0: Disabled |
|
109 * 1: Enabled |
|
110 * @return Error value. |
|
111 */ |
|
112 TInt GetProxyMode(TInt& aMode); |
|
113 |
|
114 /** |
|
115 * Sets Proxy host name. |
|
116 * @since 2.0 |
|
117 * @param aHostName Proxy host name. |
|
118 * @return Error value. |
|
119 */ |
|
120 TInt SetProxyHostNameL(const TDesC& aHostName); |
|
121 |
|
122 /** |
|
123 * Returns proxy host name. |
|
124 * @since 2.0 |
|
125 * @param aHostName Proxy host name. |
|
126 * @return Error value. |
|
127 */ |
|
128 TInt GetProxyHostName(TDes& aHostName); |
|
129 |
|
130 /** |
|
131 * Sets proxy port number. |
|
132 * @since 2.0 |
|
133 * @param aPort Proxy port number. |
|
134 * @return Error value. |
|
135 */ |
|
136 TInt SetProxyPort(TInt aPort); |
|
137 |
|
138 /** |
|
139 * Returns proxy port number.. |
|
140 * @since 2.0 |
|
141 * @return Integer: Proxy port number. |
|
142 * @return Error value. |
|
143 */ |
|
144 TInt GetProxyPort(TInt& aPort); |
|
145 |
|
146 /** |
|
147 * Sets default access point. |
|
148 * @since 2.0 |
|
149 * @param aApId Access point ID. |
|
150 * @return Error value. |
|
151 */ |
|
152 TInt SetDefaultAp(TUint32 aApId); |
|
153 |
|
154 /** |
|
155 * Returns default access point ID. |
|
156 * @since 2.0 |
|
157 * @param aApId Access point ID. |
|
158 * @return Error value. |
|
159 */ |
|
160 TInt GetDefaultAp(TUint32& aApId); |
|
161 |
|
162 /** |
|
163 * Sets minimum UDP port number. |
|
164 * @since 2.0 |
|
165 * @param aPort minimum port number. |
|
166 * @return Error value. |
|
167 */ |
|
168 TInt SetMinUDPPort(TInt aPort); |
|
169 |
|
170 /** |
|
171 * Returns minimum UDP port number. |
|
172 * @since 2.0 |
|
173 * @param aPort minimum UDP port number in minutes. |
|
174 * @return Error value. |
|
175 */ |
|
176 TInt GetMinUDPPort(TInt& aPort); |
|
177 |
|
178 /** |
|
179 * Sets maximum UDP port number. |
|
180 * @since 2.0 |
|
181 * @param aPort maximum port number. |
|
182 * @return Error value. |
|
183 */ |
|
184 TInt SetMaxUDPPort(TInt aPort); |
|
185 |
|
186 /** |
|
187 * Returns maximum UDP port number. |
|
188 * @since 2.0 |
|
189 * @param aPort maximum UDP port number in minutes. |
|
190 * @return Error value. |
|
191 */ |
|
192 TInt GetMaxUDPPort(TInt& aPort); |
|
193 |
|
194 public: |
|
195 static TUid mImplUid; |
|
196 static TInt mConfigMode; |
|
197 static TInt mProxyMode; |
|
198 static QString mHostName; |
|
199 static TInt mProxyPort; |
|
200 static TInt mMinUdpPort; |
|
201 static TInt mMaxUdpPort; |
|
202 static int mStoreSettingsCount; |
|
203 static int mDestructorCount; |
|
204 static int mApId; |
|
205 |
|
206 }; |
|
207 |
|
208 #endif // MMPSETTINGSMODEL_H |
|
209 |
|
210 // End of File |