diff -r 000000000000 -r d0791faffa3f mtpdataproviders/mtpimagedp/inc/cmtpimagedpmdeobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpmdeobserver.h Tue Feb 02 01:11:40 2010 +0200 @@ -0,0 +1,81 @@ +// 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: +// + +/** + @file + @internalTechnology +*/ + +#ifndef CMTPIMAGEDPMDEOBSERVER_H +#define CMTPIMAGEDPMDEOBSERVER_H + +#include +#include +#include + +#include + +#include "rmediasyncserver.h" +#include "cmtpimagedpobjectpropertymgr.h" + +class MMTPDataProviderFramework; +class CMTPImageDataProvider; + +/** +Implements the observer interfaces of MDE. +@internalComponent +*/ +class CMTPImageDpMdeObserver : public CBase, + public MMdEObjectObserver + { +public: + + static CMTPImageDpMdeObserver* NewL(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider); + ~CMTPImageDpMdeObserver(); + +public: + // From MMdEObjectObserver + void HandleObjectNotification(CMdESession& aSession, + TObserverNotificationType aType, + const RArray& aObjectIdArray); + + void SubscribeForChangeNotificationL(); + void UnsubscribeForChangeNotificationL(); + +private: + CMTPImageDpMdeObserver(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider); + void ConstructL(); + +private: + void HandleObjectNotificationL(CMdESession& aSession, + TObserverNotificationType aType, + const RArray& aObjectIdArray); + + void ProcessMdeNotificationL(const RArray& aObjectIdArray, TObserverNotificationType aType); + void CreateMetadataL(const CMdEObject& aMdeObject, CMTPObjectMetaData& aMetaData); + +private: + /** + FLOGGER debug trace member variable. + */ + __FLOG_DECLARATION_MEMBER_MUTABLE; + + MMTPDataProviderFramework& iFramework; + CMTPImageDataProvider& iDataProvider; + TBool iSubscribed; + TInt iNewPics; + }; + +#endif // CMTPIMAGEDPMDEOBSERVER_H