LogDoctor/docs/html/classCheckSec.html

348 lines
18 KiB
HTML
Raw Normal View History

<!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" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LogDoctor: CheckSec 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" />
</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 id="projectrow">
<td id="projectlogo"><img alt="Logo" src="dox_logo.png"/></td>
<td id="projectalign">
<div id="projectname">LogDoctor<span id="projectnumber">&#160;2.00</span>
</div>
<div id="projectbrief">Parse Apache2/Nginx/IIS logs and create statistics</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="classCheckSec-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">CheckSec Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classCheckSec.html" title="CheckSec.">CheckSec</a>.
<a href="classCheckSec.html#details">More...</a></p>
<p><code>#include &lt;checks.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:abaeae12b56acc24ef8f600814e3f280f"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCheckSec.html#abaeae12b56acc24ef8f600814e3f280f">checkCollectionDatabase</a> (const std::string &amp;db_path)</td></tr>
<tr class="memdesc:abaeae12b56acc24ef8f600814e3f280f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks the structure's integrity of the Collection database. <a href="classCheckSec.html#abaeae12b56acc24ef8f600814e3f280f">More...</a><br /></td></tr>
<tr class="separator:abaeae12b56acc24ef8f600814e3f280f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a012e382c91f035ced3c5868ad551a2ec"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCheckSec.html#a012e382c91f035ced3c5868ad551a2ec">checkHashesDatabase</a> (const std::string &amp;db_path)</td></tr>
<tr class="memdesc:a012e382c91f035ced3c5868ad551a2ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks the structure's integrity of the Hashes database. <a href="classCheckSec.html#a012e382c91f035ced3c5868ad551a2ec">More...</a><br /></td></tr>
<tr class="separator:a012e382c91f035ced3c5868ad551a2ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-methods" name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:aee7c4ae7ed7b46348be7096d5ca259c6"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCheckSec.html#aee7c4ae7ed7b46348be7096d5ca259c6">checkDatabaseTablesNames</a> (QSqlDatabase &amp;db, const QString &amp;db_name)</td></tr>
<tr class="memdesc:aee7c4ae7ed7b46348be7096d5ca259c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks the tables' names integrity. <a href="classCheckSec.html#aee7c4ae7ed7b46348be7096d5ca259c6">More...</a><br /></td></tr>
<tr class="separator:aee7c4ae7ed7b46348be7096d5ca259c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31f0c54f9b229bd616ad49a0bc09e16d"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCheckSec.html#a31f0c54f9b229bd616ad49a0bc09e16d">newCollectionDatabase</a> (QSqlDatabase &amp;db, const QString &amp;db_name, const std::vector&lt; QString &gt; &amp;ws_names)</td></tr>
<tr class="memdesc:a31f0c54f9b229bd616ad49a0bc09e16d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds a new database for the logs Collection. <a href="classCheckSec.html#a31f0c54f9b229bd616ad49a0bc09e16d">More...</a><br /></td></tr>
<tr class="separator:a31f0c54f9b229bd616ad49a0bc09e16d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56248ef831e3ea55830735ce5d436ba4"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCheckSec.html#a56248ef831e3ea55830735ce5d436ba4">newHashesDatabase</a> (QSqlDatabase &amp;db, const QString &amp;db_name, const std::vector&lt; QString &gt; &amp;ws_names)</td></tr>
<tr class="memdesc:a56248ef831e3ea55830735ce5d436ba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds a new database for the used log files' Hashes. <a href="classCheckSec.html#a56248ef831e3ea55830735ce5d436ba4">More...</a><br /></td></tr>
<tr class="separator:a56248ef831e3ea55830735ce5d436ba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p ><a class="el" href="classCheckSec.html" title="CheckSec.">CheckSec</a>. </p>
<p >Utilities used to check the databases </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="abaeae12b56acc24ef8f600814e3f280f" name="abaeae12b56acc24ef8f600814e3f280f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abaeae12b56acc24ef8f600814e3f280f">&#9670;&#160;</a></span>checkCollectionDatabase()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool CheckSec::checkCollectionDatabase </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>db_path</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks the structure's integrity of the Collection database. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">db_path</td><td>The path of the database, file included </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result of the check </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCheckSec.html#aee7c4ae7ed7b46348be7096d5ca259c6" title="Checks the tables&#39; names integrity.">checkDatabaseTablesNames()</a>, <a class="el" href="classCheckSec.html#a31f0c54f9b229bd616ad49a0bc09e16d" title="Builds a new database for the logs Collection.">newCollectionDatabase()</a>, <a class="el" href="classCheckSec.html#a56248ef831e3ea55830735ce5d436ba4" title="Builds a new database for the used log files&#39; Hashes.">newHashesDatabase()</a> </dd></dl>
</div>
</div>
<a id="aee7c4ae7ed7b46348be7096d5ca259c6" name="aee7c4ae7ed7b46348be7096d5ca259c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee7c4ae7ed7b46348be7096d5ca259c6">&#9670;&#160;</a></span>checkDatabaseTablesNames()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int CheckSec::checkDatabaseTablesNames </td>
<td>(</td>
<td class="paramtype">QSqlDatabase &amp;&#160;</td>
<td class="paramname"><em>db</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const QString &amp;&#160;</td>
<td class="paramname"><em>db_name</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks the tables' names integrity. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">db</td><td>Database object, already initialized </td></tr>
<tr><td class="paramname">db_name</td><td>Database's name, eventually used by the dialogs </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result of the check: 0 if failed with an error, 1 if all the integrity checks passed, 2 if a rebuild is needed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCheckSec.html#abaeae12b56acc24ef8f600814e3f280f" title="Checks the structure&#39;s integrity of the Collection database.">checkCollectionDatabase()</a>, <a class="el" href="classCheckSec.html#a012e382c91f035ced3c5868ad551a2ec" title="Checks the structure&#39;s integrity of the Hashes database.">checkHashesDatabase()</a>, <a class="el" href="classCheckSec.html#a31f0c54f9b229bd616ad49a0bc09e16d" title="Builds a new database for the logs Collection.">newCollectionDatabase()</a>, <a class="el" href="classCheckSec.html#a56248ef831e3ea55830735ce5d436ba4" title="Builds a new database for the used log files&#39; Hashes.">newHashesDatabase()</a> </dd></dl>
</div>
</div>
<a id="a012e382c91f035ced3c5868ad551a2ec" name="a012e382c91f035ced3c5868ad551a2ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a012e382c91f035ced3c5868ad551a2ec">&#9670;&#160;</a></span>checkHashesDatabase()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool CheckSec::checkHashesDatabase </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>db_path</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks the structure's integrity of the Hashes database. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">db_path</td><td>The path of the database, file included </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result of the check </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCheckSec.html#aee7c4ae7ed7b46348be7096d5ca259c6" title="Checks the tables&#39; names integrity.">checkDatabaseTablesNames()</a>, <a class="el" href="classCheckSec.html#a31f0c54f9b229bd616ad49a0bc09e16d" title="Builds a new database for the logs Collection.">newCollectionDatabase()</a>, <a class="el" href="classCheckSec.html#a56248ef831e3ea55830735ce5d436ba4" title="Builds a new database for the used log files&#39; Hashes.">newHashesDatabase()</a> </dd></dl>
</div>
</div>
<a id="a31f0c54f9b229bd616ad49a0bc09e16d" name="a31f0c54f9b229bd616ad49a0bc09e16d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31f0c54f9b229bd616ad49a0bc09e16d">&#9670;&#160;</a></span>newCollectionDatabase()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool CheckSec::newCollectionDatabase </td>
<td>(</td>
<td class="paramtype">QSqlDatabase &amp;&#160;</td>
<td class="paramname"><em>db</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const QString &amp;&#160;</td>
<td class="paramname"><em>db_name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; QString &gt; &amp;&#160;</td>
<td class="paramname"><em>ws_names</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Builds a new database for the logs Collection. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">db</td><td>Database object, already initialized </td></tr>
<tr><td class="paramname">db_name</td><td>Database's name, eventually used by the dialogs </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result of the operation </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCheckSec.html#abaeae12b56acc24ef8f600814e3f280f" title="Checks the structure&#39;s integrity of the Collection database.">checkCollectionDatabase()</a>, <a class="el" href="classCheckSec.html#a012e382c91f035ced3c5868ad551a2ec" title="Checks the structure&#39;s integrity of the Hashes database.">checkHashesDatabase()</a> </dd></dl>
</div>
</div>
<a id="a56248ef831e3ea55830735ce5d436ba4" name="a56248ef831e3ea55830735ce5d436ba4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56248ef831e3ea55830735ce5d436ba4">&#9670;&#160;</a></span>newHashesDatabase()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool CheckSec::newHashesDatabase </td>
<td>(</td>
<td class="paramtype">QSqlDatabase &amp;&#160;</td>
<td class="paramname"><em>db</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const QString &amp;&#160;</td>
<td class="paramname"><em>db_name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; QString &gt; &amp;&#160;</td>
<td class="paramname"><em>ws_names</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Builds a new database for the used log files' Hashes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">db</td><td>Database object, already initialized </td></tr>
<tr><td class="paramname">db_name</td><td>Database's name, eventually used by the dialogs </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The result of the operation </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCheckSec.html#abaeae12b56acc24ef8f600814e3f280f" title="Checks the structure&#39;s integrity of the Collection database.">checkCollectionDatabase()</a>, <a class="el" href="classCheckSec.html#a012e382c91f035ced3c5868ad551a2ec" title="Checks the structure&#39;s integrity of the Hashes database.">checkHashesDatabase()</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>logdoctor/utilities/checks.h</li>
<li>logdoctor/utilities/checks.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>