5
5
using System . Threading . Tasks ;
6
6
using System . Windows ;
7
7
using Squirrel ;
8
- using Flow . Launcher . Core ;
9
8
using Flow . Launcher . Core . Plugin ;
10
9
using Flow . Launcher . Core . Resource ;
11
10
using Flow . Launcher . Helper ;
14
13
using Flow . Launcher . Infrastructure . Image ;
15
14
using Flow . Launcher . Plugin ;
16
15
using Flow . Launcher . ViewModel ;
16
+ using Flow . Launcher . Plugin . SharedModels ;
17
+ using System . Threading ;
18
+ using System . IO ;
19
+ using Flow . Launcher . Infrastructure . Http ;
20
+ using JetBrains . Annotations ;
17
21
18
22
namespace Flow . Launcher
19
23
{
@@ -127,6 +131,32 @@ public List<PluginPair> GetAllPlugins()
127
131
128
132
public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent ;
129
133
134
+ public MatchResult FuzzySearch ( string query , string stringToCompare ) => StringMatcher . FuzzySearch ( query , stringToCompare ) ;
135
+
136
+ public Task < string > HttpGetStringAsync ( string url , CancellationToken token = default )
137
+ {
138
+ return Http . GetAsync ( url ) ;
139
+ }
140
+
141
+ public Task < Stream > HttpGetStreamAsync ( string url , CancellationToken token = default )
142
+ {
143
+ return Http . GetStreamAsync ( url ) ;
144
+ }
145
+
146
+ public Task HttpDownloadAsync ( [ NotNull ] string url , [ NotNull ] string filePath )
147
+ {
148
+ return Http . DownloadAsync ( url , filePath ) ;
149
+ }
150
+
151
+ public void AddActionKeyword ( string pluginId , string newActionKeyword )
152
+ {
153
+ PluginManager . AddActionKeyword ( pluginId , newActionKeyword ) ;
154
+ }
155
+
156
+ public void RemoveActionKeyword ( string pluginId , string oldActionKeyword )
157
+ {
158
+ PluginManager . RemoveActionKeyword ( pluginId , oldActionKeyword ) ;
159
+ }
130
160
#endregion
131
161
132
162
#region Private Methods
@@ -139,6 +169,7 @@ private bool KListener_hookedKeyboardCallback(KeyEvent keyevent, int vkcode, Spe
139
169
}
140
170
return true ;
141
171
}
172
+
142
173
#endregion
143
174
}
144
175
}
0 commit comments