Skip to content

Commit 1c63cd9

Browse files
committed
remove duplicate comment summary
1 parent 3c2ea38 commit 1c63cd9

File tree

1 file changed

+0
-149
lines changed

1 file changed

+0
-149
lines changed

Flow.Launcher.Core/Plugin/JsonRPCV2Models/JsonRPCPublicAPI.cs

Lines changed: 0 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -20,304 +20,155 @@ public JsonRPCPublicAPI(IPublicAPI api)
2020
_api = api;
2121
}
2222

23-
/// <summary>
24-
/// Change Flow.Launcher query
25-
/// </summary>
26-
/// <param name="query">query text</param>
27-
/// <param name="requery">
28-
/// Force requery. By default, Flow Launcher will not fire query if your query is same with existing one.
29-
/// Set this to <see langword="true"/> to force Flow Launcher requerying
30-
/// </param>
3123
public void ChangeQuery(string query, bool requery = false)
3224
{
3325
_api.ChangeQuery(query, requery);
3426
}
3527

36-
/// <summary>
37-
/// Restart Flow Launcher
38-
/// </summary>
3928
public void RestartApp()
4029
{
4130
_api.RestartApp();
4231
}
4332

44-
/// <summary>
45-
/// Run a shell command
46-
/// </summary>
47-
/// <param name="cmd">The command or program to run</param>
48-
/// <param name="filename">the shell type to run, e.g. powershell.exe</param>
49-
/// <exception cref="FileNotFoundException">Thrown when unable to find the file specified in the command </exception>
50-
/// <exception cref="Win32Exception">Thrown when error occurs during the execution of the command </exception>
5133
public void ShellRun(string cmd, string filename = "cmd.exe")
5234
{
5335
_api.ShellRun(cmd, filename);
5436
}
5537

56-
/// <summary>
57-
/// Copies the passed in text and shows a message indicating whether the operation was completed successfully.
58-
/// When directCopy is set to true and passed in text is the path to a file or directory,
59-
/// the actual file/directory will be copied to clipboard. Otherwise the text itself will still be copied to clipboard.
60-
/// </summary>
61-
/// <param name="text">Text to save on clipboard</param>
62-
/// <param name="directCopy">When true it will directly copy the file/folder from the path specified in text</param>
63-
/// <param name="showDefaultNotification">Whether to show the default notification from this method after copy is done.
64-
/// It will show file/folder/text is copied successfully.
65-
/// Turn this off to show your own notification after copy is done.</param>>
6638
public void CopyToClipboard(string text, bool directCopy = false, bool showDefaultNotification = true)
6739
{
6840
_api.CopyToClipboard(text, directCopy, showDefaultNotification);
6941
}
7042

71-
/// <summary>
72-
/// Save everything, all of Flow Launcher and plugins' data and settings
73-
/// </summary>
7443
public void SaveAppAllSettings()
7544
{
7645
_api.SaveAppAllSettings();
7746
}
7847

79-
/// <summary>
80-
/// Save all Flow's plugins settings
81-
/// </summary>
8248
public void SavePluginSettings()
8349
{
8450
_api.SavePluginSettings();
8551
}
8652

87-
/// <summary>
88-
/// Reloads any Plugins that have the
89-
/// IReloadable implemented. It refeshes
90-
/// Plugin's in memory data with new content
91-
/// added by user.
92-
/// </summary>
9353
public Task ReloadAllPluginDataAsync()
9454
{
9555
return _api.ReloadAllPluginData();
9656
}
9757

98-
/// <summary>
99-
/// Check for new Flow Launcher update
100-
/// </summary>
10158
public void CheckForNewUpdate()
10259
{
10360
_api.CheckForNewUpdate();
10461
}
10562

106-
/// <summary>
107-
/// Show the error message using Flow's standard error icon.
108-
/// </summary>
109-
/// <param name="title">Message title</param>
110-
/// <param name="subTitle">Optional message subtitle</param>
11163
public void ShowMsgError(string title, string subTitle = "")
11264
{
11365
_api.ShowMsgError(title, subTitle);
11466
}
11567

116-
/// <summary>
117-
/// Show the MainWindow when hiding
118-
/// </summary>
11968
public void ShowMainWindow()
12069
{
12170
_api.ShowMainWindow();
12271
}
12372

124-
/// <summary>
125-
/// Hide MainWindow
126-
/// </summary>
12773
public void HideMainWindow()
12874
{
12975
_api.HideMainWindow();
13076
}
13177

132-
/// <summary>
133-
/// Representing whether the main window is visible
134-
/// </summary>
135-
/// <returns></returns>
13678
public bool IsMainWindowVisible()
13779
{
13880
return _api.IsMainWindowVisible();
13981
}
14082

141-
/// <summary>
142-
/// Show message box
143-
/// </summary>
144-
/// <param name="title">Message title</param>
145-
/// <param name="subTitle">Message subtitle</param>
146-
/// <param name="iconPath">Message icon path (relative path to your plugin folder)</param>
14783
public void ShowMsg(string title, string subTitle = "", string iconPath = "")
14884
{
14985
_api.ShowMsg(title, subTitle, iconPath);
15086
}
15187

152-
/// <summary>
153-
/// Show message box
154-
/// </summary>
155-
/// <param name="title">Message title</param>
156-
/// <param name="subTitle">Message subtitle</param>
157-
/// <param name="iconPath">Message icon path (relative path to your plugin folder)</param>
158-
/// <param name="useMainWindowAsOwner">when true will use main windows as the owner</param>
15988
public void ShowMsg(string title, string subTitle, string iconPath, bool useMainWindowAsOwner = true)
16089
{
16190
_api.ShowMsg(title, subTitle, iconPath, useMainWindowAsOwner);
16291
}
16392

164-
/// <summary>
165-
/// Open setting dialog
166-
/// </summary>
16793
public void OpenSettingDialog()
16894
{
16995
_api.OpenSettingDialog();
17096
}
17197

172-
/// <summary>
173-
/// Get translation of current language
174-
/// You need to implement IPluginI18n if you want to support multiple languages for your plugin
175-
/// </summary>
176-
/// <param name="key"></param>
177-
/// <returns></returns>
17898
public string GetTranslation(string key)
17999
{
180100
return _api.GetTranslation(key);
181101
}
182102

183-
/// <summary>
184-
/// Get all loaded plugins
185-
/// </summary>
186-
/// <returns></returns>
187103
public List<PluginPair> GetAllPlugins()
188104
{
189105
return _api.GetAllPlugins();
190106
}
191107

192108

193-
/// <summary>
194-
/// Fuzzy Search the string with the given query. This is the core search mechanism Flow uses
195-
/// </summary>
196-
/// <param name="query">Query string</param>
197-
/// <param name="stringToCompare">The string that will be compared against the query</param>
198-
/// <returns>Match results</returns>
199109
public MatchResult FuzzySearch(string query, string stringToCompare)
200110
{
201111
return _api.FuzzySearch(query, stringToCompare);
202112
}
203113

204-
/// <summary>
205-
/// Http download the spefic url and return as string
206-
/// </summary>
207-
/// <param name="url">URL to call Http Get</param>
208-
/// <param name="token">Cancellation Token</param>
209-
/// <returns>Task to get string result</returns>
210114
public Task<string> HttpGetStringAsync(string url, CancellationToken token = default)
211115
{
212116
return _api.HttpGetStringAsync(url, token);
213117
}
214118

215-
/// <summary>
216-
/// Http download the spefic url and return as stream
217-
/// </summary>
218-
/// <param name="url">URL to call Http Get</param>
219-
/// <param name="token">Cancellation Token</param>
220-
/// <returns>Task to get stream result</returns>
221119
public Task<Stream> HttpGetStreamAsync(string url, CancellationToken token = default)
222120
{
223121
return _api.HttpGetStreamAsync(url, token);
224122
}
225123

226-
/// <summary>
227-
/// Download the specific url to a cretain file path
228-
/// </summary>
229-
/// <param name="url">URL to download file</param>
230-
/// <param name="filePath">path to save downloaded file</param>
231-
/// <param name="token">place to store file</param>
232-
/// <returns>Task showing the progress</returns>
233124
public Task HttpDownloadAsync([NotNull] string url, [NotNull] string filePath,
234125
CancellationToken token = default)
235126
{
236127
return _api.HttpDownloadAsync(url, filePath, token);
237128
}
238129

239-
/// <summary>
240-
/// Add ActionKeyword for specific plugin
241-
/// </summary>
242-
/// <param name="pluginId">ID for plugin that needs to add action keyword</param>
243-
/// <param name="newActionKeyword">The actionkeyword that is supposed to be added</param>
244130
public void AddActionKeyword(string pluginId, string newActionKeyword)
245131
{
246132
_api.AddActionKeyword(pluginId, newActionKeyword);
247133
}
248134

249-
/// <summary>
250-
/// Remove ActionKeyword for specific plugin
251-
/// </summary>
252-
/// <param name="pluginId">ID for plugin that needs to remove action keyword</param>
253-
/// <param name="oldActionKeyword">The actionkeyword that is supposed to be removed</param>
254135
public void RemoveActionKeyword(string pluginId, string oldActionKeyword)
255136
{
256137
_api.RemoveActionKeyword(pluginId, oldActionKeyword);
257138
}
258139

259-
/// <summary>
260-
/// Check whether specific ActionKeyword is assigned to any of the plugin
261-
/// </summary>
262-
/// <param name="actionKeyword">The actionkeyword for checking</param>
263-
/// <returns>True if the actionkeyword is already assigned, False otherwise</returns>
264140
public bool ActionKeywordAssigned(string actionKeyword)
265141
{
266142
return _api.ActionKeywordAssigned(actionKeyword);
267143
}
268144

269-
/// <summary>
270-
/// Log debug message
271-
/// Message will only be logged in Debug mode
272-
/// </summary>
273145
public void LogDebug(string className, string message, [CallerMemberName] string methodName = "")
274146
{
275147
_api.LogDebug(className, message, methodName);
276148
}
277149

278-
/// <summary>
279-
/// Log info message
280-
/// </summary>
281150
public void LogInfo(string className, string message, [CallerMemberName] string methodName = "")
282151
{
283152
_api.LogInfo(className, message, methodName);
284153
}
285154

286-
/// <summary>
287-
/// Log warning message
288-
/// </summary>
289155
public void LogWarn(string className, string message, [CallerMemberName] string methodName = "")
290156
{
291157
_api.LogWarn(className, message, methodName);
292158
}
293159

294-
295-
/// <summary>
296-
/// Open directory in an explorer configured by user via Flow's Settings. The default is Windows Explorer
297-
/// </summary>
298-
/// <param name="DirectoryPath">Directory Path to open</param>
299-
/// <param name="FileNameOrFilePath">Extra FileName Info</param>
300160
public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null)
301161
{
302162
_api.OpenDirectory(DirectoryPath, FileNameOrFilePath);
303163
}
304164

305165

306-
/// <summary>
307-
/// Opens the URL with the given string.
308-
/// The browser and mode used is based on what's configured in Flow's default browser settings.
309-
/// Non-C# plugins should use this method.
310-
/// </summary>
311166
public void OpenUrl(string url, bool? inPrivate = null)
312167
{
313168
_api.OpenUrl(url, inPrivate);
314169
}
315170

316171

317-
/// <summary>
318-
/// Opens the application URI with the given string, e.g. obsidian://search-query-example
319-
/// Non-C# plugins should use this method
320-
/// </summary>
321172
public void OpenAppUri(string appUri)
322173
{
323174
_api.OpenAppUri(appUri);

0 commit comments

Comments
 (0)