Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Static Private Attributes
nsDispatchSupport Class Reference

This class is a service that exposes some handy utility methods for IDispatch users. More...

#include <XPCDispPrivate.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIDISPATCHSUPPORT 
nsDispatchSupport ()
 Initialize nsISupports base objects.
virtual ~nsDispatchSupport ()
 Cleansup nsISupports.
void COMVariant2JSVal (in COMVARIANTPtr comvar, out JSVal val)
 Converts a COM Variant to a jsval.
void JSVal2COMVariant (in JSVal var, out COMVARIANT comvar)
 Converts a jsval to a COM Variant.
boolean isClassSafeToHost (in JSContextPtr cx, in nsCIDRef cid, in boolean capsCheck, out boolean classExists)
 Test if the class is safe to host.
boolean isClassMarkedSafeForScripting (in nsCIDRef cid, out boolean classExists)
 Test if the specified class is marked safe for scripting.
boolean isObjectSafeForScripting (in voidPtr theObject, in nsIIDRef id)
 Test if the instantiated object is safe for scripting on the specified interface.
unsigned long getHostingFlags (in string aContext)
 Return the ActiveX security and hosting flags.

Static Public Member Functions

static nsDispatchSupportGetSingleton ()
 Returns the existing instance or creates a new one.
static void FreeSingleton ()
 Called on shutdown to free the instance.

Static Private Attributes

static nsDispatchSupportmInstance = nsnull

Detailed Description

This class is a service that exposes some handy utility methods for IDispatch users.

Definition at line 1351 of file XPCDispPrivate.h.


Constructor & Destructor Documentation

Initialize nsISupports base objects.

Definition at line 149 of file nsDispatchSupport.cpp.

{
    /* member initializers and constructor code */
}

Here is the caller graph for this function:

Cleansup nsISupports.

Definition at line 154 of file nsDispatchSupport.cpp.

{
    /* destructor code */
}

Member Function Documentation

Converts a COM Variant to a jsval.

Parameters:
comvarThe COM Variant to be converted.
valThe jsval to receive the converted value.
static void nsDispatchSupport::FreeSingleton ( ) [inline, static]

Called on shutdown to free the instance.

Definition at line 1372 of file XPCDispPrivate.h.

Here is the caller graph for this function:

unsigned long nsIDispatchSupport::getHostingFlags ( in string  aContext) [inherited]

Return the ActiveX security and hosting flags.

See nsIActiveXSecurityPolicy for list of flags.

Parameters:
contextThe context for which flags are requested. At present the only valid value is nsnull.

Returns the existing instance or creates a new one.

Returns:
an nsDispatchSupport object

Definition at line 339 of file nsDispatchSupport.cpp.

Here is the call graph for this function:

boolean nsIDispatchSupport::isClassMarkedSafeForScripting ( in nsCIDRef  cid,
out boolean  classExists 
) [inherited]

Test if the specified class is marked safe for scripting.

Parameters:
cidThe nsID representation of the CLSID to test.
classExistsReturns containing PR_FALSE if the class is not registered.
boolean nsIDispatchSupport::isClassSafeToHost ( in JSContextPtr  cx,
in nsCIDRef  cid,
in boolean  capsCheck,
out boolean  classExists 
) [inherited]

Test if the class is safe to host.

Parameters:
clsidThe nsID representation of the CLSID to test.
classExistsReturns containing PR_FALSE if the class is not registered.
boolean nsIDispatchSupport::isObjectSafeForScripting ( in voidPtr  theObject,
in nsIIDRef  id 
) [inherited]

Test if the instantiated object is safe for scripting on the specified interface.

Parameters:
theObjectThe object to test (an IUnknown cast into a void *).
iidThe interface to test if it is safe for scripting on.
void nsIDispatchSupport::JSVal2COMVariant ( in JSVal  var,
out COMVARIANT  comvar 
) [inherited]

Converts a jsval to a COM Variant.

Parameters:
varThe jsval to be converted.
comvarThe COM Variant to receive the converted value

Member Data Documentation

Definition at line 1375 of file XPCDispPrivate.h.


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