using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace HIVECOMKERNELLib;

[ComImport]
[Guid("2019F18F-0A93-4FBD-9A01-E8923D4D9092")]
[TypeLibType(TypeLibTypeFlags.FDual | TypeLibTypeFlags.FDispatchable)]
public interface IHKernel
{
	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(1)]
	void LoadTestDLL([MarshalAs(UnmanagedType.BStr)] string DLLName, [MarshalAs(UnmanagedType.BStr)] ref string ListOfTests);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(2)]
	void RunTest([MarshalAs(UnmanagedType.BStr)] string strTestName, [MarshalAs(UnmanagedType.Struct)] ref object arrayParam, [MarshalAs(UnmanagedType.Struct)] ref object TestDetails);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(3)]
	void GetAllParamInfo([MarshalAs(UnmanagedType.BStr)] string strTestName, [MarshalAs(UnmanagedType.Struct)] ref object arrayParam);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(4)]
	void GetResultsParamInfo([MarshalAs(UnmanagedType.Struct)] ref object arrayParam);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(5)]
	void UnloadTestDLL([MarshalAs(UnmanagedType.BStr)] string DLLName);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(6)]
	void SetTreeName([MarshalAs(UnmanagedType.BStr)] string TestTreeName);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(7)]
	void StopTest();

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(8)]
	void LoadTestDLLEx([MarshalAs(UnmanagedType.BStr)] string DLLName, [MarshalAs(UnmanagedType.BStr)] ref string ListOfTests, [MarshalAs(UnmanagedType.BStr)] ref string ListOfTestsToBeShown);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(9)]
	void GetTestDescription([MarshalAs(UnmanagedType.BStr)] string TestName, [MarshalAs(UnmanagedType.BStr)] ref string TestDesc);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(10)]
	void SendGlobalVariable([MarshalAs(UnmanagedType.BStr)] string gvName, [MarshalAs(UnmanagedType.BStr)] string gvValue);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(11)]
	void SendGlobalVariables([MarshalAs(UnmanagedType.Struct)] ref object gvNames, [MarshalAs(UnmanagedType.Struct)] ref object gvValues, int size);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(12)]
	void IsInAutomation(int IsInAutomation);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(13)]
	void TraceLogs(int enableTrace);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(14)]
	void EnableSUITEOutParam(int enable);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(15)]
	void NotifyEventListeners([MarshalAs(UnmanagedType.BStr)] string eventName);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(16)]
	void IsSafeToExit(ref int isSafeToExitFlag);

	[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
	[DispId(17)]
	void GetTestProperties([MarshalAs(UnmanagedType.BStr)] string strTestName, [MarshalAs(UnmanagedType.Struct)] ref object arrayProperties);
}
