// Path: app/src/main/java/org/secuso/privacyfriendlyweather/weather_api/IProcessHttpRequest.java
// public interface IProcessHttpRequest {
// 
//     /**
//      * The method that will be executed in case of a successful HTTP request.
//      *
//      * @param response The response of the HTTP request.
//      */
//     void processSuccessScenario(String response);
// 
//     /**
//      * This method will be executed in case any error arose while executing the HTTP request.
//      *
//      * @param error The error that occurred while executing the HTTP request.
//      */
//     void processFailScenario(VolleyError error);
// 
// }


import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.HurlStack;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import org.secuso.privacyfriendlyweather.weather_api.IProcessHttpRequest;
import java.io.BufferedInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManagerFactory;
package org.secuso.privacyfriendlyweather.http;






/**
 * This class implements the IHttpRequest interface. It provides HTTP requests by using Volley.
 * See: https://developer.android.com/training/volley/simple.html
 */
public class VolleyHttpRequest implements IHttpRequest {

    private Context context;

    /**
     * Constructor.
     *
     * @param context Volley needs a context "for creating the cache dir".
     * @see Volley#newRequestQueue(Context)
     */
    public VolleyHttpRequest(Context context) {
        this.context = context;
    }

    /**
     * @see IHttpRequest#make(String, HttpRequestType, IProcessHttpRequest)
     */
    @Override
// Path: app/src/main/java/org/secuso/privacyfriendlyweather/weather_api/IProcessHttpRequest.java
// public interface IProcessHttpRequest {
// 
//     /**
//      * The method that will be executed in case of a successful HTTP request.
//      *
//      * @param response The response of the HTTP request.
//      */
//     void processSuccessScenario(String response);
// 
//     /**
//      * This method will be executed in case any error arose while executing the HTTP request.
//      *
//      * @param error The error that occurred while executing the HTTP request.
//      */
//     void processFailScenario(VolleyError error);
// 
// }


// Path: app/src/main/java/org/secuso/privacyfriendlyweather/http/VolleyHttpRequest.java
import android.content.Context;
import android.util.Log;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.HurlStack;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import org.secuso.privacyfriendlyweather.weather_api.IProcessHttpRequest;
import java.io.BufferedInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManagerFactory;

package org.secuso.privacyfriendlyweather.http;






/**
 * This class implements the IHttpRequest interface. It provides HTTP requests by using Volley.
 * See: https://developer.android.com/training/volley/simple.html
 */
public class VolleyHttpRequest implements IHttpRequest {

    private Context context;

    /**
     * Constructor.
     *
     * @param context Volley needs a context "for creating the cache dir".
     * @see Volley#newRequestQueue(Context)
     */
    public VolleyHttpRequest(Context context) {
        this.context = context;
    }

    /**
     * @see IHttpRequest#make(String, HttpRequestType, IProcessHttpRequest)
     */
    @Override
    public void make(String URL, HttpRequestType method, final IProcessHttpRequest requestProcessor) {