File indexing completed on 2025-02-02 05:02:32

0001 /*
0002     SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef NOTIFICATIONHELPER_H
0008 #define NOTIFICATIONHELPER_H
0009 
0010 #include "livedata.h"
0011 
0012 namespace KPublicTransport {
0013 class Stopover;
0014 }
0015 
0016 /** Helper methods for generating notifications about itinerary changes. */
0017 namespace NotificationHelper
0018 {
0019     /** Checks whether something relevant changed and we should notify about this. */
0020     bool shouldNotify(const KPublicTransport::Stopover &oldStop, const KPublicTransport::Stopover &newStop, LiveData::Type context);
0021 
0022     /** Returns the title string for the disruption notification for @p data. */
0023     QString title(const LiveData &data);
0024     /** Returns the message text for the disruption notification for @p data. */
0025     QString message(const LiveData &data);
0026 }
0027 
0028 #endif // NOTIFICATIONHELPER_H