2020-04-01 15:11:56 -04:00
|
|
|
|
using System.Collections.Generic;
|
2018-10-25 09:14:39 -04:00
|
|
|
|
using System.Threading.Tasks;
|
2018-08-28 17:32:59 -04:00
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Interfaces
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// represents the abstraction of game log reading
|
2018-08-28 17:32:59 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IGameLogReader
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// how long the log file is
|
2018-08-28 17:32:59 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
long Length { get; }
|
2020-04-01 15:11:56 -04:00
|
|
|
|
|
2018-08-28 17:32:59 -04:00
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// how often to poll the log file
|
2018-08-28 17:32:59 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
int UpdateInterval { get; }
|
2022-01-26 11:32:16 -05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// get new events that have occured since the last poll
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileSizeDiff"></param>
|
|
|
|
|
/// <param name="startPosition"></param>
|
2022-02-13 15:53:01 -05:00
|
|
|
|
/// <param name="server"></param>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// <returns></returns>
|
2022-02-13 15:53:01 -05:00
|
|
|
|
Task<IEnumerable<GameEvent>> ReadEventsFromLog(long fileSizeDiff, long startPosition, Server server);
|
2018-08-28 17:32:59 -04:00
|
|
|
|
}
|
2022-02-13 15:53:01 -05:00
|
|
|
|
}
|