usbloadergx/source/network/URL_List.h
dimok321 1b9a56b877 *Added button to update/download all language files in the Language selection. The files are downloaded into the setuped path for languages.
*Added URL_List class that gets all Links of an http url.

*Made HomebrewList class dynamic allocated like the URL_List class too now. This saves lots of unused memory.

*Small cleanups

NOTE: Punes made an update too (i didnt know he was doing it). We decided to have both in because of:

Punes update updates only the files that are available on the SD/USB and only when you are doing a complete update.

My update is downloading ALL files from the SVN Link (getting the whole list). These is mainly for people that are getting started or those who want to update the whole LanguageList
2009-07-29 20:32:14 +00:00

40 lines
1015 B
C++

/****************************************************************************
* URL List Class
* for USB Loader GX
* by dimok
***************************************************************************/
#ifndef ___URLLIST_H_
#define ___URLLIST_H_
#include "network/networkops.h"
#include "network/http.h"
typedef struct {
char *URL;
bool direct;
} Link_Info;
class URL_List
{
public:
//!Constructor
//!\param url from where to get the list of links
URL_List(const char *url);
//!Destructor
~URL_List();
//! Get the a filepath of the list
//!\param list index
char * GetURL(int index);
//! Is it a direct URL or just a file or path under the main url
bool IsDirectURL(int index);
//! Get the number of links counted
int GetURLCount();
//! Sort list
void SortList();
protected:
int urlcount;
Link_Info *Links;
};
#endif