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