|
1 /* |
|
2 * Copyright (c) 2007-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 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: This Class is observer for the Launching Application |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __LAUNCHEROBSERVER_H |
|
20 #define __LAUNCHEROBSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "appmanagercommon.h" |
|
24 |
|
25 class CAsynchRequestManager; |
|
26 class MAppObserver; |
|
27 |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CLauncherObserver class used is for observing events of launched |
|
33 * application, Launching application gets notified when launched application |
|
34 * dies. |
|
35 * |
|
36 * @since Series60 v3.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CLauncherObserver ) : public CActive |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Two-phased constructor |
|
44 * @since Series60 v3.2 |
|
45 * @param void |
|
46 * @return CLauncherObserver* Returns the instance of |
|
47 * CLauncherObserver. |
|
48 */ |
|
49 |
|
50 static CLauncherObserver* NewL( MAppObserver* aObserver ,TInt32& aTransactionID, CAsynchRequestManager* aAsynchRequestManager ); |
|
51 |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CLauncherObserver(); |
|
57 |
|
58 /** |
|
59 * This function activate the asynch request |
|
60 * succeed. |
|
61 * @since Series60 v3.2 |
|
62 */ |
|
63 |
|
64 void ActivateRequestL( TThreadId& aThreadId ); |
|
65 |
|
66 |
|
67 /** |
|
68 * This function set the pointer of observer |
|
69 * succeed. |
|
70 * @since Series60 v3.2 |
|
71 */ |
|
72 |
|
73 void SetAppObserver ( MAppObserver* aAppObserver ); |
|
74 |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * This function activate the asynch request |
|
80 * succeed. |
|
81 * @since Series60 v3.2 |
|
82 */ |
|
83 |
|
84 void NotifyRequestResultL( TInt aReason , TAppOperationEvent& aOperationEvent ); |
|
85 |
|
86 /** |
|
87 * Inherited from CActive class |
|
88 */ |
|
89 virtual void DoCancel(); |
|
90 |
|
91 /** |
|
92 * Inherited from CActive class |
|
93 */ |
|
94 virtual void RunL(); |
|
95 |
|
96 |
|
97 /** |
|
98 * Constructor |
|
99 * @since Series60 v3.2 |
|
100 * @param void |
|
101 * @return void |
|
102 */ |
|
103 CLauncherObserver( MAppObserver* aObserver , TInt32& aTransactionID, CAsynchRequestManager* aAsynchRequestManager ); |
|
104 |
|
105 |
|
106 /** |
|
107 * main thread of launched application |
|
108 */ |
|
109 |
|
110 RThread iAppThread; |
|
111 |
|
112 |
|
113 /** |
|
114 * Application Observer |
|
115 */ |
|
116 |
|
117 MAppObserver* iAppObserver ; |
|
118 |
|
119 /** |
|
120 * Transaction ID |
|
121 */ |
|
122 TInt32 iTransactionID; |
|
123 |
|
124 /** |
|
125 * Application Observer |
|
126 */ |
|
127 CAsynchRequestManager* iAsynchRequestManager; |
|
128 }; |
|
129 |
|
130 #endif __LAUNCHEROBSERVER_H |