diff options
Diffstat (limited to 'src/daemon/NotificationsService.h')
-rw-r--r-- | src/daemon/NotificationsService.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/daemon/NotificationsService.h b/src/daemon/NotificationsService.h new file mode 100644 index 0000000..ac885c1 --- /dev/null +++ b/src/daemon/NotificationsService.h @@ -0,0 +1,64 @@ +/* + * PropertiesService.h + * + * Created on: Feb 7, 2021 + * Author: emanoil + * + * hardwarecontrol Copyright (C) 2009 hardwarecontrol development team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef NOTIFICATIONSSERVICE_H_ +#define NOTIFICATIONSSERVICE_H_ + + +#include <tqdbusconnection.h> +#include <tqdbusvariant.h> +#include <tqstringlist.h> +#include <tqmap.h> + +#include "notificationsInterface.h" +#include "NotifyWidget.h" + +class NotificationsService: public org::freedesktop::NotificationsInterface +{ +public: + NotificationsService(TQT_DBusConnection&); + virtual ~NotificationsService(); + +protected: // implement sending signals + virtual bool handleSignalSend(const TQT_DBusMessage& reply); + virtual TQString objectPath() const; + +protected: + virtual bool GetCapabilities(TQStringList& return_caps, TQT_DBusError& error); + + virtual void CloseNotificationAsync(int asyncCallId, TQ_UINT32 id); + + virtual bool ReloadSettings(TQT_DBusError& error); + + virtual bool GetServerInformation(TQString& return_name, TQString& return_vendor, TQString& return_version, TQString& return_spec_version, TQT_DBusError& error); + + virtual void NotifyAsync(int asyncCallId, const TQString& app_name, TQ_UINT32 id, const TQString& icon, const TQString& summary, const TQString& body, const TQStringList& actions, const TQMap< TQString, TQT_DBusVariant >& hints, TQ_INT32 timeout); + +protected: // implement sending replies + virtual void handleMethodReply(const TQT_DBusMessage& reply); + +private: + TQT_DBusConnection *mConnection; + + TQMap<TQ_UINT32, NotifyWidget*> notificationMap; +}; + +#endif /* NOTIFICATIONSSERVICE_H_ */ |