//-----------------------------------------------------------------------
//
// Copyright (c) 2016 Mapbox. All rights reserved.
//
//-----------------------------------------------------------------------
namespace Mapbox.Platform
{
using Mapbox.Map;
using System;
///
/// A data source abstraction. Used by classes that need to fetch data but really
/// don't care about from where the data is coming from. An implementation of
/// IFileSource could fetch the data from the network, disk cache or even generate
/// the data at runtime.
///
public interface IFileSource
{
/// Performs a request asynchronously.
/// The resource description in the URI format.
/// Callback to be called after the request is completed.
///
/// Returns a that can be used for canceling a pending
/// request. This handle can be completely ignored if there is no intention of ever
/// canceling the request.
///
IAsyncRequest Request(string uri, Action callback, int timeout = 10, CanonicalTileId tileId = new CanonicalTileId(), string tilesetId = null);
}
}