/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISOAPCall.idl
 */

#ifndef __gen_nsISOAPCall_h__
#define __gen_nsISOAPCall_h__

#include "nsISupports.h"

class nsIDOMElement; /* forward declaration */

class nsISOAPParameter; /* forward declaration */

class nsISOAPResponse; /* forward declaration */


/* starting interface:    nsISOAPCall */
#define NS_ISOAPCALL_IID_STR "a8fefe40-52bc-11d4-9a57-000064657374"

#define NS_ISOAPCALL_IID \
  {0xa8fefe40, 0x52bc, 0x11d4, \
    { 0x9a, 0x57, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}

class NS_NO_VTABLE nsISOAPCall : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISOAPCALL_IID)

  /**
   * The DOM element representing the SOAP envelope itself. By default, 
   * this element has a namespace declaration for the SOAP envelope
   * namespace defined in the SOAP specification. It also has an
   * <code>encodingStyle</code> attribute that corresponds to the 
   * current encoding style for the call. The Envelope element also 
   * has two children representing the SOAP header and body. DOM methods
   * may be used to add additional attributes to the envelope.
   */
  /* readonly attribute nsIDOMElement envelope; */
  NS_IMETHOD GetEnvelope(nsIDOMElement * *aEnvelope) = 0;

  /**
   * A convenience attribute to obtain the DOM element representing the
   * SOAP header. DOM methods may be used to add header entries. By default
   * this element has no attributes or children. If this is still the case
   * at the point at which the call is invoked, the SOAP message will not
   * contain a header.
   */
  /* readonly attribute nsIDOMElement header; */
  NS_IMETHOD GetHeader(nsIDOMElement * *aHeader) = 0;

  /**
   * A convenience attribute to obtain the DOM element representing the
   * SOAP body. DOM methods may be used to add additional attributes to
   * the body element. DOM methods may also be used to add body entries,
   * though the expectation is that in most cases the SOAP message will
   * contain a single body entry created as a result of invoking the
   * call with a method name and a set of parameters.
   */
  /* readonly attribute nsIDOMElement body; */
  NS_IMETHOD GetBody(nsIDOMElement * *aBody) = 0;

  /**
   * The encodingStyle to be used for the envelope. This URI will be
   * specified in the SOAP message using the encodingStyle attribute 
   * of the Envelope element. 
   */
  /* attribute string encodingStyleURI; */
  NS_IMETHOD GetEncodingStyleURI(char * *aEncodingStyleURI) = 0;
  NS_IMETHOD SetEncodingStyleURI(const char * aEncodingStyleURI) = 0;

  /**
   * The target object on which the method is being invoked. This URI
   * is used as the namespace to qualify the tagname of the element 
   * that is the single body entry of the SOAP message.
   *
   * For example, if the <code>targetObjectURI</code> is 
   * "urn:some-namespace" and the <code>methodName</code> is 
   * GetLastTradePrice, the single body entry will be the
   * following element:
   * <code>
   *   <m:GetLastTradePrice xmlns:m="urn:some-namespace">
   *   ...
   * </code>
   * 
   */
  /* attribute string targetObjectURI; */
  NS_IMETHOD GetTargetObjectURI(char * *aTargetObjectURI) = 0;
  NS_IMETHOD SetTargetObjectURI(const char * aTargetObjectURI) = 0;

  /**
   * The name of the method being invoked. The methodName is used as
   * the tagname for the element that is the single body entry of the
   * SOAP message.
   *
   * For example, if the <code>targetObjectURI</code> is 
   * "urn:some-namespace" and the <code>methodName</code> is 
   * GetLastTradePrice, the single body entry will be the
   * following element:
   * <code>
   *   <m:GetLastTradePrice xmlns:m="urn:some-namespace">
   *   ...
   * </code>
   */
  /* attribute wstring methodName; */
  NS_IMETHOD GetMethodName(PRUnichar * *aMethodName) = 0;
  NS_IMETHOD SetMethodName(const PRUnichar * aMethodName) = 0;

  /**
   * The URI to which the RPC call is made. This does not have to
   * match the <code>targetObjectURI</code>.
   */
  /* attribute string destinationURI; */
  NS_IMETHOD GetDestinationURI(char * *aDestinationURI) = 0;
  NS_IMETHOD SetDestinationURI(const char * aDestinationURI) = 0;

  /**
   * An optional URI that can be used to add a SOAPAction HTTP
   * header field. If this attribute is NULL (the default case),
   * no SOAPAction header will be added.
   */
  /* attribute string actionURI; */
  NS_IMETHOD GetActionURI(char * *aActionURI) = 0;
  NS_IMETHOD SetActionURI(const char * aActionURI) = 0;

  /**
   * Native (non-script) method to set the list of parameters to
   * include in the SOAP call.
   *
   * @param parameters The array of parameters to include in the call
   * @param count The number of parameters in the array
   */
  /* [noscript] void setSOAPParameters ([array, size_is (count)] in nsISOAPParameter parameters, in unsigned long count); */
  NS_IMETHOD SetSOAPParameters(nsISOAPParameter **parameters, PRUint32 count) = 0;

  /**
   * The script-only method for setting the list of parameters to
   * include in the SOAP call. Despite what the idl implies, this
   * method takes an arbitrary number of arguments. Each is either
   * a SOAPParameter object or a JavaScript value (string, number
   * boolean, array or object) which will be converted to an unnamed 
   * SOAPParameter.
   */
  /* void setParameters (); */
  NS_IMETHOD SetParameters(void) = 0;

  /**
   * Synchronously make the SOAP call. At this point, the document
   * rooted by the Envelope element is serialized to form the body
   * of the SOAP message. The method returns only when we receive
   * a response (or a protocol error occurs). The expectation is that
   * at this point the <code>targetObjectURI</code>, 
   * <code>methodName</code>, <code>destinationURI</code> and
   * parameters (if any) have been set. If this is not the case,
   * the methods throws and NS_ERROR_NOT_INITIALIZED error.
   *
   * @returns The SOAP response
   */
  /* nsISOAPResponse invoke (); */
  NS_IMETHOD Invoke(nsISOAPResponse **_retval) = 0;

  /**
   * Asynchronously makes the SOAP call. At this point, the document
   * rooted by the Envelope element is serialized to form the body
   * of the SOAP message. The method returns immediately, and the
   * listener is triggered when we eventually receive a response
   * (or a protocol error occurs). The expectation is that
   * at this point the <code>targetObjectURI</code>, 
   * <code>methodName</code>, <code>destinationURI</code> and
   * parameters (if any) have been set. If this is not the case,
   * the methods throws and NS_ERROR_NOT_INITIALIZED error.
   *
   * @param listener For a native (non-script) invocation of this
   *                 method, this should be a nsISOAPResponseListener instance.
   *                 For a script invocation of this method, this
   *                 is expected to be a Function object.
   */
  /* void asyncInvoke (in nsISupports listener); */
  NS_IMETHOD AsyncInvoke(nsISupports *listener) = 0;

  /**
   * The protocol status returned by the underlying protocol
   * after an invocation.
   */
  /* readonly attribute unsigned long status; */
  NS_IMETHOD GetStatus(PRUint32 *aStatus) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISOAPCALL \
  NS_IMETHOD GetEnvelope(nsIDOMElement * *aEnvelope); \
  NS_IMETHOD GetHeader(nsIDOMElement * *aHeader); \
  NS_IMETHOD GetBody(nsIDOMElement * *aBody); \
  NS_IMETHOD GetEncodingStyleURI(char * *aEncodingStyleURI); \
  NS_IMETHOD SetEncodingStyleURI(const char * aEncodingStyleURI); \
  NS_IMETHOD GetTargetObjectURI(char * *aTargetObjectURI); \
  NS_IMETHOD SetTargetObjectURI(const char * aTargetObjectURI); \
  NS_IMETHOD GetMethodName(PRUnichar * *aMethodName); \
  NS_IMETHOD SetMethodName(const PRUnichar * aMethodName); \
  NS_IMETHOD GetDestinationURI(char * *aDestinationURI); \
  NS_IMETHOD SetDestinationURI(const char * aDestinationURI); \
  NS_IMETHOD GetActionURI(char * *aActionURI); \
  NS_IMETHOD SetActionURI(const char * aActionURI); \
  NS_IMETHOD SetSOAPParameters(nsISOAPParameter **parameters, PRUint32 count); \
  NS_IMETHOD SetParameters(void); \
  NS_IMETHOD Invoke(nsISOAPResponse **_retval); \
  NS_IMETHOD AsyncInvoke(nsISupports *listener); \
  NS_IMETHOD GetStatus(PRUint32 *aStatus); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISOAPCALL(_to) \
  NS_IMETHOD GetEnvelope(nsIDOMElement * *aEnvelope) { return _to ## GetEnvelope(aEnvelope); } \
  NS_IMETHOD GetHeader(nsIDOMElement * *aHeader) { return _to ## GetHeader(aHeader); } \
  NS_IMETHOD GetBody(nsIDOMElement * *aBody) { return _to ## GetBody(aBody); } \
  NS_IMETHOD GetEncodingStyleURI(char * *aEncodingStyleURI) { return _to ## GetEncodingStyleURI(aEncodingStyleURI); } \
  NS_IMETHOD SetEncodingStyleURI(const char * aEncodingStyleURI) { return _to ## SetEncodingStyleURI(aEncodingStyleURI); } \
  NS_IMETHOD GetTargetObjectURI(char * *aTargetObjectURI) { return _to ## GetTargetObjectURI(aTargetObjectURI); } \
  NS_IMETHOD SetTargetObjectURI(const char * aTargetObjectURI) { return _to ## SetTargetObjectURI(aTargetObjectURI); } \
  NS_IMETHOD GetMethodName(PRUnichar * *aMethodName) { return _to ## GetMethodName(aMethodName); } \
  NS_IMETHOD SetMethodName(const PRUnichar * aMethodName) { return _to ## SetMethodName(aMethodName); } \
  NS_IMETHOD GetDestinationURI(char * *aDestinationURI) { return _to ## GetDestinationURI(aDestinationURI); } \
  NS_IMETHOD SetDestinationURI(const char * aDestinationURI) { return _to ## SetDestinationURI(aDestinationURI); } \
  NS_IMETHOD GetActionURI(char * *aActionURI) { return _to ## GetActionURI(aActionURI); } \
  NS_IMETHOD SetActionURI(const char * aActionURI) { return _to ## SetActionURI(aActionURI); } \
  NS_IMETHOD SetSOAPParameters(nsISOAPParameter **parameters, PRUint32 count) { return _to ## SetSOAPParameters(parameters, count); } \
  NS_IMETHOD SetParameters(void) { return _to ## SetParameters(); } \
  NS_IMETHOD Invoke(nsISOAPResponse **_retval) { return _to ## Invoke(_retval); } \
  NS_IMETHOD AsyncInvoke(nsISupports *listener) { return _to ## AsyncInvoke(listener); } \
  NS_IMETHOD GetStatus(PRUint32 *aStatus) { return _to ## GetStatus(aStatus); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsSOAPCall : public nsISOAPCall
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSISOAPCALL

  nsSOAPCall();
  virtual ~nsSOAPCall();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsSOAPCall, nsISOAPCall)

nsSOAPCall::nsSOAPCall()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

nsSOAPCall::~nsSOAPCall()
{
  /* destructor code */
}

/* readonly attribute nsIDOMElement envelope; */
NS_IMETHODIMP nsSOAPCall::GetEnvelope(nsIDOMElement * *aEnvelope)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMElement header; */
NS_IMETHODIMP nsSOAPCall::GetHeader(nsIDOMElement * *aHeader)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMElement body; */
NS_IMETHODIMP nsSOAPCall::GetBody(nsIDOMElement * *aBody)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute string encodingStyleURI; */
NS_IMETHODIMP nsSOAPCall::GetEncodingStyleURI(char * *aEncodingStyleURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSOAPCall::SetEncodingStyleURI(const char * aEncodingStyleURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute string targetObjectURI; */
NS_IMETHODIMP nsSOAPCall::GetTargetObjectURI(char * *aTargetObjectURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSOAPCall::SetTargetObjectURI(const char * aTargetObjectURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute wstring methodName; */
NS_IMETHODIMP nsSOAPCall::GetMethodName(PRUnichar * *aMethodName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSOAPCall::SetMethodName(const PRUnichar * aMethodName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute string destinationURI; */
NS_IMETHODIMP nsSOAPCall::GetDestinationURI(char * *aDestinationURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSOAPCall::SetDestinationURI(const char * aDestinationURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute string actionURI; */
NS_IMETHODIMP nsSOAPCall::GetActionURI(char * *aActionURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSOAPCall::SetActionURI(const char * aActionURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void setSOAPParameters ([array, size_is (count)] in nsISOAPParameter parameters, in unsigned long count); */
NS_IMETHODIMP nsSOAPCall::SetSOAPParameters(nsISOAPParameter **parameters, PRUint32 count)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setParameters (); */
NS_IMETHODIMP nsSOAPCall::SetParameters()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISOAPResponse invoke (); */
NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void asyncInvoke (in nsISupports listener); */
NS_IMETHODIMP nsSOAPCall::AsyncInvoke(nsISupports *listener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long status; */
NS_IMETHODIMP nsSOAPCall::GetStatus(PRUint32 *aStatus)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#define NS_SOAPCALL_CID                             \
{ /* 87d21ec0-539d-11d4-9a59-00104bdf5339 */        \
  0x87d21ec0, 0x539d, 0x11d4,                       \
 {0x9a, 0x59, 0x00, 0x10, 0x4b, 0xdf, 0x53, 0x39} }
#define NS_SOAPCALL_CONTRACTID \
"@mozilla.org/xmlextras/soap/call;1"

#endif /* __gen_nsISOAPCall_h__ */
