IAppHubClient.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Application.Abstractions.Chat;
  2. namespace Application.Abstractions.Hub;
  3. /// <summary>
  4. /// AppHub 클라이언트 인터페이스 — 모든 페이지에서 사용하는 공통 Hub
  5. /// 접속자 추적 + 채팅 + 알림 + 쪽지 + 크루 초대/동의/toast
  6. /// </summary>
  7. public interface IAppHubClient
  8. {
  9. // ── 채팅 (기존 ChatHub 통합) ──────────────────────────────────
  10. Task ReceiveMessage(ChatMessage message);
  11. Task ReceiveHistory(IReadOnlyList<ChatMessage> messages);
  12. Task ReceiveSystemMessage(string message);
  13. Task ReceiveParticipantCount(int count);
  14. Task ReceiveParticipants(IReadOnlyList<ChatParticipant> participants);
  15. Task Connected(string message);
  16. Task Logout(string message);
  17. Task Kick();
  18. // ── 알림 + 쪽지 ──────────────────────────────────────────────
  19. Task ReceiveNotification(object notification);
  20. Task ReceiveNote(object notePreview);
  21. Task ReceiveUnreadCounts(int notificationCount, int noteCount);
  22. // ── 채널 상태 (PubSub 기반 실시간) ─────────────────────────
  23. Task ReceiveChannelStatus(object channelStatus);
  24. // ── 크루 ─────────────────────────────────────────────────────
  25. Task ReceiveCrewInvitation(object invitation);
  26. Task ReceiveCrewConsentUpdate(object consentStatus);
  27. Task ReceiveCrewStarted(object sessionInfo);
  28. Task ReceiveCrewEnded(object sessionResult);
  29. Task ReceiveCrewToast(object toastData);
  30. }