25 |
25 |
26 class CGlxAttributeContext; |
26 class CGlxAttributeContext; |
27 class CAiwGenericParamList; |
27 class CAiwGenericParamList; |
28 class CGlxMedia; |
28 class CGlxMedia; |
29 class MGlxMediaListProvider; |
29 class MGlxMediaListProvider; |
30 |
30 class CAiwServiceHandler; |
31 |
31 |
32 /** |
32 /** |
33 * CGlxCommandHandlerAiwEdit |
33 * CGlxCommandHandlerAiwEdit |
34 * |
34 * |
35 * Edit AIW command handler |
35 * Edit AIW command handler |
36 * |
36 * |
37 * @lib glxcommoncommandhandlers.lib |
37 * @lib glxcommoncommandhandlers.lib |
38 */ |
38 */ |
|
39 |
39 NONSHARABLE_CLASS (CGlxCommandHandlerAiwEdit) |
40 NONSHARABLE_CLASS (CGlxCommandHandlerAiwEdit) |
40 : public CGlxCommandHandlerAiwBase |
41 : public CGlxMediaListCommandHandler |
41 { |
42 { |
42 public: |
43 public: |
43 /** |
44 /** |
44 * Two-phase constructor |
45 * Two-phase constructor |
45 * @param aMediaListProvider object that provides the media list |
46 * @param aMediaListProvider object that provides the media list |
46 * @param aMenuResource The menu resource that the AIW command will be |
|
47 * implented in |
|
48 * @param aCommandSingleClick Flag to identify single click command |
47 * @param aCommandSingleClick Flag to identify single click command |
49 * @return Fully constructed command handler |
48 * @return Fully constructed command handler |
50 * @warning ConstructL of base class is called. If ConstructL is |
49 * @warning ConstructL of base class is called. If ConstructL is |
51 * implemented in this class, then care must be taken to call |
50 * implemented in this class, then care must be taken to call |
52 * CGlxCommandHandlerAiwBase::ConstructL |
51 * CGlxCommandHandlerAiwBase::ConstructL |
53 */ |
52 */ |
54 IMPORT_C static CGlxCommandHandlerAiwEdit* NewL( |
53 IMPORT_C static CGlxCommandHandlerAiwEdit* NewL(MGlxMediaListProvider* aMediaListProvider, TBool aCommandSingleClick=EFalse); |
55 MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource, |
|
56 TBool aCommandSingleClick=EFalse); |
|
57 |
|
58 protected: // From CGlxMediaListCommandHandler |
|
59 /** |
|
60 * See @ref CGlxMediaListCommandHandler::DoGetRequiredAttributesL |
|
61 */ |
|
62 virtual void DoGetRequiredAttributesL(RArray<TMPXAttribute>& aAttributes, TBool aFilterUsingSelection) const; |
|
63 |
54 |
64 protected: // From CGlxCommandHandlerAiwBase |
55 /** |
65 virtual TBool AppendAiwParameterL(const TGlxMedia& aItem, |
56 * Destructor |
66 CGlxAiwServiceHandler& aAiwServiceHandler); |
57 */ |
67 virtual TInt CommandId() const; |
58 IMPORT_C ~CGlxCommandHandlerAiwEdit(); |
68 virtual TInt AiwCommandId() const ; |
59 |
69 virtual TInt AiwInterestResource() const ; |
|
70 virtual TInt CommandSpace() const ; |
|
71 //single clk chng-hide edit for 0 or >1 items |
|
72 void AiwDoDynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
73 private: |
60 private: |
|
61 /** |
|
62 * Second phase constructor |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
74 /** |
66 /** |
75 * Constructor |
67 * Constructor |
76 */ |
68 * @param aMediaListProvider object that provides the media list |
77 CGlxCommandHandlerAiwEdit(MGlxMediaListProvider* aMediaListProvider, |
|
78 TInt aMenuResource); |
|
79 |
|
80 /** |
|
81 * Second phase constructor |
|
82 * @param aCommandSingleClick Flag to identify single click command |
69 * @param aCommandSingleClick Flag to identify single click command |
83 */ |
70 */ |
84 void ConstructL(TBool aCommandSingleClick); |
71 CGlxCommandHandlerAiwEdit( MGlxMediaListProvider* aMediaListProvider, TBool aCommandSingleClick); |
85 |
72 |
86 private: |
73 /* |
|
74 * return if the viewing mode is fullscreen or grid |
|
75 */ |
|
76 TBool IsInFullScreenViewingModeL(); |
|
77 |
|
78 private: // From CGlxMediaListCommandHandler |
|
79 |
|
80 void DoActivateL(TInt aViewId); |
|
81 TBool DoExecuteL( TInt aCommandId , MGlxMediaList& aList); |
|
82 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
83 |
|
84 private: // Data Members |
|
85 |
|
86 // Owned - AIW Service Handler |
|
87 CAiwServiceHandler* iServiceHandler; |
|
88 |
|
89 //Edit Supported |
|
90 TBool iEditSupported; |
|
91 |
87 TBool iCommandSingleClick; |
92 TBool iCommandSingleClick; |
88 }; |
93 }; |
89 |
94 |
90 #endif // C_GLXCOMMANDHANDLERAIWEDIT_H |
95 #endif // C_GLXCOMMANDHANDLERAIWEDIT_H |