// Path: CurseDownloader/src/main/java/ch/vorburger/minecraft/cursedl/CurseManifest.java
// public static class CurseManifestFile {
// 	public int projectID;
// 	public int fileID;
// 	public boolean required;
// 		
// 	@Override
// 	public String toString() {
// 		return "CurseManifestFile [projectID=" + projectID + ", fileID=" + fileID + ", required=" + required + "]";
// 	}
// }


import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpResponseException;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.apache.ApacheHttpTransport;
import ch.vorburger.minecraft.cursedl.CurseManifest.CurseManifestFile;
package ch.vorburger.minecraft.cursedl;




/**
 * Download files from Curse.com.
 *  
 * @author Michael Vorburger.ch
 */
public class Downloader {

	protected HttpTransport http = new ApacheHttpTransport();
	protected HttpRequestFactory requestFactory = http.createRequestFactory();
	
	protected File dir;

	public Downloader(File directory) {
		this.dir = directory;
	}

	public void download(CurseManifest mf) throws IOException {
		int i = 1;
		log("Downloading " + mf.files.size() + " mods into " + dir + " ...");
// Path: CurseDownloader/src/main/java/ch/vorburger/minecraft/cursedl/CurseManifest.java
// public static class CurseManifestFile {
// 	public int projectID;
// 	public int fileID;
// 	public boolean required;
// 		
// 	@Override
// 	public String toString() {
// 		return "CurseManifestFile [projectID=" + projectID + ", fileID=" + fileID + ", required=" + required + "]";
// 	}
// }


// Path: CurseDownloader/src/main/java/ch/vorburger/minecraft/cursedl/Downloader.java
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpResponseException;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.apache.ApacheHttpTransport;
import ch.vorburger.minecraft.cursedl.CurseManifest.CurseManifestFile;

package ch.vorburger.minecraft.cursedl;




/**
 * Download files from Curse.com.
 *  
 * @author Michael Vorburger.ch
 */
public class Downloader {

	protected HttpTransport http = new ApacheHttpTransport();
	protected HttpRequestFactory requestFactory = http.createRequestFactory();
	
	protected File dir;

	public Downloader(File directory) {
		this.dir = directory;
	}

	public void download(CurseManifest mf) throws IOException {
		int i = 1;
		log("Downloading " + mf.files.size() + " mods into " + dir + " ...");
		for (CurseManifestFile file : mf.files) {