secureswitools/swisistools/source/interpretsislib/installablefile.h
changeset 0 ba25891c3a9e
child 73 79647526f98c
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file INSTALLABLEFILE.H
       
    21  @internalComponent
       
    22  @released
       
    23 */
       
    24 #ifndef	INSTALLABLE_FILE_H
       
    25 #define	INSTALLABLE_FILE_H
       
    26 
       
    27 #include <vector> 
       
    28 #include <string>
       
    29 
       
    30 #include "symbiantypes.h"
       
    31 
       
    32 
       
    33 class CSISFileData;
       
    34 class CSISFileDescription;
       
    35 
       
    36 
       
    37 struct InstallableFile
       
    38 {
       
    39 
       
    40 public:
       
    41 	// constructor for non stub files
       
    42 	InstallableFile(const CSISFileDescription&, const CSISFileData*, const std::wstring aDrivePath, int aInstallingDrive);
       
    43 	
       
    44 	// constructor for stub files
       
    45 	InstallableFile(const CSISFileDescription&, const std::wstring aDrivePath, int aInstallingDrive);
       
    46 	~InstallableFile();
       
    47 
       
    48 public:
       
    49 	bool IsExecutable() const { return isExecutable;};
       
    50 	bool IsExe() const { return isExe;};
       
    51 	TUint32 Sid() const{ return iSid;};
       
    52 	bool IsStub() const{ return isStub;};
       
    53 	const CSISFileDescription* FileDescription() const{ return iFileDescription;};
       
    54 	const CSISFileData* FileData() const{ return iFileData;};
       
    55 	const std::wstring& GetTarget() const { return iTargetFile; };
       
    56 	const std::wstring& GetLocalTarget() const { return iLocalTargetFile; };
       
    57 
       
    58 private:
       
    59 	void ChangeTargetDrive(const std::wstring aDrivePath, int aInstallingDrive);
       
    60 
       
    61 private:
       
    62 	bool isExecutable;
       
    63 	bool isExe;
       
    64 	TUint32 iSid;
       
    65 	bool isStub;
       
    66 	const CSISFileDescription* iFileDescription;	
       
    67 	// this  can be NULL in case of stub
       
    68 	const CSISFileData* iFileData;
       
    69 	// Full file name to the device location
       
    70 	std::wstring iTargetFile;
       
    71 	// Full file name to the PC location
       
    72 	std::wstring iLocalTargetFile;
       
    73 };
       
    74 
       
    75 typedef std::vector< InstallableFile* > InstallableFiles;
       
    76 
       
    77 void GetSidsFromInstallable(const InstallableFiles& aFiles, 
       
    78 							std::vector<TUint32>& aSids);
       
    79 
       
    80 void FreeInstallableFiles(InstallableFiles& aFiles);
       
    81 #endif	/* INSTALLABLE_FILE_H */