1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2001
20 * the Initial Developer. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #ifndef nsHTTPSOAPTransport_h__
39 #define nsHTTPSOAPTransport_h__
41 #include "nsISOAPTransport.h"
42 #include "nsIXMLHttpRequest.h"
43 #include "nsIDOMEventListener.h"
44 #include "nsISOAPTransportListener.h"
45 #include "nsISOAPCallCompletion.h"
46 #include "nsISOAPCall.h"
47 #include "nsISOAPResponse.h"
48 #include "nsISOAPResponseListener.h"
51 class nsHTTPSOAPTransport
: public nsISOAPTransport
{
53 nsHTTPSOAPTransport();
54 virtual ~nsHTTPSOAPTransport();
57 NS_DECL_NSISOAPTRANSPORT
60 static nsresult
SetupRequest(nsISOAPCall
* call
, PRBool async
,
61 nsIXMLHttpRequest
** ret
);
64 class nsHTTPSSOAPTransport
: public nsHTTPSOAPTransport
{
66 nsHTTPSSOAPTransport();
67 virtual ~nsHTTPSSOAPTransport();
72 class nsHTTPSOAPTransportCompletion
: public nsIDOMEventListener
,
73 public nsISOAPCallCompletion
76 nsHTTPSOAPTransportCompletion();
77 nsHTTPSOAPTransportCompletion(nsISOAPCall
* call
,
78 nsISOAPResponse
* response
,
79 nsIXMLHttpRequest
* request
,
80 nsISOAPResponseListener
* listener
);
81 virtual ~nsHTTPSOAPTransportCompletion();
84 NS_DECL_NSISOAPCALLCOMPLETION
86 // nsIDOMEventListener
87 NS_IMETHOD
HandleEvent(nsIDOMEvent
* aEvent
);
90 nsCOMPtr
<nsISOAPCall
> mCall
;
91 nsCOMPtr
<nsISOAPResponse
> mResponse
;
92 nsCOMPtr
<nsIXMLHttpRequest
> mRequest
;
93 nsCOMPtr
<nsISOAPResponseListener
> mListener
;
96 #define NS_HTTPSOAPTRANSPORT_CID \
97 { /* d852ade0-5823-11d4-9a62-00104bdf5339 */ \
98 0xd852ade0, 0x5823, 0x11d4, \
99 {0x9a, 0x62, 0x00, 0x10, 0x4b, 0xdf, 0x53, 0x39} }
100 #define NS_HTTPSOAPTRANSPORT_CONTRACTID NS_SOAPTRANSPORT_CONTRACTID_PREFIX "http"
102 #define NS_HTTPSOAPTRANSPORTCOMPLETION_CID \
103 { /* 9032e336-1dd2-11b2-99be-a44376d4d5b1 */ \
104 0x9032e336, 0x1dd2, 0x11b2, \
105 {0x99, 0xbe, 0xa4, 0x43, 0x76, 0xd4, 0xd5, 0xb1} }
106 #define NS_HTTPSOAPTRANSPORTCOMPLETION_CONTRACTID "@mozilla.org/xmlextras/soap/transport/completion;1?protocol=http"
108 #define NS_HTTPSSOAPTRANSPORT_CID \
109 { /* aad00c5a-1dd1-11b2-9ee1-c9f6b898a7b8 */ \
110 0xaad00c5a, 0x1dd1, 0x11b2, \
111 {0x9e, 0xe1, 0xc9, 0xf6, 0xb8, 0x98, 0xa7, 0xb8} }
112 #define NS_HTTPSSOAPTRANSPORT_CONTRACTID NS_SOAPTRANSPORT_CONTRACTID_PREFIX "https"