aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Activity/IActivityManager.cs
blob: 95aa567adab9394c402795d8822c80997e2ed2e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma warning disable CS1591

using System;
using System.Threading.Tasks;
using Jellyfin.Data.Events;
using Jellyfin.Data.Queries;
using Jellyfin.Database.Implementations.Entities;
using MediaBrowser.Model.Querying;

namespace MediaBrowser.Model.Activity
{
    public interface IActivityManager
    {
        event EventHandler<GenericEventArgs<ActivityLogEntry>> EntryCreated;

        Task CreateAsync(ActivityLog entry);

        Task<QueryResult<ActivityLogEntry>> GetPagedResultAsync(ActivityLogQuery query);

        /// <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);
    }
}