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
rrdweb_thread.cpp
1
2
/***************************************************************************
3
* rrdweb_thread.cpp - RRD Webview Thread
4
*
5
* Created: Tue Dec 21 01:05:45 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.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
#include "rrdweb_thread.h"
24
#include "rrdweb_processor.h"
25
26
#include <webview/url_manager.h>
27
#include <webview/nav_manager.h>
28
29
using namespace
fawkes;
30
31
#define RRD_URL_PREFIX "/rrd"
32
33
/** @class RRDWebThread "rrd_thread.h"
34
* RRD Webview Thread.
35
* This thread queries RRD graphs from RRDManager obtained via RRDAspect
36
* and displays them on a Webview page.
37
*
38
* @author Tim Niemueller
39
*/
40
41
/** Constructor. */
42
RRDWebThread::RRDWebThread
()
43
:
Thread
(
"RRDWebThread"
,
Thread
::OPMODE_WAITFORWAKEUP)
44
{
45
}
46
47
48
/** Destructor. */
49
RRDWebThread::~RRDWebThread
()
50
{
51
}
52
53
54
void
55
RRDWebThread::init
()
56
{
57
__processor =
new
RRDWebRequestProcessor
(
rrd_manager
,
logger
, RRD_URL_PREFIX);
58
webview_url_manager
->
register_baseurl
(RRD_URL_PREFIX, __processor);
59
webview_nav_manager
->
add_nav_entry
(RRD_URL_PREFIX,
"RRD Graphs"
);
60
}
61
62
63
void
64
RRDWebThread::finalize
()
65
{
66
webview_url_manager
->
unregister_baseurl
(RRD_URL_PREFIX);
67
webview_nav_manager
->
remove_nav_entry
(RRD_URL_PREFIX);
68
delete
__processor;
69
}
70
71
72
void
73
RRDWebThread::loop
()
74
{
75
}
76
src
plugins
rrdweb
rrdweb_thread.cpp
Generated by
1.8.3.1