Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System;
10 : using Cqrs.Authentication;
11 : using Cqrs.Events;
12 :
13 : namespace Cqrs.WebApi.SignalR.Hubs
14 : {
15 : /// <summary>
16 : /// Sends <see cref="IEvent{TSingleSignOnToken}">events</see> to different groups of users.
17 : /// </summary>
18 : public interface ISingleSignOnTokenNotificationHub
19 : {
20 : /// <summary>
21 : /// Send out an event to specific user RSNs
22 : /// </summary>
23 1 : void SendUsersEvent<TSingleSignOnToken>(IEvent<TSingleSignOnToken> eventData, params Guid[] userRsnCollection)
24 : where TSingleSignOnToken : ISingleSignOnToken;
25 :
26 : /// <summary>
27 : /// Send out an event to specific user token
28 : /// </summary>
29 1 : void SendUserEvent<TSingleSignOnToken>(IEvent<TSingleSignOnToken> eventData, string userToken)
30 : where TSingleSignOnToken : ISingleSignOnToken;
31 :
32 : /// <summary>
33 : /// Send out an event to all users
34 : /// </summary>
35 1 : void SendAllUsersEvent<TSingleSignOnToken>(IEvent<TSingleSignOnToken> eventData)
36 : where TSingleSignOnToken : ISingleSignOnToken;
37 :
38 : /// <summary>
39 : /// Send out an event to all users except the specific user token
40 : /// </summary>
41 1 : void SendExceptThisUserEvent<TSingleSignOnToken>(IEvent<TSingleSignOnToken> eventData, string userToken)
42 : where TSingleSignOnToken : ISingleSignOnToken;
43 : }
44 : }
|