mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 22:07:44 +01:00
feat: Add new IPC methods, and docs (#2042)
- New methods `HasAction`, `HasFunction`, and `SubscriptionCount` to allow making better decisions about IPC logic. - Some better documentation for the call gates.
This commit is contained in:
parent
4d802a1bee
commit
73ec12145d
3 changed files with 113 additions and 91 deletions
|
|
@ -4,8 +4,24 @@ using Dalamud.Plugin.Ipc.Internal;
|
|||
|
||||
namespace Dalamud.Plugin.Ipc;
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<TRet>
|
||||
/// <summary>
|
||||
/// The backing interface for the provider ("server") half of an IPC channel. This interface is used to expose methods
|
||||
/// to other plugins via RPC, as well as to allow other plugins to subscribe to notifications from this plugin.
|
||||
/// </summary>
|
||||
public interface ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SubscriptionCount"/>
|
||||
public int SubscriptionCount { get; }
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action action);
|
||||
|
|
@ -13,18 +29,12 @@ public interface ICallGateProvider<TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1> action);
|
||||
|
|
@ -32,18 +42,12 @@ public interface ICallGateProvider<T1, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, T2, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, T2, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1, T2> action);
|
||||
|
|
@ -51,18 +55,12 @@ public interface ICallGateProvider<T1, T2, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, T2, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1, T2 arg2);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1, T2, T3> action);
|
||||
|
|
@ -70,18 +68,12 @@ public interface ICallGateProvider<T1, T2, T3, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, T2, T3, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1, T2 arg2, T3 arg3);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1, T2, T3, T4> action);
|
||||
|
|
@ -89,18 +81,12 @@ public interface ICallGateProvider<T1, T2, T3, T4, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, T2, T3, T4, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1, T2, T3, T4, T5> action);
|
||||
|
|
@ -108,18 +94,12 @@ public interface ICallGateProvider<T1, T2, T3, T4, T5, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, T2, T3, T4, T5, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1, T2, T3, T4, T5, T6> action);
|
||||
|
|
@ -127,18 +107,12 @@ public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, T2, T3, T4, T5, T6, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, T7, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, T7, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1, T2, T3, T4, T5, T6, T7> action);
|
||||
|
|
@ -146,18 +120,12 @@ public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, T7, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, T2, T3, T4, T5, T6, T7, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, T7, T8, TRet>
|
||||
/// <inheritdoc cref="ICallGateProvider"/>
|
||||
public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, T7, T8, TRet> : ICallGateProvider
|
||||
{
|
||||
/// <inheritdoc cref="CallGatePubSubBase.RegisterAction"/>
|
||||
public void RegisterAction(Action<T1, T2, T3, T4, T5, T6, T7, T8> action);
|
||||
|
|
@ -165,12 +133,6 @@ public interface ICallGateProvider<T1, T2, T3, T4, T5, T6, T7, T8, TRet>
|
|||
/// <inheritdoc cref="CallGatePubSubBase.RegisterFunc"/>
|
||||
public void RegisterFunc(Func<T1, T2, T3, T4, T5, T6, T7, T8, TRet> func);
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterAction"/>
|
||||
public void UnregisterAction();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.UnregisterFunc"/>
|
||||
public void UnregisterFunc();
|
||||
|
||||
/// <inheritdoc cref="CallGatePubSubBase.SendMessage"/>
|
||||
public void SendMessage(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue