Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::host::ScanBlacklist Class Reference

#include <scan_blacklist.hpp>

Public Member Functions

std::optional< BlacklistEntry > get (const std::string &path) const
 Return the blacklist entry for path if one exists AND matches the current file stamp.
void blacklist (const std::string &path, std::string reason)
 Record that scanning path failed.
void clear (const std::string &path)
 Unconditionally remove path from the blacklist.
std::size_t size () const
bool is_blacklisted (const std::string &path) const
std::string to_text () const
 Serialize to the plain-text format described at the top.
bool from_text (const std::string &text)
 Load from the plain-text format.
bool save_to (const std::string &file_path) const
bool load_from (const std::string &file_path)
const std::unordered_map< std::string, BlacklistEntry > & entries () const

Member Function Documentation

◆ blacklist()

void pulp::host::ScanBlacklist::blacklist ( const std::string & path,
std::string reason )

Record that scanning path failed.

Stores the current file stamp so a later rebuild invalidates the entry automatically.

◆ clear()

void pulp::host::ScanBlacklist::clear ( const std::string & path)
inline

Unconditionally remove path from the blacklist.

Users can retry a plugin by calling this.

◆ entries()

const std::unordered_map< std::string, BlacklistEntry > & pulp::host::ScanBlacklist::entries ( ) const
inline

◆ from_text()

bool pulp::host::ScanBlacklist::from_text ( const std::string & text)

Load from the plain-text format.

Returns false on I/O error; malformed lines are silently skipped (so a corrupted file downgrades to "start fresh" rather than blocking the host).

◆ get()

std::optional< BlacklistEntry > pulp::host::ScanBlacklist::get ( const std::string & path) const

Return the blacklist entry for path if one exists AND matches the current file stamp.

A rebuilt / upgraded plugin (different mtime/size) is NOT considered blacklisted — users get a fresh scan attempt on the new version.

◆ is_blacklisted()

bool pulp::host::ScanBlacklist::is_blacklisted ( const std::string & path) const
inline

◆ load_from()

bool pulp::host::ScanBlacklist::load_from ( const std::string & file_path)

◆ save_to()

bool pulp::host::ScanBlacklist::save_to ( const std::string & file_path) const

◆ size()

std::size_t pulp::host::ScanBlacklist::size ( ) const
inline

◆ to_text()

std::string pulp::host::ScanBlacklist::to_text ( ) const

Serialize to the plain-text format described at the top.


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