localisation/apparchitecture/apfile/aprfndr.h
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 1997-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 the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __APRFNDR_H__
       
    17 #define __APRFNDR_H__
       
    18 
       
    19 #include <apaid.h>
       
    20 #include <f32file.h>
       
    21 #include <apsidchecker.h>
       
    22 
       
    23 class TDriveUnitInfo;
       
    24 
       
    25 /**
       
    26 @internalComponent
       
    27 */
       
    28 class CApaAppRegFinder : public CBase
       
    29 	{
       
    30 public: // Construction / Destruction
       
    31 	IMPORT_C static CApaAppRegFinder* NewL(const RFs& aFs);
       
    32 	IMPORT_C static CApaAppRegFinder* NewLC(const RFs& aFs);
       
    33 	~CApaAppRegFinder();
       
    34 private: // Private construction
       
    35 	CApaAppRegFinder(const RFs& aFs);
       
    36 	void ConstructL();
       
    37 public:
       
    38 	IMPORT_C TBool NextL(TApaAppEntry& aEntry, 	const RPointerArray<HBufC>& aForcedRegistrations); // increments a scan for all apps
       
    39 	IMPORT_C void FindAllAppsL(); // sets up a scan for all apps
       
    40 #ifdef SYMBIAN_APPARC_APPINFO_CACHE
       
    41 	IMPORT_C const RArray<TDriveUnitInfo>& DriveList() const;
       
    42 	IMPORT_C void FindAllRemovableMediaAppsL();	// sets up a scan for all removable media apps
       
    43 #endif	// SYMBIAN_APPARC_APPINFO_CACHE
       
    44 
       
    45 private:
       
    46 #ifdef SYMBIAN_APPARC_APPINFO_CACHE
       
    47 	void BuildDriveListL();
       
    48 #else
       
    49 	void GetDriveListL();
       
    50 	static void BuildDriveListL(const RFs& aFs, const TDriveList& aSourceDriveList, RArray<TDriveUnitInfo>& aDestDriveList);
       
    51 #endif	// SYMBIAN_APPARC_APPINFO_CACHE
       
    52 	TInt GetFileListL(TDriveUnit aDriveUnit, const TDesC& aPathName);
       
    53 	void GetFolderListL();
       
    54 	static void CheckErrorL(TInt aError);
       
    55 	TBool DoNextL(TApaAppEntry& aEntry, const RPointerArray<HBufC>& aForcedRegistrations,
       
    56 		TBool& aEntryFound);
       
    57 	TBool GetNextDriveAndFolder();
       
    58 
       
    59 private:
       
    60 	enum TScanStage
       
    61 		{
       
    62 		EScanStageNonImportROM,
       
    63 		EScanStageImportNonROM, 
       
    64 		EScanStageImportNonNativeResourceNonROM,
       
    65 		EScanStageImportROM,
       
    66 		EScanStageImportNonNativeResourceROM,
       
    67 		EScanStageComplete
       
    68 		};
       
    69 	
       
    70 
       
    71 private:
       
    72 	CDir* iFileList;
       
    73 	TInt iCurrentIndexInDriveList;
       
    74 	TInt iCurrentIndexInFolderList;
       
    75 	TInt iFileIndex;
       
    76 	const RFs& iFs;
       
    77 	RPointerArray<HBufC> iListOfFolders;
       
    78 	TInt iScanStage;
       
    79 	RSidCheckerMap iSidCheckerMap;
       
    80 #ifdef SYMBIAN_APPARC_APPINFO_CACHE
       
    81 	RArray<TDriveUnitInfo> iListOfDrives;
       
    82 	TBool iRemovableMediaDriveScan;
       
    83 #else
       
    84 	RArray<TDriveUnitInfo>* iListOfDrives;
       
    85 #endif	// SYMBIAN_APPARC_APPINFO_CACHE
       
    86 	TUid iLastChkedApp; //Uid of the last app whose sid cheking has been done.
       
    87 	};
       
    88 	
       
    89 class TDriveUnitInfo 
       
    90 {
       
    91 public:
       
    92  TDriveUnit iDriveUnit; 
       
    93  TUint		iDriveAtt;
       
    94 };
       
    95 	
       
    96 #endif // __APRFNDR_H__