mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpobjectbrowser.h
changeset 0 d0791faffa3f
child 1 f8e15b44d440
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-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  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef CMTPOBJECTBROWSER_H
       
    22 #define CMTPOBJECTBROWSER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <mtp/mmtpdataproviderframework.h>
       
    26 #include "mtpdebug.h"
       
    27 
       
    28 class CMTPTypeArray;
       
    29 class CMTPRequestChecker;
       
    30 class CMTPObjectMetaData;
       
    31 
       
    32 class CMTPObjectBrowser: public CBase
       
    33     {
       
    34 public:
       
    35     typedef void ( *TBrowseObjectCallbackProcL )( TAny* aContext, TUint aHandle, TUint32 aCurDepth );
       
    36     
       
    37     struct TBrowseCallback
       
    38         {
       
    39         TBrowseObjectCallbackProcL iCallback;
       
    40         TAny* iContext;
       
    41         };
       
    42     
       
    43 public:
       
    44     static CMTPObjectBrowser* NewL( MMTPDataProviderFramework& aDpFw );
       
    45     static TBool IsFolderFormat( TUint aFmtCode, TUint aFmtSubCode );
       
    46     
       
    47 public:
       
    48     ~CMTPObjectBrowser();
       
    49     
       
    50     void GoL( TUint32 aFormatCode, TUint32 aHandle, TUint32 aDepth, const TBrowseCallback& aBrowseCallback ) const;
       
    51     
       
    52 private:
       
    53     CMTPObjectBrowser( MMTPDataProviderFramework& aDpFw );
       
    54     void ConstructL();
       
    55     
       
    56     void GetObjectHandlesL( TUint32 aCurDepth, TUint32 aStorageId, TUint32 aFormatCode, TUint32 aDepth, TUint32 aParentHandle, const TBrowseCallback& aBrowseCallback ) const;
       
    57     void GetFolderObjectHandlesL( TUint32 aCurDepth, TUint32 aFormatCode, TUint32 aDepth, TUint32 aParentHandle, const TBrowseCallback& aBrowseCallback ) const;
       
    58     void GetRootObjectHandlesL( TUint32 aCurDepth, TUint32 aFormatCode, TUint32 aDepth, const TBrowseCallback& aBrowseCallback ) const;
       
    59     void GetObjectHandlesTreeL( TUint32 aCurDepth, TUint32 aFormatCode, TUint32 aDepth, TUint32 aParentHandle, const TBrowseCallback& aBrowseCallback ) const;
       
    60     
       
    61 private:
       
    62     __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    63     
       
    64     MMTPDataProviderFramework& iDpFw;
       
    65     CMTPObjectMetaData* iObjMetaCache;
       
    66     };
       
    67 
       
    68 #endif // CMTPOBJECTBROWSER_H
       
    69