60 lines
2.2 KiB
C#
60 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Aurora.Proto.Party;
|
|
|
|
namespace Aurora.Services.EventManager
|
|
{
|
|
public interface IEventManager
|
|
{
|
|
/// <summary>
|
|
/// Get the list of event type subscriptions for a given sessionIdentifier id.
|
|
/// </summary>
|
|
/// <param name="sessionIdentifier">sessionIdentifier Id</param>
|
|
/// <returns></returns>
|
|
List<EventType> GetSubscriptionList(string sessionIdentifier);
|
|
|
|
/// <summary>
|
|
/// Get the number of event subscriptions for a given sessionIdentifier
|
|
/// </summary>
|
|
/// <param name="sessionIdentifier">sessionIdentifier Id</param>
|
|
/// <returns></returns>
|
|
int GetSubscriptionCount(string sessionIdentifier);
|
|
|
|
/// <summary>
|
|
/// Add a new subscription
|
|
/// </summary>
|
|
/// <param name="sessionIdentifier"></param>
|
|
/// <param name="type"></param>
|
|
bool AddSubscription(string sessionIdentifier, EventType type);
|
|
|
|
/// <summary>
|
|
/// Add a list of subscriptions. This unsubscribes from unused events.
|
|
/// </summary>
|
|
/// <param name="sessionIdentifier">The browser sessionIdentifier id.</param>
|
|
/// <param name="types">The list of event types to subscribe to.</param>
|
|
void AddSubscriptionList(string sessionIdentifier, List<EventType> types);
|
|
|
|
/// <summary>
|
|
/// Unsubscribe from a given event type.
|
|
/// </summary>
|
|
/// <param name="sessionIdentifier">sessionIdentifier Id</param>
|
|
/// <param name="type">Event Type to be removed</param>
|
|
void RemoveSubscription(string sessionIdentifier, EventType type);
|
|
|
|
void RemoveSubscriptionList(string sessionIdentifier, List<EventType> types);
|
|
|
|
/// <summary>
|
|
/// Remove all subscriptons for a given sessionIdentifier.
|
|
/// </summary>
|
|
/// <param name="sessionIdentifier">sessionIdentifier Id</param>
|
|
void RemoveAllSubscriptions(string sessionIdentifier);
|
|
|
|
void AddEventHandler(Action<BaseEvent> action, Action cancel, string sessionIdentifierId);
|
|
|
|
void RemoveEventHandler(string sessionIdentifierId);
|
|
|
|
void CancelEventStream(string sessionIdentifierId);
|
|
|
|
void FireEvent(BaseEvent bEvent);
|
|
}
|
|
} |