2019-01-13 21:02:23 +01:00
|
|
|
using System;
|
2020-05-02 18:32:22 -04:00
|
|
|
using System.Threading.Tasks;
|
2020-08-13 20:48:28 -04:00
|
|
|
using Jellyfin.Data.Events;
|
2020-10-03 21:14:25 -04:00
|
|
|
using Jellyfin.Data.Queries;
|
2025-03-25 16:45:00 +01:00
|
|
|
using Jellyfin.Database.Implementations.Entities;
|
2019-01-25 21:33:58 +01:00
|
|
|
using MediaBrowser.Model.Querying;
|
2018-12-27 18:27:57 -05:00
|
|
|
|
2025-12-08 21:01:32 -07:00
|
|
|
namespace MediaBrowser.Model.Activity;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface for the activity manager.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IActivityManager
|
2018-12-27 18:27:57 -05:00
|
|
|
{
|
2025-12-08 21:01:32 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// The event that is triggered when an entity is created.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event EventHandler<GenericEventArgs<ActivityLogEntry>> EntryCreated;
|
2018-12-27 18:27:57 -05:00
|
|
|
|
2025-12-08 21:01:32 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Create a new activity log entry.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="entry">The entry to create.</param>
|
|
|
|
|
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
|
|
|
|
Task CreateAsync(ActivityLog entry);
|
2019-01-25 21:33:58 +01:00
|
|
|
|
2025-12-08 21:01:32 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Get a paged list of activity log entries.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The activity log query.</param>
|
|
|
|
|
/// <returns>The page of entries.</returns>
|
|
|
|
|
Task<QueryResult<ActivityLogEntry>> GetPagedResultAsync(ActivityLogQuery query);
|
2020-10-14 11:44:11 -06:00
|
|
|
|
2025-12-08 21:01:32 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Remove all activity logs before the specified date.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="startDate">Activity log start date.</param>
|
|
|
|
|
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
|
|
|
|
Task CleanAsync(DateTime startDate);
|
2018-12-27 18:27:57 -05:00
|
|
|
}
|