Update contrib.
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
26 #ifndef __SUPPLIEROUTPUTFILE_H__
27 #define __SUPPLIEROUTPUTFILE_H__
31 #include <caf/caftypes.h>
37 #include <caf/attribute.h>
40 namespace ContentAccess
44 Holds the details of an output file produced by CAF.
49 @li The type of file (receipt or content)
50 @li The mime type of the file
53 class CSupplierOutputFile : public CBase
59 /** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
61 @note Receipt files should be generated in localised unicode
63 @param aFileName The name of the file produced
64 @param aOutputType The type of output file produced
65 @return a new CSupplierOutputFile object
69 IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType);
72 /** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
74 @note Receipt files should be generated in localised unicode
76 @param aFileName The name of the file produced
77 @param aOutputType The type of output file produced
78 @param aMimeType The mime type of the file produced
79 @return a new CSupplierOutputFile object
81 IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType, const TDesC8& aMimeType);
84 /** Construct an instance of CSupplierOutputFile by reading from the stream
85 @param aStream A stream containing a CSupplierOutputFile
86 @return A new CSupplierOutputFile
88 IMPORT_C static CSupplierOutputFile* NewL(RReadStream& aStream);
90 virtual ~CSupplierOutputFile();
92 /** Finds out the name of the file.
94 @return The name (with full path) of the output file produced.
96 IMPORT_C TPtrC FileName() const;
98 /** The type of the file, e.g., Content or a Receipt.
100 @note Receipt files should be generated in localised unicode
102 @return The type of output file.
104 IMPORT_C TOutputType OutputType() const;
106 /** The mime type of the output file.
108 @return The mime type.
110 IMPORT_C TPtrC8 MimeTypeL();
112 /** Write the CSupplierOutputFile object to a stream
114 @param aStream The stream to write to.
116 IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
119 /** Create a CAttributeObject for the output file
120 @param aPreloaded ETrue to query all attribute values before returning the attribute object
123 IMPORT_C CAttribute& AttributesL (TBool aPreloaded);
126 #endif // REMOVE_CAF1
129 CSupplierOutputFile();
130 void ConstructL(const TDesC& aFileName, const TDesC8& aMimeType, const TOutputType aOutputType);
132 void InternalizeL(RReadStream& aStream);
135 TBuf8 <KMaxDataTypeLength> iMimeType;
136 TOutputType iOutputType;