mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-11-25 05:42:45 +01:00
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using DHT.Server.Data;
|
|
using DHT.Server.Data.Aggregations;
|
|
using DHT.Server.Data.Filters;
|
|
using DHT.Server.Download;
|
|
|
|
namespace DHT.Server.Database;
|
|
|
|
public interface IDatabaseFile : IDisposable {
|
|
string Path { get; }
|
|
DatabaseStatistics Statistics { get; }
|
|
DatabaseStatisticsSnapshot SnapshotStatistics();
|
|
|
|
void AddServer(Data.Server server);
|
|
List<Data.Server> GetAllServers();
|
|
|
|
void AddChannel(Channel channel);
|
|
List<Channel> GetAllChannels();
|
|
|
|
void AddUsers(User[] users);
|
|
List<User> GetAllUsers();
|
|
|
|
void AddMessages(Message[] messages);
|
|
int CountMessages(MessageFilter? filter = null);
|
|
List<Message> GetMessages(MessageFilter? filter = null, bool includeText = true);
|
|
HashSet<ulong> GetMessageIds(MessageFilter? filter = null);
|
|
void RemoveMessages(MessageFilter filter, FilterRemovalMode mode);
|
|
|
|
int CountAttachments(AttachmentFilter? filter = null);
|
|
|
|
void AddDownload(Data.Download download);
|
|
List<Data.Download> GetDownloadsWithoutData();
|
|
Data.Download GetDownloadWithData(Data.Download download);
|
|
DownloadedAttachment? GetDownloadedAttachment(string url);
|
|
|
|
void EnqueueDownloadItems(AttachmentFilter? filter = null);
|
|
List<DownloadItem> GetEnqueuedDownloadItems(int count);
|
|
void RemoveDownloadItems(DownloadItemFilter? filter, FilterRemovalMode mode);
|
|
DownloadStatusStatistics GetDownloadStatusStatistics();
|
|
|
|
void Vacuum();
|
|
}
|