mtpdataproviders/mtpimagedp/inc/cmtpimagedpmdeobserver.h
changeset 0 d0791faffa3f
child 2 4843bb5893b6
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 #ifndef CMTPIMAGEDPMDEOBSERVER_H
       
    22 #define CMTPIMAGEDPMDEOBSERVER_H
       
    23 
       
    24 #include <e32cmn.h>
       
    25 #include <e32base.h>
       
    26 #include <e32def.h>
       
    27 
       
    28 #include <comms-infras/commsdebugutility.h>
       
    29 
       
    30 #include "rmediasyncserver.h"
       
    31 #include "cmtpimagedpobjectpropertymgr.h"
       
    32 
       
    33 class MMTPDataProviderFramework;
       
    34 class CMTPImageDataProvider;
       
    35 
       
    36 /** 
       
    37 Implements the observer interfaces of MDE.
       
    38 @internalComponent
       
    39 */
       
    40 class CMTPImageDpMdeObserver : public CBase, 
       
    41                                public MMdEObjectObserver
       
    42     {
       
    43 public:
       
    44 
       
    45     static CMTPImageDpMdeObserver* NewL(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider);
       
    46     ~CMTPImageDpMdeObserver();
       
    47     
       
    48 public:
       
    49     // From MMdEObjectObserver
       
    50     void HandleObjectNotification(CMdESession& aSession,
       
    51                                  TObserverNotificationType aType,
       
    52                                  const RArray<TItemId>& aObjectIdArray);
       
    53     
       
    54     void SubscribeForChangeNotificationL();
       
    55     void UnsubscribeForChangeNotificationL();
       
    56     
       
    57 private:
       
    58     CMTPImageDpMdeObserver(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider);
       
    59     void ConstructL();   
       
    60     
       
    61 private:    
       
    62     void HandleObjectNotificationL(CMdESession& aSession,
       
    63                                    TObserverNotificationType aType,
       
    64                                    const RArray<TItemId>& aObjectIdArray);
       
    65             
       
    66     void ProcessMdeNotificationL(const RArray<TItemId>& aObjectIdArray, TObserverNotificationType aType);     
       
    67     void CreateMetadataL(const CMdEObject& aMdeObject, CMTPObjectMetaData& aMetaData); 
       
    68     
       
    69 private:
       
    70     /**
       
    71     FLOGGER debug trace member variable.
       
    72     */
       
    73     __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    74     
       
    75     MMTPDataProviderFramework&    iFramework;    
       
    76     CMTPImageDataProvider&        iDataProvider;
       
    77     TBool                         iSubscribed;
       
    78     TInt                          iNewPics;
       
    79     };
       
    80 
       
    81 #endif // CMTPIMAGEDPMDEOBSERVER_H