43 mechanism used by the archive. See <xref href="GUID-B5CC77D2-5871-51D8-B359-77EFC081B423.dita">Files |
43 mechanism used by the archive. See <xref href="GUID-B5CC77D2-5871-51D8-B359-77EFC081B423.dita">Files |
44 Containing Multiple Content Objects</xref> for more information. </p> <p>The |
44 Containing Multiple Content Objects</xref> for more information. </p> <p>The |
45 following diagram is an example of a content file. The same diagram is used |
45 following diagram is an example of a content file. The same diagram is used |
46 in the procedure to illustrate the implementation of Consumer API. </p> <fig id="GUID-BA86F65C-C34B-57C3-8FD5-A76C61EDF035"> |
46 in the procedure to illustrate the implementation of Consumer API. </p> <fig id="GUID-BA86F65C-C34B-57C3-8FD5-A76C61EDF035"> |
47 <title> Example content file </title> |
47 <title> Example content file </title> |
48 <image href="GUID-1467745D-7C3F-52EC-8C1E-7E2F505B7313_d0e616857_href.png" placement="inline"/> |
48 <image href="GUID-1467745D-7C3F-52EC-8C1E-7E2F505B7313_d0e588963_href.png" placement="inline"/> |
49 </fig> </section> |
49 </fig> </section> |
50 <section><title>Procedure</title> <ol id="GUID-FE716629-86BE-513F-82F5-89107FB41F0E"> |
50 <section><title>Procedure</title> <ol id="GUID-FE716629-86BE-513F-82F5-89107FB41F0E"> |
51 <li id="GUID-BD7166E0-7D9C-5F55-9DF3-1DE17AEBB80B"><p><xref href="GUID-09A760FD-4C2A-5F79-91F2-DCC25A63699C.dita#GUID-09A760FD-4C2A-5F79-91F2-DCC25A63699C/GUID-09F7434B-318B-5084-8E8B-54FA0ED48031">Create a content object</xref>. </p> </li> |
51 <li id="GUID-BD7166E0-7D9C-5F55-9DF3-1DE17AEBB80B"><p><xref href="GUID-09A760FD-4C2A-5F79-91F2-DCC25A63699C.dita#GUID-09A760FD-4C2A-5F79-91F2-DCC25A63699C/GUID-09F7434B-318B-5084-8E8B-54FA0ED48031">Create a content object</xref>. </p> </li> |
52 <li id="GUID-2BADD3D3-D167-5212-942C-3A3CF4B7D25F"><p>Perform one or more |
52 <li id="GUID-2BADD3D3-D167-5212-942C-3A3CF4B7D25F"><p>Perform one or more |
53 of the following tasks as per your requirement: </p> <ul> |
53 of the following tasks as per your requirement: </p> <ul> |
82 This top level container concept applies to all files, regardless of how many |
82 This top level container concept applies to all files, regardless of how many |
83 content or container objects are inside. </p> <p>Even a content file such |
83 content or container objects are inside. </p> <p>Even a content file such |
84 as a jpeg image is a container, it's just that the file only has the <codeph>"DEFAULT"</codeph> object |
84 as a jpeg image is a container, it's just that the file only has the <codeph>"DEFAULT"</codeph> object |
85 embedded inside. </p> <p>So, when the example file shown earlier is opened, |
85 embedded inside. </p> <p>So, when the example file shown earlier is opened, |
86 the following objects can be seen by the <xref href="GUID-EF3C33C0-F02E-3C35-B289-3800631EDC3A.dita"><apiname>CContent</apiname></xref>: </p> <fig id="GUID-EC064DCF-FC5D-59AC-BF5F-378A57808A47"> |
86 the following objects can be seen by the <xref href="GUID-EF3C33C0-F02E-3C35-B289-3800631EDC3A.dita"><apiname>CContent</apiname></xref>: </p> <fig id="GUID-EC064DCF-FC5D-59AC-BF5F-378A57808A47"> |
87 <image href="GUID-518FC822-AF10-57E8-990E-BB03C2D6ACBE_d0e617030_href.png" placement="inline"/> |
87 <image href="GUID-518FC822-AF10-57E8-990E-BB03C2D6ACBE_d0e589136_href.png" placement="inline"/> |
88 </fig> <p>In this top level container, there is only one embedded content |
88 </fig> <p>In this top level container, there is only one embedded content |
89 object visible (the <filepath>.jpg</filepath> file) and two embedded container |
89 object visible (the <filepath>.jpg</filepath> file) and two embedded container |
90 objects. </p> <codeblock id="GUID-87F01EE6-EDEC-584B-844C-1DDB939FB5B3" xml:space="preserve">// Create an array to store the results of CContent::GetEmbeddedObjectsL() |
90 objects. </p> <codeblock id="GUID-87F01EE6-EDEC-584B-844C-1DDB939FB5B3" xml:space="preserve">// Create an array to store the results of CContent::GetEmbeddedObjectsL() |
91 RStreamablePtrArray<CEmbeddedObject> myArray; |
91 RStreamablePtrArray<CEmbeddedObject> myArray; |
92 CleanupClosePushL(myArray); |
92 CleanupClosePushL(myArray); |
116 TPtrC UniqueId = myArray[0]->UniqueId() |
116 TPtrC UniqueId = myArray[0]->UniqueId() |
117 |
117 |
118 // Open the first container |
118 // Open the first container |
119 content->OpenContainer(UniqueId);</codeblock> <p>Now <xref href="GUID-EF3C33C0-F02E-3C35-B289-3800631EDC3A.dita"><apiname>CContent</apiname></xref> can |
119 content->OpenContainer(UniqueId);</codeblock> <p>Now <xref href="GUID-EF3C33C0-F02E-3C35-B289-3800631EDC3A.dita"><apiname>CContent</apiname></xref> can |
120 see the contents of Container 1: </p> <fig id="GUID-2A67C29A-FBF3-553E-B653-462F5128B2F4"> |
120 see the contents of Container 1: </p> <fig id="GUID-2A67C29A-FBF3-553E-B653-462F5128B2F4"> |
121 <image href="GUID-DC7E3634-9762-542F-BDAE-AC1F2D03F55D_d0e617079_href.png" placement="inline"/> |
121 <image href="GUID-DC7E3634-9762-542F-BDAE-AC1F2D03F55D_d0e589185_href.png" placement="inline"/> |
122 </fig> <p>At this point, listing the objects that <xref href="GUID-EF3C33C0-F02E-3C35-B289-3800631EDC3A.dita"><apiname>CContent</apiname></xref> can |
122 </fig> <p>At this point, listing the objects that <xref href="GUID-EF3C33C0-F02E-3C35-B289-3800631EDC3A.dita"><apiname>CContent</apiname></xref> can |
123 see gives six MP3 files and one container object. </p> <codeblock id="GUID-F1A7C149-9AB1-5DD2-BE20-280431DBAF40" xml:space="preserve">// Get the embedded content objects in the current container |
123 see gives six MP3 files and one container object. </p> <codeblock id="GUID-F1A7C149-9AB1-5DD2-BE20-280431DBAF40" xml:space="preserve">// Get the embedded content objects in the current container |
124 content->GetEmbeddedObjectsL(myArray, EContentObject); |
124 content->GetEmbeddedObjectsL(myArray, EContentObject); |
125 |
125 |
126 i = myArray.Count(); // Six content objects |
126 i = myArray.Count(); // Six content objects |
264 |
264 |
265 // Get the number of container objects in the current container |
265 // Get the number of container objects in the current container |
266 content->GetEmbeddedObjectsL(myArray, EContainerObject); |
266 content->GetEmbeddedObjectsL(myArray, EContainerObject); |
267 i = myArray.Count(); // One container object |
267 i = myArray.Count(); // One container object |
268 myArray.ResetAndDestroy();</codeblock> <fig id="GUID-F3A1B237-A07C-5AE7-82F1-5DAA3BA65553"> |
268 myArray.ResetAndDestroy();</codeblock> <fig id="GUID-F3A1B237-A07C-5AE7-82F1-5DAA3BA65553"> |
269 <image href="GUID-DC7E3634-9762-542F-BDAE-AC1F2D03F55D_d0e617387_href.png" placement="inline"/> |
269 <image href="GUID-DC7E3634-9762-542F-BDAE-AC1F2D03F55D_d0e589493_href.png" placement="inline"/> |
270 </fig> </section> |
270 </fig> </section> |
271 </conbody></concept> |
271 </conbody></concept> |