mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-31 12:34:29 -04:00
Support for frequency manager categories (as files)
Base class for frequency manager views Menuview clear/add bugfix
This commit is contained in:
parent
abd154b3c7
commit
08391bba4f
8 changed files with 351 additions and 410 deletions
|
@ -30,11 +30,12 @@
|
|||
#define __FREQMAN_H__
|
||||
|
||||
using namespace ui;
|
||||
using namespace std;
|
||||
|
||||
enum freqman_error {
|
||||
NO_ERROR = 0,
|
||||
ERROR_ACCESS,
|
||||
ERROR_EMPTY,
|
||||
ERROR_NOFILES,
|
||||
ERROR_DUPLICATE
|
||||
};
|
||||
|
||||
|
@ -42,17 +43,16 @@ struct freqman_entry {
|
|||
rf::Frequency value;
|
||||
std::string frequency_str;
|
||||
std::string description;
|
||||
int32_t category_id;
|
||||
};
|
||||
|
||||
struct freqman_db {
|
||||
std::vector<freqman_entry> entries;
|
||||
std::vector<std::string> categories;
|
||||
};
|
||||
|
||||
bool load_freqman_file(freqman_db &db);
|
||||
bool save_freqman_file(freqman_db &db);
|
||||
bool create_freqman_file(File &freqs_file);
|
||||
std::string freqman_item_string(freqman_entry &item);
|
||||
std::vector<std::string> get_freqman_files();
|
||||
bool load_freqman_file(std::string& file_stem, freqman_db &db);
|
||||
bool save_freqman_file(std::string& file_stem, freqman_db &db);
|
||||
bool create_freqman_file(std::string& file_stem, File& freqman_file);
|
||||
std::string freqman_item_string(freqman_entry &item, size_t max_length);
|
||||
|
||||
#endif/*__FREQMAN_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue