25 #include <mccappviewpluginbase2.h> |
25 #include <mccappviewpluginbase2.h> |
26 |
26 |
27 class CCCAppCommLauncherContactHandler; |
27 class CCCAppCommLauncherContactHandler; |
28 class CCCAppCommLauncherMenuHandler; |
28 class CCCAppCommLauncherMenuHandler; |
29 class CCAContactorService; |
29 class CCAContactorService; |
|
30 class TCSParameter; |
|
31 |
|
32 /** |
|
33 * A helper class to keep up the command running state correct. |
|
34 * Only one command should be able to run at a time. |
|
35 */ |
|
36 class TCCAppCommandState |
|
37 { |
|
38 public: |
|
39 /** |
|
40 * Constructor |
|
41 */ |
|
42 TCCAppCommandState(); |
|
43 /** |
|
44 * Returns ETrue if a command is running. |
|
45 * @return ETrue if a command is running. |
|
46 */ |
|
47 inline TBool IsRunning() const { return iState; } |
|
48 /** |
|
49 * Change to Running state. |
|
50 */ |
|
51 void SetRunning(); |
|
52 /** |
|
53 * Change to Not Running state. |
|
54 */ |
|
55 void SetNotRunning(); |
|
56 /** |
|
57 * Sets state to Running and pushes a cleanup item to the CleanupStack. |
|
58 * The state will be changed to 'Not Running' in case of leave. |
|
59 */ |
|
60 void SetRunningAndPushCleanupL(); |
|
61 /** |
|
62 * Change to Not Running state and pops up the cleanup item previously |
|
63 * pushed by PushCleanupL or SetRunningAndPushCleanupL. |
|
64 */ |
|
65 void SetNotRunningAndPopCleanup(); |
|
66 /** |
|
67 * Pushes a cleanup item to the CleanupStack. |
|
68 * The state will be changed to 'Not Running' in case of leave. |
|
69 */ |
|
70 void PushCleanupL(); |
|
71 /** |
|
72 * Pops up the cleanup item previously pushed by |
|
73 * PushCleanupL or SetRunningAndPushCleanupL. |
|
74 */ |
|
75 void PopCleanup(); |
|
76 private: |
|
77 TCCAppCommandState& operator=(const TCCAppCommandState&); |
|
78 TCCAppCommandState(const TCCAppCommandState&); |
|
79 static void CleanupOperation( TAny* aCommanState ); |
|
80 private: |
|
81 /// Own: ETrue if command is running, false otherwise. |
|
82 TBool iState; |
|
83 }; |
|
84 |
30 |
85 |
31 /** |
86 /** |
32 * Class implementing CCCAppViewPluginBase interface. This is |
87 * Class implementing CCCAppViewPluginBase interface. This is |
33 * the main class and controlling the other classes of the plugin. |
88 * the main class and controlling the other classes of the plugin. |
34 * |
89 * |
45 public MCCAppViewPluginBase2 |
100 public MCCAppViewPluginBase2 |
46 { |
101 { |
47 #ifdef __COMMLAUNCHERPLUGINUNITTESTMODE |
102 #ifdef __COMMLAUNCHERPLUGINUNITTESTMODE |
48 friend class T_CCCAppCommLauncherPlugin; |
103 friend class T_CCCAppCommLauncherPlugin; |
49 #endif// __COMMLAUNCHERPLUGINUNITTESTMODE |
104 #endif// __COMMLAUNCHERPLUGINUNITTESTMODE |
50 |
105 |
51 public: |
106 public: |
52 |
107 |
53 /** |
108 /** |
54 * Two-phased constructor. |
109 * Two-phased constructor. |
55 */ |
110 */ |
272 * Sets the CBA labels. |
335 * Sets the CBA labels. |
273 * @param aEditable Boolean that tells if contact has communication |
336 * @param aEditable Boolean that tells if contact has communication |
274 * methods or not. |
337 * methods or not. |
275 */ |
338 */ |
276 void UpdateMSKinCbaL( TBool aCommMethodsAvailable ); |
339 void UpdateMSKinCbaL( TBool aCommMethodsAvailable ); |
|
340 |
|
341 /** |
|
342 * Returns the command running state instance. Command state must be |
|
343 * to running before executing the command and to not running after |
|
344 * the command has completed. |
|
345 */ |
|
346 inline TCCAppCommandState& CommandState() {return iCommandState;} |
277 |
347 |
278 /** |
348 /** |
279 * Notify the timeout after sent an aiw service request. |
349 * Notify the timeout after sent an aiw service request. |
280 * |
350 * |
281 */ |
351 */ |