1 /* |
|
2 * Copyright (c) 2005-2006 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAISCUTTARGET_H |
|
20 #define CAISCUTTARGET_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <coemain.h> |
|
24 |
|
25 class TApaTask; |
|
26 class CPeriodic; |
|
27 |
|
28 /** |
|
29 * Base class for shortcut targets |
|
30 * |
|
31 * @since S60 v3.2 |
|
32 */ |
|
33 class CAiScutTargetShutter : public CActive |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 static CAiScutTargetShutter* NewL( CCoeEnv* aEnv, TUid aAppUid, TBool aIsRunning, TBool aIsDialog ); |
|
39 |
|
40 virtual ~CAiScutTargetShutter(); |
|
41 |
|
42 void StartL(); |
|
43 |
|
44 private: |
|
45 |
|
46 CAiScutTargetShutter( CCoeEnv* aEnv, TUid aAppUid ); |
|
47 |
|
48 void ConstructL( TBool aIsRunning, TBool aIsDialog ); |
|
49 |
|
50 // from base class CActive |
|
51 |
|
52 /** |
|
53 * From CActive |
|
54 * |
|
55 * @since S60 v3.2 |
|
56 */ |
|
57 void DoCancel(); |
|
58 |
|
59 /** |
|
60 * From CActive |
|
61 * |
|
62 * @since S60 v3.2 |
|
63 */ |
|
64 void RunL(); |
|
65 |
|
66 /** |
|
67 * From CActive |
|
68 * Handles an error situation |
|
69 * |
|
70 * @since S60 v3.2 |
|
71 * @param aError Error code received from system |
|
72 * @return Error code after error handling |
|
73 */ |
|
74 TInt RunError( TInt aError ); |
|
75 |
|
76 static TInt TaskExistsCallback( TAny* aPtr ); |
|
77 |
|
78 static TInt TaskNotExistsCallback( TAny* aPtr ); |
|
79 |
|
80 void Run(); |
|
81 |
|
82 private: //data |
|
83 |
|
84 /** |
|
85 * Pointer to the control environment |
|
86 * Not own. |
|
87 */ |
|
88 CCoeEnv* iEnv; |
|
89 |
|
90 /** |
|
91 * Target application uid |
|
92 */ |
|
93 TUid iAppUid; |
|
94 |
|
95 /** |
|
96 * Window Server session |
|
97 */ |
|
98 RWsSession iWsSession; |
|
99 |
|
100 /** |
|
101 * Task exsit or not |
|
102 */ |
|
103 TBool iTaskExists; |
|
104 |
|
105 /** |
|
106 * Periodic timer |
|
107 * Own |
|
108 */ |
|
109 CPeriodic* iPeriodic; |
|
110 |
|
111 /** |
|
112 * Count retry times |
|
113 */ |
|
114 TInt iCounter; |
|
115 |
|
116 /** |
|
117 * Target application is running |
|
118 */ |
|
119 TBool iIsRunning; |
|
120 |
|
121 /** |
|
122 * Target app is dialog |
|
123 */ |
|
124 TBool iIsDialog; |
|
125 |
|
126 |
|
127 /** |
|
128 * |
|
129 */ |
|
130 TBool iTaskKilled; |
|
131 }; |
|
132 |
|
133 #endif // CAISCUTTARGET_H |
|
134 |
|
135 // End of File. |
|