<!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::parser::RepoFileReader 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="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('classzypp_1_1parser_1_1RepoFileReader.html','');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#pri-attribs">Private Attributes</a> | <a href="#friends">Friends</a> | <a href="#related">Related Functions</a> | <a href="classzypp_1_1parser_1_1RepoFileReader-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">zypp::parser::RepoFileReader Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>Read repository data from a .repo file. <a href="classzypp_1_1parser_1_1RepoFileReader.html#details">More...</a></p> <p><code>#include <<a class="el" href="RepoFileReader_8h_source.html">RepoFileReader.h</a>></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> Public Types</h2></td></tr> <tr class="memitem:a80cd03369ae698ec961fb174bff9d4e4"><td class="memItemLeft" align="right" valign="top">typedef function< <a class="el" href="classbool.html">bool</a>(const <a class="el" href="classzypp_1_1RepoInfo.html">RepoInfo</a> &)> </td><td class="memItemRight" valign="bottom"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">ProcessRepo</a></td></tr> <tr class="memdesc:a80cd03369ae698ec961fb174bff9d4e4"><td class="mdescLeft"> </td><td class="mdescRight">Callback definition. <a href="#a80cd03369ae698ec961fb174bff9d4e4">More...</a><br /></td></tr> <tr class="separator:a80cd03369ae698ec961fb174bff9d4e4"><td class="memSeparator" colspan="2"> </td></tr> </table><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:acb4d0cc6f3887df36b1835460097a362"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#acb4d0cc6f3887df36b1835460097a362">RepoFileReader</a> (const <a class="el" href="classzypp_1_1filesystem_1_1Pathname.html">Pathname</a> &repo_file, const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">ProcessRepo</a> &callback, const <a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a> &progress=<a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a>())</td></tr> <tr class="memdesc:acb4d0cc6f3887df36b1835460097a362"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#acb4d0cc6f3887df36b1835460097a362">More...</a><br /></td></tr> <tr class="separator:acb4d0cc6f3887df36b1835460097a362"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9629b3c6558de4cb9f72eb70191399a3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a9629b3c6558de4cb9f72eb70191399a3">RepoFileReader</a> (const <a class="el" href="classzypp_1_1InputStream.html">InputStream</a> &is, const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">ProcessRepo</a> &callback, const <a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a> &progress=<a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a>())</td></tr> <tr class="memdesc:a9629b3c6558de4cb9f72eb70191399a3"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#a9629b3c6558de4cb9f72eb70191399a3">More...</a><br /></td></tr> <tr class="separator:a9629b3c6558de4cb9f72eb70191399a3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:addfb78e7e778ec4fdaf02e7e3eabebdf"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#addfb78e7e778ec4fdaf02e7e3eabebdf">~RepoFileReader</a> ()</td></tr> <tr class="memdesc:addfb78e7e778ec4fdaf02e7e3eabebdf"><td class="mdescLeft"> </td><td class="mdescRight">Dtor. <a href="#addfb78e7e778ec4fdaf02e7e3eabebdf">More...</a><br /></td></tr> <tr class="separator:addfb78e7e778ec4fdaf02e7e3eabebdf"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a> Private Attributes</h2></td></tr> <tr class="memitem:afa43a33bd46db19ab7569704f66da96d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">ProcessRepo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#afa43a33bd46db19ab7569704f66da96d">_callback</a></td></tr> <tr class="separator:afa43a33bd46db19ab7569704f66da96d"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> Friends</h2></td></tr> <tr class="memitem:a33f44666e1bc051a0687dd3eee16c51c"><td class="memItemLeft" align="right" valign="top">std::ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a33f44666e1bc051a0687dd3eee16c51c">operator<<</a> (std::ostream &str, const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html">RepoFileReader</a> &obj)</td></tr> <tr class="separator:a33f44666e1bc051a0687dd3eee16c51c"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a> Related Functions</h2></td></tr> <tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p> </td></tr> <tr class="memitem:a476778554d938982f1e5c548da96cc41"><td class="memItemLeft" align="right" valign="top">std::ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a476778554d938982f1e5c548da96cc41">operator<<</a> (std::ostream &str, const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html">RepoFileReader</a> &obj)</td></tr> <tr class="separator:a476778554d938982f1e5c548da96cc41"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Read repository data from a .repo file. </p> <p>After each repo is read, a <a class="el" href="classzypp_1_1RepoInfo.html">RepoInfo</a> is prepared and <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#afa43a33bd46db19ab7569704f66da96d">_callback</a> is called with the object passed in.</p> <p>The <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#afa43a33bd46db19ab7569704f66da96d">_callback</a> is provided on construction.</p> <div class="fragment"><div class="line"><a class="code" href="classzypp_1_1parser_1_1RepoFileReader.html#acb4d0cc6f3887df36b1835460097a362">RepoFileReader</a> reader(repo_file,</div><div class="line"> bind( &SomeClass::callbackfunc, &SomeClassInstance, _1, _2 ) );</div></div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Multiple baseurls in a repo file are supported using this style: <div class="fragment"><div class="line">baseurl=http:<span class="comment">//server.a/path/to/repo</span></div><div class="line"> http:<span class="comment">//server.b/path/to/repo</span></div><div class="line"> http:<span class="comment">//server.c/path/to/repo</span></div></div><!-- fragment --> Repeating the <code>baseurl=</code> tag on each line is also accepted, but when the file has to be written, the preferred style is used. </dd></dl> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8h_source.html#l00051">51</a> of file <a class="el" href="RepoFileReader_8h_source.html">RepoFileReader.h</a>.</p> </div><h2 class="groupheader">Member Typedef Documentation</h2> <a id="a80cd03369ae698ec961fb174bff9d4e4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a80cd03369ae698ec961fb174bff9d4e4">◆ </a></span>ProcessRepo</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef function< <a class="el" href="classbool.html">bool</a>( const <a class="el" href="classzypp_1_1RepoInfo.html">RepoInfo</a> & )> <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">zypp::parser::RepoFileReader::ProcessRepo</a></td> </tr> </table> </div><div class="memdoc"> <p>Callback definition. </p> <p>First parameter is a <a class="el" href="classzypp_1_1RepoInfo.html">RepoInfo</a> object with the resource second parameter is the resource type.</p> <p>Return false from the callback to get a AbortRequestException to be thrown and the processing to be cancelled. </p> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8h_source.html#l00064">64</a> of file <a class="el" href="RepoFileReader_8h_source.html">RepoFileReader.h</a>.</p> </div> </div> <h2 class="groupheader">Constructor & Destructor Documentation</h2> <a id="acb4d0cc6f3887df36b1835460097a362"></a> <h2 class="memtitle"><span class="permalink"><a href="#acb4d0cc6f3887df36b1835460097a362">◆ </a></span>RepoFileReader() <span class="overload">[1/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">zypp::parser::RepoFileReader::RepoFileReader </td> <td>(</td> <td class="paramtype">const <a class="el" href="classzypp_1_1filesystem_1_1Pathname.html">Pathname</a> & </td> <td class="paramname"><em>repo_file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">ProcessRepo</a> & </td> <td class="paramname"><em>callback</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a> & </td> <td class="paramname"><em>progress</em> = <code><a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a>()</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Constructor. </p> <p>Creates the reader and start reading.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">repo_file</td><td>A valid .repo file </td></tr> <tr><td class="paramname">callback</td><td>Callback that will be called for each repository. </td></tr> <tr><td class="paramname">progress</td><td>Optional progress function. </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classzypp_1_1ProgressData.html" title="Maintain [min,max] and counter (value) for progress counting.">ProgressData</a></dd></dl> <dl class="exception"><dt>Exceptions</dt><dd> <table class="exception"> <tr><td class="paramname">AbortRequestException</td><td>If the callback returns false </td></tr> <tr><td class="paramname"><a class="el" href="classzypp_1_1Exception.html" title="Base class for Exception.">Exception</a></td><td>If a error occurs at reading / parsing </td></tr> </table> </dd> </dl> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8cc_source.html#l00205">205</a> of file <a class="el" href="RepoFileReader_8cc_source.html">RepoFileReader.cc</a>.</p> </div> </div> <a id="a9629b3c6558de4cb9f72eb70191399a3"></a> <h2 class="memtitle"><span class="permalink"><a href="#a9629b3c6558de4cb9f72eb70191399a3">◆ </a></span>RepoFileReader() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">zypp::parser::RepoFileReader::RepoFileReader </td> <td>(</td> <td class="paramtype">const <a class="el" href="classzypp_1_1InputStream.html">InputStream</a> & </td> <td class="paramname"><em>is</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">ProcessRepo</a> & </td> <td class="paramname"><em>callback</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a> & </td> <td class="paramname"><em>progress</em> = <code><a class="el" href="classzypp_1_1ProgressData.html#a89143a717926c1fa891ba91f07ad7aa8">ProgressData::ReceiverFnc</a>()</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Constructor. </p> <p>Creates the reader and start reading.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">is</td><td>A valid input stream </td></tr> <tr><td class="paramname">callback</td><td>Callback that will be called for each repository. </td></tr> <tr><td class="paramname">progress</td><td>Optional progress function. </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classzypp_1_1ProgressData.html" title="Maintain [min,max] and counter (value) for progress counting.">ProgressData</a></dd></dl> <dl class="exception"><dt>Exceptions</dt><dd> <table class="exception"> <tr><td class="paramname">AbortRequestException</td><td>If the callback returns false </td></tr> <tr><td class="paramname"><a class="el" href="classzypp_1_1Exception.html" title="Base class for Exception.">Exception</a></td><td>If a error occurs at reading / parsing </td></tr> </table> </dd> </dl> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8cc_source.html#l00213">213</a> of file <a class="el" href="RepoFileReader_8cc_source.html">RepoFileReader.cc</a>.</p> </div> </div> <a id="addfb78e7e778ec4fdaf02e7e3eabebdf"></a> <h2 class="memtitle"><span class="permalink"><a href="#addfb78e7e778ec4fdaf02e7e3eabebdf">◆ </a></span>~RepoFileReader()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">zypp::parser::RepoFileReader::~RepoFileReader </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Dtor. </p> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8cc_source.html#l00221">221</a> of file <a class="el" href="RepoFileReader_8cc_source.html">RepoFileReader.cc</a>.</p> </div> </div> <h2 class="groupheader">Friends And Related Function Documentation</h2> <a id="a33f44666e1bc051a0687dd3eee16c51c"></a> <h2 class="memtitle"><span class="permalink"><a href="#a33f44666e1bc051a0687dd3eee16c51c">◆ </a></span>operator<< <span class="overload">[1/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">std::ostream& operator<< </td> <td>(</td> <td class="paramtype">std::ostream & </td> <td class="paramname"><em>str</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html">RepoFileReader</a> & </td> <td class="paramname"><em>obj</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">friend</span></span> </td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8cc_source.html#l00225">225</a> of file <a class="el" href="RepoFileReader_8cc_source.html">RepoFileReader.cc</a>.</p> </div> </div> <a id="a476778554d938982f1e5c548da96cc41"></a> <h2 class="memtitle"><span class="permalink"><a href="#a476778554d938982f1e5c548da96cc41">◆ </a></span>operator<<() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">std::ostream & operator<< </td> <td>(</td> <td class="paramtype">std::ostream & </td> <td class="paramname"><em>str</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html">RepoFileReader</a> & </td> <td class="paramname"><em>obj</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">related</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Stream output </p> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8cc_source.html#l00225">225</a> of file <a class="el" href="RepoFileReader_8cc_source.html">RepoFileReader.cc</a>.</p> </div> </div> <h2 class="groupheader">Member Data Documentation</h2> <a id="afa43a33bd46db19ab7569704f66da96d"></a> <h2 class="memtitle"><span class="permalink"><a href="#afa43a33bd46db19ab7569704f66da96d">◆ </a></span>_callback</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html#a80cd03369ae698ec961fb174bff9d4e4">ProcessRepo</a> zypp::parser::RepoFileReader::_callback</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">private</span></span> </td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="RepoFileReader_8h_source.html#l00105">105</a> of file <a class="el" href="RepoFileReader_8h_source.html">RepoFileReader.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li>zypp/parser/<a class="el" href="RepoFileReader_8h_source.html">RepoFileReader.h</a></li> <li>zypp/parser/<a class="el" href="RepoFileReader_8cc_source.html">RepoFileReader.cc</a></li> </ul> </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="namespacezypp.html">zypp</a></li><li class="navelem"><a class="el" href="namespacezypp_1_1parser.html">parser</a></li><li class="navelem"><a class="el" href="classzypp_1_1parser_1_1RepoFileReader.html">RepoFileReader</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>