22 #ifndef BANNERMESSAGEEVENTFACTORY_H
23 #define BANNERMESSAGEEVENTFACTORY_H
27 #include <BannerMessageEvent.h>
28 #include <ActiveCallBannerEvent.h>
41 const std::string& _msg,
42 const std::string& _launchParams,
43 const std::string& _icon,
44 const std::string& _soundClass,
45 const std::string& _soundFile,
47 bool _doNotSuppress) {
48 if (_appId.empty() || _msg.empty() || _launchParams.empty())
51 BannerMessageEvent* e =
new BannerMessageEvent;
55 e->launchParams = _launchParams;
57 e->soundClass = _soundClass;
58 e->soundFile = _soundFile;
59 e->duration = _duration;
60 e->doNotSuppress = _doNotSuppress;
64 clock_gettime(CLOCK_MONOTONIC, &time);
65 double t = time.tv_sec * 1000.0 + time.tv_nsec / 1000000.0;
67 gchar*
id = g_strdup_printf(
"%lf", t);
75 const std::string& _msgId) {
77 if (_appId.empty() || _msgId.empty())
80 BannerMessageEvent* e =
new BannerMessageEvent;
93 BannerMessageEvent* e =
new BannerMessageEvent;
94 e->msgType = BannerMessageEvent::Clear;
101 const std::string& _soundClass,
102 const std::string& _soundFile,
103 int _duration,
bool _wakeupScreen=
false) {
104 if (_appId.empty() || _soundClass.empty())
107 BannerMessageEvent* e =
new BannerMessageEvent;
108 e->msgType = BannerMessageEvent::PlaySound;
110 e->soundClass = _soundClass;
111 e->soundFile = _soundFile;
112 e->duration = _duration;
113 e->wakeupScreen = _wakeupScreen;
124 const std::string& _icon,
126 if (_msg.empty() || BannerActive)
129 ActiveCallBannerEvent* e =
new ActiveCallBannerEvent;
142 ActiveCallBannerEvent* e =
new ActiveCallBannerEvent;
145 BannerActive =
false;
151 const std::string& _icon,
157 ActiveCallBannerEvent* e =
new ActiveCallBannerEvent;
158 e->type = ActiveCallBannerEvent::Update;
169 static bool BannerActive;