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