|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Asynchronous security server responder active object class. |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef C_SECURITY_SVR_ASYNC_H |
|
19 #define C_SECURITY_SVR_ASYNC_H |
|
20 |
|
21 #include <rm_debug_api.h> |
|
22 |
|
23 #include "c_security_svr_session.h" |
|
24 #include "c_security_svr_server.h" |
|
25 |
|
26 // forward declaration |
|
27 class CSecuritySvrSession; |
|
28 |
|
29 /** |
|
30 Class used to handle asynchronous events within a DSS session. Currently this |
|
31 is only used to handle GetEvent() calls. It sets up an active object when a |
|
32 client makes a GetEvent() call, and completes it when ready, or cancels it |
|
33 if the client so wishes. |
|
34 |
|
35 Only one outstanding active object per client session is permitted. |
|
36 */ |
|
37 class CSecuritySvrAsync : public CActive |
|
38 { |
|
39 public: |
|
40 ~CSecuritySvrAsync(); |
|
41 static CSecuritySvrAsync* NewL(CSecuritySvrSession* aSession, const TDesC8& aProcessName, TProcessId aAgentId); |
|
42 |
|
43 void GetEvent(const RMessage2& aMessage); |
|
44 const TDesC8& ProcessName(void); |
|
45 |
|
46 protected: |
|
47 CSecuritySvrAsync(CSecuritySvrSession* aSession, TProcessId aAgentId); |
|
48 |
|
49 void ConstructL(const TDesC8& aProcessName); |
|
50 |
|
51 virtual void RunL(); |
|
52 virtual void DoCancel(); |
|
53 virtual TInt RunError(TInt aError); |
|
54 |
|
55 private: |
|
56 |
|
57 /* |
|
58 * The last GetEvent message details. Needed for completion by RunL() |
|
59 */ |
|
60 RMessagePtr2 iMessage; |
|
61 |
|
62 /* |
|
63 * Temporary storage area for rm_debug.ldd to return data asynchronously |
|
64 */ |
|
65 Debug::TEventInfo iInfo; |
|
66 |
|
67 /* |
|
68 * Identity of this server session. Used for completing iMessage |
|
69 */ |
|
70 CSecuritySvrSession* iSession; |
|
71 |
|
72 /* |
|
73 * Name of the process being debugged associated with this AO |
|
74 */ |
|
75 RBuf8 iProcessName; |
|
76 |
|
77 /* |
|
78 * Debug Agent Id |
|
79 */ |
|
80 TProcessId iAgentId; |
|
81 }; |
|
82 |
|
83 #endif // C_SECURITY_SVR_ASYNC_H |