|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Active object for handling toolbar commands |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAMCOMMANDHANDLERAO_H |
|
20 #define CAMCOMMANDHANDLERAO_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CAknView; |
|
28 |
|
29 /** |
|
30 * Class to manage the asynchronous command handling |
|
31 * @since S60 v5.0 |
|
32 */ |
|
33 class CCamCommandHandlerAo : public CActive |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 |
|
37 ~CCamCommandHandlerAo(); |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @since S60 v5.0 |
|
42 */ |
|
43 static CCamCommandHandlerAo* NewL( CAknView* aView ); |
|
44 |
|
45 private: |
|
46 |
|
47 /** |
|
48 * Constructor |
|
49 * @since S60 v5.0 |
|
50 */ |
|
51 CCamCommandHandlerAo( CAknView* aView ); |
|
52 |
|
53 /** |
|
54 * 2nd phase construction |
|
55 * @since S60 v5.0 |
|
56 */ |
|
57 void ConstructL(); |
|
58 |
|
59 /** |
|
60 * Cancels the active object |
|
61 * @since S60 v5.0 |
|
62 */ |
|
63 void DoCancel(); |
|
64 |
|
65 /** |
|
66 * Perform the next scheduled task |
|
67 * @since S60 v5.0 |
|
68 */ |
|
69 void RunL(); |
|
70 |
|
71 /** |
|
72 * Perform error reporting and cleanup |
|
73 * @since S60 v5.0 |
|
74 */ |
|
75 TInt RunError( TInt aError ); |
|
76 |
|
77 public: |
|
78 |
|
79 /** |
|
80 * Adds the command to queue and sets active |
|
81 * @since S60 v5.0 |
|
82 */ |
|
83 void HandleCommandL( TInt aCommandId ); |
|
84 |
|
85 private: |
|
86 |
|
87 // Not own |
|
88 CAknView* iView; |
|
89 |
|
90 RArray< TInt > iCommandQueue; |
|
91 |
|
92 }; |
|
93 |
|
94 #endif // CAMCOMMANDHANDLERAO_H |
|
95 |
|
96 // End of File |
|
97 |
|
98 |
|
99 |
|
100 |