1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/caf/supplieroutputfile.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,144 @@
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 +
1.24 +/**
1.25 + @file
1.26 + @publishedPartner
1.27 + @released
1.28 +*/
1.29 +
1.30 +
1.31 +#ifndef __SUPPLIEROUTPUTFILE_H__
1.32 +#define __SUPPLIEROUTPUTFILE_H__
1.33 +
1.34 +#include <e32base.h>
1.35 +#include <apmstd.h>
1.36 +#include <caf/caftypes.h>
1.37 +
1.38 +class RReadStream;
1.39 +class RWriteStream;
1.40 +
1.41 +#ifndef REMOVE_CAF1
1.42 +#include <caf/attribute.h>
1.43 +#endif
1.44 +
1.45 +namespace ContentAccess
1.46 + {
1.47 +
1.48 + /**
1.49 + Holds the details of an output file produced by CAF.
1.50 +
1.51 + It stores:
1.52 +
1.53 + @li The filename
1.54 + @li The type of file (receipt or content)
1.55 + @li The mime type of the file
1.56 +
1.57 + @publishedPartner
1.58 + @released
1.59 + */
1.60 + class CSupplierOutputFile : public CBase
1.61 + {
1.62 + public:
1.63 +
1.64 + #ifndef REMOVE_CAF1
1.65 +
1.66 + /** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
1.67 +
1.68 + @note Receipt files should be generated in localised unicode
1.69 +
1.70 + @param aFileName The name of the file produced
1.71 + @param aOutputType The type of output file produced
1.72 + @return a new CSupplierOutputFile object
1.73 + @deprecated
1.74 + */
1.75 +
1.76 + IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType);
1.77 + #endif // REMOVE_CAF1
1.78 +
1.79 + /** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
1.80 +
1.81 + @note Receipt files should be generated in localised unicode
1.82 +
1.83 + @param aFileName The name of the file produced
1.84 + @param aOutputType The type of output file produced
1.85 + @param aMimeType The mime type of the file produced
1.86 + @return a new CSupplierOutputFile object
1.87 + */
1.88 + IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType, const TDesC8& aMimeType);
1.89 +
1.90 +
1.91 + /** Construct an instance of CSupplierOutputFile by reading from the stream
1.92 + @param aStream A stream containing a CSupplierOutputFile
1.93 + @return A new CSupplierOutputFile
1.94 + */
1.95 + IMPORT_C static CSupplierOutputFile* NewL(RReadStream& aStream);
1.96 +
1.97 + virtual ~CSupplierOutputFile();
1.98 +
1.99 + /** Finds out the name of the file.
1.100 +
1.101 + @return The name (with full path) of the output file produced.
1.102 + */
1.103 + IMPORT_C TPtrC FileName() const;
1.104 +
1.105 + /** The type of the file, e.g., Content or a Receipt.
1.106 +
1.107 + @note Receipt files should be generated in localised unicode
1.108 +
1.109 + @return The type of output file.
1.110 + */
1.111 + IMPORT_C TOutputType OutputType() const;
1.112 +
1.113 + /** The mime type of the output file.
1.114 +
1.115 + @return The mime type.
1.116 + */
1.117 + IMPORT_C TPtrC8 MimeTypeL();
1.118 +
1.119 + /** Write the CSupplierOutputFile object to a stream
1.120 +
1.121 + @param aStream The stream to write to.
1.122 + */
1.123 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.124 +
1.125 +#ifndef REMOVE_CAF1
1.126 + /** Create a CAttributeObject for the output file
1.127 + @param aPreloaded ETrue to query all attribute values before returning the attribute object
1.128 + @deprecated
1.129 + */
1.130 + IMPORT_C CAttribute& AttributesL (TBool aPreloaded);
1.131 + private:
1.132 + CAttribute *iAttr;
1.133 +#endif // REMOVE_CAF1
1.134 +
1.135 + private:
1.136 + CSupplierOutputFile();
1.137 + void ConstructL(const TDesC& aFileName, const TDesC8& aMimeType, const TOutputType aOutputType);
1.138 +
1.139 + void InternalizeL(RReadStream& aStream);
1.140 +
1.141 + HBufC* iFileName;
1.142 + TBuf8 <KMaxDataTypeLength> iMimeType;
1.143 + TOutputType iOutputType;
1.144 + };
1.145 + }
1.146 +
1.147 +#endif