Deluge Firmware 1.3.0
Build date: 2026.10.14
Loading...
Searching...
No Matches
deluge::gui::browser::FileListView Class Referenceabstract

Read-only view over the files on the card, so name derivation can be tested without a card, a display, or the browser's static state. More...

#include <default_name.h>

Public Member Functions

virtual std::string highestNumberedName (char const *prefix) const =0
 Finds the highest-numbered member of the "<prefix><digits>" name family.
virtual uint32_t takenLetterSuffixes (char const *stem) const =0
 Reports which single-letter variations of a name already exist.

Detailed Description

Read-only view over the files on the card, so name derivation can be tested without a card, a display, or the browser's static state.

Implemented over the Browser in the firmware, and over a vector in tests. Both queries ask about a whole family of related names at once rather than about one candidate name.

Warning
Both must answer for the entire folder. Browser::fileItems - the browser's own listing - holds at most FILE_ITEMS_MAX_NUM_ELEMENTS entries around the file being saved, culled to about half of that as a folder is read, so on its own it cannot answer either query on a folder of any size: it reports names missing that are really present, and the caller hands back a name that already exists on the card.

Member Function Documentation

◆ highestNumberedName()

virtual std::string deluge::gui::browser::FileListView::highestNumberedName ( char const * prefix) const
pure virtual

Finds the highest-numbered member of the "<prefix><digits>" name family.

"Greatest" is by the browser's ordering, in which digit runs compare numerically, so "MYTRACK 11.XML" beats "MYTRACK 9.XML".

Parameters
prefixThe family's common leading text, including any delimiter ("MYTRACK ").
Returns
The greatest matching name, extension included, or empty when the folder holds no member.

◆ takenLetterSuffixes()

virtual uint32_t deluge::gui::browser::FileListView::takenLetterSuffixes ( char const * stem) const
pure virtual

Reports which single-letter variations of a name already exist.

Names differing only in case or in extension (.XML / .Json) are the same variation.

Parameters
stemThe name the letter is appended to ("SONG185").
Returns
A bitmask of the taken letters: bit 0 is 'A', through bit 25 for 'Z'.

The documentation for this class was generated from the following file: