namespace LanMountainDesktop.AirAppSdk; /// /// Message bus for inter-AirApp communication. /// Supports both strong-typed messages and topic-based routing. /// public interface IAirAppMessageBus { /// /// Subscribe to a strong-typed message. /// IDisposable Subscribe(Action handler); /// /// Publish a strong-typed message. /// void Publish(TMessage message); /// /// Publish a message to a topic. /// /// Message topic /// Message payload void Publish(string topic, object? payload = null); /// /// Subscribe to a topic. /// /// Message topic /// Message handler /// Subscription token IDisposable Subscribe(string topic, Action handler); /// /// Subscribe to a topic with a typed payload. /// /// Payload type /// Message topic /// Typed message handler /// Subscription token IDisposable Subscribe(string topic, Action handler); }