gecko-dev/extensions/webservices/public/nsISOAPServiceRegistry.idl

94 строки
3.3 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
interface nsIDOMElement;
interface nsISOAPService;
interface nsISOAPEncodingRegistry;
/**
* This interface represents a registry of SOAP services.
* This registry recieves transports to listen for messages
* and services to hand the messages to. Service registries
* may be created as required. Destroying a service registry
* stops the registry's action. To temporarily register
* services, create a new registry. For proper order of
* listening precedence, registries should be destroyed
* in reverse order. Otherwise, a listening priority
* would be required.
*/
[scriptable, uuid(9790d6bc-1dd1-11b2-afe0-bcb310c078bf)]
interface nsISOAPServiceRegistry {
/**
* Process a configuration and add the resulting sources
* and services. This will fail if errors occur during
* processing of the configuration.
*
* @param aConfiguration Root element of configuration XML.
*/
boolean addConfiguration(in nsIDOMElement aConfiguration);
/**
* Add a transport to be serviced by the registered services.
* This will fail if the specified source was already added
* with the same setting of the capture flag.
*
* @param aTransport string specifying the transport to supply
* messages for the service.
*
* @param aCapture True if capturing before later declarations
*/
void addSource(in AString aTransport, in boolean aCapture);
/**
* Add a service to service the registered transports. This
* will fail if the specified service was already added.
*
* @param aService Service to be serviced.
*/
void addService(in nsISOAPService aService);
/**
* Registry identifying how to encode and decode
* messages containing specific types, automatically
* added to messages sent to services in this
* registry.
*/
attribute nsISOAPEncodingRegistry encodings;
};
%{ C++
#define NS_SOAPSERVICEREGISTRY_CID \
{ /* 3869184e-1dd2-11b2-aa36-d8333498043a */ \
0x3869184e, 0x1dd2, 0x11b2, \
{0xaa, 0x36, 0xd8, 0x33, 0x34, 0x98, 0x04, 0x3a} }
#define NS_SOAPSERVICEREGISTRY_CONTRACTID \
"@mozilla.org/xmlextras/soap/serviceregistry;1"
#define NS_SOAPDEFAULTSERVICEREGISTRY_CID \
{ /* 9120a01e-1dd2-11b2-a61f-906766927a4f */ \
0x9120a01e, 0x1dd2, 0x11b2, \
{0xa6, 0x1f, 0x90, 0x67, 0x66, 0x92, 0x7a, 0x4f} }
#define NS_SOAPDEFAULTSERVICEREGISTRY_CONTRACTID \
"@mozilla.org/xmlextras/soap/defaultserviceregistry;1"
%}