FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FB::PluginCore Class Referenceabstract

Base class for all FireBreath Plugins. More...

#include "PluginCore.h"

Inheritance diagram for FB::PluginCore:
Inheritance graph
Collaboration diagram for FB::PluginCore:
Collaboration graph

Public Member Functions

 PluginCore ()
 Default Constructor. More...
 
virtual ~PluginCore ()
 Finaliser. More...
 
virtual void SetHost (const FB::BrowserHostPtr &host)
 Called by the browser during startup to provide a Browser Host object. More...
 
virtual PluginWindowGetWindow () const
 Gets the PluginWindow instance currently provided by the browser, or NULL if none. More...
 
virtual void setScriptingOnly (const bool so=true)
 Called by the browser to indicate that there is no DOM element associated with this object. More...
 
virtual bool isScriptingOnly () const
 Returns true if there is no DOM element associated with the plugin. More...
 
virtual void SetWindow (PluginWindow *win)
 Called by the browser to set the window. The default implementation fires the WindowAttached event in response to this. More...
 
virtual void ClearWindow ()
 Called by the browser to indicate that the window is no longer valid. The default implementation fires the WindowDetached event in response to this. More...
 
virtual bool setReady ()
 Called by the browser to indicate that the basic initialization is complete and the plugin is now ready to interact with the Browser via Javascript. This may or may not occur before the Window (if any) is set. More...
 
virtual void onPluginReady ()
 This is called when the plugin is ready. More...
 
virtual void shutdown ()
 This is called when the plugin needs to shut down to give it a chance to stop all threads; the destructor would be too late for thread shutdown. More...
 
void releaseRootJSAPI ()
 Releases the root JSAPI object. More...
 
virtual JSAPIPtr getRootJSAPI ()
 Gets the root JSAPI object. It is not recommended to call this from the constructor or before setHost is called, as many JSAPI objects need the BrowserHost and a weak_ptr to the Plugin class to function correctly. More...
 
virtual bool isWindowless ()
 Called by the browser to query if this plugin should be windowless. More...
 
virtual std::string negotiateDrawingModel ()
 Called at plugin creation to query the plugin's preferred drawing model. More...
 
virtual void setFSPath (const std::string &path)
 Called by the browser to set the file system path of the plugin module. More...
 
virtual void setParams (const FB::VariantMap &inParams)
 Called by the browser to store the values provided in param tags in m_params. More...
 
virtual void handleUnsolicitedStream (BrowserStreamRequest &req)
 Called by the browser to handle an unsolicited BrowserStream. More...
 
- Public Member Functions inherited from FB::PluginEventSink
virtual bool HandleEvent (PluginEvent *event, PluginEventSource *source)=0
 Called by the browser when a system event needs to be handled, such as a mouse event, a keyboard event, or a drawing event. More...
 

Static Public Member Functions

static void setPlatform (const std::string &os, const std::string &browser)
 Called by the browser when the Operating System and Browser are known. More...
 
static std::string getFSPath ()
 Returns the path and filename of the current plugin module. More...
 

Protected Member Functions

virtual JSAPIPtr createJSAPI ()=0
 Called the first time something calls getRootJSAPI() to get the Root JSAPI instance. More...
 

Protected Attributes

BrowserHostPtr m_host
 The BrowserHost object for the current session; deprecated, use getHost() More...
 
std::string m_filesystemPath
 Stores the value passed into setFSPath(); deprecated, use getFSPath() More...
 
bool m_paramsSet
 Boolean value indicates if the browser has called setParams() yet or not. More...
 
FB::VariantMap m_params
 

Detailed Description

Base class for all FireBreath Plugins.

This class should be extended by all FireBreath plugin classes. Each <object> tag in the web page corresponds to an instance of a class which extends PluginCore, and the basic plugin lifecycle is seen in this class. Please note that JavaScript API calls are handled by JSAPI or JSAPIAuto.

All classes extending PluginCore must implement the createJSAPI() method, which creates an instance of the JSAPI-derived type which handles interaction with Javascript for this plugin.

Author
Richard Bateman (taxilian)

Definition at line 54 of file PluginCore.h.


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