BSB Developer Docs
Loading...
Searching...
No Matches
busy.h File Reference

BUSY application – frontend for the BusyTimer service. More...

#include "busy_common.h"

Go to the source code of this file.

Macros

#define RECORD_BUSY_APP   "busy_app"
 The string key for BusyApp instance access.
 
#define BUSY_APP_TIMER_MODE   "timer"
 Special argument to launch in timer mode.
 
#define BUSY_APP_CUSTOM_MODE   "custom"
 Special argument to launch in Custom mode.
 

Typedefs

typedef struct BusyApp BusyApp
 BusyApp opaque type.
 

Enumerations

enum  BusyStatus { BusyStatusOk , BusyStatusAborted , BusyStatusTimeout }
 Enumeration of possible statuses returned by the BusyApp APIs. More...
 

Functions

BusyStatus busy_set_config (BusyApp *instance, const BusyAppConfig *config)
 Set application configuration (e.g.
 
BusyStatus busy_show_timer (BusyApp *instance)
 Force the running app to transition to the timer scene.
 
BusyStatus busy_request_exit (BusyApp *instance)
 Request the running app to exit.
 

Detailed Description

BUSY application – frontend for the BusyTimer service.

Macro Definition Documentation

◆ BUSY_APP_CUSTOM_MODE

#define BUSY_APP_CUSTOM_MODE   "custom"

Special argument to launch in Custom mode.

Passing this string as the application argument indicates that the app is to be run in Custom mode.

In this mode, the app will show different graphics and additionally, use a different settings profile.

◆ BUSY_APP_TIMER_MODE

#define BUSY_APP_TIMER_MODE   "timer"

Special argument to launch in timer mode.

Passing this string as the application argument indicates that the app was run by the BUSY timer.

In this mode, the app will go directly to the BusyAppSceneIdTimer scene and will exit if "back" is pressed on any of the following scenes:

  • BusyAppSceneIdTimer,
  • BusyAppSceneIdNext,
  • BusyAppSceneIdProgress.

◆ RECORD_BUSY_APP

#define RECORD_BUSY_APP   "busy_app"

The string key for BusyApp instance access.

Get the instance pointer by calling furi_record_open(RECORD_BUSY_APP);

Note
The record is only available if the BUSY app is running.

Enumeration Type Documentation

◆ BusyStatus

enum BusyStatus

Enumeration of possible statuses returned by the BusyApp APIs.

Enumerator
BusyStatusOk 

Command executed normally, no error occurred.

BusyStatusAborted 

Command was aborted (e.g.

when app was exiting)

BusyStatusTimeout 

Command was taking too long to execute.

Function Documentation

◆ busy_request_exit()

BusyStatus busy_request_exit ( BusyApp * instance)

Request the running app to exit.

Depending on the way the app was started, it will result in different behaviour:

  • If the app was started in regular or custom mode, it will return to the start scene.
  • If the app was started in the timer mode, it will exit.

This function is nonblocking (will return sooner than the command will actually execute).

Parameters
[in,out]instancepointer to the BusyApp instance
Returns
BusyStatusOk on success, any other value from BusyStatus on failure

◆ busy_set_config()

BusyStatus busy_set_config ( BusyApp * instance,
const BusyAppConfig * config )

Set application configuration (e.g.

theme, Smart home behaviour)

It is safe to delete the value pointed to by config after this function has returned.

Parameters
[in,out]instancepointer to the BusyApp instance
[in]configpointer to the structure containing the configuration
Returns
BusyStatusOk on success, any other value from BusyStatus on failure

◆ busy_show_timer()

BusyStatus busy_show_timer ( BusyApp * instance)

Force the running app to transition to the timer scene.

This function is blocking, i.e. it only returns when the transition has been completed.

Parameters
[in,out]instancepointer to the BusyApp instance
Returns
BusyStatusOk on success, any other value from BusyStatus on failure