mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpobjectbrowser.h
changeset 0 d0791faffa3f
child 1 f8e15b44d440
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpobjectbrowser.h	Tue Feb 02 01:11:40 2010 +0200
@@ -0,0 +1,69 @@
+// Copyright (c) 2006-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
+ @internalComponent
+*/
+
+#ifndef CMTPOBJECTBROWSER_H
+#define CMTPOBJECTBROWSER_H
+
+#include <e32base.h>
+#include <mtp/mmtpdataproviderframework.h>
+#include "mtpdebug.h"
+
+class CMTPTypeArray;
+class CMTPRequestChecker;
+class CMTPObjectMetaData;
+
+class CMTPObjectBrowser: public CBase
+    {
+public:
+    typedef void ( *TBrowseObjectCallbackProcL )( TAny* aContext, TUint aHandle, TUint32 aCurDepth );
+    
+    struct TBrowseCallback
+        {
+        TBrowseObjectCallbackProcL iCallback;
+        TAny* iContext;
+        };
+    
+public:
+    static CMTPObjectBrowser* NewL( MMTPDataProviderFramework& aDpFw );
+    static TBool IsFolderFormat( TUint aFmtCode, TUint aFmtSubCode );
+    
+public:
+    ~CMTPObjectBrowser();
+    
+    void GoL( TUint32 aFormatCode, TUint32 aHandle, TUint32 aDepth, const TBrowseCallback& aBrowseCallback ) const;
+    
+private:
+    CMTPObjectBrowser( MMTPDataProviderFramework& aDpFw );
+    void ConstructL();
+    
+    void GetObjectHandlesL( TUint32 aCurDepth, TUint32 aStorageId, TUint32 aFormatCode, TUint32 aDepth, TUint32 aParentHandle, const TBrowseCallback& aBrowseCallback ) const;
+    void GetFolderObjectHandlesL( TUint32 aCurDepth, TUint32 aFormatCode, TUint32 aDepth, TUint32 aParentHandle, const TBrowseCallback& aBrowseCallback ) const;
+    void GetRootObjectHandlesL( TUint32 aCurDepth, TUint32 aFormatCode, TUint32 aDepth, const TBrowseCallback& aBrowseCallback ) const;
+    void GetObjectHandlesTreeL( TUint32 aCurDepth, TUint32 aFormatCode, TUint32 aDepth, TUint32 aParentHandle, const TBrowseCallback& aBrowseCallback ) const;
+    
+private:
+    __FLOG_DECLARATION_MEMBER_MUTABLE;
+    
+    MMTPDataProviderFramework& iDpFw;
+    CMTPObjectMetaData* iObjMetaCache;
+    };
+
+#endif // CMTPOBJECTBROWSER_H
+