Loading...
Searching...
No Matches
CheckSec Class Reference

CheckSec. More...

`#include <checks.h>`

## Static Public Member Functions

static bool | checkCollectionDatabase (const std::string &db_path)
| Checks the structure's integrity of the Collection database. More...
static bool | checkHashesDatabase (const std::string &db_path)
| Checks the structure's integrity of the Hashes database. More...

## Static Private Member Functions

static int | checkDatabaseTablesNames (QSqlDatabase &db, const QString &db_name)
| Checks the tables' names integrity. More...
static bool | newCollectionDatabase (QSqlDatabase &db, const QString &db_name, const std::vector< QString > &ws_names)
| Builds a new database for the logs Collection. More...
static bool | newHashesDatabase (QSqlDatabase &db, const QString &db_name, const std::vector< QString > &ws_names)
| Builds a new database for the used log files' Hashes. More...

## Detailed Description

CheckSec.

Utilities used to check the databases

## Member Function Documentation

## checkCollectionDatabase()

bool CheckSec::checkCollectionDatabase | ( | const std::string & | db_path | ) |

static

Checks the structure's integrity of the Collection database.

Parameters

  db_path | The path of the database, file included

Returns
  The result of the check

See also
  checkDatabaseTablesNames(), newCollectionDatabase(), newHashesDatabase()

## checkDatabaseTablesNames()

int CheckSec::checkDatabaseTablesNames | ( | QSqlDatabase & | db,
|  | const QString & | db_name
| ) |  |

staticprivate

Checks the tables' names integrity.

Parameters

  db | Database object, already initialized
  db_name | Database's name, eventually used by the dialogs

Returns
  The result of the check: 0 if failed with an error, 1 if all the integrity checks passed, 2 if a rebuild is needed

See also
  checkCollectionDatabase(), checkHashesDatabase(), newCollectionDatabase(), newHashesDatabase()

## checkHashesDatabase()

bool CheckSec::checkHashesDatabase | ( | const std::string & | db_path | ) |

static

Checks the structure's integrity of the Hashes database.

Parameters

  db_path | The path of the database, file included

Returns
  The result of the check

See also
  checkDatabaseTablesNames(), newCollectionDatabase(), newHashesDatabase()

## newCollectionDatabase()

bool CheckSec::newCollectionDatabase | ( | QSqlDatabase & | db,
|  | const QString & | db_name,
|  | const std::vector< QString > & | ws_names
| ) |  |

staticprivate

Builds a new database for the logs Collection.

Parameters

  db | Database object, already initialized
  db_name | Database's name, eventually used by the dialogs

Returns
  The result of the operation

See also
  checkCollectionDatabase(), checkHashesDatabase()

## newHashesDatabase()

bool CheckSec::newHashesDatabase | ( | QSqlDatabase & | db,
|  | const QString & | db_name,
|  | const std::vector< QString > & | ws_names
| ) |  |

staticprivate

Builds a new database for the used log files' Hashes.

Parameters

  db | Database object, already initialized
  db_name | Database's name, eventually used by the dialogs

Returns
  The result of the operation

See also
  checkCollectionDatabase(), checkHashesDatabase()

The documentation for this class was generated from the following files:

- logdoctor/utilities/checks.h
- logdoctor/utilities/checks.cpp