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