|
1 /* |
|
2 * Copyright (c) 2002-2005 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: |
|
15 * imps access commander. AO. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef ImpsAccessCommand_H |
|
21 #define ImpsAccessCommand_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "impsconst.h" |
|
26 #include "impsservercommon.h" |
|
27 #include "impsclientsrv.h" |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class RImpsAccessClient2; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Active object to control access client request |
|
37 */ |
|
38 class CImpsAccessCommand2 :public CActive |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aClient a client session |
|
45 */ |
|
46 static CImpsAccessCommand2* NewL( RImpsAccessClient2& aClient ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CImpsAccessCommand2(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Start the execution. |
|
57 * @param aOpId operation-id |
|
58 * @param aType message type |
|
59 */ |
|
60 void StartRunL( |
|
61 TInt aOpId, |
|
62 TImpsServRequest aType ); |
|
63 |
|
64 /** |
|
65 * Set login parameters. |
|
66 * Data is copied. |
|
67 * @param aServer SAP URI |
|
68 * @param aUser user id |
|
69 * @param aPsw password |
|
70 * @param aClientId CSP clientId |
|
71 * @param aAP CommDb id for access point |
|
72 * @param aKey1 future option |
|
73 * @param aKey2 future option |
|
74 */ |
|
75 void SetParametersL( |
|
76 const TDesC& aServer, |
|
77 const TDesC& aUser, |
|
78 const TDesC& aPsw, |
|
79 const TDesC& aClientId, |
|
80 TUint32 aAP, |
|
81 const TDesC* aKey1, |
|
82 const TDesC* aKey2 ); |
|
83 |
|
84 |
|
85 protected: // New functions |
|
86 |
|
87 protected: // Functions from base classes |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 * C++ default constructor. |
|
93 */ |
|
94 CImpsAccessCommand2( TInt aPriority, RImpsAccessClient2& aClient ); |
|
95 |
|
96 // from CActive |
|
97 void RunL(); |
|
98 void DoCancel(); |
|
99 |
|
100 /** |
|
101 * By default constructor is private. |
|
102 */ |
|
103 void ConstructL(); |
|
104 |
|
105 // By default, prohibit copy constructor |
|
106 CImpsAccessCommand2( const CImpsAccessCommand2& ); |
|
107 // Prohibit assigment operator |
|
108 CImpsAccessCommand2& operator= ( const CImpsAccessCommand2& ); |
|
109 |
|
110 private: // Data |
|
111 RImpsAccessClient2& iClient; |
|
112 TInt iOpId; |
|
113 TImpsServRequest iType; |
|
114 TInt iState; |
|
115 |
|
116 // Local copies of data to enable internally asyncronous request |
|
117 HBufC8* iCookie; // session cookie |
|
118 HBufC8* iMessageStream; // streaming buffer |
|
119 TPtrC8 iMessagePtr; |
|
120 TPtrC8 iCookiePtr; |
|
121 |
|
122 private: // Friend classes |
|
123 friend class RImpsAccessClient2; |
|
124 |
|
125 }; |
|
126 |
|
127 #endif // ?INCLUDE_H |
|
128 |
|
129 // End of File |