|
1 /* |
|
2 * Copyright (c) 2004 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: Dialog for command execution for Video Telephone application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CVTUIEXECUTECMDDIALOG_H |
|
21 #define CVTUIEXECUTECMDDIALOG_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CVtUiBlankDialog.h" |
|
25 #include <mvtengcommandobserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MVtEngCommandHandler; |
|
29 class MVtUiEngineCommandManager; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Dialog for command execution for Video Telephone application. |
|
35 * |
|
36 * @since Series 60 2.6 |
|
37 */ |
|
38 class CVtUiExecuteCmdDialog |
|
39 : public CVtUiBlankDialog, |
|
40 private MVtEngCommandObserver |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Constructor. |
|
46 * |
|
47 * @param aSelfPtr optional pointer to itself. |
|
48 * @param aCommandHandler command handler. |
|
49 * @param aCommandManager command manager. |
|
50 */ |
|
51 CVtUiExecuteCmdDialog( |
|
52 CEikDialog** aSelfPtr, |
|
53 MVtEngCommandHandler& aCommandHandler, |
|
54 MVtUiEngineCommandManager& aCommandManager ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CVtUiExecuteCmdDialog(); |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Executes command dialog. |
|
65 * @param aCommandId command identifier. |
|
66 * @param aParams parameters. |
|
67 * @param aRequest request status, optional. |
|
68 */ |
|
69 void ExecuteCmdLD( |
|
70 const TVtEngCommandId aCommandId, |
|
71 TDesC8* aParams, |
|
72 TRequestStatus* aRequest ); |
|
73 |
|
74 protected: // Functions from base classes |
|
75 |
|
76 /** |
|
77 * @see CVtUiBlankDialog::PostLayoutDynInitL. |
|
78 */ |
|
79 void PostLayoutDynInitL(); |
|
80 |
|
81 private: |
|
82 |
|
83 /** |
|
84 * @see MVtEngCommandObserver::HandleVTCommandPerformedL. |
|
85 */ |
|
86 virtual void HandleVTCommandPerformedL( |
|
87 TVtEngCommandId aCommand, |
|
88 const TInt aError ); |
|
89 |
|
90 /** |
|
91 * Handles execution failure. |
|
92 * @param aResult error code. |
|
93 */ |
|
94 void HandleExecuteFailed( TInt aResult ); |
|
95 |
|
96 private: |
|
97 |
|
98 // Inner class. |
|
99 class CActiveCmd; |
|
100 |
|
101 // Friend. |
|
102 friend class CActiveCmd; |
|
103 |
|
104 // Ref to command handler. |
|
105 MVtEngCommandHandler& iCommandHandler; |
|
106 |
|
107 // Ref to command manager. |
|
108 MVtUiEngineCommandManager& iCommandManager; |
|
109 |
|
110 // Command to be executed. |
|
111 TVtEngCommandId iCommand; |
|
112 |
|
113 // Owned parameters. |
|
114 HBufC8* iCommandParams; |
|
115 |
|
116 // ETrue if command has been completed. |
|
117 TBool iCommandCompleted; |
|
118 |
|
119 // Owned active object to perform the command. |
|
120 CActiveCmd* iActiveCmd; |
|
121 |
|
122 }; |
|
123 |
|
124 #endif // CVTUIEXECUTECMDDIALOG_H |
|
125 |
|
126 // End of File |