27 #define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_EXPORT |
27 #define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_EXPORT |
28 #else |
28 #else |
29 #define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_IMPORT |
29 #define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_IMPORT |
30 #endif |
30 #endif |
31 class MGlxMediaList; |
31 class MGlxMediaList; |
|
32 class HbProgressDialog; |
32 |
33 |
33 class GLX_COMMANDHANDLERBASE_EXPORT GlxMpxCommandHandler : public GlxCommandHandler, public MGlxMediaListObserver |
34 class GLX_COMMANDHANDLERBASE_EXPORT GlxMpxCommandHandler : public GlxCommandHandler, public MGlxMediaListObserver |
34 { |
35 { |
35 public: |
36 public: |
36 GlxMpxCommandHandler(); |
37 GlxMpxCommandHandler(); |
37 virtual ~GlxMpxCommandHandler(); |
38 virtual ~GlxMpxCommandHandler(); |
38 virtual void executeCommand(int commandId,int collectionId); |
39 virtual void executeCommand(int commandId,int collectionId,QList<QModelIndex> indexList = QList<QModelIndex>() ); |
39 |
40 |
40 protected: // From MGlxMediaListObserver |
41 protected: // From MGlxMediaListObserver |
41 /// See @ref MGlxMediaListObserver::HandleItemAddedL |
42 /// See @ref MGlxMediaListObserver::HandleItemAddedL |
42 void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList); |
43 void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList); |
43 |
44 |
64 void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList); |
65 void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList); |
65 |
66 |
66 /// See @ref MGlxMediaListObserver::HandleCommandCompleteL |
67 /// See @ref MGlxMediaListObserver::HandleCommandCompleteL |
67 void HandleCommandCompleteL(TAny* aSessionId, CMPXCommand* aCommandResult, TInt aError, MGlxMediaList* aList); |
68 void HandleCommandCompleteL(TAny* aSessionId, CMPXCommand* aCommandResult, TInt aError, MGlxMediaList* aList); |
68 |
69 |
|
70 /// See @ref MGlxMediaListObserver::HandleError |
|
71 void HandleError(TInt aError); |
69 protected: // From derived class |
72 protected: // From derived class |
70 |
73 |
71 virtual void DoHandleCommandCompleteL(TAny* aSessionId, |
74 virtual void DoHandleCommandCompleteL(TAny* aSessionId, |
72 CMPXCommand* aCommandResult, TInt aError, MGlxMediaList* aList); |
75 CMPXCommand* aCommandResult, TInt aError, MGlxMediaList* aList); |
73 |
76 |
74 virtual CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const = 0; |
77 virtual CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const = 0; |
75 virtual void DoExecuteCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume); |
78 virtual void DoExecuteCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume); |
76 |
79 virtual void HandleErrorL(TInt aErrorCode); |
77 private: |
80 virtual QString CompletionTextL() const; |
78 |
81 virtual QString ProgressTextL() const; |
|
82 virtual QString ConfirmationTextL(bool multiSelection = false) const; |
|
83 private: |
|
84 bool ConfirmationNoteL(MGlxMediaList& aMediaList) const; |
|
85 bool ConfirmationNoteSingleL(MGlxMediaList& aMediaList) const; |
|
86 bool ConfirmationNoteMultipleL(MGlxMediaList& aMediaList) const; |
|
87 void ProgressNoteL(TInt aCommandId); |
|
88 void DismissProgressNoteL(); |
|
89 void CompletionNoteL() const; |
|
90 void TryExitL(TInt aErrorCode); |
79 void CreateMediaListL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType) ; |
91 void CreateMediaListL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType) ; |
80 void CreateMediaListAlbumItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
92 void CreateMediaListAlbumItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
81 private: |
93 private: |
82 // Instance of Media List |
94 // Instance of Media List |
83 MGlxMediaList* iMediaList; |
95 MGlxMediaList* iMediaList; |
84 |
96 TBool iProgressComplete; |
|
97 HbProgressDialog* mProgressDialog; |
85 }; |
98 }; |
86 #endif //GLXMPXCOMMANDHANDLER_H |
99 #endif //GLXMPXCOMMANDHANDLER_H |