classRakNet_1_1FileListTransferCBInterface.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>RakNet: RakNet::FileListTransferCBInterface Class Reference</title>
  7. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  8. <script type="text/javascript" src="jquery.js"></script>
  9. <script type="text/javascript" src="dynsections.js"></script>
  10. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  11. </head>
  12. <body>
  13. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  14. <div id="titlearea">
  15. <table cellspacing="0" cellpadding="0">
  16. <tbody>
  17. <tr style="height: 56px;">
  18. <td style="padding-left: 0.5em;">
  19. <div id="projectname">RakNet
  20. &#160;<span id="projectnumber">4.0</span>
  21. </div>
  22. </td>
  23. </tr>
  24. </tbody>
  25. </table>
  26. </div>
  27. <!-- end header part -->
  28. <!-- Generated by Doxygen 1.8.2 -->
  29. <div id="navrow1" class="tabs">
  30. <ul class="tablist">
  31. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  32. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  33. <li><a href="modules.html"><span>Modules</span></a></li>
  34. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  35. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  36. <li><a href="files.html"><span>Files</span></a></li>
  37. </ul>
  38. </div>
  39. <div id="navrow2" class="tabs2">
  40. <ul class="tablist">
  41. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  42. <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
  43. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  44. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  45. </ul>
  46. </div>
  47. <div id="nav-path" class="navpath">
  48. <ul>
  49. <li class="navelem"><a class="el" href="namespaceRakNet.html">RakNet</a></li><li class="navelem"><a class="el" href="classRakNet_1_1FileListTransferCBInterface.html">FileListTransferCBInterface</a></li> </ul>
  50. </div>
  51. </div><!-- top -->
  52. <div class="header">
  53. <div class="summary">
  54. <a href="#pub-methods">Public Member Functions</a> &#124;
  55. <a href="classRakNet_1_1FileListTransferCBInterface-members.html">List of all members</a> </div>
  56. <div class="headertitle">
  57. <div class="title">RakNet::FileListTransferCBInterface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  58. </div><!--header-->
  59. <div class="contents">
  60. <p>Used by <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a> plugin as a callback for when we get a file.
  61. <a href="classRakNet_1_1FileListTransferCBInterface.html#details">More...</a></p>
  62. <p><code>#include &lt;FileListTransferCBInterface.h&gt;</code></p>
  63. <p>Inherited by RakNet::AutopatcherClientCBInterface.</p>
  64. <table class="memberdecls">
  65. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  66. Public Member Functions</h2></td></tr>
  67. <tr class="memitem:ad76acca10f79fc228ab6281a92b0c4a3"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1FileListTransferCBInterface.html#ad76acca10f79fc228ab6281a92b0c4a3">OnFile</a> (OnFileStruct *onFileStruct)=0</td></tr>
  68. <tr class="memdesc:ad76acca10f79fc228ab6281a92b0c4a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Got a file. <a href="#ad76acca10f79fc228ab6281a92b0c4a3"></a><br/></td></tr>
  69. <tr class="separator:ad76acca10f79fc228ab6281a92b0c4a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  70. <tr class="memitem:a2a66bf79748c3d0d84d28704dd65a366"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1FileListTransferCBInterface.html#a2a66bf79748c3d0d84d28704dd65a366">OnFileProgress</a> (FileProgressStruct *fps)=0</td></tr>
  71. <tr class="memdesc:a2a66bf79748c3d0d84d28704dd65a366"><td class="mdescLeft">&#160;</td><td class="mdescRight">Got part of a big file internally in <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a>. <a href="#a2a66bf79748c3d0d84d28704dd65a366"></a><br/></td></tr>
  72. <tr class="separator:a2a66bf79748c3d0d84d28704dd65a366"><td class="memSeparator" colspan="2">&#160;</td></tr>
  73. <tr class="memitem:a9a7baa02f61c5ef154f40ac6b6d77f84"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1FileListTransferCBInterface.html#a9a7baa02f61c5ef154f40ac6b6d77f84">Update</a> (void)</td></tr>
  74. <tr class="memdesc:a9a7baa02f61c5ef154f40ac6b6d77f84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called while the handler is active by <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a>. <a href="#a9a7baa02f61c5ef154f40ac6b6d77f84"></a><br/></td></tr>
  75. <tr class="separator:a9a7baa02f61c5ef154f40ac6b6d77f84"><td class="memSeparator" colspan="2">&#160;</td></tr>
  76. <tr class="memitem:a67a7f0fef54fbaf01651857f7f808805"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1FileListTransferCBInterface.html#a67a7f0fef54fbaf01651857f7f808805">OnDownloadComplete</a> (DownloadCompleteStruct *dcs)</td></tr>
  77. <tr class="memdesc:a67a7f0fef54fbaf01651857f7f808805"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when the download is completed. <a href="#a67a7f0fef54fbaf01651857f7f808805"></a><br/></td></tr>
  78. <tr class="separator:a67a7f0fef54fbaf01651857f7f808805"><td class="memSeparator" colspan="2">&#160;</td></tr>
  79. <tr class="memitem:a968411780da34ca06fc473f1cb4b1e84"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1FileListTransferCBInterface.html#a968411780da34ca06fc473f1cb4b1e84">OnDereference</a> (void)</td></tr>
  80. <tr class="memdesc:a968411780da34ca06fc473f1cb4b1e84"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called when this instance is about to be dereferenced by the <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a> plugin. <a href="#a968411780da34ca06fc473f1cb4b1e84"></a><br/></td></tr>
  81. <tr class="separator:a968411780da34ca06fc473f1cb4b1e84"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. </table>
  83. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  84. <div class="textblock"><p>Used by <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a> plugin as a callback for when we get a file. </p>
  85. <p>You get the last file when fileIndex==numberOfFilesInThisSet </p>
  86. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a> </dd></dl>
  87. </div><h2 class="groupheader">Member Function Documentation</h2>
  88. <a class="anchor" id="a968411780da34ca06fc473f1cb4b1e84"></a>
  89. <div class="memitem">
  90. <div class="memproto">
  91. <table class="mlabels">
  92. <tr>
  93. <td class="mlabels-left">
  94. <table class="memname">
  95. <tr>
  96. <td class="memname">virtual void RakNet::FileListTransferCBInterface::OnDereference </td>
  97. <td>(</td>
  98. <td class="paramtype">void&#160;</td>
  99. <td class="paramname"></td><td>)</td>
  100. <td></td>
  101. </tr>
  102. </table>
  103. </td>
  104. <td class="mlabels-right">
  105. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  106. </tr>
  107. </table>
  108. </div><div class="memdoc">
  109. <p>This function is called when this instance is about to be dereferenced by the <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a> plugin. </p>
  110. <p>Update will no longer be called. It will will be deleted automatically if true was passed to FileListTransfer::SetupReceive::deleteHandler Otherwise it is up to you to delete it yourself. </p>
  111. </div>
  112. </div>
  113. <a class="anchor" id="a67a7f0fef54fbaf01651857f7f808805"></a>
  114. <div class="memitem">
  115. <div class="memproto">
  116. <table class="mlabels">
  117. <tr>
  118. <td class="mlabels-left">
  119. <table class="memname">
  120. <tr>
  121. <td class="memname">virtual bool RakNet::FileListTransferCBInterface::OnDownloadComplete </td>
  122. <td>(</td>
  123. <td class="paramtype">DownloadCompleteStruct *&#160;</td>
  124. <td class="paramname"><em>dcs</em></td><td>)</td>
  125. <td></td>
  126. </tr>
  127. </table>
  128. </td>
  129. <td class="mlabels-right">
  130. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  131. </tr>
  132. </table>
  133. </div><div class="memdoc">
  134. <p>Called when the download is completed. </p>
  135. <p>If you are finished with this class, return false. At that point OnDereference will be called and the class will no longer be maintained by the <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a> plugin. Otherwise return true, and Update will continue to be called. </p>
  136. </div>
  137. </div>
  138. <a class="anchor" id="ad76acca10f79fc228ab6281a92b0c4a3"></a>
  139. <div class="memitem">
  140. <div class="memproto">
  141. <table class="mlabels">
  142. <tr>
  143. <td class="mlabels-left">
  144. <table class="memname">
  145. <tr>
  146. <td class="memname">virtual bool RakNet::FileListTransferCBInterface::OnFile </td>
  147. <td>(</td>
  148. <td class="paramtype">OnFileStruct *&#160;</td>
  149. <td class="paramname"><em>onFileStruct</em></td><td>)</td>
  150. <td></td>
  151. </tr>
  152. </table>
  153. </td>
  154. <td class="mlabels-right">
  155. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  156. </tr>
  157. </table>
  158. </div><div class="memdoc">
  159. <p>Got a file. </p>
  160. <p>This structure is only valid for the duration of this function call. </p>
  161. <dl class="section return"><dt>Returns</dt><dd>Return true to have <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a> delete the memory allocated to hold this file for this function call. </dd></dl>
  162. </div>
  163. </div>
  164. <a class="anchor" id="a2a66bf79748c3d0d84d28704dd65a366"></a>
  165. <div class="memitem">
  166. <div class="memproto">
  167. <table class="mlabels">
  168. <tr>
  169. <td class="mlabels-left">
  170. <table class="memname">
  171. <tr>
  172. <td class="memname">virtual void RakNet::FileListTransferCBInterface::OnFileProgress </td>
  173. <td>(</td>
  174. <td class="paramtype">FileProgressStruct *&#160;</td>
  175. <td class="paramname"><em>fps</em></td><td>)</td>
  176. <td></td>
  177. </tr>
  178. </table>
  179. </td>
  180. <td class="mlabels-right">
  181. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  182. </tr>
  183. </table>
  184. </div><div class="memdoc">
  185. <p>Got part of a big file internally in <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a>. </p>
  186. <p>This is called in one of two circumstances: Either the transport layer is returning ID_PROGRESS_NOTIFICATION, or you got a block via IncrementalReadInterface If the transport layer is returning ID_PROGRESS_NOTIFICATION (see <a class="el" href="classRakNet_1_1RakPeer.html#a35e89d9813d6f6e7f2144a6a0437a33b" title="Controls how often to return ID_DOWNLOAD_PROGRESS for large message downloads.">RakPeer::SetSplitMessageProgressInterval()</a>) then FileProgressStruct::iriDataChunk will be 0. If this is a block via IncrementalReadInterface, then iriDataChunk will point to the block just downloaded. If not using IncrementalReadInterface, then you only care about partCount and partTotal to tell how far the download has progressed. YOu can use firstDataChunk to read the first part of the file if desired. The file is usable when you get the OnFile callback. If using IncrementalReadInterface and you let <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a> buffer the files in memory (default), then it is the same as above. The file is usable when you get the OnFile callback. If using IncrementalReadInterface and you do not let <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a> buffer the files in memory, then set allocateIrIDataChunkAutomatically to false. Write the file to disk whenever you get OnFileProgress and iriDataChunk is not 0, and ignore OnFile. </p>
  187. </div>
  188. </div>
  189. <a class="anchor" id="a9a7baa02f61c5ef154f40ac6b6d77f84"></a>
  190. <div class="memitem">
  191. <div class="memproto">
  192. <table class="mlabels">
  193. <tr>
  194. <td class="mlabels-left">
  195. <table class="memname">
  196. <tr>
  197. <td class="memname">virtual bool RakNet::FileListTransferCBInterface::Update </td>
  198. <td>(</td>
  199. <td class="paramtype">void&#160;</td>
  200. <td class="paramname"></td><td>)</td>
  201. <td></td>
  202. </tr>
  203. </table>
  204. </td>
  205. <td class="mlabels-right">
  206. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  207. </tr>
  208. </table>
  209. </div><div class="memdoc">
  210. <p>Called while the handler is active by <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a>. </p>
  211. <p>Return false when you are done with the class. At that point OnDereference will be called and the class will no longer be maintained by the <a class="el" href="classRakNet_1_1FileListTransfer.html" title="A plugin to provide a simple way to compress and incrementally send the files in the FileList structu...">FileListTransfer</a> plugin. </p>
  212. </div>
  213. </div>
  214. <hr/>The documentation for this class was generated from the following file:<ul>
  215. <li>D:/temp/RakNet_PC/Source/<a class="el" href="FileListTransferCBInterface_8h.html">FileListTransferCBInterface.h</a></li>
  216. </ul>
  217. </div><!-- contents -->
  218. <!-- start footer part -->
  219. <hr class="footer"/><address class="footer"><small>
  220. Generated on Mon Jun 2 2014 20:10:28 for RakNet by &#160;<a href="http://www.doxygen.org/index.html">
  221. <img class="footer" src="doxygen.png" alt="doxygen"/>
  222. </a> 1.8.2
  223. </small></address>
  224. </body>
  225. </html>
粤ICP备19079148号