Debian Codegraph @

src/librssguard/miscellaneous/notification.h

raw symbols SCIP
1 // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/miscellaneous/notification.h`/
2
3 #ifndef NOTIFICATION_H
4 #define NOTIFICATION_Hcxx . . $ `src/librssguard/miscellaneous/notification.h:4:9`!
5
6 #include "definitions/definitions.h"cxx . . $ `<file>/src/librssguard/definitions/definitions.h`/
7
8 #include <QString>
9
10 class Applicationcxx . . $ Application#;
11
12 class Notificationcxx . . $ Notification# {
13 public:
14 enum class Eventcxx . . $ Notification#Event# {
15 // Is here to provide "empty" events - events which should
16 // not trigger any notifications.
17 NoEventcxx . . $ Notification#Event#NoEvent. = 0,
18
19 // Used for many events which happen throught application lifecycle.
20 GeneralEventcxx . . $ Notification#Event#GeneralEvent. = 1,
21
22 // New (unread) messages were downloaded for some feed.
23 NewUnreadArticlesFetchedcxx . . $ Notification#Event#NewUnreadArticlesFetched. = 2,
24
25 // RSS Guard started downloading messages for some feed.
26 ArticlesFetchingStartedcxx . . $ Notification#Event#ArticlesFetchingStarted. = 3,
27
28 // Login tokens were successfuly refreshed.
29 // NOTE: This is primarily used in accounts which use
30 // OAuth or similar mechanism.
31 LoginDataRefreshedcxx . . $ Notification#Event#LoginDataRefreshed. = 4,
32
33 // New RSS Guard version available.
34 NewAppVersionAvailablecxx . . $ Notification#Event#NewAppVersionAvailable. = 5,
35
36 // Some service failed to login.
37 LoginFailurecxx . . $ Notification#Event#LoginFailure. = 6,
38
39 // Node.js - package updated.
40 NodePackageUpdatedcxx . . $ Notification#Event#NodePackageUpdated. = 7,
41
42 // Node.js - package failde to update.
43 NodePackageFailedToUpdatecxx . . $ Notification#Event#NodePackageFailedToUpdate. = 8,
44
45 // There was at least one error during fetching articles.
46 ArticlesFetchingErrorcxx . . $ Notification#Event#ArticlesFetchingError. = 9
47 };
48
49 explicit Notificationcxx . . $ Notification#Notification(113beba568247365).(Eventcxx . . $ Notification#Event# event = Eventcxx . . $ Notification#Event#::NoEventcxx . . $ Notification#Event#NoEvent.,
50 bool balloon = false,
51 bool dialog = false,
52 bool play_sound = true,
53 const QStringcxx . . $ QString#& sound_path =cxx . . $ QString#QString(ced63f7c635d850d). {},
54 int volume = DEFAULT_NOTIFICATION_VOLUMEcxx . . $ `src/librssguard/definitions/definitions.h:100:9`!);
55
56 bool balloonEnabledcxx . . $ Notification#balloonEnabled(50ce9a9e25b4a850).() const;
57 bool dialogEnabledcxx . . $ Notification#dialogEnabled(50ce9a9e25b4a850).() const;
58
59 Eventcxx . . $ Notification#Event# eventcxx . . $ Notification#event(752d85c5520a3778).() const;
60 void setEventcxx . . $ Notification#setEvent(4d81b92070311c96).(Eventcxx . . $ Notification#Event# event);
61
62 int volumecxx . . $ Notification#volume(455f465bc33b4cdf).() const;
63 qrealcxx . . $ qreal# fractionalVolumecxx . . $ Notification#fractionalVolume(21b6c25e127938e2).() const;
64 void setVolumecxx . . $ Notification#setVolume(d4f767463ce0a6b3).(int volume);
65
66 bool soundEnabledcxx . . $ Notification#soundEnabled(50ce9a9e25b4a850).() const;
67 void setSoundEnabledcxx . . $ Notification#setSoundEnabled(b45ddcbc8423892c).(bool play_sound);
68
69 // Returns full path to audio file which should be played when notification
70 // is launched.
71 // NOTE: This property supports "%data%" placeholder.
72 QStringcxx . . $ QString# soundPathcxx . . $ Notification#soundPath(6ef7b6c27b00b43d).() const;
73 void setSoundPathcxx . . $ Notification#setSoundPath(3520e46b33348bf6).(const QStringcxx . . $ QString#& sound_path);
74
75 void playSoundcxx . . $ Notification#playSound(20e408e26c1df836).(Applicationcxx . . $ Application#* app) const;
76
77 static QListcxx . . $ QList#<Eventcxx . . $ Notification#Event#> allEventscxx . . $ Notification#allEvents(7ddaa241c28a488e).();
78 static QStringcxx . . $ QString# nameForEventcxx . . $ Notification#nameForEvent(50042268f9318a56).(Eventcxx . . $ Notification#Event# event);
79
80 private:
81 Eventcxx . . $ Notification#Event# m_eventcxx . . $ Notification#m_event.;
82 bool m_balloonEnabledcxx . . $ Notification#m_balloonEnabled.;
83 bool m_dialogEnabledcxx . . $ Notification#m_dialogEnabled.;
84 bool m_soundEnabledcxx . . $ Notification#m_soundEnabled.;
85 QStringcxx . . $ QString# m_soundPathcxx . . $ Notification#m_soundPath.;
86 qrealcxx . . $ qreal# m_volumecxx . . $ Notification#m_volume.;
87 };
88
89 Q_DECLARE_METATYPEcxx . . $ Notification#Event#(Notification::Event)
90
91 #endif // NOTIFICATION_H