os/security/contentmgmt/contentaccessfwfordrm/inc/supplieroutputfile.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/contentmgmt/contentaccessfwfordrm/inc/supplieroutputfile.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,140 @@
     1.4 +/*
     1.5 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file
    1.24 + @publishedPartner
    1.25 + @released
    1.26 +*/
    1.27 +
    1.28 +
    1.29 +#ifndef __SUPPLIEROUTPUTFILE_H__
    1.30 +#define __SUPPLIEROUTPUTFILE_H__
    1.31 +
    1.32 +#include <e32base.h>
    1.33 +#include <apmstd.h>
    1.34 +#include <caf/caftypes.h>
    1.35 +
    1.36 +class RReadStream;
    1.37 +class RWriteStream;
    1.38 +
    1.39 +#ifndef REMOVE_CAF1
    1.40 +#include <caf/attribute.h>
    1.41 +#endif
    1.42 +
    1.43 +namespace ContentAccess
    1.44 +	{
    1.45 +
    1.46 +	/** 
    1.47 +	Holds the details of an output file produced by CAF. 
    1.48 +	
    1.49 +	It stores:
    1.50 +
    1.51 +	@li The filename
    1.52 +	@li The type of file (receipt or content)
    1.53 +	@li The mime type of the file
    1.54 +	
    1.55 +	*/
    1.56 +	class CSupplierOutputFile : public CBase
    1.57 +		{
    1.58 +	public:
    1.59 +
    1.60 +		#ifndef REMOVE_CAF1
    1.61 +
    1.62 +		/** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
    1.63 +	
    1.64 +		@note Receipt files should be generated in localised unicode
    1.65 +
    1.66 +		@param aFileName The name of the file produced
    1.67 +		@param aOutputType The type of output file produced
    1.68 +		@return a new CSupplierOutputFile object
    1.69 +		@deprecated
    1.70 +		*/
    1.71 +
    1.72 +		IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType);
    1.73 +		#endif // REMOVE_CAF1
    1.74 +
    1.75 +		/** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
    1.76 +
    1.77 +		@note Receipt files should be generated in localised unicode
    1.78 +	  
    1.79 +		@param aFileName The name of the file produced
    1.80 +		@param aOutputType The type of output file produced
    1.81 +		@param aMimeType The mime type of the file produced
    1.82 +		@return a new CSupplierOutputFile object
    1.83 +		*/
    1.84 +		IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType, const TDesC8& aMimeType);
    1.85 +
    1.86 +		
    1.87 +		/** Construct an instance of CSupplierOutputFile by reading from the stream
    1.88 +		@param aStream A stream containing a CSupplierOutputFile
    1.89 +		@return A new CSupplierOutputFile
    1.90 +		*/
    1.91 +		IMPORT_C static CSupplierOutputFile* NewL(RReadStream& aStream);
    1.92 +
    1.93 +		virtual ~CSupplierOutputFile();
    1.94 +
    1.95 +		/** Finds out the name of the file.
    1.96 +		
    1.97 +		@return	The name (with full path) of the output file produced.
    1.98 +		*/
    1.99 +		IMPORT_C TPtrC FileName() const;
   1.100 +
   1.101 +		/** The type of the file, e.g., Content or a Receipt.
   1.102 +
   1.103 +		@note Receipt files should be generated in localised unicode
   1.104 +
   1.105 +		@return	The type of output file.
   1.106 +		*/
   1.107 +		IMPORT_C TOutputType OutputType() const;
   1.108 +
   1.109 +		/** The mime type of the output file. 
   1.110 +
   1.111 +		@return The mime type. 
   1.112 +		*/
   1.113 +		IMPORT_C TPtrC8 MimeTypeL();
   1.114 +
   1.115 +		/** Write the CSupplierOutputFile object to a stream
   1.116 +		
   1.117 +		 @param aStream The stream to write to.
   1.118 +		 */
   1.119 +		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
   1.120 +
   1.121 +#ifndef REMOVE_CAF1
   1.122 +		/** Create a CAttributeObject for the output file
   1.123 +		@param aPreloaded ETrue to query all attribute values before returning the attribute object
   1.124 +		@deprecated 
   1.125 +		*/
   1.126 +		IMPORT_C CAttribute& AttributesL (TBool aPreloaded);
   1.127 +	private:
   1.128 +		CAttribute *iAttr;
   1.129 +#endif // REMOVE_CAF1
   1.130 +
   1.131 +	private:
   1.132 +		CSupplierOutputFile();
   1.133 +		void ConstructL(const TDesC& aFileName, const TDesC8& aMimeType, const TOutputType aOutputType);
   1.134 +
   1.135 +		void InternalizeL(RReadStream& aStream);
   1.136 +
   1.137 +		HBufC* iFileName;
   1.138 +		TBuf8 <KMaxDataTypeLength> iMimeType;
   1.139 +		TOutputType iOutputType;
   1.140 +		};
   1.141 +	}
   1.142 +
   1.143 +#endif