sharp-chat/SharpChat/EventStorage/IEventStorage.cs

37 lines
1.4 KiB
C#
Raw Normal View History

using System.Collections.Generic;
namespace SharpChat.EventStorage
{
public interface IEventStorage {
void AddEvent(
long id, string type,
2024-05-10 19:18:55 +00:00
object? data = null,
StoredEventFlags flags = StoredEventFlags.None
);
void AddEvent(
long id, string type,
2024-05-10 19:18:55 +00:00
string? channelName,
object? data = null,
StoredEventFlags flags = StoredEventFlags.None
);
void AddEvent(
long id, string type,
2024-05-10 19:18:55 +00:00
long senderId, string? senderName, ChatColour senderColour, int senderRank, string? senderNick, ChatUserPermissions senderPerms,
object? data = null,
StoredEventFlags flags = StoredEventFlags.None
);
void AddEvent(
long id, string type,
2024-05-10 19:18:55 +00:00
string? channelName,
long senderId, string? senderName, ChatColour senderColour, int senderRank, string? senderNick, ChatUserPermissions senderPerms,
object? data = null,
StoredEventFlags flags = StoredEventFlags.None
);
2024-05-10 19:18:55 +00:00
long AddEvent(string type, ChatUser user, ChatChannel channel, object? data = null, StoredEventFlags flags = StoredEventFlags.None);
void RemoveEvent(StoredEventInfo evt);
2024-05-10 19:18:55 +00:00
StoredEventInfo? GetEvent(long seqId);
IEnumerable<StoredEventInfo> GetChannelEventLog(string channelName, int amount = 20, int offset = 0);
}
}