|
1 /* |
|
2 * Copyright (c) 2009 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 #ifndef __MENU_LINK_HANDLER_H__ |
|
19 #define __MENU_LINK_HANDLER_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "mcsmenuhandlerplugin.h" |
|
23 |
|
24 /** |
|
25 * Handler for menu items of type "menu:link". |
|
26 */ |
|
27 NONSHARABLE_CLASS( CMenuLinkHandler ): public CMenuHandlerPlugin |
|
28 { |
|
29 |
|
30 public: // construction |
|
31 |
|
32 /** |
|
33 * Destructor. |
|
34 */ |
|
35 virtual ~CMenuLinkHandler(); |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. Leaves on failure. |
|
39 * @param aMenu Menu. |
|
40 * @return The constructed object. |
|
41 */ |
|
42 static CMenuLinkHandler* NewL( RMenu &aMenu ); |
|
43 |
|
44 protected: // construction |
|
45 |
|
46 /** |
|
47 * Constructor. |
|
48 * @param aMenu Menu. |
|
49 */ |
|
50 CMenuLinkHandler( RMenu &aMenu ); |
|
51 |
|
52 /** |
|
53 * Second-phase constructor. |
|
54 */ |
|
55 void ConstructL(); |
|
56 |
|
57 public: // from CMenuHandler |
|
58 |
|
59 /** |
|
60 * Query support for item type. |
|
61 * @param aType Type. |
|
62 * @return ETrue if handler supports this type, EFalse otherwise. |
|
63 */ |
|
64 TBool SupportsType( const TDesC& aType ); |
|
65 |
|
66 /** |
|
67 * Handle command. |
|
68 * @param aItem Item of supported type. |
|
69 * @param aCommand Command. |
|
70 * @param aParams. Command parameters. |
|
71 * @param aStatus Observer request status. When the operation completes, |
|
72 * this status will be completed with the resulting error code. |
|
73 * @return Asynchronous operation. Owned by the caller. |
|
74 */ |
|
75 CMenuOperation* HandleCommandL( |
|
76 CMenuItem& aItem, |
|
77 const TDesC8& aCommand, |
|
78 const TDesC8& aParams, |
|
79 TRequestStatus& aStatus ); |
|
80 |
|
81 private: // data |
|
82 |
|
83 }; |
|
84 |
|
85 #endif // __MENU_LINK_HANDLER_H__ |