|
libnx v4.9.0
|
Alarm notification (notif:*) service IPC wrapper. More...
#include "../types.h"#include "../kernel/event.h"#include "../services/applet.h"#include "../services/acc.h"#include "../sf/service.h"Go to the source code of this file.
Data Structures | |
| struct | NotifAlarmTime |
| Data extracted from NotifWeeklyScheduleAlarmSetting::settings. This uses local-time. More... | |
| struct | NotifWeeklyScheduleAlarmSetting |
| WeeklyScheduleAlarmSetting. More... | |
| struct | NotifAlarmSetting |
| AlarmSetting. More... | |
Macros | |
| #define | NOTIF_MAX_ALARMS 8 |
| Maximum alarms that can be registered at the same time by the host Application. | |
Enumerations | |
| enum | NotifServiceType { NotifServiceType_Application = 0 , NotifServiceType_System = 1 } |
| ServiceType for notifInitialize. More... | |
Functions | |
| Result | notifInitialize (NotifServiceType service_type) |
| Initialize notif. Only available on [9.0.0+]. | |
| void | notifExit (void) |
| Exit notif. | |
| Service * | notifGetServiceSession (void) |
| Gets the Service object for the actual notif:* service session. | |
| void | notifAlarmSettingCreate (NotifAlarmSetting *alarm_setting) |
| Creates a NotifAlarmSetting. | |
| static void | notifAlarmSettingSetIsMuted (NotifAlarmSetting *alarm_setting, bool flag) |
| Sets whether the NotifAlarmSetting is muted. | |
| static void | notifAlarmSettingSetUid (NotifAlarmSetting *alarm_setting, AccountUid uid) |
| Sets the AccountUid for the NotifAlarmSetting, see NotifAlarmSetting::uid. | |
| Result | notifAlarmSettingIsEnabled (NotifAlarmSetting *alarm_setting, u32 day_of_week, bool *out) |
| Gets whether the schedule setting for the specified day_of_week is enabled, for the NotifAlarmSetting. | |
| Result | notifAlarmSettingGet (NotifAlarmSetting *alarm_setting, u32 day_of_week, NotifAlarmTime *out) |
| Gets the schedule setting for the specified day_of_week, for the NotifAlarmSetting. | |
| Result | notifAlarmSettingEnable (NotifAlarmSetting *alarm_setting, u32 day_of_week, s32 hour, s32 minute) |
| Enables the schedule setting for the specified day_of_week, for the NotifAlarmSetting. | |
| Result | notifAlarmSettingDisable (NotifAlarmSetting *alarm_setting, u32 day_of_week) |
| Disables the schedule setting for the specified day_of_week, for the NotifAlarmSetting. | |
| Result | notifRegisterAlarmSetting (u16 *alarm_setting_id, const NotifAlarmSetting *alarm_setting, const void *buffer, size_t size) |
| Registers the specified AlarmSetting. | |
| Result | notifUpdateAlarmSetting (const NotifAlarmSetting *alarm_setting, const void *buffer, size_t size) |
| Updates the specified AlarmSetting. | |
| Result | notifListAlarmSettings (NotifAlarmSetting *alarm_settings, s32 count, s32 *total_out) |
| Gets a listing of AlarmSettings. | |
| Result | notifLoadApplicationParameter (u16 alarm_setting_id, void *buffer, size_t size, u32 *actual_size) |
| Loads the ApplicationParameter for the specified AlarmSetting. | |
| Result | notifDeleteAlarmSetting (u16 alarm_setting_id) |
| Deletes the specified AlarmSetting. | |
| static Result | notifGetNotificationSystemEvent (Event *out_event) |
| Gets an Event which is signaled when data is available with notifTryPopNotifiedApplicationParameter. | |
| Result | notifTryPopNotifiedApplicationParameter (void *buffer, u64 size, u64 *out_size) |
| Uses appletTryPopFromNotificationStorageChannel then reads the data from there into the output params. | |
Alarm notification (notif:*) service IPC wrapper.
| enum NotifServiceType |
ServiceType for notifInitialize.
| Enumerator | |
|---|---|
| NotifServiceType_Application | Initializes notif:a, for Application. |
| NotifServiceType_System | Initializes notif:s, for System. |
| void notifAlarmSettingCreate | ( | NotifAlarmSetting * | alarm_setting | ) |
Creates a NotifAlarmSetting.
| [out] | alarm_setting | NotifAlarmSetting |
| Result notifAlarmSettingDisable | ( | NotifAlarmSetting * | alarm_setting, |
| u32 | day_of_week | ||
| ) |
Disables the schedule setting for the specified day_of_week, for the NotifAlarmSetting.
| alarm_setting | NotifAlarmSetting | |
| [in] | day_of_week | Day-of-week, must be 0-6 (Sun-Sat). |
| Result notifAlarmSettingEnable | ( | NotifAlarmSetting * | alarm_setting, |
| u32 | day_of_week, | ||
| s32 | hour, | ||
| s32 | minute | ||
| ) |
Enables the schedule setting for the specified day_of_week, for the NotifAlarmSetting.
This uses local-time.
| alarm_setting | NotifAlarmSetting | |
| [in] | day_of_week | Day-of-week, must be 0-6 (Sun-Sat). |
| [in] | hour | Hour. |
| [in] | minute | Minute. |
| Result notifAlarmSettingGet | ( | NotifAlarmSetting * | alarm_setting, |
| u32 | day_of_week, | ||
| NotifAlarmTime * | out | ||
| ) |
Gets the schedule setting for the specified day_of_week, for the NotifAlarmSetting.
| alarm_setting | NotifAlarmSetting | |
| [in] | day_of_week | Day-of-week, must be 0-6 (Sun-Sat). |
| [out] | out | NotifAlarmTime |
| Result notifAlarmSettingIsEnabled | ( | NotifAlarmSetting * | alarm_setting, |
| u32 | day_of_week, | ||
| bool * | out | ||
| ) |
Gets whether the schedule setting for the specified day_of_week is enabled, for the NotifAlarmSetting.
| alarm_setting | NotifAlarmSetting | |
| [in] | day_of_week | Day-of-week, must be 0-6 (Sun-Sat). |
| [out] | out | Whether the setting is enabled. |
|
inlinestatic |
Sets whether the NotifAlarmSetting is muted.
| alarm_setting | NotifAlarmSetting | |
| [in] | flag | Whether the alarm is muted (true = Alarm turned off, false = on). |
|
inlinestatic |
Sets the AccountUid for the NotifAlarmSetting, see NotifAlarmSetting::uid.
| alarm_setting | NotifAlarmSetting | |
| [in] | uid | AccountUid. If want to clear the uid after it was previously set, you can use an all-zero uid to reset to the default (notifAlarmSettingCreate). |
Deletes the specified AlarmSetting.
| [in] | alarm_setting_id | AlarmSettingId |
Gets an Event which is signaled when data is available with notifTryPopNotifiedApplicationParameter.
| [out] | out_event | Output Event with autoclear=false. |
| Result notifListAlarmSettings | ( | NotifAlarmSetting * | alarm_settings, |
| s32 | count, | ||
| s32 * | total_out | ||
| ) |
Gets a listing of AlarmSettings.
| [out] | alarm_settings | Output NotifAlarmSetting array. |
| [in] | count | Total entries in the alarm_settings array. |
| [out] | total_out | Total output entries. |
| Result notifLoadApplicationParameter | ( | u16 | alarm_setting_id, |
| void * | buffer, | ||
| size_t | size, | ||
| u32 * | actual_size | ||
| ) |
Loads the ApplicationParameter for the specified AlarmSetting.
| [in] | alarm_setting_id | AlarmSettingId |
| [out] | buffer | Output buffer containing the ApplicationParameter. |
| [in] | size | Output buffer size. |
| [out] | actual_size | Actual output size. |
| Result notifRegisterAlarmSetting | ( | u16 * | alarm_setting_id, |
| const NotifAlarmSetting * | alarm_setting, | ||
| const void * | buffer, | ||
| size_t | size | ||
| ) |
Registers the specified AlarmSetting.
| [out] | alarm_setting_id | AlarmSettingId |
| [in] | alarm_setting | NotifAlarmSetting |
| [in] | buffer | Input buffer containing the ApplicationParameter. Optional, can be NULL. |
| [in] | size | Input buffer size, must be <=0x400. Optional, can be 0. |
Uses appletTryPopFromNotificationStorageChannel then reads the data from there into the output params.
| [out] | buffer | Output buffer. |
| [out] | size | Output buffer size. |
| [out] | out_size | Size of the data which was written into the output buffer. Optional, can be NULL. |
| Result notifUpdateAlarmSetting | ( | const NotifAlarmSetting * | alarm_setting, |
| const void * | buffer, | ||
| size_t | size | ||
| ) |
Updates the specified AlarmSetting.
| [in] | alarm_setting | NotifAlarmSetting |
| [in] | buffer | Input buffer containing the ApplicationParameter. Optional, can be NULL. |
| [in] | size | Input buffer size, must be <=0x400. Optional, can be 0. |