with GNATCOM.Dispinterface;

package MSHTML.IHTMLXMLHttpRequest_Interface is

   type IHTMLXMLHttpRequest_Type is
     new GNATCOM.Dispinterface.Dispinterface_Type with null record;

   procedure Initialize (This : in out IHTMLXMLHttpRequest_Type);

   function Pointer (This : IHTMLXMLHttpRequest_Type)
     return Pointer_To_IHTMLXMLHttpRequest;

   procedure Attach (This    : in out IHTMLXMLHttpRequest_Type;
                     Pointer : in     Pointer_To_IHTMLXMLHttpRequest);

   function Get_readyState
     (This : IHTMLXMLHttpRequest_Type)
     return Interfaces.C.long;

   function Get_responseBody
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT;

   function Get_responseText
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.BSTR;

   function Get_responseXML
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.Pointer_To_IDispatch;

   function Get_status
     (This : IHTMLXMLHttpRequest_Type)
     return Interfaces.C.long;

   function Get_statusText
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.BSTR;

   procedure Put_onreadystatechange
     (This : IHTMLXMLHttpRequest_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True);

   function Get_onreadystatechange
     (This : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.VARIANT;

   procedure uabort
     (This : IHTMLXMLHttpRequest_Type);

   procedure open
     (This        : IHTMLXMLHttpRequest_Type;
      bstrMethod  : GNATCOM.Types.BSTR;
      bstrURL     : GNATCOM.Types.BSTR;
      varAsync    : GNATCOM.Types.VARIANT;
      varUser     : GNATCOM.Types.VARIANT  := GNATCOM.Types.VARIANT_MISSING;
      varPassword : GNATCOM.Types.VARIANT  := GNATCOM.Types.VARIANT_MISSING;
      Free        : Boolean := True);

   procedure send
     (This    : IHTMLXMLHttpRequest_Type;
      varBody : GNATCOM.Types.VARIANT  := GNATCOM.Types.VARIANT_MISSING;
      Free    : Boolean := True);

   function getAllResponseHeaders
     (This                            : IHTMLXMLHttpRequest_Type)
     return GNATCOM.Types.BSTR;

   function getResponseHeader
     (This                            : IHTMLXMLHttpRequest_Type;
      bstrHeader                      : GNATCOM.Types.BSTR;
      Free                            : Boolean := True)
     return GNATCOM.Types.BSTR;

   procedure setRequestHeader
     (This       : IHTMLXMLHttpRequest_Type;
      bstrHeader : GNATCOM.Types.BSTR;
      bstrValue  : GNATCOM.Types.BSTR;
      Free       : Boolean := True);

end MSHTML.IHTMLXMLHttpRequest_Interface;

