get notifications from dbus
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "glibmm/refptr.h"
|
||||
#include "gtkmm/application.h"
|
||||
#include "services/hyprland.hpp"
|
||||
#include "services/notifications.hpp"
|
||||
#include "services/tray.hpp"
|
||||
|
||||
class App {
|
||||
@@ -18,6 +19,7 @@ class App {
|
||||
Glib::RefPtr<Gtk::Application> app;
|
||||
std::vector<Bar *> bars;
|
||||
HyprlandService hyprlandService;
|
||||
NotificationService notificationService;
|
||||
TrayService trayService;
|
||||
|
||||
void setupServices();
|
||||
|
||||
20
include/services/notifications.hpp
Normal file
20
include/services/notifications.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
class NotificationService {
|
||||
public:
|
||||
void intialize();
|
||||
|
||||
NotificationService() = default;
|
||||
~NotificationService();
|
||||
|
||||
guint32 allocateNotificationId(guint32 replacesId);
|
||||
GDBusConnection* getConnection() const { return connection; }
|
||||
|
||||
private:
|
||||
GDBusConnection* connection = nullptr;
|
||||
guint registrationId = 0;
|
||||
GDBusNodeInfo* nodeInfo = nullptr;
|
||||
guint32 nextNotificationId = 1;
|
||||
};
|
||||
Reference in New Issue
Block a user