using ClassNotify.Shared.Models; namespace ClassNotify.Shared.Contracts; /// /// 教室端 (Windows Service) 接收来自服务端的强类型 SignalR 契约 /// public interface IDeviceHubClient { /// /// 接收呼叫/通知指令 /// Task ReceiveNotification(NotificationDto notification); /// /// 接收服务端下发的端到端受控运维指令 (SelfCheck, RestartClient, Reconnect, RefreshConfig) /// Task ReceiveRemoteCommand(DeviceCommandDto command); /// /// 接收服务端下达的撤回/提前关闭通知指令 /// Task CancelNotification(string notificationId); /// /// 接收配置更新 /// Task ReceiveConfigUpdate(string configJson); /// /// 接收服务端下达的技术诊断包采集命令 (P2.5 RC1-3 Support Bundle) /// Task GenerateSupportBundle(GenerateSupportBundleCommand command); /// /// 接收服务端下发的版本升级启动指令 (P2.5 RC1-4 Update & Rollback) /// Task StartDeviceUpdate(StartDeviceUpdateCommand command); /// /// 接收服务端下达的设备授权状态变更通知 (P3 License Lifecycle) /// Task ReceiveLicenseStatus(DeviceLicenseStatusDto licenseStatus); /// /// 接收班级名称或大屏名称更新通知 /// Task ClassDisplayNameChanged(string newClassName); /// /// 服务端通知客户端当前会话已失效(租户或班级绑定变更或凭据轮转),必须使用新凭据重新建立全新连接 /// Task DeviceSessionInvalidated(string reason); /// /// 服务端下发大屏临时进入配对模式(携带临时配对码与有效期秒数) /// Task ReceivePairingMode(string pairingCode, int ttlSeconds); /// /// Turn 115: 服务端通知大屏绑定状态更新(如任课教师首次绑定或新增任课教师绑定) /// Task DeviceBindingUpdated(string classDisplayName, int boundTeacherCount); }