using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace XUnity.AutoTranslator.Plugin.Core.Web { public interface IKnownEndpoint { /// /// Attempt to translated the provided untranslated text. Will be used in a "coroutine", so it can be implemented /// in an async fashion. /// IEnumerator Translate( string untranslatedText, string from, string to, Action success, Action failure ); /// /// Gets a boolean indicating if we are allowed to call "Translate". /// bool IsBusy { get; } /// /// Called before plugin shutdown and can return true to prevent plugin shutdown, if the plugin /// can provide a secondary strategy for translation. /// /// bool ShouldGetSecondChanceAfterFailure(); /// /// "Update" game loop method. /// void OnUpdate(); } }