<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>libzypp: zypp/repo/Downloader.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="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</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;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">libzypp  <span id="projectnumber">17.9.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('Downloader_8h_source.html','');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">Downloader.h</div> </div> </div><!--header--> <div class="contents"> <a href="Downloader_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*---------------------------------------------------------------------\</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">| ____ _ __ __ ___ |</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">| |__ / \ / / . \ . \ |</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">| / / \ V /| _/ _/ |</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">| / /__ | | | | | | |</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">| /_____||_| |_| |_| |</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">| |</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">\---------------------------------------------------------------------*/</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#ifndef ZYPP_REPO_DOWNLOADER</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#define ZYPP_REPO_DOWNLOADER</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "<a class="code" href="Url_8h.html">zypp/Url.h</a>"</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include "<a class="code" href="Pathname_8h.html">zypp/Pathname.h</a>"</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="ProgressData_8h.html">zypp/ProgressData.h</a>"</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="RepoStatus_8h.html">zypp/RepoStatus.h</a>"</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="MediaSetAccess_8h.html">zypp/MediaSetAccess.h</a>"</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="Fetcher_8h.html">zypp/Fetcher.h</a>"</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="RepoInfo_8h.html">zypp/RepoInfo.h</a>"</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="keyword">namespace </span><a class="code" href="namespacezypp.html">zypp</a></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> {</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="keyword">namespace </span>repo</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  {</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classzypp_1_1repo_1_1Downloader.html"> 32</a></span>  <span class="keyword">class </span><a class="code" href="classzypp_1_1repo_1_1Downloader.html">Downloader</a> : <span class="keyword">public</span> <a class="code" href="classzypp_1_1Fetcher.html">Fetcher</a></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="classzypp_1_1repo_1_1Downloader.html#aae61733590d58214a5507dcda5333b9e">Downloader</a>();</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="classzypp_1_1repo_1_1Downloader.html#aae61733590d58214a5507dcda5333b9e">Downloader</a>(<span class="keyword">const</span> <a class="code" href="classzypp_1_1RepoInfo.html">RepoInfo</a> & info);</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keyword">virtual</span> <a class="code" href="classzypp_1_1repo_1_1Downloader.html#a7c87178107352752fafc838d54f386f9">~Downloader</a>();</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classzypp_1_1repo_1_1Downloader.html#a32d1f8b29070810bc6c7a31b403822cc">download</a>( <a class="code" href="namespaceMediaSetAccess.html">MediaSetAccess</a> &media,</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">const</span> <a class="code" href="classzypp_1_1filesystem_1_1Pathname.html">Pathname</a> &dest_dir,</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keyword">const</span> <a class="code" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a> & progress = <a class="code" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a>() );</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keyword">virtual</span> <a class="code" href="classzypp_1_1RepoStatus.html">RepoStatus</a> <a class="code" href="classzypp_1_1repo_1_1Downloader.html#a79adc470a7ddc166087823cbe86f78ec">status</a>( <a class="code" href="namespaceMediaSetAccess.html">MediaSetAccess</a> &media );</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classzypp_1_1repo_1_1Downloader.html#abce6a2457b2517011c37f5d723ea9ba8"> 58</a></span>  <span class="keyword">const</span> <a class="code" href="classzypp_1_1RepoInfo.html">RepoInfo</a> & <a class="code" href="classzypp_1_1repo_1_1Downloader.html#abce6a2457b2517011c37f5d723ea9ba8">repoInfo</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classzypp_1_1repo_1_1Downloader.html#a028865691045b5dcf38955f8ffa682cb">_repoinfo</a>; }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">protected</span>:</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordtype">void</span> <a class="code" href="classzypp_1_1repo_1_1Downloader.html#a72b46eff2fd8408a13597004422e8a8c">defaultDownloadMasterIndex</a>( <a class="code" href="namespaceMediaSetAccess.html">MediaSetAccess</a> & media_r, <span class="keyword">const</span> <a class="code" href="classzypp_1_1filesystem_1_1Pathname.html">Pathname</a> & destdir_r, <span class="keyword">const</span> <a class="code" href="classzypp_1_1filesystem_1_1Pathname.html">Pathname</a> & masterIndex_r );</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classzypp_1_1repo_1_1Downloader.html#a028865691045b5dcf38955f8ffa682cb"> 65</a></span>  <a class="code" href="classzypp_1_1RepoInfo.html">RepoInfo</a> <a class="code" href="classzypp_1_1repo_1_1Downloader.html#a028865691045b5dcf38955f8ffa682cb">_repoinfo</a>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  };</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  } <span class="comment">// ns repo</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> } <span class="comment">// ns zypp</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="classzypp_1_1repo_1_1Downloader_html_a72b46eff2fd8408a13597004422e8a8c"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html#a72b46eff2fd8408a13597004422e8a8c">zypp::repo::Downloader::defaultDownloadMasterIndex</a></div><div class="ttdeci">void defaultDownloadMasterIndex(MediaSetAccess &media_r, const Pathname &destdir_r, const Pathname &masterIndex_r)</div><div class="ttdoc">Common workflow downloading a (signed) master index file.</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8cc_source.html#l00049">Downloader.cc:49</a></div></div> <div class="ttc" id="Pathname_8h_html"><div class="ttname"><a href="Pathname_8h.html">Pathname.h</a></div></div> <div class="ttc" id="classzypp_1_1repo_1_1Downloader_html_a028865691045b5dcf38955f8ffa682cb"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html#a028865691045b5dcf38955f8ffa682cb">zypp::repo::Downloader::_repoinfo</a></div><div class="ttdeci">RepoInfo _repoinfo</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8h_source.html#l00065">Downloader.h:65</a></div></div> <div class="ttc" id="ProgressData_8h_html"><div class="ttname"><a href="ProgressData_8h.html">ProgressData.h</a></div></div> <div class="ttc" id="Fetcher_8h_html"><div class="ttname"><a href="Fetcher_8h.html">Fetcher.h</a></div></div> <div class="ttc" id="classzypp_1_1RepoInfo_html"><div class="ttname"><a href="classzypp_1_1RepoInfo.html">zypp::RepoInfo</a></div><div class="ttdoc">What is known about a repository.</div><div class="ttdef"><b>Definition:</b> <a href="RepoInfo_8h_source.html#l00071">RepoInfo.h:71</a></div></div> <div class="ttc" id="classzypp_1_1ProgressData_html_a89143a717926c1fa891ba91f07ad7aa8"><div class="ttname"><a href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">zypp::ProgressData::ReceiverFnc</a></div><div class="ttdeci">function< bool(const ProgressData &)> ReceiverFnc</div><div class="ttdoc">Most simple version of progress reporting The percentage in most cases.</div><div class="ttdef"><b>Definition:</b> <a href="ProgressData_8h_source.html#l00139">ProgressData.h:139</a></div></div> <div class="ttc" id="Url_8h_html"><div class="ttname"><a href="Url_8h.html">Url.h</a></div></div> <div class="ttc" id="classzypp_1_1repo_1_1Downloader_html_a7c87178107352752fafc838d54f386f9"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html#a7c87178107352752fafc838d54f386f9">zypp::repo::Downloader::~Downloader</a></div><div class="ttdeci">virtual ~Downloader()</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8cc_source.html#l00032">Downloader.cc:32</a></div></div> <div class="ttc" id="classzypp_1_1repo_1_1Downloader_html_aae61733590d58214a5507dcda5333b9e"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html#aae61733590d58214a5507dcda5333b9e">zypp::repo::Downloader::Downloader</a></div><div class="ttdeci">Downloader()</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8cc_source.html#l00026">Downloader.cc:26</a></div></div> <div class="ttc" id="RepoStatus_8h_html"><div class="ttname"><a href="RepoStatus_8h.html">RepoStatus.h</a></div></div> <div class="ttc" id="classzypp_1_1repo_1_1Downloader_html_abce6a2457b2517011c37f5d723ea9ba8"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html#abce6a2457b2517011c37f5d723ea9ba8">zypp::repo::Downloader::repoInfo</a></div><div class="ttdeci">const RepoInfo & repoInfo() const</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8h_source.html#l00058">Downloader.h:58</a></div></div> <div class="ttc" id="namespaceMediaSetAccess_html"><div class="ttname"><a href="namespaceMediaSetAccess.html">MediaSetAccess</a></div></div> <div class="ttc" id="classzypp_1_1repo_1_1Downloader_html_a32d1f8b29070810bc6c7a31b403822cc"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html#a32d1f8b29070810bc6c7a31b403822cc">zypp::repo::Downloader::download</a></div><div class="ttdeci">virtual void download(MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())</div><div class="ttdoc">Download metadata to a local directory.</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8cc_source.html#l00042">Downloader.cc:42</a></div></div> <div class="ttc" id="MediaSetAccess_8h_html"><div class="ttname"><a href="MediaSetAccess_8h.html">MediaSetAccess.h</a></div></div> <div class="ttc" id="classzypp_1_1RepoStatus_html"><div class="ttname"><a href="classzypp_1_1RepoStatus.html">zypp::RepoStatus</a></div><div class="ttdoc">Track changing files or directories.</div><div class="ttdef"><b>Definition:</b> <a href="RepoStatus_8h_source.html#l00038">RepoStatus.h:38</a></div></div> <div class="ttc" id="classzypp_1_1repo_1_1Downloader_html"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html">zypp::repo::Downloader</a></div><div class="ttdoc">Downloader base class.</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8h_source.html#l00032">Downloader.h:32</a></div></div> <div class="ttc" id="RepoInfo_8h_html"><div class="ttname"><a href="RepoInfo_8h.html">RepoInfo.h</a></div></div> <div class="ttc" id="classzypp_1_1repo_1_1Downloader_html_a79adc470a7ddc166087823cbe86f78ec"><div class="ttname"><a href="classzypp_1_1repo_1_1Downloader.html#a79adc470a7ddc166087823cbe86f78ec">zypp::repo::Downloader::status</a></div><div class="ttdeci">virtual RepoStatus status(MediaSetAccess &media)</div><div class="ttdoc">Status of the remote repository.</div><div class="ttdef"><b>Definition:</b> <a href="Downloader_8cc_source.html#l00036">Downloader.cc:36</a></div></div> <div class="ttc" id="classzypp_1_1filesystem_1_1Pathname_html"><div class="ttname"><a href="classzypp_1_1filesystem_1_1Pathname.html">zypp::filesystem::Pathname</a></div><div class="ttdoc">Pathname.</div><div class="ttdef"><b>Definition:</b> <a href="Pathname_8h_source.html#l00043">Pathname.h:43</a></div></div> <div class="ttc" id="namespacezypp_html"><div class="ttname"><a href="namespacezypp.html">zypp</a></div><div class="ttdoc">Easy-to use interface to the ZYPP dependency resolver.</div><div class="ttdef"><b>Definition:</b> <a href="CodePitfalls_8doc_source.html#l00001">CodePitfalls.doc:1</a></div></div> <div class="ttc" id="classzypp_1_1Fetcher_html"><div class="ttname"><a href="classzypp_1_1Fetcher.html">zypp::Fetcher</a></div><div class="ttdoc">This class allows to retrieve a group of files in a confortable way, providing some smartness that do...</div><div class="ttdef"><b>Definition:</b> <a href="Fetcher_8h_source.html#l00105">Fetcher.h:105</a></div></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_c187b43c6f283d9fc95eff3f44ce072a.html">zypp</a></li><li class="navelem"><a class="el" href="dir_87611d73de4eb3bd0276658efbbf5b67.html">repo</a></li><li class="navelem"><a class="el" href="Downloader_8h.html">Downloader.h</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li> </ul> </div> </body> </html>