mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: obsolete current IPC
This commit is contained in:
parent
d9e6f25f42
commit
bbdc7d56b4
1 changed files with 6 additions and 0 deletions
|
|
@ -226,6 +226,7 @@ namespace Dalamud.Plugin
|
|||
/// Subscribe to an IPC message by any plugin.
|
||||
/// </summary>
|
||||
/// <param name="action">The action to take when a message was received.</param>
|
||||
[Obsolete("The current IPC mechanism is obsolete and scheduled to be replaced after API level 3.")]
|
||||
public void SubscribeAny(Action<string, ExpandoObject> action)
|
||||
{
|
||||
if (this.AnyPluginIpcAction != null)
|
||||
|
|
@ -239,6 +240,7 @@ namespace Dalamud.Plugin
|
|||
/// </summary>
|
||||
/// <param name="pluginName">The InternalName of the plugin to subscribe to.</param>
|
||||
/// <param name="action">The action to take when a message was received.</param>
|
||||
[Obsolete("The current IPC mechanism is obsolete and scheduled to be replaced after API level 3.")]
|
||||
public void Subscribe(string pluginName, Action<ExpandoObject> action)
|
||||
{
|
||||
if (this.dalamud.PluginManager.IpcSubscriptions.Any(x => x.SourcePluginName == this.pluginName && x.SubPluginName == pluginName))
|
||||
|
|
@ -250,6 +252,7 @@ namespace Dalamud.Plugin
|
|||
/// <summary>
|
||||
/// Unsubscribe from messages from any plugin.
|
||||
/// </summary>
|
||||
[Obsolete("The current IPC mechanism is obsolete and scheduled to be replaced after API level 3.")]
|
||||
public void UnsubscribeAny()
|
||||
{
|
||||
if (this.AnyPluginIpcAction == null)
|
||||
|
|
@ -262,6 +265,7 @@ namespace Dalamud.Plugin
|
|||
/// Unsubscribe from messages from a plugin.
|
||||
/// </summary>
|
||||
/// <param name="pluginName">The InternalName of the plugin to unsubscribe from.</param>
|
||||
[Obsolete("The current IPC mechanism is obsolete and scheduled to be replaced after API level 3.")]
|
||||
public void Unsubscribe(string pluginName)
|
||||
{
|
||||
var sub = this.dalamud.PluginManager.IpcSubscriptions.FirstOrDefault(x => x.SourcePluginName == this.pluginName && x.SubPluginName == pluginName);
|
||||
|
|
@ -275,6 +279,7 @@ namespace Dalamud.Plugin
|
|||
/// Send a message to all subscribed plugins.
|
||||
/// </summary>
|
||||
/// <param name="message">The message to send.</param>
|
||||
[Obsolete("The current IPC mechanism is obsolete and scheduled to be replaced after API level 3.")]
|
||||
public void SendMessage(ExpandoObject message)
|
||||
{
|
||||
var subs = this.dalamud.PluginManager.IpcSubscriptions.Where(x => x.SubPluginName == this.pluginName);
|
||||
|
|
@ -290,6 +295,7 @@ namespace Dalamud.Plugin
|
|||
/// <param name="pluginName">The InternalName of the plugin to send the message to.</param>
|
||||
/// <param name="message">The message to send.</param>
|
||||
/// <returns>True if the corresponding plugin was present and received the message.</returns>
|
||||
[Obsolete("The current IPC mechanism is obsolete and scheduled to be replaced after API level 3.")]
|
||||
public bool SendMessage(string pluginName, ExpandoObject message)
|
||||
{
|
||||
var (_, _, pluginInterface, _) = this.dalamud.PluginManager.Plugins.FirstOrDefault(x => x.Definition.InternalName == pluginName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue