2002-02-14 16:36:34 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-19 02:14:17 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
2000-07-11 04:52:30 +04:00
|
|
|
*
|
2004-04-19 02:14:17 +04:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
2000-07-11 04:52:30 +04:00
|
|
|
*
|
2002-02-14 16:36:34 +03:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
2000-07-11 04:52:30 +04:00
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-19 02:14:17 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2002-02-14 16:36:34 +03:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2001
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
2000-07-11 04:52:30 +04:00
|
|
|
*
|
2002-02-14 16:36:34 +03:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-19 02:14:17 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2002-02-14 16:36:34 +03:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-19 02:14:17 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2002-02-14 16:36:34 +03:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2000-07-11 04:52:30 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsISOAPTransportListener;
|
2001-11-28 13:50:29 +03:00
|
|
|
interface nsISOAPCall;
|
|
|
|
interface nsISOAPResponse;
|
|
|
|
interface nsISOAPResponseListener;
|
2001-12-01 01:53:16 +03:00
|
|
|
interface nsISOAPCallCompletion;
|
2000-07-11 04:52:30 +04:00
|
|
|
|
|
|
|
[scriptable, uuid(99ec6695-535f-11d4-9a58-000064657374)]
|
2002-02-15 13:48:16 +03:00
|
|
|
interface nsISOAPTransport : nsISupports {
|
2001-11-28 13:50:29 +03:00
|
|
|
|
2002-02-15 13:25:28 +03:00
|
|
|
/**
|
|
|
|
* Send the specified message to the specified destination.
|
|
|
|
* This will fail if synchronous calls are not supported or if there is any
|
|
|
|
* failure in the actual message exchange. Failure of the call itself will be
|
|
|
|
* contained in the response.
|
|
|
|
*
|
|
|
|
* @param aCall Actual message to be sent.
|
|
|
|
*
|
2005-11-26 00:57:13 +03:00
|
|
|
* @param aResponse Message to be received. Calling synchronously assumes that
|
2002-02-15 13:25:28 +03:00
|
|
|
* exactly one response is expected.
|
|
|
|
*/
|
2002-01-17 06:23:06 +03:00
|
|
|
void syncCall(in nsISOAPCall aCall, in nsISOAPResponse aResponse);
|
2001-11-28 13:50:29 +03:00
|
|
|
|
2002-02-15 13:25:28 +03:00
|
|
|
/**
|
|
|
|
* Send the specified message to the specified destination synchronously waiting
|
|
|
|
* for completion and any response.
|
|
|
|
* This will fail if there is any failure in the setup of the message exchange.
|
|
|
|
* Later errors will only be known through the response listener. Failures of the
|
|
|
|
* call itself will be contained in the response passed to the response listener.
|
|
|
|
*
|
|
|
|
* @param aCall Actual message to be sent.
|
|
|
|
*
|
|
|
|
* @param aListener Handler to be invoked (single threaded) as each response is
|
|
|
|
* received and finally with null. If specified as null, no responses are returned.
|
|
|
|
*
|
2006-08-29 00:12:37 +04:00
|
|
|
* @param response Message to receive response and be handled by listener. May be
|
2002-02-15 13:25:28 +03:00
|
|
|
* null if listener is null.
|
|
|
|
*/
|
2001-12-01 01:53:16 +03:00
|
|
|
nsISOAPCallCompletion asyncCall(in nsISOAPCall aCall,
|
2002-02-15 13:48:16 +03:00
|
|
|
in nsISOAPResponseListener aListener,
|
|
|
|
in nsISOAPResponse aResponse);
|
2001-11-28 13:50:29 +03:00
|
|
|
|
2002-02-15 13:25:28 +03:00
|
|
|
/**
|
|
|
|
* Add listener for unsolicited messages arriving on the transport. Listeners
|
|
|
|
* are provided with the opportunity to accept and process messages. Typically
|
|
|
|
* a listener will be a service dispatcher. Listeners will be invoked in the
|
|
|
|
* reverse order of declaration, allowing more local service dispatchers to
|
|
|
|
* temporarily override permanent service dispatchers. This will fail if the
|
|
|
|
* desired listener was already added to the transport with the specified
|
|
|
|
* capture flag or if the transport does not support incoming messages.
|
|
|
|
*
|
2006-08-29 00:12:37 +04:00
|
|
|
* @param aListener The listener to receive unsolicited messages from the
|
2002-02-15 13:25:28 +03:00
|
|
|
* transport.
|
|
|
|
*
|
|
|
|
* @param aCapture True if the listener should capture the message before
|
|
|
|
* later-declared services.
|
|
|
|
*/
|
2002-01-17 06:23:06 +03:00
|
|
|
void addListener(in nsISOAPTransportListener aListener,
|
2002-02-15 13:48:16 +03:00
|
|
|
in boolean aCapture);
|
2001-11-28 13:50:29 +03:00
|
|
|
|
2002-02-15 13:25:28 +03:00
|
|
|
/**
|
|
|
|
* Remove listener for unsolicited messages arriving on the transport. This
|
|
|
|
* will fail if the specified listener was not added with the specified
|
|
|
|
* capture setting.
|
|
|
|
*
|
2006-08-29 00:12:37 +04:00
|
|
|
* @param aListener The listener to stop from receiving unsolicited messages
|
2002-02-15 13:25:28 +03:00
|
|
|
* from the transport.
|
|
|
|
*
|
|
|
|
* @param aCapture True if the listener was added to capture the message before
|
|
|
|
* later-declared services (must be specified to remove, since a listener
|
|
|
|
* may be registered as both).
|
|
|
|
*/
|
2002-01-17 06:23:06 +03:00
|
|
|
void removeListener(in nsISOAPTransportListener aListener,
|
2002-02-15 13:48:16 +03:00
|
|
|
in boolean aCapture);
|
2000-07-11 04:52:30 +04:00
|
|
|
};
|
|
|
|
|
2002-01-17 06:23:06 +03:00
|
|
|
%{C++
|
2000-09-14 03:57:52 +04:00
|
|
|
#define NS_SOAPTRANSPORT_CONTRACTID \
|
|
|
|
"@mozilla.org/xmlextras/soap/transport;1"
|
|
|
|
#define NS_SOAPTRANSPORT_CONTRACTID_PREFIX NS_SOAPTRANSPORT_CONTRACTID "?protocol="
|
2000-07-11 04:52:30 +04:00
|
|
|
%}
|