diff --git a/Flow.Launcher.Plugin/IAsyncPlugin.cs b/Flow.Launcher.Plugin/IAsyncPlugin.cs
index 36f098e7d..3e1a086bc 100644
--- a/Flow.Launcher.Plugin/IAsyncPlugin.cs
+++ b/Flow.Launcher.Plugin/IAsyncPlugin.cs
@@ -4,9 +4,24 @@ using System.Threading.Tasks;
namespace Flow.Launcher.Plugin
{
+ ///
+ /// Asynchronous Plugin Model for Flow Launcher
+ ///
public interface IAsyncPlugin
{
+ ///
+ /// Asynchronous Querying
+ ///
+ /// Query to search
+ /// Cancel when querying job is obsolete
+ ///
Task> QueryAsync(Query query, CancellationToken token);
+
+ ///
+ /// Initialize plugin asynchrously (will still wait finish to continue)
+ ///
+ ///
+ ///
Task InitAsync(PluginInitContext context);
}
}
\ No newline at end of file
diff --git a/Flow.Launcher.Plugin/IPlugin.cs b/Flow.Launcher.Plugin/IPlugin.cs
index 4cc6d8d40..41c61a608 100644
--- a/Flow.Launcher.Plugin/IPlugin.cs
+++ b/Flow.Launcher.Plugin/IPlugin.cs
@@ -2,10 +2,30 @@
namespace Flow.Launcher.Plugin
{
+ ///
+ /// Synchronous Plugin Model for Flow Launcher
+ ///
+ /// If you assume that Querying or Init method require IO transmission
+ /// or CPU Intense Job (performing better with cancellation), please try IAsyncPlugin interface
+ ///
+ ///
public interface IPlugin
{
+ ///
+ /// Querying when user's search changes
+ ///
+ /// This method will be called within a Task.Run,
+ /// so please avoid synchrously wait for long.
+ ///
+ ///
+ /// Query to search
+ ///
List Query(Query query);
-
+
+ ///
+ /// Initialize plugin
+ ///
+ ///
void Init(PluginInitContext context);
}
}
\ No newline at end of file
diff --git a/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs b/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs
index 9c922f667..434d83646 100644
--- a/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs
@@ -2,6 +2,17 @@
namespace Flow.Launcher.Plugin
{
+ ///
+ /// This interface is to indicate and allow plugins to asyncronously reload their
+ /// in memory data cache or other mediums when user makes a new change
+ /// that is not immediately captured. For example, for BrowserBookmark and Program
+ /// plugin does not automatically detect when a user added a new bookmark or program,
+ /// so this interface's function is exposed to allow user manually do the reloading after
+ /// those new additions.
+ ///
+ /// The command that allows user to manual reload is exposed via Plugin.Sys, and
+ /// it will call the plugins that have implemented this interface.
+ ///
public interface IAsyncReloadable
{
Task ReloadDataAsync();
diff --git a/Flow.Launcher.Plugin/Interfaces/IReloadable.cs b/Flow.Launcher.Plugin/Interfaces/IReloadable.cs
index 29b3c15c9..d9160b0ea 100644
--- a/Flow.Launcher.Plugin/Interfaces/IReloadable.cs
+++ b/Flow.Launcher.Plugin/Interfaces/IReloadable.cs
@@ -1,7 +1,7 @@
namespace Flow.Launcher.Plugin
{
///
- /// This interface is to indicate and allow plugins to reload their
+ /// This interface is to indicate and allow plugins to synchronously reload their
/// in memory data cache or other mediums when user makes a new change
/// that is not immediately captured. For example, for BrowserBookmark and Program
/// plugin does not automatically detect when a user added a new bookmark or program,
@@ -10,6 +10,10 @@
///
/// The command that allows user to manual reload is exposed via Plugin.Sys, and
/// it will call the plugins that have implemented this interface.
+ ///
+ ///
+ /// If requiring reloading data asynchrouly, please try IAsyncReloadable
+ ///
///
public interface IReloadable
{