with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLPerformance_Interface is

   procedure Initialize (This : in out IHTMLPerformance_Type) is
   begin
      Set_IID (This, IID_IHTMLPerformance);
   end Initialize;

   function Pointer (This : IHTMLPerformance_Type)
     return Pointer_To_IHTMLPerformance
   is
   begin
      return To_Pointer_To_IHTMLPerformance (Address (This));
   end Pointer;

   procedure Attach (This    : in out IHTMLPerformance_Type;
                     Pointer : in     Pointer_To_IHTMLPerformance)
   is
   begin
      Attach (This, GNATCOM.IInterface.To_Pointer_To_IUnknown
              (Pointer.all'Address));
   end Attach;

   function Get_navigation
     (This : IHTMLPerformance_Type)
     return Pointer_To_IHTMLPerformanceNavigation
   is
       RetVal : aliased Pointer_To_IHTMLPerformanceNavigation;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_navigation
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_navigation;

   function Get_timing
     (This : IHTMLPerformance_Type)
     return Pointer_To_IHTMLPerformanceTiming
   is
       RetVal : aliased Pointer_To_IHTMLPerformanceTiming;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_timing
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_timing;

   function toString
     (This   : IHTMLPerformance_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.toString
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end toString;

   function toJSON
     (This : IHTMLPerformance_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.toJSON
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end toJSON;

end MSHTML.IHTMLPerformance_Interface;

