2024-04-30 18:17:17 +02:00
|
|
|
#include "notification.h"
|
2024-09-16 14:11:01 +02:00
|
|
|
#include "util.h"
|
2024-04-30 18:17:17 +02:00
|
|
|
|
2024-09-16 14:11:01 +02:00
|
|
|
void send_notification(uint8_t *content)
|
2024-04-30 18:17:17 +02:00
|
|
|
{
|
2024-09-16 14:11:01 +02:00
|
|
|
printf("Content: %s\n", content);
|
|
|
|
NotifyNotification *notification = notify_notification_new("Client",
|
|
|
|
(char *) content, "dialog-information");
|
|
|
|
if (notification == NULL) {
|
|
|
|
error(0, "Cannot create notification");
|
|
|
|
}
|
|
|
|
if (!notify_notification_show(notification, NULL)) {
|
|
|
|
error(0, "Cannot show notifcation");
|
|
|
|
}
|
|
|
|
g_object_unref(G_OBJECT(notification));
|
2024-04-30 18:17:17 +02:00
|
|
|
}
|