MessageViewer::SpamScore Class

class MessageViewer::SpamScore

A simple tuple of error, agent, score, confidence and header. More...

Header: #include <MessageViewer/SpamHeaderAnalyzer>
CMake: find_package(KPim6MessageViewer REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::MessageViewer)

Public Functions

SpamScore()
SpamScore(const QString &agent, MessageViewer::SpamError error, float score, float confidence, const QString &header, const QString &cheader)
QString agent() const
float confidence() const
QString confidenceHeader() const
MessageViewer::SpamError error() const
float score() const
QString spamHeader() const

Detailed Description

* * *

The score returned is positive if no error has occurred. error values indicate the following errors: noError Spam Headers successfully parsed uninitializedStructUsed Uninitialized struct used errorExtractingAgentString Error extracting agent string couldNotConverScoreToFloat Couldn't convert score to float couldNotConvertThresholdToFloatOrThresholdIsNegative Couldn't convert threshold to float or threshold is negative couldNotFindTheScoreField Couldn't find the score field couldNotFindTheThresholdField Couldn't find the threshold field couldNotConvertConfidenceToFloat Couldn't convert confidence to float

Member Function Documentation

SpamScore::SpamScore()

SpamScore::SpamScore(const QString &agent, MessageViewer::SpamError error, float score, float confidence, const QString &header, const QString &cheader)

QString SpamScore::agent() const

float SpamScore::confidence() const

QString SpamScore::confidenceHeader() const

MessageViewer::SpamError SpamScore::error() const

float SpamScore::score() const

QString SpamScore::spamHeader() const