unleashed-firmware/lib/toolbox/name_generator.h
MX 16b8fa4715
Subghz save files with receive time [ci skip]
+ merge better scene_save_name code (removing kostily)
some modifications to original code was made to keep previous formats
original implementation by Willy-JL

Source:
a1c7dc5eaa
7e7509d481 (diff-1708ba08196de5331f4b4c3d8e13162e78d5edb33e1308c1b4cc09975264151e)
2024-01-28 06:45:33 +03:00

48 lines
1.4 KiB
C

#pragma once
#include <stdint.h>
#include <stddef.h>
#include <furi_hal_rtc.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Generates detailed/random name based on furi_hal flags
*
* @param name buffer to write random name
* @param max_name_size length of given buffer
* @param[in] prefix The prefix of the name
*/
void name_generator_make_auto(char* name, size_t max_name_size, const char* prefix);
void name_generator_make_auto_datetime(
char* name,
size_t max_name_size,
const char* prefix,
FuriHalRtcDateTime* custom_time);
/** Generates random name
*
* @param name buffer to write random name
* @param max_name_size length of given buffer
* @param[in] prefix The prefix of the name
*/
void name_generator_make_random(char* name, size_t max_name_size);
void name_generator_make_random_prefixed(char* name, size_t max_name_size, const char* prefix);
/** Generates detailed name
*
* @param name buffer to write random name
* @param max_name_size length of given buffer
* @param[in] prefix The prefix of the name
*/
void name_generator_make_detailed(char* name, size_t max_name_size, const char* prefix);
void name_generator_make_detailed_datetime(
char* name,
size_t max_name_size,
const char* prefix,
FuriHalRtcDateTime* custom_time);
#ifdef __cplusplus
}
#endif