big refactoring and features added
This commit is contained in:
36
App/Services/profile_repository.h
Normal file
36
App/Services/profile_repository.h
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @file profile_repository.h
|
||||
* @brief Future SD-card profile repository with minimal standalone parsing.
|
||||
*/
|
||||
|
||||
#ifndef PROFILE_REPOSITORY_H
|
||||
#define PROFILE_REPOSITORY_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "app_types.h"
|
||||
|
||||
/**
|
||||
* @brief Load the first valid profile listed in `profiles.csv`.
|
||||
*
|
||||
* @param out_profile Destination profile object.
|
||||
* @param out_index Receives the zero-based valid profile index.
|
||||
*
|
||||
* @retval true A valid profile was loaded.
|
||||
* @retval false No valid profile entry was available.
|
||||
*/
|
||||
bool profile_repository_load_first(profile_t *out_profile, uint16_t *out_index);
|
||||
|
||||
/**
|
||||
* @brief Load the next valid profile, wrapping around to the first entry.
|
||||
*
|
||||
* @param in_out_index Current profile index on input, next index on success.
|
||||
* @param out_profile Destination profile object.
|
||||
*
|
||||
* @retval true The next valid profile was loaded.
|
||||
* @retval false No valid profile entry was available.
|
||||
*/
|
||||
bool profile_repository_load_next(uint16_t *in_out_index, profile_t *out_profile);
|
||||
|
||||
#endif /* PROFILE_REPOSITORY_H */
|
||||
Reference in New Issue
Block a user