1 /* |
|
2 * Copyright (c) 2002 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 "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: XML writer class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _BIPXMLWRITER_H |
|
20 #define _BIPXMLWRITER_H |
|
21 |
|
22 //INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <f32file.h> |
|
25 #include "debug.h" |
|
26 |
|
27 // CONSTANTS |
|
28 enum TElementType |
|
29 { |
|
30 EImageFormats, |
|
31 EPreferredFormat, |
|
32 EAttachmentFormats, |
|
33 EFilteringParameters, |
|
34 EDPOFOptions |
|
35 }; |
|
36 |
|
37 enum TAttributeType |
|
38 { |
|
39 EEncoding, |
|
40 EPixel, |
|
41 ETransformation, |
|
42 EMaxSize |
|
43 }; |
|
44 |
|
45 // CLASS DECLARATION |
|
46 |
|
47 /** |
|
48 * XML writer for BIP capability object |
|
49 * |
|
50 */ |
|
51 NONSHARABLE_CLASS (CBIPXmlWriter) : public CBase |
|
52 { |
|
53 public: //Constructors and destructors |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CBIPXmlWriter* NewL(); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 virtual ~CBIPXmlWriter(); |
|
64 |
|
65 public: //New Functions |
|
66 |
|
67 /** |
|
68 * Open temporary file |
|
69 * @param TFileName Contains the new temp file name. |
|
70 * @return None. |
|
71 */ |
|
72 void OpenXmlDocumentL( TFileName& aFileName); |
|
73 |
|
74 /** |
|
75 * Close temporary file. So that it can be used by clients |
|
76 * @param None. |
|
77 * @return None. |
|
78 */ |
|
79 void CloseXmlDocumentL(); |
|
80 |
|
81 /** |
|
82 * Opens xml element for writing |
|
83 * @param TElementType Element to be written to file |
|
84 * @return None. |
|
85 */ |
|
86 void OpenXmlElementL( TElementType aElement ); |
|
87 |
|
88 /** |
|
89 * Close xml element |
|
90 * @param None |
|
91 * @return None. |
|
92 */ |
|
93 void CloseXmlElementL( ); |
|
94 |
|
95 /** |
|
96 * Add xml attribute to the open element |
|
97 * @param TAttributeType Type of the attribute |
|
98 * @param TDesC8 Attribute |
|
99 * @return None. |
|
100 */ |
|
101 void AddXmlAttributeL( TAttributeType aAttributeType, TDesC8& aAttr ); |
|
102 |
|
103 private: |
|
104 |
|
105 /** |
|
106 * C++ default constructor. |
|
107 */ |
|
108 CBIPXmlWriter(); |
|
109 |
|
110 /** |
|
111 * Symbian 2nd phase constructor. |
|
112 */ |
|
113 void ConstructL(); |
|
114 |
|
115 private: // Data |
|
116 |
|
117 RFile ifile; |
|
118 RFs iFileSession; |
|
119 TFileName iFileName; |
|
120 }; |
|
121 |
|
122 #endif //_BIPXMLWRITER_H |
|
123 |
|
124 // End of File |
|