Hentai-Downloader/source/sites/basesiteintf.d

48 lines
1.1 KiB
D

module sites.basesiteintf;
/++
+ This is the interface for the base class
+ from which all the other sites are inherited
+/
interface BaseSiteIntf
{
protected:
/++
+ This function returns the name of the manga by parsing the
+ html from the url
+/
string getNameFromUrl(string url);
/++
+ This function extracts the urls of the images from the supplied manga base url
+/
string[] getImageUrlsFromBase(string url);
/++
+ This function creates a folder with the given name
+/
void createOuputFolder(string foldername);
/++
+ This function downloads the images over the
+ url supplied in the `imageUrls` into the `outputPath`
+/
void downloadImages(string[] imageUrls, string outputPath);
/++
+ Downloads a doujin from `url` into `outputPath`
+/
void downloadDoujinFromUrl(string url, string outputPath);
public:
/++
+ Downloads a dojin from `url` into the `outputPath`
+/
void downloadDoujin(string url);
/* /++
+ Download multiple doujins
+/
void downloadDojin(string[] urls); */
}