<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.12"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Crashpad: crashpad::FileSeekerInterface Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="crashpad_doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Crashpad </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.12 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); </script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1FileSeekerInterface.html">FileSeekerInterface</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="classcrashpad_1_1FileSeekerInterface-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">crashpad::FileSeekerInterface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div> </div><!--header--> <div class="contents"> <p>An interface to seek in files and other file-like objects with semantics matching the underlying platform (POSIX or Windows). <a href="classcrashpad_1_1FileSeekerInterface.html#details">More...</a></p> <p><code>#include "util/file/file_seeker.h"</code></p> <div class="dynheader"> Inheritance diagram for crashpad::FileSeekerInterface:</div> <div class="dyncontent"> <div class="center"> <img src="classcrashpad_1_1FileSeekerInterface.png" usemap="#crashpad::FileSeekerInterface_map" alt=""/> <map id="crashpad::FileSeekerInterface_map" name="crashpad::FileSeekerInterface_map"> <area href="classcrashpad_1_1FileReaderInterface.html" title="An interface to read to files and other file-like objects with semantics matching the underlying plat..." alt="crashpad::FileReaderInterface" shape="rect" coords="352,56,577,80"/> <area href="classcrashpad_1_1FileWriterInterface.html" title="An interface to write to files and other file-like objects with semantics matching the underlying pla..." alt="crashpad::FileWriterInterface" shape="rect" coords="1175,56,1400,80"/> <area href="classcrashpad_1_1FileReader.html" title="A file reader implementation that wraps traditional system file operations on files accessed through ..." alt="crashpad::FileReader" shape="rect" coords="0,112,225,136"/> <area href="classcrashpad_1_1StringFile.html" title="A file reader and writer backed by a virtual file, as opposed to a file on disk or other operating sy..." alt="crashpad::StringFile" shape="rect" coords="235,112,460,136"/> <area href="classcrashpad_1_1WeakFileHandleFileReader.html" title="A file reader backed by a FileHandle. " alt="crashpad::WeakFileHandleFileReader" shape="rect" coords="470,112,695,136"/> <area href="classcrashpad_1_1WeakStdioFileReader.html" title="A file reader backed by a standard input/output FILE*. " alt="crashpad::WeakStdioFileReader" shape="rect" coords="705,112,930,136"/> <area href="classcrashpad_1_1FileWriter.html" title="A file writer implementation that wraps traditional system file operations on files accessed through ..." alt="crashpad::FileWriter" shape="rect" coords="940,112,1165,136"/> <area href="classcrashpad_1_1StringFile.html" title="A file reader and writer backed by a virtual file, as opposed to a file on disk or other operating sy..." alt="crashpad::StringFile" shape="rect" coords="1175,112,1400,136"/> <area href="classcrashpad_1_1WeakFileHandleFileWriter.html" title="A file writer backed by a FileHandle. " alt="crashpad::WeakFileHandleFileWriter" shape="rect" coords="1410,112,1635,136"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a8d56f7d12dfcce3e4a39ad1524302aa1"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1FileSeekerInterface.html#a8d56f7d12dfcce3e4a39ad1524302aa1">Seek</a> (<a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> offset, int whence)=0</td></tr> <tr class="memdesc:a8d56f7d12dfcce3e4a39ad1524302aa1"><td class="mdescLeft"> </td><td class="mdescRight">Wraps <a class="el" href="namespacecrashpad.html#a3d6cedc10e24145d4a0c1000c33f8a10" title="Wraps lseek() or SetFilePointerEx(). Logs an error if the operation fails. ">LoggingSeekFile()</a> or provides an alternate implementation with identical semantics. <a href="#a8d56f7d12dfcce3e4a39ad1524302aa1">More...</a><br /></td></tr> <tr class="separator:a8d56f7d12dfcce3e4a39ad1524302aa1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a49a884bfb0a61461b0291c975aa15382"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1FileSeekerInterface.html#a49a884bfb0a61461b0291c975aa15382">SeekGet</a> ()</td></tr> <tr class="memdesc:a49a884bfb0a61461b0291c975aa15382"><td class="mdescLeft"> </td><td class="mdescRight">Wraps <a class="el" href="classcrashpad_1_1FileSeekerInterface.html#a8d56f7d12dfcce3e4a39ad1524302aa1" title="Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. ">Seek()</a>, using <code>SEEK_CUR</code> to obtain the file’s current position. <a href="#a49a884bfb0a61461b0291c975aa15382">More...</a><br /></td></tr> <tr class="separator:a49a884bfb0a61461b0291c975aa15382"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:add2e1ee642d94c91ef722911e9aee250"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1FileSeekerInterface.html#add2e1ee642d94c91ef722911e9aee250">SeekSet</a> (<a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> offset)</td></tr> <tr class="memdesc:add2e1ee642d94c91ef722911e9aee250"><td class="mdescLeft"> </td><td class="mdescRight">Wraps <a class="el" href="classcrashpad_1_1FileSeekerInterface.html#a8d56f7d12dfcce3e4a39ad1524302aa1" title="Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. ">Seek()</a>, using <code>SEEK_SET</code>, ensuring that the seek succeeded and the file is positioned as desired. <a href="#add2e1ee642d94c91ef722911e9aee250">More...</a><br /></td></tr> <tr class="separator:add2e1ee642d94c91ef722911e9aee250"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>An interface to seek in files and other file-like objects with semantics matching the underlying platform (POSIX or Windows). </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="a8d56f7d12dfcce3e4a39ad1524302aa1"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8d56f7d12dfcce3e4a39ad1524302aa1">§ </a></span>Seek()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> crashpad::FileSeekerInterface::Seek </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> </td> <td class="paramname"><em>offset</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>whence</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Wraps <a class="el" href="namespacecrashpad.html#a3d6cedc10e24145d4a0c1000c33f8a10" title="Wraps lseek() or SetFilePointerEx(). Logs an error if the operation fails. ">LoggingSeekFile()</a> or provides an alternate implementation with identical semantics. </p> <dl class="section return"><dt>Returns</dt><dd>The return value of <a class="el" href="namespacecrashpad.html#a3d6cedc10e24145d4a0c1000c33f8a10" title="Wraps lseek() or SetFilePointerEx(). Logs an error if the operation fails. ">LoggingSeekFile()</a>. <code>-1</code> on failure, with an error message logged. </dd></dl> <p>Implemented in <a class="el" href="classcrashpad_1_1WeakStdioFileReader.html#aadfb883a076615e7f6c2b4e4f29ce3a5">crashpad::WeakStdioFileReader</a>, <a class="el" href="classcrashpad_1_1FileWriter.html#a2dbaf9ac2c3f1802fea09843127d24e2">crashpad::FileWriter</a>, <a class="el" href="classcrashpad_1_1FileReader.html#aa468e6ee52895d46173aed720230f4b8">crashpad::FileReader</a>, <a class="el" href="classcrashpad_1_1WeakFileHandleFileWriter.html#a98976c8eab56aa6d1e0bfe3e01a87b08">crashpad::WeakFileHandleFileWriter</a>, <a class="el" href="classcrashpad_1_1WeakFileHandleFileReader.html#a8374ad1eb0a03bfb5f36d6a5e8959f98">crashpad::WeakFileHandleFileReader</a>, and <a class="el" href="classcrashpad_1_1StringFile.html#acabb59b99e86bea5949f7a9a47c6dbcc">crashpad::StringFile</a>.</p> </div> </div> <a id="a49a884bfb0a61461b0291c975aa15382"></a> <h2 class="memtitle"><span class="permalink"><a href="#a49a884bfb0a61461b0291c975aa15382">§ </a></span>SeekGet()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> crashpad::FileSeekerInterface::SeekGet </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Wraps <a class="el" href="classcrashpad_1_1FileSeekerInterface.html#a8d56f7d12dfcce3e4a39ad1524302aa1" title="Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. ">Seek()</a>, using <code>SEEK_CUR</code> to obtain the file’s current position. </p> <dl class="section return"><dt>Returns</dt><dd>The file’s current position on success. <code>-1</code> on failure, with an error message logged. </dd></dl> </div> </div> <a id="add2e1ee642d94c91ef722911e9aee250"></a> <h2 class="memtitle"><span class="permalink"><a href="#add2e1ee642d94c91ef722911e9aee250">§ </a></span>SeekSet()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool crashpad::FileSeekerInterface::SeekSet </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> </td> <td class="paramname"><em>offset</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Wraps <a class="el" href="classcrashpad_1_1FileSeekerInterface.html#a8d56f7d12dfcce3e4a39ad1524302aa1" title="Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. ">Seek()</a>, using <code>SEEK_SET</code>, ensuring that the seek succeeded and the file is positioned as desired. </p> <dl class="section return"><dt>Returns</dt><dd><code>true</code> if the operation succeeded, <code>false</code> if it failed, with an error message logged. A failure to reposition the file as desired is treated as a failure. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li>util/file/file_seeker.h</li> <li>util/file/file_seeker.cc</li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.12 </small></address> </body> </html>