Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
webview.cpp
1
2
/***************************************************************************
3
* webview.cpp - Webview aspect for Fawkes
4
*
5
* Created: Thu Nov 25 22:20:52 2010
6
* Copyright 2006-2010 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#include <aspect/webview.h>
25
26
namespace
fawkes {
27
#if 0
/* just to make Emacs auto-indent happy */
28
}
29
#endif
30
31
/** @class WebviewAspect <aspect/webview.h>
32
* Thread aspect to provide web pages via Webview.
33
*
34
* The WebviewAspect differs from other aspects. It can be successfully
35
* initialized even if there currently is no plugin loaded to serve web
36
* pages. This is because the central interface, the WebUrlManager, is
37
* held by the WebviewAspectIniFin and thus processor can be registerd
38
* and deregistered all the time. The webview plugin itself has the
39
* WebviewAspect, but it uses its access to the WebUrlManager instance
40
* to serve requests and pass them on to the appropriate processor.
41
*
42
* It is guaranteed that if used properly from within plugins that
43
* init_WebviewAspect() is called before the thread is started and that
44
* you can access the webview request processor manager in the thread's
45
* init() method.
46
*
47
* @ingroup Aspects
48
* @author Tim Niemueller
49
*/
50
51
52
/** Constructor. */
53
WebviewAspect::WebviewAspect()
54
{
55
add_aspect(
"WebviewAspect"
);
56
}
57
58
59
/** Virtual empty Destructor. */
60
WebviewAspect::~WebviewAspect()
61
{
62
}
63
64
65
/** Set URL manager.
66
* It is guaranteed that this is called for a logging thread before
67
* Thread::start() is called (when running regularly inside Fawkes).
68
* @param url_manager URL manager to register processors to
69
* @param nav_manager Navigation manager to add navigation entries
70
* @see WebviewMaster
71
*/
72
void
73
WebviewAspect::init_WebviewAspect(
WebUrlManager
*url_manager,
74
WebNavManager
*nav_manager)
75
{
76
webview_url_manager = url_manager;
77
webview_nav_manager = nav_manager;
78
}
79
80
}
// end namespace fawkes
src
libs
aspect
webview.cpp
Generated by
1.8.3.1