mtpdataproviders/mtpfileandfolderdp/inc/cmtpfiledpconfigmgr.h
changeset 0 d0791faffa3f
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  @internalTechnology
       
    19 */
       
    20 
       
    21 #ifndef CMTPFILEDPCONFIGMGR_H
       
    22 #define CMTPFILEDPCONFIGMGR_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <badesca.h>
       
    26 
       
    27 #include <mtp/mtpprotocolconstants.h>
       
    28 
       
    29 class MMTPDataProviderFramework;
       
    30 
       
    31 class CMTPFileDpConfigMgr : 
       
    32 	public CBase
       
    33 	{
       
    34 public:
       
    35 	enum TParameter
       
    36 	    {
       
    37     	/**
       
    38     	The object format code exclusion list parameter.
       
    39     	*/
       
    40     	EFormatExclusionList,
       
    41     	
       
    42     	/**
       
    43     	The object format code mappings.
       
    44     	*/
       
    45     	EFormatMappings,
       
    46  
       
    47     	/**
       
    48     	The maximum number of data objects that are enumerated on each 
       
    49     	iteration of the file data provider's object enumerator.
       
    50     	
       
    51     	Setting this to a smaller < 128 number will reduce the running time of the
       
    52     	enumerator ActiveObject RunL as to allow other ActiveObjects to run. 
       
    53     	The downside is that the enumerator will take longer to iterate over 
       
    54     	directory entries due less objects being added in each RunL call.
       
    55     	
       
    56     	Setting this to a larger number > 128 will increase the running time of the
       
    57     	enumerator ActiveObject RunL decreasing total enumerator running time but
       
    58     	potentially starving out other ActiveObjects.
       
    59     	*/
       
    60     	EEnumerationIterationLength,
       
    61     	};
       
    62 	
       
    63 public:
       
    64 	static CMTPFileDpConfigMgr* NewL(MMTPDataProviderFramework& aFramework);
       
    65 	~CMTPFileDpConfigMgr();
       
    66 	
       
    67 	TUint UintValueL(TParameter aParam) const;
       
    68 	
       
    69 	void GetArrayValueL(TParameter aParam, RArray<TUint>& aArray) const;
       
    70 	
       
    71 	static TInt FormatCompare(const TUint& aFirst, const TUint& aSecond);
       
    72 	
       
    73 private:
       
    74 	CMTPFileDpConfigMgr(MMTPDataProviderFramework& aFramework);
       
    75 	void ConstructL();
       
    76 	
       
    77 	void ReadFormatExclusionListL(RArray<TUint>& aArray) const;
       
    78 	
       
    79 private:
       
    80 	MMTPDataProviderFramework& iFramework;
       
    81 	TUint iResourceId;
       
    82 	
       
    83 	TUint iEnumItrLength;
       
    84 	RArray<TUint> iExcludedFormats;
       
    85 	};
       
    86 
       
    87 #endif // CMTPFILEDPCONFIGMGR_H