Extend SystemInfo to allow distinguishing between platforms and variants.

Doing so removes the need to loop over all targets to fill in values for
target variants in ServerInfo.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24427 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2010-01-31 21:57:45 +00:00
parent e953836328
commit ea4130fd2d
4 changed files with 49 additions and 34 deletions

View file

@ -63,14 +63,21 @@ class SystemInfo : public QObject
CurConfigureModel,
};
enum PlatformType {
PlatformAll,
PlatformBase,
PlatformVariant
};
//! return a list of all platforms (rbutil internal names)
static QStringList platforms(void);
static QStringList platforms(enum PlatformType type = PlatformAll,
QString variant="");
//! returns a list of all languages
static QStringList languages(void);
//! maps a platform to its name
static QString name(QString plattform);
static QString name(QString platform);
//! maps a platform to its brand
static QString brand(QString plattform);
static QString brand(QString platform);
//! returns a map of usb-ids and their targets
static QMap<int, QString> usbIdMap(enum MapType);
//! get a value from system settings