// DO NOT EDIT! This is an autogenerated file. All changes will be
// overwritten!

//	Copyright (c) 2023 Vidyo, Inc. All rights reserved.


using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;

namespace VidyoClient
{
	public class RateShaperStatsFactory
	{
		public static RateShaperStats Create()
		{
			return new RateShaperStats(IntPtr.Zero);
		}
		public static void Destroy(RateShaperStats obj)
		{
		}
	}
	/// <summary>
	/// Staticstics for an endpoint rate shaper.
	/// </summary>
	public class RateShaperStats {
#if __IOS__
		const string importLib = "__Internal";
#else
		const string importLib = "libVidyoClient";
#endif
		private IntPtr objPtr; // opaque VidyoRateShaperStats reference.
		public IntPtr GetObjectPtr() {

			VidyoRateShaperStatsSetdelayNormalNative(objPtr, delayNormal);
			VidyoRateShaperStatsSetdelayRetransmitNative(objPtr, delayRetransmit);
			VidyoRateShaperStatsSetdropNormalNative(objPtr, dropNormal);
			VidyoRateShaperStatsSetpacketsNormalNative(objPtr, packetsNormal);
			VidyoRateShaperStatsSetpacketsRetransmitNative(objPtr, packetsRetransmit);

			return objPtr;
		}
		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern uint VidyoRateShaperStatsGetdelayNormalNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoRateShaperStatsSetdelayNormalNative(IntPtr obj, uint delayNormal);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern uint VidyoRateShaperStatsGetdelayRetransmitNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoRateShaperStatsSetdelayRetransmitNative(IntPtr obj, uint delayRetransmit);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern uint VidyoRateShaperStatsGetdropNormalNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoRateShaperStatsSetdropNormalNative(IntPtr obj, uint dropNormal);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern uint VidyoRateShaperStatsGetpacketsNormalNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoRateShaperStatsSetpacketsNormalNative(IntPtr obj, uint packetsNormal);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern uint VidyoRateShaperStatsGetpacketsRetransmitNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoRateShaperStatsSetpacketsRetransmitNative(IntPtr obj, uint packetsRetransmit);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr VidyoRateShaperStatsConstructCopyNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr VidyoRateShaperStatsConstructDefaultNative();

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern void VidyoRateShaperStatsDestructNative(IntPtr obj);

		/// <summary>
		/// Normal delay.
		/// </summary>
		public uint delayNormal;
		/// <summary>
		/// Retransmit delay.
		/// </summary>
		public uint delayRetransmit;
		/// <summary>
		/// Dropped normal.
		/// </summary>
		public uint dropNormal;
		/// <summary>
		/// Normal packets.
		/// </summary>
		public uint packetsNormal;
		/// <summary>
		/// Retransmitted packets.
		/// </summary>
		public uint packetsRetransmit;
		public RateShaperStats(IntPtr obj){
			if(obj == IntPtr.Zero) {
				objPtr = VidyoRateShaperStatsConstructDefaultNative();
			}
			else {
				objPtr = VidyoRateShaperStatsConstructCopyNative(obj);
			}

			delayNormal = VidyoRateShaperStatsGetdelayNormalNative(objPtr);
			delayRetransmit = VidyoRateShaperStatsGetdelayRetransmitNative(objPtr);
			dropNormal = VidyoRateShaperStatsGetdropNormalNative(objPtr);
			packetsNormal = VidyoRateShaperStatsGetpacketsNormalNative(objPtr);
			packetsRetransmit = VidyoRateShaperStatsGetpacketsRetransmitNative(objPtr);
		}
		~RateShaperStats() {
			VidyoRateShaperStatsDestructNative(objPtr);
		 }
	};
}
