1 /* |
|
2 * Copyright (c) 2005-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 the License "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 * CAsyncResponseDecoder - Auth Client helper class |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @released |
|
23 @internalComponent |
|
24 */ |
|
25 #ifndef ASYNCRESPONSEDECODER_H |
|
26 #define ASYNCRESPONSEDECODER_H |
|
27 namespace AuthServer |
|
28 { |
|
29 |
|
30 /** |
|
31 * This AO handles the return buffers from asynchronous RAuthClient / |
|
32 * RAuthMgrClient calls and reconstructs the object from the stream returned, |
|
33 * completing the caller when finished. |
|
34 **/ |
|
35 class CAsyncResponseDecoder : public CActive |
|
36 { |
|
37 public: |
|
38 |
|
39 CAsyncResponseDecoder(const RAuthClient& aSession); |
|
40 ~CAsyncResponseDecoder(); |
|
41 |
|
42 /** |
|
43 * Initiate the authenticate method |
|
44 */ |
|
45 |
|
46 void AuthenticateL(const CAuthExpression& aExpression, |
|
47 TTimeIntervalSeconds aTimeout, |
|
48 TBool aClientSpecificKey, |
|
49 TUid aClientSid, |
|
50 TBool aWithString, |
|
51 const TDesC& aClientMessage, |
|
52 CIdentity*& aIdentityResult, |
|
53 TRequestStatus& aClientStatus); |
|
54 |
|
55 /** |
|
56 * Initiate the register identity method |
|
57 */ |
|
58 void RegisterIdentityL(CIdentity*& aIdentity, |
|
59 const TDesC& aDescription, |
|
60 TRequestStatus& aRequest); |
|
61 /** |
|
62 * common code to send the request and kickoff the active object |
|
63 **/ |
|
64 void StartCall(TAuthServerMessages aCmd); |
|
65 |
|
66 void RunL(); |
|
67 |
|
68 void DoCancel(); |
|
69 |
|
70 private: |
|
71 void Cleanup(); |
|
72 TInt RunError(TInt aError); |
|
73 |
|
74 const RAuthClient& iSession; |
|
75 const CAuthExpression* iExpression; |
|
76 CIdentity** iResult; |
|
77 HBufC8* iBuffer; |
|
78 HBufC8* iParamsBuffer; |
|
79 TPtr8 iBufDes; |
|
80 TPtr8 iParamsPtr; |
|
81 TRequestStatus* iClientStatus; |
|
82 TIpcArgs* iArgs; |
|
83 HBufC8* iExprBuf; |
|
84 HBufC* iDescription; |
|
85 TAuthServerMessages iCmd; |
|
86 }; |
|
87 } |
|
88 #endif // ASYNCRESPONSEDECODER_H |
|