Fawkes API  Fawkes Development Version
fawkes::WebviewAspect Class Reference

Thread aspect to provide web pages via Webview. More...

#include <>>

Inheritance diagram for fawkes::WebviewAspect:

Public Member Functions

 WebviewAspect ()
 Constructor. More...
 
virtual ~WebviewAspect ()
 Virtual empty Destructor. More...
 
void init_WebviewAspect (WebUrlManager *url_manager, WebNavManager *nav_manager)
 Set URL manager. More...
 
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread. More...
 

Protected Attributes

WebUrlManagerwebview_url_manager
 Webview request processor manager. More...
 
WebNavManagerwebview_nav_manager
 Webview navigation manager. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread. More...
 

Detailed Description

Thread aspect to provide web pages via Webview.

The WebviewAspect differs from other aspects. It can be successfully initialized even if there currently is no plugin loaded to serve web pages. This is because the central interface, the WebUrlManager, is held by the WebviewAspectIniFin and thus processor can be registerd and deregistered all the time. The webview plugin itself has the WebviewAspect, but it uses its access to the WebUrlManager instance to serve requests and pass them on to the appropriate processor.

It is guaranteed that if used properly from within plugins that init_WebviewAspect() is called before the thread is started and that you can access the webview request processor manager in the thread's init() method.

Author
Tim Niemueller

Definition at line 37 of file webview.h.

Constructor & Destructor Documentation

fawkes::WebviewAspect::WebviewAspect ( )

Constructor.

Definition at line 53 of file webview.cpp.

References fawkes::Aspect::add_aspect().

fawkes::WebviewAspect::~WebviewAspect ( )
virtual

Virtual empty Destructor.

Definition at line 60 of file webview.cpp.

Member Function Documentation

void fawkes::WebviewAspect::init_WebviewAspect ( WebUrlManager url_manager,
WebNavManager nav_manager 
)

Set URL manager.

It is guaranteed that this is called for a logging thread before Thread::start() is called (when running regularly inside Fawkes).

Parameters
url_managerURL manager to register processors to
nav_managerNavigation manager to add navigation entries
See also
WebviewMaster

Definition at line 73 of file webview.cpp.

References webview_nav_manager, and webview_url_manager.

Referenced by fawkes::WebviewAspectIniFin::init().

Member Data Documentation

WebNavManager* fawkes::WebviewAspect::webview_nav_manager
protected
WebUrlManager* fawkes::WebviewAspect::webview_url_manager
protected

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