Tag Parser  6.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | Static Public Member Functions | List of all members
Media::Notification Class Reference

The Notification class holds a notification message of a certain notification type. More...

#include <notification.h>

Public Member Functions

 Notification (NotificationType type, const std::string &message, const std::string &context)
 Constructs a new Notification with the specified type, message and context. More...
 
NotificationType type () const
 Returns the notification type. More...
 
const char * typeName () const
 Returns the notification type as C-style string. More...
 
const std::string & message () const
 Returns the message. More...
 
const std::string & context () const
 Returns the context, eg. More...
 
const ChronoUtilities::DateTimecreationTime () const
 Returns the time when the notification originally was created. More...
 
bool operator== (const Notification &other) const
 Returns whether the current instance equals other. More...
 

Static Public Member Functions

static constexpr NotificationType worstNotificationType ()
 Returns the worst notification type. More...
 
static void sortByTime (NotificationList &notifications)
 Sorts the specified notifications by time (ascending). More...
 

Detailed Description

The Notification class holds a notification message of a certain notification type.

These notifications are generated when parsing or making data.

Definition at line 43 of file notification.h.

Constructor & Destructor Documentation

◆ Notification()

Media::Notification::Notification ( NotificationType  type,
const std::string &  message,
const std::string &  context 
)

Constructs a new Notification with the specified type, message and context.

Definition at line 18 of file notification.cpp.

Member Function Documentation

◆ context()

const std::string & Media::Notification::context ( ) const
inline

Returns the context, eg.

"parsing element xyz".

Definition at line 83 of file notification.h.

◆ creationTime()

const ChronoUtilities::DateTime & Media::Notification::creationTime ( ) const
inline

Returns the time when the notification originally was created.

Definition at line 91 of file notification.h.

◆ message()

const std::string & Media::Notification::message ( ) const
inline

Returns the message.

Definition at line 75 of file notification.h.

◆ operator==()

bool Media::Notification::operator== ( const Notification other) const
inline

Returns whether the current instance equals other.

Remarks
The creation time is not taken into account.

Definition at line 108 of file notification.h.

◆ sortByTime()

void Media::Notification::sortByTime ( NotificationList notifications)
static

Sorts the specified notifications by time (ascending).

Definition at line 46 of file notification.cpp.

◆ type()

NotificationType Media::Notification::type ( ) const
inline

Returns the notification type.

Definition at line 67 of file notification.h.

◆ typeName()

const char * Media::Notification::typeName ( ) const

Returns the notification type as C-style string.

Definition at line 28 of file notification.cpp.

◆ worstNotificationType()

constexpr NotificationType Media::Notification::worstNotificationType ( )
inlinestatic

Returns the worst notification type.

Definition at line 99 of file notification.h.


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