secureswitools/swisistools/source/interpretsislib/filedescription.h
changeset 0 ba25891c3a9e
child 25 7333d7932ef7
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 #ifndef	FILEDESCRIPTION_H
       
    20 #define	FILEDESCRIPTION_H
       
    21 
       
    22 #include <istream>
       
    23 #include "serialisable.h"
       
    24 #include "symbiantypes.h"
       
    25 #include "hashcontainer.h"
       
    26 
       
    27 #include <vector>
       
    28 
       
    29 class Serialiser;
       
    30 class Deserialiser;
       
    31 class CSISFileDescription;
       
    32 
       
    33 /**
       
    34 * @file FILEDESCRIPTION.H
       
    35 *
       
    36 * @internalComponent
       
    37 * @released
       
    38 */
       
    39 class FileDescription : public Serialisable
       
    40 	{
       
    41 public:
       
    42 	/**
       
    43 	Constructor
       
    44 	*/
       
    45 	FileDescription () {};
       
    46 	FileDescription (const CSISFileDescription& aFile, TInt aSid, const TInt aTargetDrive, const std::wstring& aFileName);
       
    47 
       
    48 	virtual ~FileDescription ();
       
    49 
       
    50 	virtual void Internalize(Deserialiser& des);
       
    51 	virtual void Externalize(Serialiser& ser);
       
    52 
       
    53 	TInt GetSid() const
       
    54 	{ return iSid; }
       
    55 
       
    56 	void SetSid(const TInt& aSid)
       
    57 	{ iSid = aSid; }
       
    58 
       
    59 	TInt GetIndex() const
       
    60 	{ return iIndex; }
       
    61 
       
    62 	void SetIndex(const TInt& aIndex)
       
    63 	{ iIndex = aIndex; }
       
    64 
       
    65 	TInt64 GetUncompressedLength() const
       
    66 	{ return iUncompressedLength; }
       
    67 
       
    68 	void SetUncompressedLength(const TInt64& aUncompressedLength)
       
    69 	{ iUncompressedLength = aUncompressedLength; }
       
    70 
       
    71 	const HashContainer& GetHash() const
       
    72 	{ return iHash; }
       
    73 
       
    74 	void SetHash(const HashContainer& aHash)
       
    75 	{ iHash = aHash; }
       
    76 
       
    77 	TInt GetOperationOptions() const
       
    78 	{ return iOperationOptions; }
       
    79 
       
    80 	void SetOperationOptions(const TInt& aOperationOptions)
       
    81 	{ iOperationOptions = aOperationOptions; }
       
    82 
       
    83 	TInt GetOperation() const
       
    84 	{ return iOperation; }
       
    85 
       
    86 	void SetOperation(const TInt& aOperation)
       
    87 	{ iOperation = aOperation; }
       
    88 
       
    89 	const std::wstring& GetMimeType() const
       
    90 	{ return iMimeType; }
       
    91 
       
    92 	void SetMimeType(const std::wstring& aMimeType)
       
    93 	{ iMimeType = aMimeType; }
       
    94 
       
    95 	const std::wstring& GetTarget() const
       
    96 	{ return iTarget; }
       
    97 
       
    98 	void SetTarget(const std::wstring& aTarget)
       
    99 	{ iTarget = aTarget; }
       
   100 
       
   101 private:
       
   102 	std::wstring  iTarget;
       
   103 	std::wstring  iMimeType;
       
   104 	TInt        iOperation;
       
   105 	TInt        iOperationOptions;
       
   106 	HashContainer iHash;
       
   107 	TInt64        iUncompressedLength;
       
   108 	TInt        iIndex;
       
   109 	TInt        iSid;
       
   110     };
       
   111 
       
   112 
       
   113 #ifdef _MSC_VER
       
   114 
       
   115 Deserialiser& operator>>(Deserialiser& aInput, std::vector<FileDescription*>& val);
       
   116 
       
   117 #endif
       
   118 
       
   119 #endif	/* FILEDESCRIPTION_H */