|
1 /* |
|
2 * Copyright (c) 2009 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: MPSettingsModel stub |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "stub/inc/mpsettingsmodel.h" |
|
20 #include <qglobal.h> |
|
21 #include <xqconversions.h> |
|
22 |
|
23 TUid CMPSettingsModel::mImplUid(TUid::Null()); |
|
24 TInt CMPSettingsModel::mConfigMode(-1); |
|
25 TInt CMPSettingsModel::mProxyMode(-1); |
|
26 QString CMPSettingsModel::mHostName = QString(); |
|
27 TInt CMPSettingsModel::mProxyPort(-1); |
|
28 TInt CMPSettingsModel::mMinUdpPort(-1); |
|
29 TInt CMPSettingsModel::mMaxUdpPort(-1); |
|
30 int CMPSettingsModel::mStoreSettingsCount(0); |
|
31 int CMPSettingsModel::mDestructorCount(0); |
|
32 int CMPSettingsModel::mApId(0); |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // NewL |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 CMPSettingsModel* CMPSettingsModel::NewL(TUid aUid) |
|
39 { |
|
40 mImplUid = aUid; |
|
41 return new CMPSettingsModel; |
|
42 } |
|
43 |
|
44 // --------------------------------------------------------------------------- |
|
45 // CMPSettingsModel |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 CMPSettingsModel::CMPSettingsModel() |
|
49 { |
|
50 } |
|
51 |
|
52 // --------------------------------------------------------------------------- |
|
53 // ~CMPSettingsModel |
|
54 // --------------------------------------------------------------------------- |
|
55 // |
|
56 CMPSettingsModel::~CMPSettingsModel() |
|
57 { |
|
58 mDestructorCount++; |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 // LoadSettingsL |
|
63 // --------------------------------------------------------------------------- |
|
64 // |
|
65 void CMPSettingsModel::LoadSettingsL(TInt aConfigVersion) |
|
66 { |
|
67 mConfigMode = aConfigVersion; |
|
68 } |
|
69 |
|
70 // --------------------------------------------------------------------------- |
|
71 // StoreSettingsL |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 void CMPSettingsModel::StoreSettingsL() |
|
75 { |
|
76 mStoreSettingsCount++; |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // SetProxyMode |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 TInt CMPSettingsModel::SetProxyMode(TInt aMode) |
|
84 { |
|
85 mProxyMode = aMode; |
|
86 return 0; |
|
87 } |
|
88 |
|
89 // --------------------------------------------------------------------------- |
|
90 // GetProxyMode |
|
91 // --------------------------------------------------------------------------- |
|
92 // |
|
93 TInt CMPSettingsModel::GetProxyMode(TInt& aMode) |
|
94 { |
|
95 aMode = mProxyMode; |
|
96 return 0; |
|
97 } |
|
98 |
|
99 // --------------------------------------------------------------------------- |
|
100 // SetProxyHostNameL |
|
101 // --------------------------------------------------------------------------- |
|
102 // |
|
103 TInt CMPSettingsModel::SetProxyHostNameL(const TDesC& aHostName) |
|
104 { |
|
105 mHostName = XQConversions::s60DescToQString(aHostName); |
|
106 return 0; |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // GetProxyHostName |
|
111 // --------------------------------------------------------------------------- |
|
112 // |
|
113 TInt CMPSettingsModel::GetProxyHostName(TDes& aHostName) |
|
114 { |
|
115 HBufC* name = XQConversions::qStringToS60Desc(mHostName); |
|
116 aHostName.Append(*name); |
|
117 delete name; |
|
118 return 0; |
|
119 } |
|
120 |
|
121 // --------------------------------------------------------------------------- |
|
122 // SetProxyPort |
|
123 // --------------------------------------------------------------------------- |
|
124 // |
|
125 TInt CMPSettingsModel::SetProxyPort(TInt aPort) |
|
126 { |
|
127 mProxyPort = aPort; |
|
128 return 0; |
|
129 } |
|
130 |
|
131 // --------------------------------------------------------------------------- |
|
132 // GetProxyPort |
|
133 // --------------------------------------------------------------------------- |
|
134 // |
|
135 TInt CMPSettingsModel::GetProxyPort(TInt& aPort) |
|
136 { |
|
137 aPort = mProxyPort; |
|
138 return 0; |
|
139 } |
|
140 |
|
141 // --------------------------------------------------------------------------- |
|
142 // SetDefaultAp |
|
143 // --------------------------------------------------------------------------- |
|
144 // |
|
145 TInt CMPSettingsModel::SetDefaultAp(TUint32 aApId) |
|
146 { |
|
147 mApId = aApId; |
|
148 return 0; |
|
149 } |
|
150 |
|
151 // --------------------------------------------------------------------------- |
|
152 // GetDefaultAp |
|
153 // --------------------------------------------------------------------------- |
|
154 // |
|
155 TInt CMPSettingsModel::GetDefaultAp(TUint32& aApId) |
|
156 { |
|
157 aApId = mApId; |
|
158 return 0; |
|
159 } |
|
160 |
|
161 // --------------------------------------------------------------------------- |
|
162 // SetMinUDPPort |
|
163 // --------------------------------------------------------------------------- |
|
164 // |
|
165 TInt CMPSettingsModel::SetMinUDPPort(TInt aPort) |
|
166 { |
|
167 mMinUdpPort = aPort; |
|
168 return 0; |
|
169 } |
|
170 |
|
171 // --------------------------------------------------------------------------- |
|
172 // GetMinUDPPort |
|
173 // --------------------------------------------------------------------------- |
|
174 // |
|
175 TInt CMPSettingsModel::GetMinUDPPort(TInt& aPort) |
|
176 { |
|
177 aPort = mMinUdpPort; |
|
178 return 0; |
|
179 } |
|
180 |
|
181 // --------------------------------------------------------------------------- |
|
182 // SetMaxUDPPort |
|
183 // --------------------------------------------------------------------------- |
|
184 // |
|
185 TInt CMPSettingsModel::SetMaxUDPPort(TInt aPort) |
|
186 { |
|
187 mMaxUdpPort = aPort; |
|
188 return 0; |
|
189 } |
|
190 |
|
191 // --------------------------------------------------------------------------- |
|
192 // GetMaxUDPPort |
|
193 // --------------------------------------------------------------------------- |
|
194 // |
|
195 TInt CMPSettingsModel::GetMaxUDPPort(TInt& aPort) |
|
196 { |
|
197 aPort = mMaxUdpPort; |
|
198 return 0; |
|
199 } |