with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLLinkElement_Interface is

   procedure Initialize (This : in out IHTMLLinkElement_Type) is
   begin
      Set_IID (This, IID_IHTMLLinkElement);
   end Initialize;

   function Pointer (This : IHTMLLinkElement_Type)
     return Pointer_To_IHTMLLinkElement
   is
   begin
      return To_Pointer_To_IHTMLLinkElement (Address (This));
   end Pointer;

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

   procedure Put_href
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_href
         (Pointer (This),
          p));

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

   end Put_href;

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

      return RetVal;
   end Get_href;

   procedure Put_rel
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_rel
         (Pointer (This),
          p));

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

   end Put_rel;

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

      return RetVal;
   end Get_rel;

   procedure Put_rev
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_rev
         (Pointer (This),
          p));

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

   end Put_rev;

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

      return RetVal;
   end Get_rev;

   procedure Put_type
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_type
         (Pointer (This),
          p));

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

   end Put_type;

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

      return RetVal;
   end Get_type;

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

      return RetVal;
   end Get_readyState;

   procedure Put_onreadystatechange
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onreadystatechange
         (Pointer (This),
          p));

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

   end Put_onreadystatechange;

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

      return RetVal;
   end Get_onreadystatechange;

   procedure Put_onload
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onload
         (Pointer (This),
          p));

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

   end Put_onload;

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

      return RetVal;
   end Get_onload;

   procedure Put_onerror
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onerror
         (Pointer (This),
          p));

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

   end Put_onerror;

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

      return RetVal;
   end Get_onerror;

   function Get_styleSheet
     (This : IHTMLLinkElement_Type)
     return Pointer_To_IHTMLStyleSheet
   is
       RetVal : aliased Pointer_To_IHTMLStyleSheet;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_styleSheet
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_styleSheet;

   procedure Put_disabled
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.VARIANT_BOOL)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_disabled
         (Pointer (This),
          p));

   end Put_disabled;

   function Get_disabled
     (This : IHTMLLinkElement_Type)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_disabled
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_disabled;

   procedure Put_media
     (This : IHTMLLinkElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_media
         (Pointer (This),
          p));

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

   end Put_media;

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

      return RetVal;
   end Get_media;

end MSHTML.IHTMLLinkElement_Interface;

