using Jellyfin.Data.Events.System; 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.Events; using MediaBrowser.Controller.Events.Authentication; using MediaBrowser.Controller.Events.Session; using MediaBrowser.Controller.Events.Updates; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Lyrics; using MediaBrowser.Controller.Subtitles; using MediaBrowser.Model.Tasks; using Microsoft.Extensions.DependencyInjection; namespace Jellyfin.Server.Implementations.Events { /// /// A class containing extensions to for eventing. /// public static class EventingServiceCollectionExtensions { /// /// Adds the event services to the service collection. /// /// The service collection. public static void AddEventServices(this IServiceCollection collection) { // Library consumers collection.AddScoped, LyricDownloadFailureLogger>(); collection.AddScoped, SubtitleDownloadFailureLogger>(); // Security consumers collection.AddScoped, AuthenticationFailedLogger>(); collection.AddScoped, AuthenticationSucceededLogger>(); // Session consumers collection.AddScoped, PlaybackStartLogger>(); collection.AddScoped, PlaybackStopLogger>(); collection.AddScoped, SessionEndedLogger>(); collection.AddScoped, SessionStartedLogger>(); // System consumers collection.AddScoped, PendingRestartNotifier>(); collection.AddScoped, TaskCompletedLogger>(); collection.AddScoped, TaskCompletedNotifier>(); // Update consumers collection.AddScoped, PluginInstallationCancelledNotifier>(); collection.AddScoped, PluginInstallationFailedLogger>(); collection.AddScoped, PluginInstallationFailedNotifier>(); collection.AddScoped, PluginInstalledLogger>(); collection.AddScoped, PluginInstalledNotifier>(); collection.AddScoped, PluginInstallingNotifier>(); collection.AddScoped, PluginUninstalledLogger>(); collection.AddScoped, PluginUninstalledNotifier>(); collection.AddScoped, PluginUpdatedLogger>(); // User consumers collection.AddScoped, UserCreatedLogger>(); collection.AddScoped, UserDeletedLogger>(); collection.AddScoped, UserDeletedNotifier>(); collection.AddScoped, UserLockedOutLogger>(); collection.AddScoped, UserPasswordChangedLogger>(); collection.AddScoped, UserUpdatedNotifier>(); } } }