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

#ifndef __gen_nsISOAPParameter_h__
#define __gen_nsISOAPParameter_h__

#include "nsISupports.h"


/* starting interface:    nsISOAPParameter */
#define NS_ISOAPPARAMETER_IID_STR "99ec6690-535f-11d4-9a58-000064657374"

#define NS_ISOAPPARAMETER_IID \
  {0x99ec6690, 0x535f, 0x11d4, \
    { 0x9a, 0x58, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}

class NS_NO_VTABLE nsISOAPParameter : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISOAPPARAMETER_IID)

  /**
   * <p>Possible values for the type of a Parameter object. Native
   *    (non-script) callers must specify the type of a parameter
   *    when setting the value. The list below indicates the native
   *    type expected in each case. Both native and script callers
   *    may query the type of the parameter. The list below also
   *    indicates the native or script type passed back when the 
   *    value is retrieved.</p>
   * <p>Notes:
   * <ul>
   *   <li><code>PARAMETER_TYPE_STRING</code> - The value is of type
   *       nsISupportsWString for native callers, a JavaScript string
   *       for script callers.</li>
   *   <li><code>PARAMETER_TYPE_BOOLEAN</code> - The value is of type
   *       nsISupportsPRBool for native callers, a boolean for script
   *       callers.</li>
   *   <li><code>PARAMETER_TYPE_DOUBLE</code> - The value is of type
   *       nsISupportsDouble for native callers, a double for script
   *       callers.</li>
   *   <li><code>PARAMETER_TYPE_FLOAT</code> - The value is of type
   *       nsISupportsFloat for native callers, a double for script
   *       callers.</li>
   *   <li><code>PARAMETER_TYPE_LONG</code> - The value is of type
   *       nsISupportsPRInt64 for native callers.</li>
   *   <li><code>PARAMETER_TYPE_INT</code> - The value is of type
   *       nsISupportsPRInt32 for native callers, an integer for
   *       script callers.</li>
   *   <li><code>PARAMETER_TYPE_SHORT</code> - The value is of type
   *       nsISupportsPRInt16 for native callers, an integer for
   *       script callers.</li>
   *   <li><code>PARAMETER_TYPE_BYTE</code> - The value is of type
   *       nsISupportsPRInt8 for native callers, an integer for script
   *       callers.</li>
   *   <li><code>PARAMETER_TYPE_ARRAY</code> - The value is of type
   *       nsISupportsArray for native callers (each element is itself
   *       an instance of nsISOAPParameter).</li>
   *   <li><code>PARAMETER_TYPE_JAVASCRIPT_ARRAY</code> - The value is
   *       a JSObject that is an array.</li>
   *   <li><code>PARAMETER_TYPE_JAVASCRIPT_OBJECT</code> - The value is
   *       a generic JSObject.</li>
   * </ul>
   * </p>
   */
  enum { PARAMETER_TYPE_UNKNOWN = 0 };

  enum { PARAMETER_TYPE_NULL = 1 };

  enum { PARAMETER_TYPE_VOID = 2 };

  enum { PARAMETER_TYPE_STRING = 3 };

  enum { PARAMETER_TYPE_BOOLEAN = 4 };

  enum { PARAMETER_TYPE_DOUBLE = 5 };

  enum { PARAMETER_TYPE_FLOAT = 6 };

  enum { PARAMETER_TYPE_LONG = 7 };

  enum { PARAMETER_TYPE_INT = 8 };

  enum { PARAMETER_TYPE_SHORT = 9 };

  enum { PARAMETER_TYPE_BYTE = 10 };

  enum { PARAMETER_TYPE_ARRAY = 11 };

  enum { PARAMETER_TYPE_JAVASCRIPT_ARRAY = 12 };

  enum { PARAMETER_TYPE_JAVASCRIPT_OBJECT = 13 };

  /**
   * An optional encodingStyle specifically for this parameter. The
   * default is to inherit the encodingStyle from the element parent
   * chain.
   */
  /* attribute string encodingStyleURI; */
  NS_IMETHOD GetEncodingStyleURI(char * *aEncodingStyleURI) = 0;
  NS_IMETHOD SetEncodingStyleURI(const char * aEncodingStyleURI) = 0;

  /**
   * The name of the parameter. If the parameter is left unnamed, it
   * will be encoded using the element types defined in the SOAP-ENC
   * schema. For example, <code>&lt;SOAP-ENC:int&gt;45&lt;/SOAP-ENC:int&gt;
   * </code>
   */
  /* attribute wstring name; */
  NS_IMETHOD GetName(PRUnichar * *aName) = 0;
  NS_IMETHOD SetName(const PRUnichar * aName) = 0;

  /**
   * The type of the parameter. See the descriptions for the type
   * constants for details.
   */
  /* readonly attribute long type; */
  NS_IMETHOD GetType(PRInt32 *aType) = 0;

  /**
   * Native (non-script) method for setting the value of a parameter.
   * The interface implemented by the <code>value</code> parameter 
   * depends on the value of <code>type</code> parameter. Additional
   * details can be found in the descriptions for the type constants.
   *
   * @param value The value of the parameter. Either NULL or an object
   *              that implements an interface specified by the
   *              <code>type</code> parameter.
   * @param type The type of the parameter. See the description of
   *             the type contants for details.
   */
  /* [noscript] void setValueAndType (in nsISupports value, in long type); */
  NS_IMETHOD SetValueAndType(nsISupports *value, PRInt32 type) = 0;

  /**
   * Native (non-script) method for getting the value and type of a parameter.
   * The interface implemented by the <code>value</code> parameter 
   * depends on the value of <code>type</code> parameter. Additional
   * details can be found in the descriptions for the type constants.
   *
   * @param value Out parameter returning the value of the parameter. 
   *              Either NULL or an object that implements an interface 
   *              specified by the <code>type</code> parameter.
   * @param type Out parameter returning the type of the parameter. See 
   *             the description of the type contants for details.
   */
  /* [noscript] void getValueAndType (out nsISupports value, out long type); */
  NS_IMETHOD GetValueAndType(nsISupports **value, PRInt32 *type) = 0;

  /**
   * <p>The getter is for native and script callers (despite the
   * [noscript] qualification). For native callers, the interface
   * implemented by the returned value depends on the
   * <code>type</code> attribute as detailed in the description of the
   * type constants. For script callers, the value returned is either
   * a string, boolean, double, integer, Array or object.</p> 
   * <p>The setter is for script callers only (again despite the
   * [noscript] qualification). Native callers should
   * use the <code>setValueAndType</code> method). For script callers,
   * the value can be either a string, boolean, double, integer, Array
   * or object.</p>
   */
  /* [noscript] attribute nsISupports value; */
  NS_IMETHOD GetValue(nsISupports * *aValue) = 0;
  NS_IMETHOD SetValue(nsISupports * aValue) = 0;

  /**
   * Used by native callers (SOAP encoders, for example) to retrieve
   * the JSObject value if the <code>type</code> attribute is either
   * <code>PARAMETER_TYPE_JAVASCRIPT_ARRAY</code> or
   * <code>PARAMETER_TYPE_JAVASCRIPT_OBJECT</code>.
   */
  /* [noscript] readonly attribute JSObjectPtr JSValue; */
  NS_IMETHOD GetJSValue(JSObject * *aJSValue) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISOAPPARAMETER \
  NS_IMETHOD GetEncodingStyleURI(char * *aEncodingStyleURI); \
  NS_IMETHOD SetEncodingStyleURI(const char * aEncodingStyleURI); \
  NS_IMETHOD GetName(PRUnichar * *aName); \
  NS_IMETHOD SetName(const PRUnichar * aName); \
  NS_IMETHOD GetType(PRInt32 *aType); \
  NS_IMETHOD SetValueAndType(nsISupports *value, PRInt32 type); \
  NS_IMETHOD GetValueAndType(nsISupports **value, PRInt32 *type); \
  NS_IMETHOD GetValue(nsISupports * *aValue); \
  NS_IMETHOD SetValue(nsISupports * aValue); \
  NS_IMETHOD GetJSValue(JSObject * *aJSValue); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISOAPPARAMETER(_to) \
  NS_IMETHOD GetEncodingStyleURI(char * *aEncodingStyleURI) { return _to ## GetEncodingStyleURI(aEncodingStyleURI); } \
  NS_IMETHOD SetEncodingStyleURI(const char * aEncodingStyleURI) { return _to ## SetEncodingStyleURI(aEncodingStyleURI); } \
  NS_IMETHOD GetName(PRUnichar * *aName) { return _to ## GetName(aName); } \
  NS_IMETHOD SetName(const PRUnichar * aName) { return _to ## SetName(aName); } \
  NS_IMETHOD GetType(PRInt32 *aType) { return _to ## GetType(aType); } \
  NS_IMETHOD SetValueAndType(nsISupports *value, PRInt32 type) { return _to ## SetValueAndType(value, type); } \
  NS_IMETHOD GetValueAndType(nsISupports **value, PRInt32 *type) { return _to ## GetValueAndType(value, type); } \
  NS_IMETHOD GetValue(nsISupports * *aValue) { return _to ## GetValue(aValue); } \
  NS_IMETHOD SetValue(nsISupports * aValue) { return _to ## SetValue(aValue); } \
  NS_IMETHOD GetJSValue(JSObject * *aJSValue) { return _to ## GetJSValue(aJSValue); } 

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

/* Header file */
class nsSOAPParameter : public nsISOAPParameter
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSISOAPPARAMETER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsSOAPParameter, nsISOAPParameter)

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

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

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

/* attribute wstring name; */
NS_IMETHODIMP nsSOAPParameter::GetName(PRUnichar * *aName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSOAPParameter::SetName(const PRUnichar * aName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute long type; */
NS_IMETHODIMP nsSOAPParameter::GetType(PRInt32 *aType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void setValueAndType (in nsISupports value, in long type); */
NS_IMETHODIMP nsSOAPParameter::SetValueAndType(nsISupports *value, PRInt32 type)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void getValueAndType (out nsISupports value, out long type); */
NS_IMETHODIMP nsSOAPParameter::GetValueAndType(nsISupports **value, PRInt32 *type)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] attribute nsISupports value; */
NS_IMETHODIMP nsSOAPParameter::GetValue(nsISupports * *aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsSOAPParameter::SetValue(nsISupports * aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] readonly attribute JSObjectPtr JSValue; */
NS_IMETHODIMP nsSOAPParameter::GetJSValue(JSObject * *aJSValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_SOAPPARAMETER_CID                        \
{ /* 87d21ec2-539d-11d4-9a59-00104bdf5339 */        \
  0x87d21ec2, 0x539d, 0x11d4,                       \
 {0x9a, 0x59, 0x00, 0x10, 0x4b, 0xdf, 0x53, 0x39} }
#define NS_SOAPPARAMETER_CONTRACTID \
"@mozilla.org/xmlextras/soap/parameter;1"

#endif /* __gen_nsISOAPParameter_h__ */
