26 #include "sishash.h" |
26 #include "sishash.h" |
27 |
27 |
28 FileDescription::~FileDescription () |
28 FileDescription::~FileDescription () |
29 { |
29 { |
30 } |
30 } |
|
31 |
|
32 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
|
33 FileDescription::FileDescription(const CSISFileDescription& aFile, TInt aSid, const TInt aTargetDrive, const std::wstring& aFileName, const std::wstring& aLocalName) |
|
34 : iTarget(aFileName), |
|
35 iLocalFile(aLocalName), |
|
36 iMimeType(aFile.MimeType().GetString()), |
|
37 iOperation(aFile.Operation()), |
|
38 iOperationOptions(aFile.OperationOptions()), |
|
39 iUncompressedLength(aFile.UncompressedLength()), |
|
40 iIndex(aFile.FileIndex()), |
|
41 iSid(aSid) |
|
42 { |
|
43 const unsigned char* data = aFile.Hash().Blob().Data(); |
|
44 TUint32 len = aFile.Hash().Blob().Size(); |
31 |
45 |
|
46 std::string hashData((char*)data, len); |
|
47 |
|
48 iHash.SetData(hashData); |
|
49 iHash.SetHashId(HashContainer::EHashSHA); |
|
50 } |
|
51 #else |
32 FileDescription::FileDescription(const CSISFileDescription& aFile, TInt aSid, const TInt aTargetDrive, const std::wstring& aFileName) |
52 FileDescription::FileDescription(const CSISFileDescription& aFile, TInt aSid, const TInt aTargetDrive, const std::wstring& aFileName) |
33 : iTarget(aFileName), |
53 : iTarget(aFileName), |
34 iMimeType(aFile.MimeType().GetString()), |
54 iMimeType(aFile.MimeType().GetString()), |
35 iOperation(aFile.Operation()), |
55 iOperation(aFile.Operation()), |
36 iOperationOptions(aFile.OperationOptions()), |
56 iOperationOptions(aFile.OperationOptions()), |
44 std::string hashData((char*)data, len); |
64 std::string hashData((char*)data, len); |
45 |
65 |
46 iHash.SetData(hashData); |
66 iHash.SetData(hashData); |
47 iHash.SetHashId(HashContainer::EHashSHA); |
67 iHash.SetHashId(HashContainer::EHashSHA); |
48 } |
68 } |
|
69 #endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK |
49 |
70 |
50 void FileDescription::Internalize(Deserialiser& des) |
71 void FileDescription::Internalize(Deserialiser& des) |
51 { |
72 { |
52 |
73 |
53 des >> iTarget |
74 des >> iTarget |