diff -r f7f0874bfe7d -r 74c9f037fd5d ui/commandhandlers/commandhandlerbase/inc/glxmpxcommandhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commandhandlerbase/inc/glxmpxcommandhandler.h Fri Mar 19 09:28:59 2010 +0200 @@ -0,0 +1,86 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef GLXMPXCOMMANDHANDLER_H +#define GLXMPXCOMMANDHANDLER_H + +#include +#include +#include +#include +#include + +#ifdef BUILD_COMMANDHANDLERBASE +#define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_EXPORT +#else +#define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_IMPORT +#endif +class MGlxMediaList; + +class GLX_COMMANDHANDLERBASE_EXPORT GlxMpxCommandHandler : public GlxCommandHandler, public MGlxMediaListObserver +{ +public: + GlxMpxCommandHandler(); + virtual ~GlxMpxCommandHandler(); + virtual void executeCommand(int commandId,int collectionId); + +protected: // From MGlxMediaListObserver + /// See @ref MGlxMediaListObserver::HandleItemAddedL + void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleMediaL + void HandleMediaL(TInt aListIndex, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleItemRemovedL + void HandleItemRemovedL(TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleItemModifiedL + void HandleItemModifiedL(const RArray& aItemIndexes, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleAttributesAvailableL + void HandleAttributesAvailableL(TInt aItemIndex, + const RArray& aAttributes, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleFocusChangedL + void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType, TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleItemSelectedL + void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleMessageL + void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList); + + /// See @ref MGlxMediaListObserver::HandleCommandCompleteL + void HandleCommandCompleteL(TAny* aSessionId, CMPXCommand* aCommandResult, TInt aError, MGlxMediaList* aList); + +protected: // From derived class + + virtual void DoHandleCommandCompleteL(TAny* aSessionId, + CMPXCommand* aCommandResult, TInt aError, MGlxMediaList* aList); + + virtual CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const = 0; + virtual void DoExecuteCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume); + +private: + + void CreateMediaListL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType) ; + void CreateMediaListAlbumItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); +private: + // Instance of Media List + MGlxMediaList* iMediaList; + +}; +#endif //GLXMPXCOMMANDHANDLER_H \ No newline at end of file