usbloadergx/source/themes/Theme_List.h

55 lines
1.5 KiB
C
Raw Normal View History

/****************************************************************************
* Theme_List Class
* for USB Loader GX
* by dimok
***************************************************************************/
#ifndef ___THEMELIST_H_
#define ___THEMELIST_H_
#include "network/networkops.h"
#include "network/http.h"
typedef struct _theme_info
{
2010-09-24 02:48:03 +02:00
char *themetitle;
char *author;
char *imagelink;
char *downloadlink;
u8 rating;
} Theme_Info;
class Theme_List
{
public:
//!Constructor
//!\param url from where to get the list of links
2010-09-24 02:48:03 +02:00
Theme_List(const char *url);
//!Destructor
~Theme_List();
//!Get Themes into a struct from the XML file amount
2010-09-24 02:48:03 +02:00
bool ParseXML(const u8 * xmlfile);
//!Get Theme amount
2010-09-24 02:48:03 +02:00
int CountThemes(const u8 * xmlfile);
//! Get the a theme title
//!\param list index
2010-09-24 02:48:03 +02:00
const char * GetThemeTitle(int index);
//! Get the author of the theme
//!\param list index
2010-09-24 02:48:03 +02:00
const char * GetThemeAuthor(int index);
//! Get the author of the theme
//!\param list index
2010-09-24 02:48:03 +02:00
const char * GetImageLink(int index);
//! Get the download link of the theme
//!\param list index
2010-09-24 02:48:03 +02:00
const char * GetDownloadLink(int index);
//! Get the number of links counted
int GetThemeCount();
//! Sort list
void SortList();
protected:
int themescount;
Theme_Info *Theme;
};
#endif