// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/AppConfig.java
// public class AppConfig {
//     public static final String ANALYTICS_PROPERTY_KEY = BuildConfig.APP_ANALYTICS_PROPERTY_KEY;
//     public static final String APP_VERSION = BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")";
//     public static final String WIDESPACE_SID = BuildConfig.DEBUG ? BuildConfig.APP_WIDESPACE_DEBUG_SID : BuildConfig.APP_WIDESPACE_SID;
//     public static final String STHLM_TRAVELING_API_KEY = BuildConfig.APP_STHLMTRAVELING_API_KEY;
//     public static final String USER_AGENT = "STHLMTraveling-Android/" + BuildConfig.VERSION_NAME;
//     public static final String STHLM_TRAVELING_API_ENDPOINT = "http://api.sthlmtraveling.se/";
//     public static final String ADMOB_ROUTE_DETAILS_AD_UNIT_ID = BuildConfig.ADMOB_ROUTE_DETAILS_AD_UNIT_ID;
//     public static final String[] ADMOB_TEST_DEVICES = TextUtils.split(BuildConfig.ADMOB_TEST_DEVICES, ",");
// 
//     public static boolean shouldServeAds() {
//         return BuildConfig.APP_IS_ADS_ENABLED;
//     }
// }
// 
// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/provider/ApiConf.java
// public class ApiConf {
//    public static String KEY = AppConfig.STHLM_TRAVELING_API_KEY;
// 
//    public static String apiEndpoint2() {
//        return AppConfig.STHLM_TRAVELING_API_ENDPOINT;
//    }
// 
//    public static String get(String s) {
//        return s;
//    }
// 
// }


import android.content.Context;
import android.util.Log;
import com.markupartist.sthlmtraveling.AppConfig;
import com.markupartist.sthlmtraveling.provider.ApiConf;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
/*
 * Copyright (C) 2009-2014 Johan Nilsson <http://markupartist.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.markupartist.sthlmtraveling.data.misc;




public class HttpHelper {
    static final int DISK_CACHE_SIZE = 50 * 1024 * 1024; // 50MB
    private static HttpHelper sInstance;
    OkHttpClient mClient;

    private HttpHelper(final Context context) {
        mClient = new OkHttpClient();
        mClient.setConnectTimeout(15, TimeUnit.SECONDS);
        mClient.setReadTimeout(15, TimeUnit.SECONDS);
        installHttpCache(context);
    }

    public static HttpHelper getInstance(final Context context) {
        if (sInstance == null) {
            sInstance = new HttpHelper(context);
        }
// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/AppConfig.java
// public class AppConfig {
//     public static final String ANALYTICS_PROPERTY_KEY = BuildConfig.APP_ANALYTICS_PROPERTY_KEY;
//     public static final String APP_VERSION = BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")";
//     public static final String WIDESPACE_SID = BuildConfig.DEBUG ? BuildConfig.APP_WIDESPACE_DEBUG_SID : BuildConfig.APP_WIDESPACE_SID;
//     public static final String STHLM_TRAVELING_API_KEY = BuildConfig.APP_STHLMTRAVELING_API_KEY;
//     public static final String USER_AGENT = "STHLMTraveling-Android/" + BuildConfig.VERSION_NAME;
//     public static final String STHLM_TRAVELING_API_ENDPOINT = "http://api.sthlmtraveling.se/";
//     public static final String ADMOB_ROUTE_DETAILS_AD_UNIT_ID = BuildConfig.ADMOB_ROUTE_DETAILS_AD_UNIT_ID;
//     public static final String[] ADMOB_TEST_DEVICES = TextUtils.split(BuildConfig.ADMOB_TEST_DEVICES, ",");
// 
//     public static boolean shouldServeAds() {
//         return BuildConfig.APP_IS_ADS_ENABLED;
//     }
// }
// 
// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/provider/ApiConf.java
// public class ApiConf {
//    public static String KEY = AppConfig.STHLM_TRAVELING_API_KEY;
// 
//    public static String apiEndpoint2() {
//        return AppConfig.STHLM_TRAVELING_API_ENDPOINT;
//    }
// 
//    public static String get(String s) {
//        return s;
//    }
// 
// }


// Path: sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/data/misc/HttpHelper.java
import android.content.Context;
import android.util.Log;
import com.markupartist.sthlmtraveling.AppConfig;
import com.markupartist.sthlmtraveling.provider.ApiConf;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;

/*
 * Copyright (C) 2009-2014 Johan Nilsson <http://markupartist.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.markupartist.sthlmtraveling.data.misc;




public class HttpHelper {
    static final int DISK_CACHE_SIZE = 50 * 1024 * 1024; // 50MB
    private static HttpHelper sInstance;
    OkHttpClient mClient;

    private HttpHelper(final Context context) {
        mClient = new OkHttpClient();
        mClient.setConnectTimeout(15, TimeUnit.SECONDS);
        mClient.setReadTimeout(15, TimeUnit.SECONDS);
        installHttpCache(context);
    }

    public static HttpHelper getInstance(final Context context) {
        if (sInstance == null) {
            sInstance = new HttpHelper(context);
        }
        return sInstance;