2015-07-19 00:27:41 +00:00
|
|
|
|
using Jackett.Models;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
2015-04-13 06:25:21 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2015-04-13 14:25:41 +00:00
|
|
|
|
using System.Web.UI.WebControls;
|
2015-04-13 06:25:21 +00:00
|
|
|
|
|
|
|
|
|
namespace Jackett
|
|
|
|
|
{
|
|
|
|
|
public interface IndexerInterface
|
|
|
|
|
{
|
2015-04-13 14:25:41 +00:00
|
|
|
|
string DisplayName { get; }
|
|
|
|
|
string DisplayDescription { get; }
|
2015-04-14 14:51:56 +00:00
|
|
|
|
Uri SiteLink { get; }
|
2015-04-13 14:25:41 +00:00
|
|
|
|
|
2015-04-25 19:37:03 +00:00
|
|
|
|
// Whether this indexer has been configured, verified and saved in the past and has the settings required for functioning
|
|
|
|
|
bool IsConfigured { get; }
|
|
|
|
|
|
2015-04-13 06:25:21 +00:00
|
|
|
|
// Retrieved for starting setup for the indexer via web API
|
|
|
|
|
Task<ConfigurationData> GetConfigurationForSetup();
|
|
|
|
|
|
|
|
|
|
// Called when web API wants to apply setup configuration via web API, usually this is where login and storing cookie happens
|
2015-04-15 19:42:50 +00:00
|
|
|
|
Task ApplyConfiguration(JToken configJson);
|
2015-04-13 06:25:21 +00:00
|
|
|
|
|
|
|
|
|
// Called on startup when initializing indexers from saved configuration
|
|
|
|
|
void LoadFromSavedConfiguration(JToken jsonConfig);
|
2015-04-16 06:04:28 +00:00
|
|
|
|
|
|
|
|
|
Task<ReleaseInfo[]> PerformQuery(TorznabQuery query);
|
2015-04-17 03:53:52 +00:00
|
|
|
|
|
|
|
|
|
Task<byte[]> Download(Uri link);
|
2015-04-13 06:25:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|