with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ISVGTests_Interface is

   procedure Initialize (This : in out ISVGTests_Type) is
   begin
      Set_IID (This, IID_ISVGTests);
   end Initialize;

   function Pointer (This : ISVGTests_Type)
     return Pointer_To_ISVGTests
   is
   begin
      return To_Pointer_To_ISVGTests (Address (This));
   end Pointer;

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

   function Get_requiredFeatures
     (This : ISVGTests_Type)
     return Pointer_To_ISVGStringList
   is
       RetVal : aliased Pointer_To_ISVGStringList;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_requiredFeatures
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_requiredFeatures;

   function Get_requiredExtensions
     (This : ISVGTests_Type)
     return Pointer_To_ISVGStringList
   is
       RetVal : aliased Pointer_To_ISVGStringList;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_requiredExtensions
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_requiredExtensions;

   function Get_systemLanguage
     (This : ISVGTests_Type)
     return Pointer_To_ISVGStringList
   is
       RetVal : aliased Pointer_To_ISVGStringList;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_systemLanguage
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_systemLanguage;

   function hasExtension
     (This      : ISVGTests_Type;
      extension : GNATCOM.Types.BSTR;
      Free      : Boolean := True)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.hasExtension
         (Pointer (This),
          extension,
          RetVal'Unchecked_Access));

      if Free then
               GNATCOM.IInterface.Free (extension);
      
      end if;

      return RetVal;
   end hasExtension;

end MSHTML.ISVGTests_Interface;

