using System.Threading.Tasks; namespace Flow.Launcher.Plugin { /// /// This interface is for plugins that wish to provide file preview (external preview) /// via a third party app instead of the default preview. /// public interface IAsyncExternalPreview : IFeatures { /// /// Method for opening/showing the preview. /// /// The file path to open the preview for /// Whether to send a toast message notification on failure for the user public Task OpenPreviewAsync(string path, bool sendFailToast = true); /// /// Method for closing/hiding the preview. /// public Task ClosePreviewAsync(); /// /// Method for switching the preview to the next file result. /// This requires the external preview be already open/showing /// /// The file path to switch the preview for /// Whether to send a toast message notification on failure for the user public Task SwitchPreviewAsync(string path, bool sendFailToast = true); /// /// Allows the preview plugin to override the AlwaysPreview setting. Typically useful if plugin's preview does not /// fully work well with being shown together when the query window appears with results. /// When AlwaysPreview setting is on and this is set to false, the preview will not be shown when query /// window appears with results, instead the internal preview will be shown. /// /// public bool AllowAlwaysPreview(); } }