author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:20:32 +0300 | |
branch | RCL_3 |
changeset 33 | 2989b291cac7 |
parent 28 | d38647835c2e |
permissions | -rw-r--r-- |
28 | 1 |
/* |
2 |
* Copyright (c) 2006-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: CCH Client / Server common interface header |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#ifndef T_CCHCLIENTSERVER_H |
|
21 |
#define T_CCHCLIENTSERVER_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <e32base.h> |
|
33
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
25 |
#include <CchError.h> |
28 | 26 |
#include <cchtypes.h> |
27 |
// CONSTANTS |
|
28 |
const TUint KCCHMaxServiceNameLength = 64; |
|
29 |
const TUint KCCHMaxSubservicesCount = 4; |
|
30 |
const TUint KCCHMaxProtocolNameLength = 512; |
|
31 |
const TUint KCCHMaxUsernameLength = 128; |
|
32 |
const TUint KCCHMaxPasswordLength = 64; |
|
33 |
||
34 |
||
35 |
// CLASS DECLARATION |
|
36 |
class TServiceSelection |
|
37 |
{ |
|
38 |
public: |
|
39 |
inline TServiceSelection(); |
|
40 |
inline TServiceSelection( TUint aServiceId, |
|
41 |
TCCHSubserviceType aType, |
|
42 |
TCchConnectionParameter aParameter = ECchInitial ); |
|
43 |
public: |
|
44 |
/** |
|
45 |
* Service Id |
|
46 |
*/ |
|
47 |
TUint iServiceId; |
|
48 |
/** |
|
49 |
* Subservice's type |
|
50 |
*/ |
|
51 |
TCCHSubserviceType iType; |
|
52 |
/** |
|
53 |
* Identifies operation target for get/set. |
|
54 |
*/ |
|
55 |
TCchConnectionParameter iParameter; |
|
56 |
}; |
|
57 |
||
58 |
class TServiceConnectionInfo |
|
59 |
{ |
|
60 |
public: |
|
61 |
inline TServiceConnectionInfo(); |
|
62 |
inline TServiceConnectionInfo( TUint aServiceId, |
|
63 |
TCCHSubserviceType aType, |
|
64 |
TUint32 aIapId, |
|
65 |
TUint32 aSNAPId ); |
|
66 |
||
67 |
inline TServiceConnectionInfo( TUint aServiceId, |
|
68 |
TCCHSubserviceType aType, |
|
69 |
TUint32 aIapId, |
|
70 |
TUint32 aSNAPId, |
|
71 |
TDesC& aUsername, |
|
72 |
TDesC& aPassword ); |
|
73 |
inline TUint ServiceId() const; |
|
74 |
inline TCCHSubserviceType Type() const; |
|
75 |
inline void SetServiceId( TUint aServiceId ); |
|
76 |
inline void SetType( TCCHSubserviceType aType ); |
|
77 |
inline void SetParameter( TCchConnectionParameter aParameter ); |
|
78 |
||
79 |
public: |
|
80 |
/** |
|
81 |
* Service Id |
|
82 |
*/ |
|
83 |
TServiceSelection iServiceSelection; |
|
84 |
/** |
|
85 |
* Service's SNAP Id |
|
86 |
*/ |
|
87 |
TUint32 iSNAPId; |
|
88 |
/** |
|
89 |
* Services IAP Id |
|
90 |
*/ |
|
91 |
TUint32 iIapId; |
|
92 |
/** |
|
93 |
* Is SNAP editable, read only |
|
94 |
*/ |
|
95 |
TBool iSNAPLocked; |
|
96 |
/** |
|
97 |
* Is password set. |
|
98 |
*/ |
|
99 |
TBool iPasswordSet; |
|
100 |
||
101 |
/** |
|
102 |
* Username |
|
103 |
*/ |
|
104 |
TBuf<KCCHMaxUsernameLength> iUsername; |
|
105 |
||
106 |
/** |
|
107 |
* Password |
|
108 |
*/ |
|
109 |
TBuf<KCCHMaxPasswordLength> iPassword; |
|
110 |
||
111 |
/** |
|
112 |
* Reserved, obsolote. When adding next new parameter (TInt) |
|
113 |
* rename Reserved to that, implementation is ready then. |
|
114 |
*/ |
|
115 |
TBool iReserved; |
|
116 |
||
117 |
}; |
|
118 |
||
119 |
class TServiceStatus |
|
120 |
{ |
|
121 |
public: |
|
122 |
inline TServiceStatus(); |
|
123 |
inline TUint ServiceId() const; |
|
124 |
inline TCCHSubserviceType Type() const; |
|
125 |
inline TUint32 IapId() const; |
|
126 |
inline TUint32 SNAPId() const; |
|
127 |
inline TBool SNAPLocked() const; |
|
128 |
inline TBool PasswordSet() const; |
|
129 |
inline void SetServiceId( TUint aServiceId ); |
|
130 |
inline void SetType( TCCHSubserviceType aType ); |
|
131 |
inline void SetIapId( TUint32 aIapId ); |
|
132 |
inline void SetSNAPId( TUint32 aSNAPId ); |
|
133 |
inline void SetSNAPLocked( TBool aSNAPLocked ); |
|
134 |
public: |
|
135 |
/** |
|
136 |
* Service Id |
|
137 |
*/ |
|
138 |
TServiceConnectionInfo iConnectionInfo; |
|
139 |
/** |
|
140 |
* Current state of subservice |
|
141 |
*/ |
|
142 |
TCCHSubserviceState iState; |
|
143 |
/** |
|
144 |
* Current error code of subservice |
|
145 |
*/ |
|
146 |
TInt iError; |
|
147 |
}; |
|
148 |
||
149 |
class TCCHSubservice |
|
150 |
{ |
|
151 |
public: |
|
152 |
inline TCCHSubservice(); |
|
153 |
inline TUint ServiceId() const; |
|
154 |
inline TCCHSubserviceType Type() const; |
|
155 |
inline TUint32 IapId() const; |
|
156 |
inline TUint32 SNAPId() const; |
|
157 |
inline TBool SNAPLocked() const; |
|
158 |
inline void SetServiceId( TUint aServiceId ); |
|
159 |
inline void SetType( TCCHSubserviceType aType ); |
|
160 |
inline void SetIapId( TUint32 aIapId ); |
|
161 |
inline void SetSNAPId( TUint32 aSNAPId ); |
|
162 |
inline void SetSNAPLocked( TBool aSNAPLocked ); |
|
163 |
public: |
|
164 |
/** |
|
165 |
* Service Id |
|
166 |
*/ |
|
167 |
TServiceConnectionInfo iConnectionInfo; |
|
168 |
/** |
|
169 |
* Subservice's Id |
|
170 |
*/ |
|
171 |
TUint iSubserviceId; |
|
172 |
/** |
|
173 |
* Current state of subservice |
|
174 |
*/ |
|
175 |
TCCHSubserviceState iState; |
|
176 |
/** |
|
177 |
* Subservice's name |
|
178 |
*/ |
|
179 |
TBuf<KCCHMaxServiceNameLength> iSubserviceName; |
|
180 |
/** |
|
181 |
* Current error code of subservice |
|
182 |
*/ |
|
183 |
TInt iError; |
|
184 |
}; |
|
185 |
||
186 |
class TCCHService |
|
187 |
{ |
|
188 |
public: |
|
189 |
inline TCCHService(); |
|
190 |
||
191 |
public: |
|
192 |
/** |
|
193 |
* Service Id |
|
194 |
*/ |
|
195 |
TUint iServiceId; |
|
196 |
/** |
|
197 |
* Service's name |
|
198 |
*/ |
|
199 |
TBuf<KCCHMaxServiceNameLength> iServiceName; |
|
200 |
/** |
|
201 |
* Service's subservices |
|
202 |
*/ |
|
203 |
TFixedArray<TCCHSubservice, KCCHMaxSubservicesCount> iSubservices; |
|
204 |
}; |
|
205 |
||
33
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
206 |
#include "CCHClientServer.inl" |
28 | 207 |
|
208 |
#endif // T_CCHCLIENTSERVER_H |
|
209 |
||
210 |
// End of File |