Baloo::DatabaseSanitizer
#include <databasesanitizer.h>
Public Types | |
enum | ItemAccessFilterFlags { IgnoreNone = 0 , IgnoreAvailable = 1 , IgnoreUnavailable = 2 , IgnoreMounted = 8 , IgnoreUnmounted = 0x10 } |
typedef QFlags< ItemAccessFilterFlags > | ItemAccessFilters |
Public Member Functions | |
DatabaseSanitizer (const Database &db, Transaction::TransactionType type) | |
DatabaseSanitizer (Database *db, Transaction::TransactionType type) | |
void | printDevices (const QVector< qint64 > &deviceIds, const ItemAccessFilters accessFilter=IgnoreNone) |
void | printList (const QVector< qint64 > &deviceIds, const ItemAccessFilters accessFilter=IgnoreNone, const QSharedPointer< QRegularExpression > &urlFilter=nullptr) |
void | removeStaleEntries (const QVector< qint64 > &deviceIds, const DatabaseSanitizer::ItemAccessFilters accessFilter=DatabaseSanitizer::IgnoreNone, const bool dryRun=false, const QSharedPointer< QRegularExpression > &urlFilter=nullptr) |
Detailed Description
Provide methods to show database problems and sanitize them.
Definition at line 20 of file databasesanitizer.h.
Member Typedef Documentation
◆ ItemAccessFilters
QFlags< ItemAccessFilterFlags > Baloo::DatabaseSanitizer::ItemAccessFilters |
Definition at line 30 of file databasesanitizer.h.
Member Enumeration Documentation
◆ ItemAccessFilterFlags
enum Baloo::DatabaseSanitizer::ItemAccessFilterFlags |
Definition at line 23 of file databasesanitizer.h.
Constructor & Destructor Documentation
◆ DatabaseSanitizer() [1/2]
DatabaseSanitizer::DatabaseSanitizer | ( | const Database & | db, |
Transaction::TransactionType | type ) |
Definition at line 212 of file databasesanitizer.cpp.
◆ DatabaseSanitizer() [2/2]
DatabaseSanitizer::DatabaseSanitizer | ( | Database * | db, |
Transaction::TransactionType | type ) |
Definition at line 217 of file databasesanitizer.cpp.
◆ ~DatabaseSanitizer()
DatabaseSanitizer::~DatabaseSanitizer | ( | ) |
Definition at line 222 of file databasesanitizer.cpp.
Member Function Documentation
◆ printDevices()
void DatabaseSanitizer::printDevices | ( | const QVector< qint64 > & | deviceIds, |
const ItemAccessFilters | accessFilter = IgnoreNone ) |
Print info about known devices to stdout.
deviceIDs
filter by device ids. Negative numbers list everything but... with empty deviceIDs(default)
everything is printed.
accessFilter
filter by accessibility. E.g IgnoreAvailable|IgnoreUnmounted prints only mounted devices with inaccessible files.
Definition at line 271 of file databasesanitizer.cpp.
◆ printList()
void DatabaseSanitizer::printList | ( | const QVector< qint64 > & | deviceIds, |
const ItemAccessFilters | accessFilter = IgnoreNone, | ||
const QSharedPointer< QRegularExpression > & | urlFilter = nullptr ) |
Print database content to stdout.
Create a list of FileInfo items and print it to stdout.
deviceIDs
filter by device ids. Negative numbers list everything but... with empty deviceIDs(default)
everything is printed.
missingOnly
Simulate purging operation. Only inaccessible items are printed.
urlFilter
Filter result urls. Default is null = Print everything.
deviceIDs
filter by device ids. If the vector is empty no filtering is done and everything is printed. Positive numbers are including filters printing only the mentioned device ids. Negative numbers are excluding filters printing everything but the mentioned device ids.
missingOnly
Simulate purging operation. Only inaccessible items are printed.
urlFilter
Filter result urls. Default is null = Print everything.
Definition at line 240 of file databasesanitizer.cpp.
◆ removeStaleEntries()
void DatabaseSanitizer::removeStaleEntries | ( | const QVector< qint64 > & | deviceIds, |
const DatabaseSanitizer::ItemAccessFilters | accessFilter = DatabaseSanitizer::IgnoreNone, | ||
const bool | dryRun = false, | ||
const QSharedPointer< QRegularExpression > & | urlFilter = nullptr ) |
Definition at line 321 of file databasesanitizer.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:13:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.