2020-04-04 12:40:23 -05:00
|
|
|
|
using System;
|
|
|
|
|
using static SharedLibraryCore.Server;
|
2019-02-05 18:02:45 -06:00
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Interfaces
|
2018-04-13 01:32:30 -05:00
|
|
|
|
{
|
|
|
|
|
public interface IEventParser
|
|
|
|
|
{
|
2018-04-14 23:26:27 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generates a game event based on log line input
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="logLine">single log line string</param>
|
|
|
|
|
/// <returns></returns>
|
2018-04-26 01:13:04 -05:00
|
|
|
|
/// todo: make this integrate without needing the server
|
2019-05-13 10:36:11 -05:00
|
|
|
|
GameEvent GenerateGameEvent(string logLine);
|
2018-04-14 23:26:27 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get game specific folder prefix for log files
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>Game directory prefix</returns>
|
2019-01-26 20:33:37 -06:00
|
|
|
|
IEventParserConfiguration Configuration { get; set; }
|
2019-02-05 18:02:45 -06:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// stores the game/client specific version (usually the value of the "version" DVAR)
|
|
|
|
|
/// </summary>
|
2019-02-02 18:54:30 -06:00
|
|
|
|
string Version { get; set; }
|
2019-02-05 18:02:45 -06:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// specifies the game name (usually the internal studio iteration ie: IW4, T5 etc...)
|
|
|
|
|
/// </summary>
|
|
|
|
|
Game GameName { get; set; }
|
2019-04-06 21:48:49 -05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// specifies the connect URI used to join game servers via web browser
|
|
|
|
|
/// </summary>
|
|
|
|
|
string URLProtocolFormat { get; set; }
|
2020-01-21 18:08:18 -06:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-04-04 12:40:23 -05:00
|
|
|
|
/// specifies the text name of the game the parser is for
|
2020-01-21 18:08:18 -06:00
|
|
|
|
/// </summary>
|
|
|
|
|
string Name { get; set; }
|
2020-04-04 12:40:23 -05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// registers a custom event subtype to be triggered when a value is detected
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="eventSubtype">subtype assigned to the event when generated</param>
|
|
|
|
|
/// <param name="eventTriggerValue">event keyword to trigger an event generation</param>
|
|
|
|
|
/// <param name="eventModifier">function pointer that modifies the generated game event</param>
|
|
|
|
|
void RegisterCustomEvent(string eventSubtype, string eventTriggerValue, Func<string, IEventParserConfiguration, GameEvent, GameEvent> eventModifier);
|
2018-04-13 01:32:30 -05:00
|
|
|
|
}
|
|
|
|
|
}
|