|
1 /* |
|
2 * Copyright (c) 2006-2006 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: All file container data functions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 #ifndef XMLENGINE_FILECONTAINER_H_INCLUDED |
|
25 #define XMLENGINE_FILECONTAINER_H_INCLUDED |
|
26 |
|
27 #include "xmlengdatacontainer.h" |
|
28 |
|
29 class RFile; |
|
30 |
|
31 |
|
32 |
|
33 /** |
|
34 * Instance of TXmlEngFileContainer class represents data stored in RFile in DOM tree |
|
35 * |
|
36 * RFile container is treated in general as text nodes in DOM tree. |
|
37 * Some of the fields in xmlNode structure are reused in order to save memory. |
|
38 * Data is stored in file system referenced to by RFile handle. |
|
39 * |
|
40 * Sample code for creating filecontainer: |
|
41 * @code |
|
42 * RXmlEngDOMImplementation domImpl; |
|
43 * domImpl.OpenL(); ///< opening DOM implementation object |
|
44 * RXmlEngDocument iDoc; |
|
45 * ///< create document element |
|
46 * TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc")); |
|
47 * ///< create file container from file (file1 is an RFile object) and CID equals cid |
|
48 * TXmlEngFileContainer binData = iDoc.CreateFileContainerL(cid, file1); |
|
49 * elem.AppendChildL(binData); ///< append container to the dom tree |
|
50 * iDoc.Close(); ///< closing all opened objects |
|
51 * domImpl.Close(); |
|
52 * @endcode |
|
53 * |
|
54 * @lib XmlEngineDOM.lib |
|
55 * @since S60 v3.2 |
|
56 */ |
|
57 class TXmlEngFileContainer : public TXmlEngDataContainer |
|
58 { |
|
59 public: |
|
60 /** |
|
61 * Get RFile reference |
|
62 * |
|
63 * @since S60 v3.2 |
|
64 * @return RFile reference |
|
65 * |
|
66 */ |
|
67 IMPORT_C RFile& File() const; |
|
68 |
|
69 protected: |
|
70 /** |
|
71 * Default constructor |
|
72 * |
|
73 * @since S60 v3.1 |
|
74 */ |
|
75 inline TXmlEngFileContainer(); |
|
76 |
|
77 /** |
|
78 * Constructor |
|
79 * |
|
80 * @since S60 v3.1 |
|
81 * @param aInternal node pointer |
|
82 */ |
|
83 inline TXmlEngFileContainer(void* aInternal); |
|
84 }; |
|
85 |
|
86 |
|
87 |
|
88 #include "xmlengfilecontainer.inl" |
|
89 |
|
90 #endif /* XMLENGINE_FILECONTAINER_H_INCLUDED */ |