Fawkes API Fawkes Development Version
|
Thread aspect to provide web pages via Webview. More...
#include <>>
Public Member Functions | |
WebviewAspect () | |
Constructor. More... | |
virtual | ~WebviewAspect () |
Virtual empty Destructor. More... | |
void | init_WebviewAspect (WebUrlManager *url_manager, WebNavManager *nav_manager, WebRequestManager *request_manager, WebviewRestApiManager *rest_api_manager) |
Set URL manager. More... | |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
Protected Attributes | |
WebUrlManager * | webview_url_manager |
Webview request processor manager. More... | |
WebNavManager * | webview_nav_manager |
Webview navigation manager. More... | |
WebRequestManager * | webview_request_manager |
Webview request manager. More... | |
WebviewRestApiManager * | webview_rest_api_manager |
Webview REST API manager. More... | |
Additional Inherited Members | |
![]() | |
void | add_aspect (const char *name) |
Add an aspect to a thread. More... | |
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.
fawkes::WebviewAspect::WebviewAspect | ( | ) |
|
virtual |
Virtual empty Destructor.
Definition at line 55 of file webview.cpp.
void fawkes::WebviewAspect::init_WebviewAspect | ( | WebUrlManager * | url_manager, |
WebNavManager * | nav_manager, | ||
WebRequestManager * | request_manager, | ||
WebviewRestApiManager * | rest_api_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).
url_manager | URL manager to register processors to |
nav_manager | Navigation manager to add navigation entries |
request_manager | Request manager to query request information |
rest_api_manager | Manager to register REST APIs |
Definition at line 69 of file webview.cpp.
References webview_nav_manager, webview_request_manager, webview_rest_api_manager, and webview_url_manager.
Referenced by fawkes::WebviewAspectIniFin::init().
|
protected |
Webview navigation manager.
Definition at line 51 of file webview.h.
Referenced by init_WebviewAspect().
|
protected |
Webview request manager.
Definition at line 53 of file webview.h.
Referenced by WebviewThread::init(), and init_WebviewAspect().
|
protected |
Webview REST API manager.
Definition at line 55 of file webview.h.
Referenced by ClipsExecutiveRestApi::finalize(), ClipsRestApi::finalize(), SkillerRestApi::finalize(), BackendInfoRestApi::finalize(), BlackboardRestApi::finalize(), ConfigurationRestApi::finalize(), ImageRestApi::finalize(), PluginRestApi::finalize(), TransformsRestApi::finalize(), ClipsExecutiveRestApi::init(), ClipsRestApi::init(), SkillerRestApi::init(), BackendInfoRestApi::init(), BlackboardRestApi::init(), ConfigurationRestApi::init(), ImageRestApi::init(), PluginRestApi::init(), TransformsRestApi::init(), WebviewThread::init(), and init_WebviewAspect().
|
protected |
Webview request processor manager.
Definition at line 49 of file webview.h.
Referenced by MetricsThread::finalize(), WebviewThread::finalize(), XmlRpcThread::finalize(), MetricsThread::init(), WebviewThread::init(), XmlRpcThread::init(), and init_WebviewAspect().