// Path: library/src/main/java/com/wuman/androidimageloader/ImageLoader.java
// public static enum LoadSource {
//     /**
//      * Returned when an image was loaded from memory cache.
//      */
//     CACHE_MEMORY,
//     /**
//      * Returned when an image was loaded from disk cache.
//      */
//     CACHE_DISK,
//     /**
//      * Returned when an image was loaded from an external source. The
//      * default is via HttpUrlConnection.
//      */
//     EXTERNAL
// }


import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.WeakHashMap;
import android.graphics.Bitmap;
import android.text.TextUtils;
import com.wuman.androidimageloader.ImageLoader.LoadSource;

    public final void setLoadingResource(int loading) {
        mLoadingResource = loading;
    }

    public final void setErrorResource(int error) {
        mErrorResource = error;
    }

    public void unbind(T view) {
        mViewBindings.remove(view);
    }

    public void bind(T view, String url) {
        if (view == null) {
            throw new NullPointerException("view is null");
        }
        if (url == null) {
            throw new NullPointerException("URL is null");
        }

        // reset if wrong URL
        if (!TextUtils.equals(url, mViewBindings.get(view))) {
            unbind(view);
        }

        mViewBindings.put(view, url);
    }

    protected abstract void onImageLoaded(T view, Bitmap bitmap, String url,
// Path: library/src/main/java/com/wuman/androidimageloader/ImageLoader.java
// public static enum LoadSource {
//     /**
//      * Returned when an image was loaded from memory cache.
//      */
//     CACHE_MEMORY,
//     /**
//      * Returned when an image was loaded from disk cache.
//      */
//     CACHE_DISK,
//     /**
//      * Returned when an image was loaded from an external source. The
//      * default is via HttpUrlConnection.
//      */
//     EXTERNAL
// }


// Path: library/src/main/java/com/wuman/androidimageloader/AbstractViewBinder.java
import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.WeakHashMap;
import android.graphics.Bitmap;
import android.text.TextUtils;
import com.wuman.androidimageloader.ImageLoader.LoadSource;


    public final void setLoadingResource(int loading) {
        mLoadingResource = loading;
    }

    public final void setErrorResource(int error) {
        mErrorResource = error;
    }

    public void unbind(T view) {
        mViewBindings.remove(view);
    }

    public void bind(T view, String url) {
        if (view == null) {
            throw new NullPointerException("view is null");
        }
        if (url == null) {
            throw new NullPointerException("URL is null");
        }

        // reset if wrong URL
        if (!TextUtils.equals(url, mViewBindings.get(view))) {
            unbind(view);
        }

        mViewBindings.put(view, url);
    }

    protected abstract void onImageLoaded(T view, Bitmap bitmap, String url,
            LoadSource loadSource);