Skip to end of metadata
Go to start of metadata

FB::JSAPIProxy Class Reference

JavaScript API Wrapper -- this can wrap any type of JSAPI object and be passed back to any browser that. More...

#include <JSAPIProxy.h>

Inheritance diagram for FB::JSAPIProxy:
Inheritance graph
Collaboration diagram for FB::JSAPIProxy:
Collaboration graph

List of all members.

Public Member Functions

bool isExpired () const
 Returns true if the weak_ptr this contains doesn't point to anything.
void changeObject (const FB::JSAPIPtr &inner)
 Changes the wrapped JSAPIPtr to the given one.
void changeObject (const FB::JSAPIWeakPtr &inner)
 Changes the wrapped JSAPIWeakPtr to the given one.
void invalidate ()
 Invalidates this object.
virtual void getMemberNames (std::vector< std::string > &nameVector) const
 Called by the browser to enumerate the members of this JSAPI object.
virtual size_t getMemberCount () const
 Gets the member count.
virtual bool HasMethod (const std::wstring &methodName) const
virtual bool HasMethod (const std::string &methodName) const
 Query if the JSAPI object has the 'methodName' method.
virtual bool HasProperty (const std::wstring &propertyName) const
virtual bool HasProperty (const std::string &propertyName) const
 Query if 'propertyName' is a valid property.
virtual bool HasProperty (int idx) const
 Query if the property at "idx" exists.
virtual variant GetProperty (const std::wstring &propertyName)
virtual variant GetProperty (const std::string &propertyName)
 Gets a property value.
virtual void SetProperty (const std::wstring &propertyName, const variant &value)
virtual void SetProperty (const std::string &propertyName, const variant &value)
 Sets the value of a property.
virtual void RemoveProperty (const std::wstring &propertyName)
virtual void RemoveProperty (const std::string &propertyName)
 Removes a property.
virtual variant GetProperty (int idx)
 Gets the value of an indexed property.
virtual void SetProperty (int idx, const variant &value)
 Sets the value of an indexed property.
virtual void RemoveProperty (int idx)
 Removes an indexed property.
virtual variant Invoke (const std::wstring &methodName, const std::vector< variant > &args)
virtual variant Invoke (const std::string &methodName, const std::vector< variant > &args)
 Called by the browser to invoke a method on the JSAPI object.
virtual variant Construct (const std::vector< variant > &args)
 Called by the browser to construct the JSAPI object.

Static Public Member Functions

static JSAPIProxyPtr create (const FB::JSAPIPtr &inner)
 Creates a JSAPIProxy that holds a shared_ptr reference to the JSAPI object provided.
static JSAPIProxyPtr create (const SecurityZone &securityLevel, const FB::JSAPIPtr &inner)
static JSAPIProxyPtr create (const FB::JSAPIWeakPtr &inner)
 Creates a JSAPIProxy that holds a weak_ptr reference to the JSAPI object provided.
static JSAPIProxyPtr create (const SecurityZone &securityLevel, const FB::JSAPIWeakPtr &inner)

Detailed Description

JavaScript API Wrapper -- this can wrap any type of JSAPI object and be passed back to any browser that.

There are cases when you may want to pass a JSAPI object into another browser / browserhost instance (even just such as another page). This class makes it possible to return a JSAPI object from a different instance of the plugin into a page, or presumably even a JSObject from one page into another (be *really* careful with that). Note that not all JSAPI objects are linked to a BrowserHost instance, and thus might not need this wrapper class to function correctly

Both constructors also have an optional SecurityZone parameter that, if provided, can allow this proxy object to operate in a different security zone than the object it wraps, allowing the same object to be shared between two instances of a plugin that run in different security zones

See also:
FB::JSAPI
FB::JSAPIAuto

Definition at line 45 of file JSAPIProxy.h.


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

Generated on 22 May 2013 for FireBreath by  doxygen 1.6.1
Labels
  • None