Back to index

lightning-sunbird  0.9+nobinonly
nsIXMLHttpRequest.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "nsISupports.idl"
00039 
00040 interface nsIDOMDocument;
00041 interface nsIDOMEventListener;
00042 interface nsIChannel;
00043 interface nsIVariant;
00044 
00081 [scriptable, uuid(7b3b3c62-9d53-4abc-bc89-c33ce78f439f)]
00082 interface nsIXMLHttpRequest : nsISupports
00083 {
00095   readonly attribute nsIChannel channel;
00096 
00103   readonly attribute nsIDOMDocument responseXML;
00104 
00110   readonly attribute AString responseText;
00111 
00112 
00116   readonly attribute unsigned long status;
00117 
00122   readonly attribute AUTF8String statusText;
00123 
00128   void   abort();
00129 
00140   string getAllResponseHeaders();
00141 
00151   ACString getResponseHeader(in AUTF8String header);
00152 
00177   [noscript] void   openRequest(in AUTF8String method,
00178                                 in AUTF8String url,
00179                                 in boolean async,
00180                                 in AString user,
00181                                 in AString password);
00182 
00211   void   open(in AUTF8String method, in AUTF8String url);
00212 
00236   void   send(in nsIVariant body);
00237 
00245   void   setRequestHeader(in AUTF8String header, in AUTF8String value);
00246 
00257   readonly attribute long readyState;
00258 
00268   void   overrideMimeType(in AUTF8String mimetype);
00269 
00283   attribute boolean multipart;
00284 };
00285 
00286 
00287 [scriptable, function, uuid(6459B7CE-6B57-4934-A0AF-0133BA6F9085)]
00288 interface nsIOnReadyStateChangeHandler : nsISupports {
00293   void handleEvent();
00294 };
00295 
00296 [scriptable, uuid(9deabc90-28d5-41d3-a660-474f2254f4ba)]
00297 interface nsIJSXMLHttpRequest : nsISupports {
00309   attribute nsIDOMEventListener onload;
00310 
00322   attribute nsIDOMEventListener onerror;
00323 
00336   attribute nsIDOMEventListener onprogress;
00337 
00347   attribute nsIOnReadyStateChangeHandler onreadystatechange;
00348 };
00349 
00350 %{ C++
00351 #define NS_XMLHTTPREQUEST_CID                       \
00352  { /* d164e770-4157-11d4-9a42-000064657374 */       \
00353   0xd164e770, 0x4157, 0x11d4,                       \
00354  {0x9a, 0x42, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74} }
00355 #define NS_XMLHTTPREQUEST_CONTRACTID \
00356 "@mozilla.org/xmlextras/xmlhttprequest;1"
00357 %}