mtpdataproviders/mtpimagedp/inc/cmtpimagedpmdeobserver.h
changeset 0 d0791faffa3f
child 2 4843bb5893b6
--- /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 <e32cmn.h>
+#include <e32base.h>
+#include <e32def.h>
+
+#include <comms-infras/commsdebugutility.h>
+
+#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<TItemId>& aObjectIdArray);
+    
+    void SubscribeForChangeNotificationL();
+    void UnsubscribeForChangeNotificationL();
+    
+private:
+    CMTPImageDpMdeObserver(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider);
+    void ConstructL();   
+    
+private:    
+    void HandleObjectNotificationL(CMdESession& aSession,
+                                   TObserverNotificationType aType,
+                                   const RArray<TItemId>& aObjectIdArray);
+            
+    void ProcessMdeNotificationL(const RArray<TItemId>& 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