|
1 /* |
|
2 * Copyright (c) 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: Network operations for chat access handling. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCAACCESSMANAGER_H |
|
20 #define CCAACCESSMANAGER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "MCAImpsAccessClient.h" |
|
24 #include "MCAAccessInterface.h" |
|
25 #include "PrivateEngineDefinitions.h" |
|
26 #include <e32base.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CCARequestMapper; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Network operations for chat group handling. |
|
35 * |
|
36 * @lib CAEngine.lib |
|
37 * @since 3.0 |
|
38 */ |
|
39 class CCAAccessManager : public CBase, |
|
40 public MImpsAccessHandler2, |
|
41 public MImpsErrorHandler2, |
|
42 public MCAAccessInterface |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CCAAccessManager* NewL( CCARequestMapper& aRequestMapper ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CCAAccessManager(); |
|
55 |
|
56 protected: // From MImpsErrorHandler |
|
57 |
|
58 /** |
|
59 * From MImpsErrorHandler |
|
60 * @see MImpsErrorHandler::HandleErrorL |
|
61 */ |
|
62 void HandleErrorL( |
|
63 TInt aStatus, |
|
64 TInt aOpId, |
|
65 const TDesC* aDescription, |
|
66 const CImpsDetailed* aDetailedRes, |
|
67 TImpsCspIdentifier& aCspId ); |
|
68 |
|
69 |
|
70 private: // From MCAAccessInterface |
|
71 |
|
72 /** |
|
73 * @see MCAAccessInterface |
|
74 */ |
|
75 void LoginL( TImpsCspIdentifier& aCspId, |
|
76 const TDesC& aPsw, |
|
77 const TDesC& aClientId, |
|
78 TUint32 aAP, |
|
79 const TDesC* aKey1 = NULL, |
|
80 const TDesC* aKey2 = NULL ); |
|
81 |
|
82 /** |
|
83 * @see MCAAccessInterface |
|
84 */ |
|
85 void LogoutL(); |
|
86 |
|
87 private: // From MImpsAccessHandler2 |
|
88 |
|
89 /** |
|
90 * @see MImpsAccessHandler2: |
|
91 */ |
|
92 void HandleLoginL( TInt aId, |
|
93 TImpsCspIdentifier& aCspId ); |
|
94 |
|
95 /** |
|
96 * @see MImpsAccessHandler2: |
|
97 */ |
|
98 void HandleLogoutL( TInt aId, |
|
99 TImpsCspIdentifier& aCspId ); |
|
100 |
|
101 /** |
|
102 * @see MImpsAccessHandler2: |
|
103 */ |
|
104 void HandleLoginCancelL( TInt aCancelledOpId, |
|
105 TImpsCspIdentifier& aCspId ); |
|
106 |
|
107 |
|
108 /** |
|
109 * @see MImpsAccessHandler2: |
|
110 */ |
|
111 void HandleNbrSessionsL( TInt aId, |
|
112 TInt aNbr, |
|
113 TImpsCspIdentifier& aCspId ); |
|
114 |
|
115 private: |
|
116 |
|
117 /** |
|
118 * By default Symbian OS constructor is private. |
|
119 */ |
|
120 void ConstructL(); |
|
121 |
|
122 /** |
|
123 * C++ default constructor. |
|
124 * @see CCAGroupManager::NewL. |
|
125 */ |
|
126 CCAAccessManager( CCARequestMapper& aRequestMapper ); |
|
127 |
|
128 /** |
|
129 * Execute requests |
|
130 */ |
|
131 TInt ExecuteRequestL( TInt aOperationId, |
|
132 TOperationRequests aRequestType, |
|
133 MDesCArray* aAdditionalData = NULL ); |
|
134 |
|
135 private: // Data |
|
136 |
|
137 /// Access client for access management. |
|
138 MCAImpsAccessClient* iImpsAccessClient; // does not own |
|
139 |
|
140 /// Does not own. |
|
141 CCARequestMapper& iRequestMapper; |
|
142 }; |
|
143 |
|
144 #endif // CCAGROUPMANAGER_H |
|
145 |
|
146 // End of File |