mirror of
https://github.com/D4C1-Labs/Flipper-ARF.git
synced 2026-03-29 08:09:53 +00:00
30 lines
811 B
C++
30 lines
811 B
C++
#pragma once
|
|
|
|
#include <furi.h>
|
|
#include <notification/notification.h>
|
|
#include <notification/notification_messages.h>
|
|
|
|
static NotificationApp* __notification_app_instance = NULL;
|
|
|
|
class Notification {
|
|
private:
|
|
static NotificationApp* getApp() {
|
|
if(__notification_app_instance == NULL) {
|
|
__notification_app_instance = (NotificationApp*)furi_record_open(RECORD_NOTIFICATION);
|
|
}
|
|
return __notification_app_instance;
|
|
}
|
|
|
|
public:
|
|
static void Play(const NotificationSequence* nullTerminatedSequence) {
|
|
notification_message(getApp(), nullTerminatedSequence);
|
|
}
|
|
|
|
static void Dispose() {
|
|
if(__notification_app_instance != NULL) {
|
|
furi_record_close(RECORD_NOTIFICATION);
|
|
__notification_app_instance = NULL;
|
|
}
|
|
}
|
|
};
|