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, WebRequestManager *request_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...
 
WebRequestManagerwebview_request_manager
 Webview request 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 38 of file webview.h.

Constructor & Destructor Documentation

◆ WebviewAspect()

fawkes::WebviewAspect::WebviewAspect ( )

Constructor.

Definition at line 53 of file webview.cpp.

References fawkes::Aspect::add_aspect().

◆ ~WebviewAspect()

fawkes::WebviewAspect::~WebviewAspect ( )
virtual

Virtual empty Destructor.

Definition at line 60 of file webview.cpp.

Member Function Documentation

◆ init_WebviewAspect()

void fawkes::WebviewAspect::init_WebviewAspect ( WebUrlManager url_manager,
WebNavManager nav_manager,
WebRequestManager request_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
request_managerRequest manager to query request information
See also
WebviewMaster

Definition at line 74 of file webview.cpp.

References webview_nav_manager, webview_request_manager, and webview_url_manager.

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

Member Data Documentation

◆ webview_nav_manager

◆ webview_request_manager

WebRequestManager* fawkes::WebviewAspect::webview_request_manager
protected

Webview request manager.

Definition at line 54 of file webview.h.

Referenced by WebviewThread::init(), init_WebviewAspect(), and WebviewPtzCamThread::loop().

◆ webview_url_manager


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