Fawkes API
Fawkes Development Version
nav_manager.h
1
2
/***************************************************************************
3
* nav_manager.h - Web Navigation manager
4
*
5
* Created: Tue Dec 21 01:28:50 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
#ifndef _LIBS_WEBVIEW_NAV_MANAGER_H_
24
#define _LIBS_WEBVIEW_NAV_MANAGER_H_
25
26
#include <map>
27
#include <string>
28
29
namespace
fawkes
{
30
31
class
Mutex;
32
33
class
WebNavManager
34
{
35
public
:
36
/** Navigation map type, mapping URLs to labels. */
37
typedef
std::map<std::string, std::string>
NavMap
;
38
39
WebNavManager
();
40
~WebNavManager
();
41
42
void
add_nav_entry
(std::string baseurl, std::string name);
43
void
remove_nav_entry
(std::string baseurl);
44
45
/** Get navigation entries. @return navigation entries map. */
46
const
NavMap
&
47
get_nav_entries
()
const
48
{
49
return
nav_entries_;
50
}
51
/** Get mutex for navigation entries. @return mutex for navigation entries. */
52
Mutex
*
53
mutex
()
54
{
55
return
mutex_;
56
}
57
58
private
:
59
Mutex
*mutex_;
60
NavMap
nav_entries_;
61
};
62
63
}
// end namespace fawkes
64
65
#endif
fawkes::Mutex
Definition:
mutex.h:38
fawkes::WebNavManager::~WebNavManager
~WebNavManager()
Destructor.
Definition:
nav_manager.cpp:50
fawkes::WebNavManager::WebNavManager
WebNavManager()
Constructor.
Definition:
nav_manager.cpp:44
fawkes::WebNavManager::mutex
Mutex * mutex()
Get mutex for navigation entries.
Definition:
nav_manager.h:59
fawkes
fawkes::WebNavManager::remove_nav_entry
void remove_nav_entry(std::string baseurl)
Remove a navigation entry.
Definition:
nav_manager.cpp:74
fawkes::WebNavManager::NavMap
std::map< std::string, std::string > NavMap
Navigation map type, mapping URLs to labels.
Definition:
nav_manager.h:43
fawkes::WebNavManager::get_nav_entries
const NavMap & get_nav_entries() const
Get navigation entries.
Definition:
nav_manager.h:53
fawkes::WebNavManager::add_nav_entry
void add_nav_entry(std::string baseurl, std::string name)
Add a navigation entry.
Definition:
nav_manager.cpp:61
src
libs
webview
nav_manager.h
Generated by
1.8.17