Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Attributes
nsSOAPParameter Class Reference

#include <nsSOAPParameter.h>

Inheritance diagram for nsSOAPParameter:
Inheritance graph
[legend]
Collaboration diagram for nsSOAPParameter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsSOAPParameter ()
virtual ~nsSOAPParameter ()
NS_DECL_ISUPPORTS
NS_DECL_NSISOAPBLOCK
NS_IMETHOD 
Initialize (JSContext *cx, JSObject *obj, PRUint32 argc, jsval *argv)
 Intialize a newly created native instance using the parameters passed into the JavaScript constructor.
void init (in nsISOAPAttachments aAttachments, in unsigned short aVersion)
 Initialize the block for additional decoding information.

Public Attributes

attribute AString namespaceURI
 The namespace URI of the block.
attribute AString name
 The name of the block.
attribute nsISOAPEncoding encoding
 The encoding that was / will be applied to the block.
attribute nsISchemaType schemaType
 The schema type used to encode or decode the block.
attribute nsIDOMElement element
 The element which is the encoded value of this block.
attribute nsIVariant value
 The native value which is the decoded value of this block.

Protected Attributes

nsString mNamespaceURI
nsString mName
nsCOMPtr< nsISOAPEncodingmEncoding
nsCOMPtr< nsISchemaTypemSchemaType
nsCOMPtr< nsISOAPAttachmentsmAttachments
nsCOMPtr< nsIDOMElementmElement
nsCOMPtr< nsIVariantmValue
nsresult mStatus
PRUint16 mVersion
PRPackedBool mComputeValue

Detailed Description

Definition at line 52 of file nsSOAPParameter.h.


Constructor & Destructor Documentation

Definition at line 45 of file nsSOAPParameter.cpp.

{
}
virtual nsSOAPParameter::~nsSOAPParameter ( ) [virtual]

Member Function Documentation

void nsISOAPBlock::init ( in nsISOAPAttachments  aAttachments,
in unsigned short  aVersion 
) [inherited]

Initialize the block for additional decoding information.

Parameters:
aAttachmentsAttachments in case this refers to them.
aVersionSOAP version for decoding special header attributes.
NS_IMETHODIMP nsSOAPBlock::Initialize ( JSContext cx,
JSObject obj,
PRUint32  argc,
jsval argv 
) [virtual, inherited]

Intialize a newly created native instance using the parameters passed into the JavaScript constructor.

Implements nsIJSNativeInitializer.

Definition at line 194 of file nsSOAPBlock.cpp.

{

//  Get the arguments.


  nsAutoString name;
  nsAutoString namespaceURI;
  nsIVariant* s1 = nsnull;
  nsISupports* s2 = nsnull;
  nsISupports* s3 = nsnull;

  if (!JS_ConvertArguments(cx, argc, argv, "/%iv %is %is %ip %ip",
                           &s1,
                           NS_STATIC_CAST(nsAString *, &name),
                           NS_STATIC_CAST(nsAString *, &namespaceURI),
                           &s2,
                           &s3))
    return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_BLOCK_INIT", "Could not interpret block initialization arguments.");
  
  nsCOMPtr<nsIVariant> value = dont_AddRef(s1);
  nsCOMPtr<nsISupports> schemaType = dont_AddRef(s2);
  nsCOMPtr<nsISupports> encoding = dont_AddRef(s3);

  nsresult rc = SetValue(value);
  if (NS_FAILED(rc))
    return rc;
  rc = SetName(name);
  if (NS_FAILED(rc))
    return rc;
  rc = SetNamespaceURI(namespaceURI);
  if (NS_FAILED(rc))
    return rc;
  if (schemaType) {
    nsCOMPtr<nsISchemaType> v = do_QueryInterface(schemaType, &rc);
    if (NS_FAILED(rc))
      return rc;
    rc = SetSchemaType(v);
    if (NS_FAILED(rc))
      return rc;
  }
  if (encoding) {
    nsCOMPtr<nsISOAPEncoding> v = do_QueryInterface(encoding, &rc);
    if (NS_FAILED(rc))
      return rc;
    rc = SetEncoding(v);
    if (NS_FAILED(rc))
      return rc;
  }

  return NS_OK;
}

Here is the call graph for this function:


Member Data Documentation

The element which is the encoded value of this block.

If this is set, value, namespaceURI, and name becomes a computed attributes which are produced by decoding this element.

Definition at line 117 of file nsISOAPBlock.idl.

The encoding that was / will be applied to the block.

If this is blank and element is non-null, it becomes impossible to decode the block when the value is requested.

Definition at line 102 of file nsISOAPBlock.idl.

Definition at line 70 of file nsSOAPBlock.h.

PRPackedBool nsSOAPBlock::mComputeValue [protected, inherited]

Definition at line 75 of file nsSOAPBlock.h.

nsCOMPtr<nsIDOMElement> nsSOAPBlock::mElement [protected, inherited]

Definition at line 71 of file nsSOAPBlock.h.

Definition at line 68 of file nsSOAPBlock.h.

nsString nsSOAPBlock::mName [protected, inherited]

Definition at line 67 of file nsSOAPBlock.h.

nsString nsSOAPBlock::mNamespaceURI [protected, inherited]

Definition at line 66 of file nsSOAPBlock.h.

Definition at line 69 of file nsSOAPBlock.h.

nsresult nsSOAPBlock::mStatus [protected, inherited]

Definition at line 73 of file nsSOAPBlock.h.

nsCOMPtr<nsIVariant> nsSOAPBlock::mValue [protected, inherited]

Definition at line 72 of file nsSOAPBlock.h.

PRUint16 nsSOAPBlock::mVersion [protected, inherited]

Definition at line 74 of file nsSOAPBlock.h.

attribute AString nsISOAPBlock::name [inherited]

The name of the block.

If the block is left unnamed, it will be encoded using the element types defined in the SOAP-ENC schema. For example, <SOAP-ENC:int>45</SOAP-ENC:int> . If this is modified, element is set to null and all attributes computed from element revert to previous uncomputed values. If element is set, this becomes computed.

Definition at line 94 of file nsISOAPBlock.idl.

The namespace URI of the block.

Ignored if name is null. If this is modified, element is set to null and all attributes computed from element revert to previous uncomputed values. If element is set, this becomes computed.

Definition at line 84 of file nsISOAPBlock.idl.

The schema type used to encode or decode the block.

If this is null, then the default encoder or decoder may

Definition at line 109 of file nsISOAPBlock.idl.

The native value which is the decoded value of this block.

If this is modified, element is set to null and all attributes computed from element revert to previous uncomputed values. If element is set, this becomes computed, relying on the value of encoding and schemaType each time it is computed.

Definition at line 128 of file nsISOAPBlock.idl.


The documentation for this class was generated from the following files: