summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/asynctask/PicassoImageResource.java
blob: 84179cfcb01ff8dad683adef53d0de291684b30d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package de.danoeh.antennapod.asynctask;

import android.net.Uri;

/**
 * Classes that implement this interface provide access to an image resource that can
 * be loaded by the Picasso library.
 */
public interface PicassoImageResource {

    /**
     * This scheme should be used by PicassoImageResources to
     * indicate that the image Uri points to a file that is not an image
     * (e.g. a media file). This workaround is needed so that the Picasso library
     * loads these Uri with a Downloader instead of trying to load it directly.
     * <p/>
     * For example implementations, see FeedMedia or ExternalMedia.
     */
    public static final String SCHEME_MEDIA = "media";

    /**
     * Returns a Uri to the image or null if no image is available.
     */
    public Uri getImageUri();
}