mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-17 19:08:53 -07:00
64 lines
3.7 KiB
C#
64 lines
3.7 KiB
C#
using Jellyfin.Data.Events;
|
|
using Jellyfin.Data.Events.Users;
|
|
using Jellyfin.Server.Implementations.Events.Consumers.Library;
|
|
using Jellyfin.Server.Implementations.Events.Consumers.Security;
|
|
using Jellyfin.Server.Implementations.Events.Consumers.Session;
|
|
using Jellyfin.Server.Implementations.Events.Consumers.System;
|
|
using Jellyfin.Server.Implementations.Events.Consumers.Updates;
|
|
using Jellyfin.Server.Implementations.Events.Consumers.Users;
|
|
using MediaBrowser.Common.Updates;
|
|
using MediaBrowser.Controller.Authentication;
|
|
using MediaBrowser.Controller.Events;
|
|
using MediaBrowser.Controller.Events.Session;
|
|
using MediaBrowser.Controller.Events.Updates;
|
|
using MediaBrowser.Controller.Library;
|
|
using MediaBrowser.Controller.Session;
|
|
using MediaBrowser.Controller.Subtitles;
|
|
using MediaBrowser.Model.Tasks;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Jellyfin.Server.Implementations.Events
|
|
{
|
|
/// <summary>
|
|
/// A class containing extensions to <see cref="IServiceCollection"/> for eventing.
|
|
/// </summary>
|
|
public static class EventingServiceCollectionExtensions
|
|
{
|
|
/// <summary>
|
|
/// Adds the event services to the service collection.
|
|
/// </summary>
|
|
/// <param name="collection">The service collection.</param>
|
|
public static void AddEventServices(this IServiceCollection collection)
|
|
{
|
|
collection.AddScoped<IEventConsumer<SubtitleDownloadFailureEventArgs>, SubtitleDownloadFailureLogger>();
|
|
|
|
collection.AddScoped<IEventConsumer<GenericEventArgs<AuthenticationResult>>, AuthenticationSucceededLogger>();
|
|
collection.AddScoped<IEventConsumer<GenericEventArgs<AuthenticationRequest>>, AuthenticationFailedLogger>();
|
|
|
|
collection.AddScoped<IEventConsumer<PlaybackStartEventArgs>, PlaybackStartLogger>();
|
|
collection.AddScoped<IEventConsumer<PlaybackStopEventArgs>, PlaybackStopLogger>();
|
|
collection.AddScoped<IEventConsumer<SessionStartedEventArgs>, SessionStartedLogger>();
|
|
collection.AddScoped<IEventConsumer<SessionEndedEventArgs>, SessionEndedLogger>();
|
|
|
|
collection.AddScoped<IEventConsumer<PluginInstallingEventArgs>, PluginInstallingNotifier>();
|
|
collection.AddScoped<IEventConsumer<PluginInstalledEventArgs>, PluginInstalledLogger>();
|
|
collection.AddScoped<IEventConsumer<PluginInstalledEventArgs>, PluginInstalledNotifier>();
|
|
collection.AddScoped<IEventConsumer<PluginUninstalledEventArgs>, PluginUninstalledLogger>();
|
|
collection.AddScoped<IEventConsumer<PluginUninstalledEventArgs>, PluginUninstalledNotifier>();
|
|
collection.AddScoped<IEventConsumer<PluginUpdatedEventArgs>, PluginUpdatedLogger>();
|
|
collection.AddScoped<IEventConsumer<InstallationFailedEventArgs>, PluginInstallationFailedLogger>();
|
|
collection.AddScoped<IEventConsumer<InstallationFailedEventArgs>, PluginInstallationFailedNotifier>();
|
|
collection.AddScoped<IEventConsumer<PluginInstallationCancelledEventArgs>, PluginInstallationCancelledNotifier>();
|
|
|
|
collection.AddScoped<IEventConsumer<UserCreatedEventArgs>, UserCreatedLogger>();
|
|
collection.AddScoped<IEventConsumer<UserDeletedEventArgs>, UserDeletedLogger>();
|
|
collection.AddScoped<IEventConsumer<UserDeletedEventArgs>, UserDeletedNotifier>();
|
|
collection.AddScoped<IEventConsumer<UserUpdatedEventArgs>, UserUpdatedNotifier>();
|
|
collection.AddScoped<IEventConsumer<UserLockedOutEventArgs>, UserLockedOutLogger>();
|
|
collection.AddScoped<IEventConsumer<UserPasswordChangedEventArgs>, UserPasswordChangedLogger>();
|
|
|
|
collection.AddScoped<IEventConsumer<TaskCompletionEventArgs>, TaskCompletedLogger>();
|
|
}
|
|
}
|
|
}
|