shaka-packager/docs/d2/d4d/file_8h_source.html

103 lines
30 KiB
HTML
Raw Normal View History

<!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"/>
2018-02-10 23:37:42 +00:00
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Shaka Packager SDK: packager/file/file.h Source File</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"/>
2018-02-10 23:37:42 +00:00
<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" />
</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;">
2018-02-10 23:37:42 +00:00
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Shaka Packager SDK
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
2018-02-10 23:37:42 +00:00
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
2018-02-10 23:37:42 +00:00
<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)">
2018-02-10 23:37:42 +00:00
</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="../../dir_3f8eec2fc361645de4b1ec14c19fffc7.html">packager</a></li><li class="navelem"><a class="el" href="../../dir_d258fb6e36cbaad69b44b6c9489b2bbb.html">file</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">file.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2014 Google Inc. All rights reserved.</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// Use of this source code is governed by a BSD-style</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// license that can be found in the LICENSE file or at</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// https://developers.google.com/open-source/licenses/bsd</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#ifndef PACKAGER_FILE_FILE_H_</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#define PACKAGER_FILE_FILE_H_</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &quot;packager/base/macros.h&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#include &quot;packager/file/public/buffer_callback_params.h&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="keyword">namespace </span><a class="code" href="../../d8/daf/namespaceshaka.html">shaka</a> {</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* kCallbackFilePrefix;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* kLocalFilePrefix;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* kMemoryFilePrefix;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* kUdpFilePrefix;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="keyword">const</span> int64_t kWholeFile = -1;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="../../d3/d73/classshaka_1_1File.html"> 26</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d3/d73/classshaka_1_1File.html">File</a> {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keyword">static</span> <a class="code" href="../../d3/d73/classshaka_1_1File.html">File</a>* <a class="code" href="../../d3/d73/classsh
<div class="ttc" id="classshaka_1_1File_html_a383c9f670511961f334569fd1a7a103b"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a383c9f670511961f334569fd1a7a103b">shaka::File::Delete</a></div><div class="ttdeci">static bool Delete(const char *file_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00198">file.cc:198</a></div></div>
<div class="ttc" id="classshaka_1_1File_html"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html">shaka::File</a></div><div class="ttdoc">Define an abstract file interface. </div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d4d/file_8h_source.html#l00026">file.h:26</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a8eb71689f5456ba0b1a401c57386caaf"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a8eb71689f5456ba0b1a401c57386caaf">shaka::File::IsLocalRegularFile</a></div><div class="ttdeci">static bool IsLocalRegularFile(const char *file_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00354">file.cc:354</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_af2cbec5c6dc1c97ada010acd83b9728a"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#af2cbec5c6dc1c97ada010acd83b9728a">shaka::File::Copy</a></div><div class="ttdeci">static bool Copy(const char *from_file_name, const char *to_file_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00281">file.cc:281</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a85633ec9f051eb9f32b07ff7e7740d1c"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a85633ec9f051eb9f32b07ff7e7740d1c">shaka::File::CopyFile</a></div><div class="ttdeci">static int64_t CopyFile(File *source, File *destination)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00316">file.cc:316</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_ac9a19cb5fc45664ca440996bf1201c30"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#ac9a19cb5fc45664ca440996bf1201c30">shaka::File::ReadFileToString</a></div><div class="ttdeci">static bool ReadFileToString(const char *file_name, std::string *contents)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00216">file.cc:216</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a6e1ecb2904b609554d332290f20fde0a"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a6e1ecb2904b609554d332290f20fde0a">shaka::File::Read</a></div><div class="ttdeci">virtual int64_t Read(void *buffer, uint64_t length)=0</div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="classshaka_1_1File_html_a4b06e08bb0295cb89fca45f9356ecbae"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a4b06e08bb0295cb89fca45f9356ecbae">shaka::File::file_name</a></div><div class="ttdeci">const std::string &amp; file_name() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d4d/file_8h_source.html#l00094">file.h:94</a></div></div>
<div class="ttc" id="classshaka_1_1ThreadedIoFile_html"><div class="ttname"><a href="../../dd/d0c/classshaka_1_1ThreadedIoFile.html">shaka::ThreadedIoFile</a></div><div class="ttdoc">Declaration of class which implements a thread-safe circular buffer. </div><div class="ttdef"><b>Definition:</b> <a href="../../d2/da6/threaded__io__file_8h_source.html#l00020">threaded_io_file.h:20</a></div></div>
2018-02-10 23:37:42 +00:00
<div class="ttc" id="namespaceshaka_html"><div class="ttname"><a href="../../d8/daf/namespaceshaka.html">shaka</a></div><div class="ttdoc">All the methods that are virtual are virtual for mocking. </div><div class="ttdef"><b>Definition:</b> <a href="../../d4/d15/gflags__hex__bytes_8cc_source.html#l00011">gflags_hex_bytes.cc:11</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_ac978d5c0585850d4d9948fdf39b33292"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#ac978d5c0585850d4d9948fdf39b33292">shaka::File::GetFileSize</a></div><div class="ttdeci">static int64_t GetFileSize(const char *file_name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00207">file.cc:207</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a07ae6476e88dab6c0cd9d8c0073b667d"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a07ae6476e88dab6c0cd9d8c0073b667d">shaka::File::Tell</a></div><div class="ttdeci">virtual bool Tell(uint64_t *position)=0</div></div>
<div class="ttc" id="classshaka_1_1File_html_a932666ed1d6a565bf387a9d8b39a8948"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a932666ed1d6a565bf387a9d8b39a8948">shaka::File::Close</a></div><div class="ttdeci">virtual bool Close()=0</div></div>
<div class="ttc" id="classshaka_1_1File_html_a5fa625751e03b9e7652ba1bfa98b8ca4"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a5fa625751e03b9e7652ba1bfa98b8ca4">shaka::File::Flush</a></div><div class="ttdeci">virtual bool Flush()=0</div></div>
<div class="ttc" id="classshaka_1_1File_html_aeb98b64a05f141140e110170bef1bc55"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#aeb98b64a05f141140e110170bef1bc55">shaka::File::Size</a></div><div class="ttdeci">virtual int64_t Size()=0</div></div>
<div class="ttc" id="classshaka_1_1File_html_a483ce187d628385d342748315d72f8ab"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a483ce187d628385d342748315d72f8ab">shaka::File::WriteStringToFile</a></div><div class="ttdeci">static bool WriteStringToFile(const char *file_name, const std::string &amp;contents)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00234">file.cc:234</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a486bda715b58b1a1863fbfc8d48da62a"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a486bda715b58b1a1863fbfc8d48da62a">shaka::File::Seek</a></div><div class="ttdeci">virtual bool Seek(uint64_t position)=0</div></div>
<div class="ttc" id="classshaka_1_1File_html_a7a90ebd27f7728a7075cf3ba97396cae"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a7a90ebd27f7728a7075cf3ba97396cae">shaka::File::MakeCallbackFileName</a></div><div class="ttdeci">static std::string MakeCallbackFileName(const BufferCallbackParams &amp;callback_params, const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00379">file.cc:379</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a0a50526352bd6e946c4f33d3e8431b2d"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a0a50526352bd6e946c4f33d3e8431b2d">shaka::File::OpenWithNoBuffering</a></div><div class="ttdeci">static File * OpenWithNoBuffering(const char *file_name, const char *mode)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00187">file.cc:187</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a92d1a67d1560a5290eb36447c50fabf9"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a92d1a67d1560a5290eb36447c50fabf9">shaka::File::~File</a></div><div class="ttdeci">virtual ~File()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d4d/file_8h_source.html#l00174">file.h:174</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a4b5280fe058359b5991037f90dde2b77"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a4b5280fe058359b5991037f90dde2b77">shaka::File::WriteFileAtomically</a></div><div class="ttdeci">static bool WriteFileAtomically(const char *file_name, const std::string &amp;contents)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00262">file.cc:262</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_ae87642f9661588e47479721cd101bf7d"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#ae87642f9661588e47479721cd101bf7d">shaka::File::ParseCallbackFileName</a></div><div class="ttdeci">static bool ParseCallbackFileName(const std::string &amp;callback_file_name, const BufferCallbackParams **callback_params, std::string *name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/dfc/file_8cc_source.html#l00389">file.cc:389</a></div></div>
<div class="ttc" id="classshaka_1_1File_html_a68a15f623c2a1601879f291f93a1f464"><div class="ttname"><a href="../../d3/d73/classshaka_1_1File.html#a68a15f623c2a1601879f291f93a1f464">shaka::File::Open</a></div><div class="ttdeci">virtual bool Open()=0</div><div class="ttdoc">Internal open. Should not be used directly. </div></div>
<div class="ttc" id="structshaka_1_1BufferCallbackParams_html"><div class="ttname"><a href="../../d9/da8/structshaka_1_1BufferCallbackParams.html">shaka::BufferCallbackParams</a></div><div class="ttdoc">Buffer callback params. </div><div class="ttdef"><b>Definition:</b> <a href="../../dc/da3/buffer__callback__params_8h_source.html#l00015">buffer_callback_params.h:15</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jan 21 2020 16:58:50 for Shaka Packager SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
2018-02-10 23:37:42 +00:00
</a> 1.8.13
</small></address>
</body>
</html>