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: Inline functions for ClientServer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // -------------------------------------------------------------------------- |
|
20 // TCCHService::TCCHService |
|
21 // -------------------------------------------------------------------------- |
|
22 // |
|
23 inline TCCHService::TCCHService() |
|
24 { |
|
25 iServiceId = 0; |
|
26 } |
|
27 |
|
28 // -------------------------------------------------------------------------- |
|
29 // TCCHSubservice::TCCHSubservice |
|
30 // -------------------------------------------------------------------------- |
|
31 // |
|
32 inline TCCHSubservice::TCCHSubservice() |
|
33 { |
|
34 iConnectionInfo.iServiceSelection.iServiceId = 0; |
|
35 iConnectionInfo.iServiceSelection.iType = ECCHUnknown; |
|
36 iConnectionInfo.iIapId = 0; |
|
37 iConnectionInfo.iSNAPId = 0; |
|
38 iConnectionInfo.iSNAPLocked = EFalse; |
|
39 iConnectionInfo.iPasswordSet = EFalse; |
|
40 iConnectionInfo.iUsername.Zero(); |
|
41 iConnectionInfo.iPassword.Zero(); |
|
42 iSubserviceId = 0; |
|
43 iState = ECCHUninitialized; |
|
44 iError = KErrNone; |
|
45 } |
|
46 |
|
47 inline TUint TCCHSubservice::ServiceId() const |
|
48 { |
|
49 return iConnectionInfo.iServiceSelection.iServiceId; |
|
50 } |
|
51 |
|
52 inline TCCHSubserviceType TCCHSubservice::Type() const |
|
53 { |
|
54 return iConnectionInfo.iServiceSelection.iType; |
|
55 } |
|
56 |
|
57 inline void TCCHSubservice::SetServiceId( TUint aServiceId ) |
|
58 { |
|
59 iConnectionInfo.iServiceSelection.iServiceId = aServiceId; |
|
60 } |
|
61 |
|
62 inline void TCCHSubservice::SetType( TCCHSubserviceType aType ) |
|
63 { |
|
64 iConnectionInfo.iServiceSelection.iType = aType; |
|
65 } |
|
66 |
|
67 inline TUint32 TCCHSubservice::IapId() const |
|
68 { |
|
69 return iConnectionInfo.iIapId; |
|
70 } |
|
71 |
|
72 inline TUint32 TCCHSubservice::SNAPId() const |
|
73 { |
|
74 return iConnectionInfo.iSNAPId; |
|
75 } |
|
76 |
|
77 inline TBool TCCHSubservice::SNAPLocked() const |
|
78 { |
|
79 return iConnectionInfo.iSNAPLocked; |
|
80 } |
|
81 |
|
82 inline void TCCHSubservice::SetIapId( TUint32 aIapId ) |
|
83 { |
|
84 iConnectionInfo.iIapId = aIapId; |
|
85 } |
|
86 |
|
87 inline void TCCHSubservice::SetSNAPId( TUint32 aSNAPId) |
|
88 { |
|
89 iConnectionInfo.iSNAPId = aSNAPId; |
|
90 } |
|
91 |
|
92 inline void TCCHSubservice::SetSNAPLocked( TBool aSNAPLocked ) |
|
93 { |
|
94 iConnectionInfo.iSNAPLocked = aSNAPLocked; |
|
95 } |
|
96 |
|
97 // -------------------------------------------------------------------------- |
|
98 // TServiceStatus::TServiceStatus |
|
99 // -------------------------------------------------------------------------- |
|
100 // |
|
101 inline TServiceStatus::TServiceStatus() |
|
102 { |
|
103 iConnectionInfo.iServiceSelection.iServiceId = 0; |
|
104 iConnectionInfo.iServiceSelection.iType = ECCHUnknown; |
|
105 iConnectionInfo.iIapId = 0; |
|
106 iConnectionInfo.iSNAPId = 0; |
|
107 iConnectionInfo.iSNAPLocked = EFalse; |
|
108 iConnectionInfo.iUsername.Zero(); |
|
109 iConnectionInfo.iPassword.Zero(); |
|
110 iState = ECCHUninitialized; |
|
111 iError = KErrNone; |
|
112 } |
|
113 |
|
114 inline TUint TServiceStatus::ServiceId() const |
|
115 { |
|
116 return iConnectionInfo.iServiceSelection.iServiceId; |
|
117 } |
|
118 |
|
119 inline TCCHSubserviceType TServiceStatus::Type() const |
|
120 { |
|
121 return iConnectionInfo.iServiceSelection.iType; |
|
122 } |
|
123 |
|
124 inline void TServiceStatus::SetServiceId( TUint aServiceId ) |
|
125 { |
|
126 iConnectionInfo.iServiceSelection.iServiceId = aServiceId; |
|
127 } |
|
128 |
|
129 inline void TServiceStatus::SetType( TCCHSubserviceType aType ) |
|
130 { |
|
131 iConnectionInfo.iServiceSelection.iType = aType; |
|
132 } |
|
133 |
|
134 inline TUint32 TServiceStatus::IapId() const |
|
135 { |
|
136 return iConnectionInfo.iIapId; |
|
137 } |
|
138 |
|
139 inline TUint32 TServiceStatus::SNAPId() const |
|
140 { |
|
141 return iConnectionInfo.iSNAPId; |
|
142 } |
|
143 |
|
144 inline TBool TServiceStatus::SNAPLocked() const |
|
145 { |
|
146 return iConnectionInfo.iSNAPLocked; |
|
147 } |
|
148 inline TBool TServiceStatus::PasswordSet() const |
|
149 { |
|
150 return iConnectionInfo.iPasswordSet; |
|
151 } |
|
152 |
|
153 inline void TServiceStatus::SetIapId( TUint32 aIapId ) |
|
154 { |
|
155 iConnectionInfo.iIapId = aIapId; |
|
156 } |
|
157 |
|
158 inline void TServiceStatus::SetSNAPId( TUint32 aSNAPId) |
|
159 { |
|
160 iConnectionInfo.iSNAPId = aSNAPId; |
|
161 } |
|
162 |
|
163 inline void TServiceStatus::SetSNAPLocked( TBool aSNAPLocked ) |
|
164 { |
|
165 iConnectionInfo.iSNAPLocked = aSNAPLocked; |
|
166 } |
|
167 |
|
168 // -------------------------------------------------------------------------- |
|
169 // TServiceSelection::TServiceSelection |
|
170 // -------------------------------------------------------------------------- |
|
171 // |
|
172 inline TServiceSelection::TServiceSelection() |
|
173 { |
|
174 iServiceId = 0; |
|
175 iType = ECCHUnknown; |
|
176 iParameter = ECchInitial; |
|
177 } |
|
178 |
|
179 inline TServiceSelection::TServiceSelection( TUint aServiceId, |
|
180 TCCHSubserviceType aType, |
|
181 TCchConnectionParameter aParameter ) |
|
182 { |
|
183 iServiceId = aServiceId; |
|
184 iType = aType; |
|
185 iParameter = aParameter; |
|
186 } |
|
187 |
|
188 // -------------------------------------------------------------------------- |
|
189 // TServiceConnectionInfo::TServiceConnectionInfo |
|
190 // -------------------------------------------------------------------------- |
|
191 // |
|
192 inline TServiceConnectionInfo::TServiceConnectionInfo() |
|
193 { |
|
194 iServiceSelection.iServiceId = 0; |
|
195 iServiceSelection.iType = ECCHUnknown; |
|
196 iSNAPId = 0; |
|
197 iIapId = 0; |
|
198 iSNAPLocked = EFalse; |
|
199 iUsername.Zero(); |
|
200 iPassword.Zero(); |
|
201 } |
|
202 |
|
203 inline TServiceConnectionInfo::TServiceConnectionInfo( TUint aServiceId, |
|
204 TCCHSubserviceType aType, |
|
205 TUint32 aIapId, |
|
206 TUint32 aSNAPId ) |
|
207 { |
|
208 iServiceSelection.iServiceId = aServiceId; |
|
209 iServiceSelection.iType = aType; |
|
210 iSNAPId = aSNAPId; |
|
211 iIapId = aIapId; |
|
212 iSNAPLocked = EFalse; |
|
213 iPasswordSet = EFalse; |
|
214 } |
|
215 |
|
216 inline TServiceConnectionInfo::TServiceConnectionInfo( TUint aServiceId, |
|
217 TCCHSubserviceType aType, |
|
218 TUint32 aIapId, |
|
219 TUint32 aSNAPId, |
|
220 TDesC& aUsername, |
|
221 TDesC& aPassword ) |
|
222 { |
|
223 iServiceSelection.iServiceId = aServiceId; |
|
224 iServiceSelection.iType = aType; |
|
225 iSNAPId = aSNAPId; |
|
226 iIapId = aIapId; |
|
227 iSNAPLocked = EFalse; |
|
228 iUsername.Append( aUsername ); |
|
229 iPassword.Append( aPassword ); |
|
230 } |
|
231 inline TUint TServiceConnectionInfo::ServiceId() const |
|
232 { |
|
233 return iServiceSelection.iServiceId; |
|
234 } |
|
235 |
|
236 inline TCCHSubserviceType TServiceConnectionInfo::Type() const |
|
237 { |
|
238 return iServiceSelection.iType; |
|
239 } |
|
240 |
|
241 inline void TServiceConnectionInfo::SetServiceId( TUint aServiceId ) |
|
242 { |
|
243 iServiceSelection.iServiceId = aServiceId; |
|
244 } |
|
245 |
|
246 inline void TServiceConnectionInfo::SetType( TCCHSubserviceType aType ) |
|
247 { |
|
248 iServiceSelection.iType = aType; |
|
249 } |
|
250 |
|
251 inline void TServiceConnectionInfo::SetParameter( TCchConnectionParameter aParameter ) |
|
252 { |
|
253 iServiceSelection.iParameter = aParameter; |
|
254 } |
|