ACC SHELL
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>
ProductLicense
</title>
<style type="text/css">body { background-color: #c8c8c8 }
h1 { color: #e00000 }
table { width: 100%/ border: none }
img { border: 0px }
.sigbox { background-color: #ffc080; border: solid thin #f96500 }
.sig { font: larger monospace }
.padtbl { background-color: #ffc080; padding: 10px; margin: 10px }
/* arrow */
.a { color: #606060 }
/* type, parameter */
.t, .p { color: #c05000 }
.pbox { width: 20% }
.descbox { }
.right { align: right }
.header {}
.footer { clear: both}
.menu { width: 10%; float: left }
.main { width: 90%; float: left }
</style>
</head>
<body>
<div class="header">
<i>YaST2 Developers Documentation:</i>
<a href="index.html">
<b>
ProductLicense
</b>
</a>
<img class="right" alt="" src="/usr/share/doc/packages/yast2-devtools/images/yast2-mini.png" />
<hr />
</div>
<div class="menu">
<img alt="YaST" src="/usr/share/doc/packages/yast2-devtools/images/yast2-half.png" />
<br />
<br />
<a href="index.html">functions</a>
<br />
<a href="files.html">files</a>
<br />
<a href="intro.html">intro</a>
</div>
<div class="main">
<div class="sigbox">
<table class="padtbl">
<tr>
<td>
<h1>
ProductLicense
</h1>
</td>
<td class="filecell">ProductLicense.ycp
</td>
</tr>
<tr>
<td>Provide access / dialog for product license
</td>
</tr>
<tr>
<td>
<ul>
<li>Jiri Srain <jsrain@suse.cz></li>
<li> Lukas Ocilka <locilka@suse.cz></li>
</ul>
</td>
</tr>
<tr>
<td>
<p>This module has an unstable interface.</p>
</td>
</tr>
</table>
<table class="padtbl">
<tr>
<td>
<h1>Imports</h1>
<ul>
<li>Directory</li>
<li>FileUtils</li>
<li>InstShowInfo</li>
<li>Language</li>
<li>Mode</li>
<li>Popup</li>
<li>ProductFeatures</li>
<li>Progress</li>
<li>Report</li>
<li>Stage</li>
<li>String</li>
<li>Wizard</li>
<li>WorkflowManager</li>
</ul>
<h1>Structures</h1>
<ul>
<li>
<a href="#$["ID":$[licenses]]">$["ID":$[licenses]]</a>
</li>
</ul>
<h1>Global Functions</h1>
<ul>
<li>
<a href="#AcceptanceNeeded">AcceptanceNeeded (string id)</a>
</li>
<li>
<a href="#AskLicenseAgreement">AskLicenseAgreement (integer src_id, string dir, list<string> patterns, string action, boolean enable_back, boolean base_product, boolean require_agreement, string id)</a>
</li>
<li>
<a href="#AskLicensesAgreement">AskLicensesAgreement (list <string> dirs, list<string> patterns, string action, boolean enable_back, boolean base_product, boolean require_agreement)</a>
</li>
<li>
<a href="#ShowFullScreenLicenseInInstallation">ShowFullScreenLicenseInInstallation (any replace_point_ID, integer src_id)</a>
</li>
<li>
<a href="#ShowLicenseInInstallation">ShowLicenseInInstallation (any replace_point_ID, integer src_id)</a>
</li>
</ul>
<h1>Local Variables</h1>
<ul>
<li>
<a href="#all_licenses">all_licenses</a>
</li>
</ul>
<h1>Local Functions</h1>
<ul>
<li>
<a href="#CleanUp">CleanUp ()</a>
</li>
<li>
<a href="#CleanUpLicense">CleanUpLicense (string tmpdir)</a>
</li>
<li>
<a href="#DisplayLicenseDialog">DisplayLicenseDialog (list<string> languages, boolean back, string license_language, map <string, string> & licenses, string id)</a>
</li>
<li>
<a href="#GetId">GetId (string id_text)</a>
</li>
<li>
<a href="#GetLicenseIdentString">GetLicenseIdentString (string filename)</a>
</li>
<li>
<a href="#IsLicenseAlreadyAccepted">IsLicenseAlreadyAccepted (string license_ident)</a>
</li>
<li>
<a href="#LicenseFiles">LicenseFiles (string dir, list<string> patterns)</a>
</li>
<li>
<a href="#LicenseHasBeenAccepted">LicenseHasBeenAccepted (string license_ident)</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<p />
<div class="sigbox">
<span class="sig" id="all_licenses">local
<b>all_licenses
<span class="a"> -> </span>
<span class="t">map <string, map <string, string> ></span>
</b>
</span>
</div>
<p>
License files by their eula_ID</p>
<p>Structure
<b>
<a id="$["ID":$[licenses]]">$["ID":$[licenses]]</a>
</b>
</p>
<pre></pre>
<div class="sigbox">
<span class="sig" id="GetId">local
<b>GetId (string id_text)
<span class="a"> -> </span>
<span class="t">string</span>
</b>
</span>
</div>
<p>
Checks the string that might contain ID of a license and
eventually returns that id.
See also GetIdPlease for a better ratio of successful stories.</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">id_text</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="GetLicenseIdentString">local
<b>GetLicenseIdentString (string filename)
<span class="a"> -> </span>
<span class="t">string</span>
</b>
</span>
</div>
<p>
Creates a unique identification from filename
(MD5sum + file size)</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">filename</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">unique ID</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="IsLicenseAlreadyAccepted">local
<b>IsLicenseAlreadyAccepted (string license_ident)
<span class="a"> -> </span>
<span class="t">boolean</span>
</b>
</span>
</div>
<p>
Checks whether the license (file) has been already accepted</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">license_ident</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">whether the license has been accepted before</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="LicenseHasBeenAccepted">local
<b>LicenseHasBeenAccepted (string license_ident)
<span class="a"> -> </span>
<span class="t">void</span>
</b>
</span>
</div>
<p>
Sets that the license (file) has been already accepted</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">license_ident</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="AcceptanceNeeded">global
<b>AcceptanceNeeded (string id)
<span class="a"> -> </span>
<span class="t">boolean</span>
</b>
</span>
</div>
<p>
Returns whether accepting the license manually is requied.</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">id</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">if required</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>See</b>
</dt>
<dd>
<table>
<tr>
<td align="left" valign="top"><a href="#BNC #448598">BNC #448598</a></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="DisplayLicenseDialog">local
<b>DisplayLicenseDialog (list<string> languages, boolean back, string license_language, map <string, string> & licenses, string id)
<span class="a"> -> </span>
<span class="t">void</span>
</b>
</span>
</div>
<p>
Displays License with Help and ( ) Yes / ( ) No radio buttons</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">languages</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">back</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">license_language</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">licenses</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">id</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="CleanUpLicense">local
<b>CleanUpLicense (string tmpdir)
<span class="a"> -> </span>
<span class="t">void</span>
</b>
</span>
</div>
<p>
Removes the temporary directory for licenses</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">tmpdir</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="LicenseFiles">local
<b>LicenseFiles (string dir, list<string> patterns)
<span class="a"> -> </span>
<span class="t">map<string,string></span>
</b>
</span>
</div>
<p>
Get all files with license existing in specified directory</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">dir</span>
</td>
<td class="descbox">string directory to look into</td>
</tr>
<tr>
<td class="pbox">
<span class="p">patterns</span>
</td>
<td class="descbox">a list of patterns for the files, regular expressions
with %1 for the language</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">a map $[ lang_code : filename ]</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="CleanUp">local
<b>CleanUp ()
<span class="a"> -> </span>
<span class="t">void</span>
</b>
</span>
</div>
<p>
Generic cleanup</p>
<div class="sigbox">
<span class="sig" id="AskLicenseAgreement">global
<b>AskLicenseAgreement (integer src_id, string dir, list<string> patterns, string action, boolean enable_back, boolean base_product, boolean require_agreement, string id)
<span class="a"> -> </span>
<span class="t">symbol</span>
</b>
</span>
</div>
<p>
Ask user to confirm license agreement</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">src_id</span>
</td>
<td class="descbox">integer repository to get the license from.
If set to 'nil', the license is considered to belong to a base product</td>
</tr>
<tr>
<td class="pbox">
<span class="p">dir</span>
</td>
<td class="descbox">string directory to look for the license in if src_id is nil
and not 1st stage installation</td>
</tr>
<tr>
<td class="pbox">
<span class="p">patterns</span>
</td>
<td class="descbox">a list of patterns for the files, regular expressions
with %1 for the language</td>
</tr>
<tr>
<td class="pbox">
<span class="p">action</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">enable_back</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">base_product</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">require_agreement</span>
</td>
<td class="descbox">means that even if the license (or the very same license)
has been already accepetd, ask user to accept it again (because of 'going back'
in the installation proposal).</td>
</tr>
<tr>
<td class="pbox">
<span class="p">id</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="AskLicensesAgreement">global
<b>AskLicensesAgreement (list <string> dirs, list<string> patterns, string action, boolean enable_back, boolean base_product, boolean require_agreement)
<span class="a"> -> </span>
<span class="t">symbol</span>
</b>
</span>
</div>
<p>
Ask user to confirm license agreement</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">dirs</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">patterns</span>
</td>
<td class="descbox">a list of patterns for the files, regular expressions
with %1 for the language</td>
</tr>
<tr>
<td class="pbox">
<span class="p">action</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">enable_back</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">base_product</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">require_agreement</span>
</td>
<td class="descbox">means that even if the license (or the very same license)
has been already accepetd, ask user to accept it again (because of 'going back'
in the installation proposal).</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="ShowFullScreenLicenseInInstallation">global
<b>ShowFullScreenLicenseInInstallation (any replace_point_ID, integer src_id)
<span class="a"> -> </span>
<span class="t">boolean</span>
</b>
</span>
</div>
<p>
Called from the first stage Welcome dialog by clicking on a button</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">replace_point_ID</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">src_id</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="ShowLicenseInInstallation">global
<b>ShowLicenseInInstallation (any replace_point_ID, integer src_id)
<span class="a"> -> </span>
<span class="t">boolean</span>
</b>
</span>
</div>
<p>
Used in the first-stage Welcome dialog</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">replace_point_ID</span>
</td>
<td class="descbox"></td>
</tr>
<tr>
<td class="pbox">
<span class="p">src_id</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
</div>
<div class="footer">
<hr />
<i>YaST2 Developers Documentation</i>
<img class="right" alt="" src="/usr/share/doc/packages/yast2-devtools/images/yast2-mini.png" />
</div>
</body>
</html>
ACC SHELL 2018