mtpfws/mtpfw/dataproviders/dputility/inc/cmtpfsenumerator.h
changeset 20 6e82ae192c3a
parent 17 aabe5387f5ce
child 19 ef55b168cedb
equal deleted inserted replaced
18:1b39655331a3 20:6e82ae192c3a
    44     {
    44     {
    45 public:
    45 public:
    46     IMPORT_C static CMTPFSEnumerator* NewL(MMTPDataProviderFramework& aFramework, CMTPFSExclusionMgr& aExclusionMgr, MMTPEnumerationCallback& aCallback, TInt aProcessLimit);
    46     IMPORT_C static CMTPFSEnumerator* NewL(MMTPDataProviderFramework& aFramework, CMTPFSExclusionMgr& aExclusionMgr, MMTPEnumerationCallback& aCallback, TInt aProcessLimit);
    47     IMPORT_C ~CMTPFSEnumerator();
    47     IMPORT_C ~CMTPFSEnumerator();
    48 
    48 
    49 	IMPORT_C void StartL(TUint32 aStorageId, TBool aOnlyRoot = EFalse);	
    49 	IMPORT_C void StartL(TUint32 aStorageId, TBool aScanAll = EFalse);	
    50 	
    50 	
    51 private:
    51 private:
    52 	//from CActive
    52 	//from CActive
    53 	void DoCancel();
    53 	void DoCancel();
    54 	void RunL();
    54 	void RunL();
    67 	void AddEntryL(const TDesC& aPath, TUint32 &aHandle, TMTPFormatCode format, TUint32 aDPId, const TEntry& aEntry, TUint32 aStorageId, TUint32 aParentHandle);
    67 	void AddEntryL(const TDesC& aPath, TUint32 &aHandle, TMTPFormatCode format, TUint32 aDPId, const TEntry& aEntry, TUint32 aStorageId, TUint32 aParentHandle);
    68 	void AddFileEntryForOtherDpL(const TDesC& aPath, TUint32 &aHandle, TMTPFormatCode format, TUint32 aDPId, const TEntry& aEntry, TUint32 aStorageId, TUint32 aParentHandle);
    68 	void AddFileEntryForOtherDpL(const TDesC& aPath, TUint32 &aHandle, TMTPFormatCode format, TUint32 aDPId, const TEntry& aEntry, TUint32 aStorageId, TUint32 aParentHandle);
    69 	void NotifyObjectAddToDP(const TUint32 aHandle,const TUint DpId);
    69 	void NotifyObjectAddToDP(const TUint32 aHandle,const TUint DpId);
    70 	
    70 	
    71 	
    71 	
       
    72 private:
       
    73     static  const TUint KMTPMaxFullFileName = 259;
       
    74     class TStackItem
       
    75         {
       
    76         public:
       
    77             TStackItem(const TDesC& aPath, const TUint32 aHandle):iPath(aPath), iHandle(aHandle)
       
    78                 {
       
    79                
       
    80                 }
       
    81         public:
       
    82             TBuf<KMTPMaxFullFileName> iPath;
       
    83             TUint32                   iHandle;
       
    84         };
    72 private: 
    85 private: 
    73 	// Owned
    86 	// Owned
    74 	MMTPDataProviderFramework&  iFramework;
    87 	MMTPDataProviderFramework&  iFramework;
    75 	CMTPFSExclusionMgr& 		iExclusionMgr;
    88 	CMTPFSExclusionMgr& 		iExclusionMgr;
    76 	MMTPEnumerationCallback& 	iCallback;
    89 	MMTPEnumerationCallback& 	iCallback;
    77 	RMTPDpSingletons			iDpSingletons;
    90 	RMTPDpSingletons			iDpSingletons;
    78 	TUint32 					iParentHandle;
    91 	TUint32 					iParentHandle;
    79 	TParse						iPath;
    92 	TBuf<KMTPMaxFullFileName>	iCurrentPath;
    80 	RDir						iDir;
    93 	RDir						iDir;
    81 	TEntryArray					iEntries;
    94 	TEntryArray					iEntries;
    82 	TInt						iFirstUnprocessed;
    95 	TInt						iFirstUnprocessed;
    83 	RArray<TEntry>				iDirStack;
    96 	RArray<TStackItem>			iDirStack;
    84 	RArray<TUint>				iStorages;
    97 	RArray<TUint>				iStorages;
    85 	TUint32						iStorageId;
    98 	TUint32						iStorageId;
    86 	// How many entries should be processed in one go
    99 	// How many entries should be processed in one go
    87 	TInt 						iProcessLimit;
   100 	TInt 						iProcessLimit;
    88 	CMTPObjectMetaData* 		iObject;
   101 	CMTPObjectMetaData* 		iObject;
    89 	TUint						iDpID;
   102 	TUint						iDpID;
    90 	RMTPFramework               iSingletons;
   103 	RMTPFramework               iSingletons;
    91 	TBool                       iSkipCurrentStorage;
   104 	TBool                       iSkipCurrentStorage;
       
   105 	TBool                       iScanAll;
       
   106 	TBool                       iAllRootScaned;
       
   107 	TUint                       iScanPos;
       
   108 	TInt                        iObjectNeedToScan;
       
   109 
    92 	
   110 	
    93 	TBool						iIsFileEnumerator;
   111 	
    94 	TBool						iOnlyScanRoot;
       
    95 	TInt						iNumOfFoldersAndFiles;
       
    96 	/**
   112 	/**
    97     FLOGGER debug trace member variable.
   113     FLOGGER debug trace member variable.
    98     */
   114     */
    99     __FLOG_DECLARATION_MEMBER_MUTABLE;
   115     __FLOG_DECLARATION_MEMBER_MUTABLE;
   100        
   116