using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Interop.Lmx; [ComImport] [Guid("F31F0CC4-3085-4183-BF28-8FA0659F01F2")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IRedundancyService { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void Initialize([In] Guid guidGalaxyId, [In] int lPlatformId, [In][MarshalAs(UnmanagedType.BStr)] string bstrPrimaryAddress, [In] int lPrimaryPort, [In][MarshalAs(UnmanagedType.BStr)] string bstrSecondaryAddress, [In] int lSecondaryPort, [In][MarshalAs(UnmanagedType.BStr)] string bstrMulticastGroup, [In] int lMultiCastPort = 5001); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void TransferData([In] int lEngineId, [In] int lType, [In] int lReference, [In] ref byte pBuffer, [In] int lLength, [In] int lTimeOut = 0); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UpdateSubscriberInfo([In] int lEngineId, [In] int lToAddCount, [In] ref tagEngineSubscriberInformation pToAdd, [In] int lToDeleteCount, [In] ref tagEngineSubscriberInformation pToDelete); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void RegisterRedundancyNotification([In] int lEngineId, [In][MarshalAs(UnmanagedType.Interface)] IRedundancyNotify pNotify, out int pCookie); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UnregisterRedundancyNotification([In] int lCookie); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void RegisterRedundancyStatusNotification([In] int lTargetPlatformId, [In] int lTargetEngineId, [In][MarshalAs(UnmanagedType.Interface)] IRedundancyNotify pNotify, out int pCookie); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UnregisterRedundancyStatusNotification([In] int lTargetPlatformId, [In] int lTargetEngineId, [In] int lCookie); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UnregisterRedundantEngine([In] int lEngineId); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetHeartbeatRateForRedundantPartner([In] int lEngineId, [In] int lTicks, [In] int lMaxMissedTicks); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetHeartbeatRate([In] int lEngineId, [In] int lTicks, [In] int lMaxMissedTicks); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetIndirectDetectTimeoutForRedundantPartner([In] int lEngineId, [In] int lTimeOut, [In] int bEnableStandbyDetect); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetIndirectDetectTimeout([In] int lEngineId, [In] int lTimeOut, [In] int bEnableStandbyDetect); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UpdateRedundancyStatus([In] int lEngineId, [In] tagRedundancyStatus eFailoverStatus, [In] tagRedundancySubStatus subStatus); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetRedundancyStatus([In] int lPlatformId, [In] int lEngineId, out tagRedundancyStatus eFailoverStatus, out tagRedundancySubStatus subStatus); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetRedundancyStatusBlock([In] int lPlatformId, [In] int lEngineId, [In] int lTimeOut, out tagRedundancyStatus eFailoverStatus, out tagRedundancySubStatus subStatus); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetEngineRedundancyInfo([In] int lPlatformId, [In] int lEngineId, out tagEngineRedundancyInformation pFailoverEngineInfo); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetHeartbeatConsecMissCount([In] int lEngineId, [In] tagRedundancyChannel eChannel, out int plTotalHeartbeatMissed, out int plConsecHeartbeatMissed); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UpdateRemotePlatform([In] int lPlatformId, [In][MarshalAs(UnmanagedType.BStr)] string bstrPrimaryAddress, [In] int lPrimaryPort, [In][MarshalAs(UnmanagedType.BStr)] string bstrFailoverAddress, [In] int lFailoverPort); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void RemoveRemotePlatform([In] int lPlatformId); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void RegisterRedundantEngine([In] int lEngineId, [In] int lPartnerPlatformId, [In][MarshalAs(UnmanagedType.BStr)] string partnerPMCAddress, [In] int partnerPMCPort, [In][MarshalAs(UnmanagedType.BStr)] string partnerRMCAddress, [In] int partnerRMCPort, [In] int timeToDiscoverPartner, [In][MarshalAs(UnmanagedType.BStr)] string engineName, [In] tagRedundancyIdentity eFailoverConfig); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UpdatePartnerRMCAddress([In] int lEngineId, [In][MarshalAs(UnmanagedType.BStr)] string partnerRMCAddress, [In] int partnerRMCPort); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UpdateTimeToDiscoverRedundantPartner([In] int engineId, [In] int timeToDiscoverPartner); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetMaxTimeForStandbyToBecomeActive([In] int engineId, [In] int timeToBecomeActive); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetPartnerRedundancyStatus([In] int engineId, out tagRedundancyStatus status, out tagRedundancySubStatus subStatus, out tagRedundancyStatus partnerStatus); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetPartnerRMCAddress([In] int engineId, [MarshalAs(UnmanagedType.BStr)] out string partnerRMCAddress, out int partnerRMCPort); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void Dump([In] int dumpmsg, [In][MarshalAs(UnmanagedType.Struct)] ref object parm1, [In][MarshalAs(UnmanagedType.Struct)] ref object parm2); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetRedundancyStatusBlockEx([In] tagRedundancyChannel lMessageChannelId, [In] int lPlatformId, [In] int lEngineId, [In] int lTimeOut, out tagRedundancyStatus eStatus, out int partnerPlatform, out int partnerEngine, [ComAliasName("Interop.Lmx.eRedundancyStatusBlockExResult")] out eRedundancyStatusBlockExResult result); }