60 <li id="GUID-609612CB-E684-5BDA-88FC-16FFB71D70C2"><p> <xref href="GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6.dita#GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6/GUID-71DC7464-0EF0-5F78-816E-24F73F5FCA12">Exclusive access</xref>, </p> </li> |
60 <li id="GUID-609612CB-E684-5BDA-88FC-16FFB71D70C2"><p> <xref href="GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6.dita#GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6/GUID-71DC7464-0EF0-5F78-816E-24F73F5FCA12">Exclusive access</xref>, </p> </li> |
61 <li id="GUID-665C36D1-DDD3-5DA4-86A3-574DFDC38AFF"><p> <xref href="GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6.dita#GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6/GUID-9C152BE3-9113-5A0C-8EE2-81ADD09BEAD2">Intercepting requests to the ROM drive</xref>, </p> </li> |
61 <li id="GUID-665C36D1-DDD3-5DA4-86A3-574DFDC38AFF"><p> <xref href="GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6.dita#GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6/GUID-9C152BE3-9113-5A0C-8EE2-81ADD09BEAD2">Intercepting requests to the ROM drive</xref>, </p> </li> |
62 <li id="GUID-F06D0F56-40AA-5631-9686-BA955E8E263B"><p> <xref href="GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6.dita#GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6/GUID-AA3990F3-52AB-5B14-8ED4-50CCA824AF84">Preventing deadlock</xref>. </p> </li> |
62 <li id="GUID-F06D0F56-40AA-5631-9686-BA955E8E263B"><p> <xref href="GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6.dita#GUID-DEF3B8B3-5BD7-505B-93F9-A20CE00FFAE6/GUID-AA3990F3-52AB-5B14-8ED4-50CCA824AF84">Preventing deadlock</xref>. </p> </li> |
63 </ul> <p>The diagram below shows how plugins fit into the File Server software |
63 </ul> <p>The diagram below shows how plugins fit into the File Server software |
64 stack. </p> <fig id="GUID-EF5AECEC-9CB0-54B0-B6D2-46266B5FF49E"> |
64 stack. </p> <fig id="GUID-EF5AECEC-9CB0-54B0-B6D2-46266B5FF49E"> |
65 <image href="GUID-9A4543B3-2A79-5604-AE11-5087507C6755_d0e363939_href.png" placement="inline"/> |
65 <image href="GUID-9A4543B3-2A79-5604-AE11-5087507C6755_d0e369788_href.png" placement="inline"/> |
66 </fig> <p> <b>Note</b>: more than one plugin can be loaded into the file server |
66 </fig> <p> <b>Note</b>: more than one plugin can be loaded into the file server |
67 at the same time. A plugin is not aware of other plugins. </p> <p id="GUID-3D91570E-8939-557B-8E1E-3A3C5BD27A26"><b> Threads and execution context</b> </p> <p>The |
67 at the same time. A plugin is not aware of other plugins. </p> <p id="GUID-3D91570E-8939-557B-8E1E-3A3C5BD27A26"><b> Threads and execution context</b> </p> <p>The |
68 Symbian platform File Server has multiple threads. There is a thread for each |
68 Symbian platform File Server has multiple threads. There is a thread for each |
69 drive in use and a main thread that receives the requests from clients and |
69 drive in use and a main thread that receives the requests from clients and |
70 sends them to the drive threads. Synchronous drives, however, do not have |
70 sends them to the drive threads. Synchronous drives, however, do not have |
92 one plugin was present. </p> <p>The diagram below shows two plugins in the |
92 one plugin was present. </p> <p>The diagram below shows two plugins in the |
93 pre v9.5 framework. If both plugins issue new file server requests and if |
93 pre v9.5 framework. If both plugins issue new file server requests and if |
94 the plugins are not re-entrant safe this can lead to deadlock in the file |
94 the plugins are not re-entrant safe this can lead to deadlock in the file |
95 server. </p> <fig id="GUID-01A69E82-BF01-520A-A8C5-927F1ED85E04"> |
95 server. </p> <fig id="GUID-01A69E82-BF01-520A-A8C5-927F1ED85E04"> |
96 <title> File server deadlock </title> |
96 <title> File server deadlock </title> |
97 <image href="GUID-9CC5E096-74FB-59AB-BAB9-A5486B961B7D_d0e364015_href.png" placement="inline"/> |
97 <image href="GUID-9CC5E096-74FB-59AB-BAB9-A5486B961B7D_d0e369864_href.png" placement="inline"/> |
98 </fig> <p>The framework introduced in v9.5 prevents deadlock by allowing plugins |
98 </fig> <p>The framework introduced in v9.5 prevents deadlock by allowing plugins |
99 to issue internal file server requests after intercepting a request by using |
99 to issue internal file server requests after intercepting a request by using |
100 the newly introduced <xref href="GUID-3C50CF63-9AF4-3F36-8B8F-3FBB613E1CAC.dita"><apiname>RFilePlugin</apiname></xref>, <xref href="GUID-2E871434-D08F-3275-AC55-260A9A78661A.dita"><apiname>RDirPlugin</apiname></xref> and <xref href="GUID-DE8D8017-6E9C-38CE-A023-98A53CDF7152.dita"><apiname>RFsPlugin</apiname></xref> APIs |
100 the newly introduced <xref href="GUID-3C50CF63-9AF4-3F36-8B8F-3FBB613E1CAC.dita"><apiname>RFilePlugin</apiname></xref>, <xref href="GUID-2E871434-D08F-3275-AC55-260A9A78661A.dita"><apiname>RDirPlugin</apiname></xref> and <xref href="GUID-DE8D8017-6E9C-38CE-A023-98A53CDF7152.dita"><apiname>RFsPlugin</apiname></xref> APIs |
101 and not by using the <xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita"><apiname>RFs</apiname></xref>, <xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita"><apiname>RFile</apiname></xref> and <xref href="GUID-12AE154F-7741-38C0-ADFE-9784FCF5E516.dita"><apiname>RDir</apiname></xref> APIs. |
101 and not by using the <xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita"><apiname>RFs</apiname></xref>, <xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita"><apiname>RFile</apiname></xref> and <xref href="GUID-12AE154F-7741-38C0-ADFE-9784FCF5E516.dita"><apiname>RDir</apiname></xref> APIs. |
102 Internally issued requests are only dispatched to plugins mounted below the |
102 Internally issued requests are only dispatched to plugins mounted below the |
103 issuing plugin and the appropriate drive thread. </p> <p>The sequence of events |
103 issuing plugin and the appropriate drive thread. </p> <p>The sequence of events |
104 for a typical plugin intercepting a file read request is illustrated below: </p> <fig id="GUID-E366027F-3112-520F-A118-4C048102749E"> |
104 for a typical plugin intercepting a file read request is illustrated below: </p> <fig id="GUID-E366027F-3112-520F-A118-4C048102749E"> |
105 <title> Read request intercepted by a plugin |
105 <title> Read request intercepted by a plugin |
106 </title> |
106 </title> |
107 <image href="GUID-2ABCF233-7DCC-59E2-B075-81E148A1D2AB_d0e364053_href.png" placement="inline"/> |
107 <image href="GUID-2ABCF233-7DCC-59E2-B075-81E148A1D2AB_d0e369902_href.png" placement="inline"/> |
108 </fig> <p>The classes <xref href="GUID-3C50CF63-9AF4-3F36-8B8F-3FBB613E1CAC.dita"><apiname>RFilePlugin</apiname></xref>, <xref href="GUID-2E871434-D08F-3275-AC55-260A9A78661A.dita"><apiname>RDirPlugin</apiname></xref> and <xref href="GUID-DE8D8017-6E9C-38CE-A023-98A53CDF7152.dita"><apiname>RFsPlugin</apiname></xref> have |
108 </fig> <p>The classes <xref href="GUID-3C50CF63-9AF4-3F36-8B8F-3FBB613E1CAC.dita"><apiname>RFilePlugin</apiname></xref>, <xref href="GUID-2E871434-D08F-3275-AC55-260A9A78661A.dita"><apiname>RDirPlugin</apiname></xref> and <xref href="GUID-DE8D8017-6E9C-38CE-A023-98A53CDF7152.dita"><apiname>RFsPlugin</apiname></xref> have |
109 been introduced to facilitate plugins with direct access behaviour on file |
109 been introduced to facilitate plugins with direct access behaviour on file |
110 and directory requests. These classes are analogous to the client-side <xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita"><apiname>RFile</apiname></xref>, <xref href="GUID-12AE154F-7741-38C0-ADFE-9784FCF5E516.dita"><apiname>RDir</apiname></xref> and <xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita"><apiname>RFs</apiname></xref> classes and have functions with similar or identical signitures. </p> <p>In |
110 and directory requests. These classes are analogous to the client-side <xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita"><apiname>RFile</apiname></xref>, <xref href="GUID-12AE154F-7741-38C0-ADFE-9784FCF5E516.dita"><apiname>RDir</apiname></xref> and <xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita"><apiname>RFs</apiname></xref> classes and have functions with similar or identical signitures. </p> <p>In |
111 order to perform requests on a file it is necessary to open a sub-session |
111 order to perform requests on a file it is necessary to open a sub-session |
112 by calling either <xref href="GUID-EC8FDB25-3DD7-3F1C-9875-0FA9315AE9AC.dita"><apiname>AdoptFromClient()</apiname></xref> or <xref href="GUID-20D0D10F-3401-3F72-8AF6-DC35F6025DC2.dita"><apiname>Open()</apiname></xref>. <codeph>AdoptFromClient()</codeph> is |
112 by calling either <xref href="GUID-EC8FDB25-3DD7-3F1C-9875-0FA9315AE9AC.dita"><apiname>AdoptFromClient()</apiname></xref> or <xref href="GUID-20D0D10F-3401-3F72-8AF6-DC35F6025DC2.dita"><apiname>Open()</apiname></xref>. <codeph>AdoptFromClient()</codeph> is |
182 time. This absolute position is the index in the internal array of plugins |
182 time. This absolute position is the index in the internal array of plugins |
183 in which the plugin should be mounted. The plugin at position 0 being the |
183 in which the plugin should be mounted. The plugin at position 0 being the |
184 first plugin to be able to intercept requests. </p> <fig id="GUID-41EB2F58-407F-52C7-A40C-0E3858CF718B"> |
184 first plugin to be able to intercept requests. </p> <fig id="GUID-41EB2F58-407F-52C7-A40C-0E3858CF718B"> |
185 <title> Plugin stack showing absolute positions |
185 <title> Plugin stack showing absolute positions |
186 </title> |
186 </title> |
187 <image href="GUID-64BDD1DA-6B93-5F45-8CBD-7DBAF92CC4C7_d0e364179_href.png" placement="inline"/> |
187 <image href="GUID-64BDD1DA-6B93-5F45-8CBD-7DBAF92CC4C7_d0e370028_href.png" placement="inline"/> |
188 </fig> <p>The absolute position method is more appropriate for mounting plugins |
188 </fig> <p>The absolute position method is more appropriate for mounting plugins |
189 that operate regardless of their position in the plugin stack or when all |
189 that operate regardless of their position in the plugin stack or when all |
190 of the plugins for a device are known and installed when manufactured. This |
190 of the plugins for a device are known and installed when manufactured. This |
191 method does not suit plugins that are added after manufacture where the dependencies |
191 method does not suit plugins that are added after manufacture where the dependencies |
192 of other available plugins is not known. If this is the case use the unique |
192 of other available plugins is not known. If this is the case use the unique |