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