2024-02-04 01:10:53 +01:00
|
|
|
#ifndef LOGDOCTOR__WARNLISTS__WARNLIST__H
|
|
|
|
#define LOGDOCTOR__WARNLISTS__WARNLIST__H
|
|
|
|
|
|
|
|
|
|
|
|
#include "modules/warnlists/modules/warnlist_item.h"
|
|
|
|
|
|
|
|
|
|
|
|
struct Warnlist final
|
|
|
|
{
|
|
|
|
WarnlistItem method;
|
|
|
|
WarnlistItem uri;
|
|
|
|
WarnlistItem client;
|
|
|
|
WarnlistItem user_agent;
|
|
|
|
|
|
|
|
explicit Warnlist() noexcept;
|
|
|
|
|
2024-02-04 01:46:20 +01:00
|
|
|
//! Returns a reference to the requested warnlist item
|
|
|
|
/*!
|
|
|
|
\throw DoNotCatchException
|
|
|
|
*/
|
2024-02-04 01:10:53 +01:00
|
|
|
WarnlistItem& get( const WarnlistField field );
|
|
|
|
|
2024-02-04 01:46:20 +01:00
|
|
|
//! Returns whether the requested warnlist is in use
|
|
|
|
/*!
|
|
|
|
\throw DoNotCatchException
|
|
|
|
*/
|
2024-02-04 01:10:53 +01:00
|
|
|
inline bool isUsed( const WarnlistField field )
|
|
|
|
{ return get( field ).used; }
|
|
|
|
|
2024-02-04 01:46:20 +01:00
|
|
|
//! Sets the requested warnlist in the given in-use condition
|
|
|
|
/*!
|
|
|
|
\throw DoNotCatchException
|
|
|
|
*/
|
2024-02-04 01:10:53 +01:00
|
|
|
inline void setUsed( const WarnlistField field, const bool used )
|
|
|
|
{ get( field ).used = used; }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LOGDOCTOR__WARNLISTS__WARNLIST__H
|