sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
/**
|
sl@0
|
20 |
@file
|
sl@0
|
21 |
@publishedPartner
|
sl@0
|
22 |
@released
|
sl@0
|
23 |
*/
|
sl@0
|
24 |
|
sl@0
|
25 |
|
sl@0
|
26 |
#ifndef __SUPPLIEROUTPUTFILE_H__
|
sl@0
|
27 |
#define __SUPPLIEROUTPUTFILE_H__
|
sl@0
|
28 |
|
sl@0
|
29 |
#include <e32base.h>
|
sl@0
|
30 |
#include <apmstd.h>
|
sl@0
|
31 |
#include <caf/caftypes.h>
|
sl@0
|
32 |
|
sl@0
|
33 |
class RReadStream;
|
sl@0
|
34 |
class RWriteStream;
|
sl@0
|
35 |
|
sl@0
|
36 |
#ifndef REMOVE_CAF1
|
sl@0
|
37 |
#include <caf/attribute.h>
|
sl@0
|
38 |
#endif
|
sl@0
|
39 |
|
sl@0
|
40 |
namespace ContentAccess
|
sl@0
|
41 |
{
|
sl@0
|
42 |
|
sl@0
|
43 |
/**
|
sl@0
|
44 |
Holds the details of an output file produced by CAF.
|
sl@0
|
45 |
|
sl@0
|
46 |
It stores:
|
sl@0
|
47 |
|
sl@0
|
48 |
@li The filename
|
sl@0
|
49 |
@li The type of file (receipt or content)
|
sl@0
|
50 |
@li The mime type of the file
|
sl@0
|
51 |
|
sl@0
|
52 |
*/
|
sl@0
|
53 |
class CSupplierOutputFile : public CBase
|
sl@0
|
54 |
{
|
sl@0
|
55 |
public:
|
sl@0
|
56 |
|
sl@0
|
57 |
#ifndef REMOVE_CAF1
|
sl@0
|
58 |
|
sl@0
|
59 |
/** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
|
sl@0
|
60 |
|
sl@0
|
61 |
@note Receipt files should be generated in localised unicode
|
sl@0
|
62 |
|
sl@0
|
63 |
@param aFileName The name of the file produced
|
sl@0
|
64 |
@param aOutputType The type of output file produced
|
sl@0
|
65 |
@return a new CSupplierOutputFile object
|
sl@0
|
66 |
@deprecated
|
sl@0
|
67 |
*/
|
sl@0
|
68 |
|
sl@0
|
69 |
IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType);
|
sl@0
|
70 |
#endif // REMOVE_CAF1
|
sl@0
|
71 |
|
sl@0
|
72 |
/** Create a new CSupplierOutputFile used to describe output files produced by the CAF supply operation
|
sl@0
|
73 |
|
sl@0
|
74 |
@note Receipt files should be generated in localised unicode
|
sl@0
|
75 |
|
sl@0
|
76 |
@param aFileName The name of the file produced
|
sl@0
|
77 |
@param aOutputType The type of output file produced
|
sl@0
|
78 |
@param aMimeType The mime type of the file produced
|
sl@0
|
79 |
@return a new CSupplierOutputFile object
|
sl@0
|
80 |
*/
|
sl@0
|
81 |
IMPORT_C static CSupplierOutputFile* NewL(const TDesC& aFileName, const TOutputType aOutputType, const TDesC8& aMimeType);
|
sl@0
|
82 |
|
sl@0
|
83 |
|
sl@0
|
84 |
/** Construct an instance of CSupplierOutputFile by reading from the stream
|
sl@0
|
85 |
@param aStream A stream containing a CSupplierOutputFile
|
sl@0
|
86 |
@return A new CSupplierOutputFile
|
sl@0
|
87 |
*/
|
sl@0
|
88 |
IMPORT_C static CSupplierOutputFile* NewL(RReadStream& aStream);
|
sl@0
|
89 |
|
sl@0
|
90 |
virtual ~CSupplierOutputFile();
|
sl@0
|
91 |
|
sl@0
|
92 |
/** Finds out the name of the file.
|
sl@0
|
93 |
|
sl@0
|
94 |
@return The name (with full path) of the output file produced.
|
sl@0
|
95 |
*/
|
sl@0
|
96 |
IMPORT_C TPtrC FileName() const;
|
sl@0
|
97 |
|
sl@0
|
98 |
/** The type of the file, e.g., Content or a Receipt.
|
sl@0
|
99 |
|
sl@0
|
100 |
@note Receipt files should be generated in localised unicode
|
sl@0
|
101 |
|
sl@0
|
102 |
@return The type of output file.
|
sl@0
|
103 |
*/
|
sl@0
|
104 |
IMPORT_C TOutputType OutputType() const;
|
sl@0
|
105 |
|
sl@0
|
106 |
/** The mime type of the output file.
|
sl@0
|
107 |
|
sl@0
|
108 |
@return The mime type.
|
sl@0
|
109 |
*/
|
sl@0
|
110 |
IMPORT_C TPtrC8 MimeTypeL();
|
sl@0
|
111 |
|
sl@0
|
112 |
/** Write the CSupplierOutputFile object to a stream
|
sl@0
|
113 |
|
sl@0
|
114 |
@param aStream The stream to write to.
|
sl@0
|
115 |
*/
|
sl@0
|
116 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
sl@0
|
117 |
|
sl@0
|
118 |
#ifndef REMOVE_CAF1
|
sl@0
|
119 |
/** Create a CAttributeObject for the output file
|
sl@0
|
120 |
@param aPreloaded ETrue to query all attribute values before returning the attribute object
|
sl@0
|
121 |
@deprecated
|
sl@0
|
122 |
*/
|
sl@0
|
123 |
IMPORT_C CAttribute& AttributesL (TBool aPreloaded);
|
sl@0
|
124 |
private:
|
sl@0
|
125 |
CAttribute *iAttr;
|
sl@0
|
126 |
#endif // REMOVE_CAF1
|
sl@0
|
127 |
|
sl@0
|
128 |
private:
|
sl@0
|
129 |
CSupplierOutputFile();
|
sl@0
|
130 |
void ConstructL(const TDesC& aFileName, const TDesC8& aMimeType, const TOutputType aOutputType);
|
sl@0
|
131 |
|
sl@0
|
132 |
void InternalizeL(RReadStream& aStream);
|
sl@0
|
133 |
|
sl@0
|
134 |
HBufC* iFileName;
|
sl@0
|
135 |
TBuf8 <KMaxDataTypeLength> iMimeType;
|
sl@0
|
136 |
TOutputType iOutputType;
|
sl@0
|
137 |
};
|
sl@0
|
138 |
}
|
sl@0
|
139 |
|
sl@0
|
140 |
#endif
|