1 | #ifndef _theplu_svndigest_html_utility_ |
---|
2 | #define _theplu_svndigest_html_utility_ |
---|
3 | |
---|
4 | // $Id: html_utility.h 519 2007-12-23 20:14:50Z jari $ |
---|
5 | |
---|
6 | /* |
---|
7 | Copyright (C) 2006 Peter Johansson |
---|
8 | Copyright (C) 2007 Jari Häkkinen, Peter Johansson |
---|
9 | |
---|
10 | This file is part of svndigest, http://trac.thep.lu.se/svndigest |
---|
11 | |
---|
12 | svndigest is free software; you can redistribute it and/or modify it |
---|
13 | under the terms of the GNU General Public License as published by |
---|
14 | the Free Software Foundation; either version 2 of the License, or |
---|
15 | (at your option) any later version. |
---|
16 | |
---|
17 | svndigest is distributed in the hope that it will be useful, but |
---|
18 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
20 | General Public License for more details. |
---|
21 | |
---|
22 | You should have received a copy of the GNU General Public License |
---|
23 | along with this program; if not, write to the Free Software |
---|
24 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
25 | 02111-1307, USA. |
---|
26 | */ |
---|
27 | |
---|
28 | #include <fstream> |
---|
29 | #include <iosfwd> |
---|
30 | #include <string> |
---|
31 | #include <vector> |
---|
32 | |
---|
33 | namespace theplu{ |
---|
34 | namespace svndigest{ |
---|
35 | |
---|
36 | /// |
---|
37 | /// @brief create anchor |
---|
38 | /// |
---|
39 | /// @param url address to link to |
---|
40 | /// @param name text visible on page |
---|
41 | /// @param level '../' is added @a level times before @a href |
---|
42 | /// @param title title of anchor |
---|
43 | /// |
---|
44 | std::string anchor(const std::string& url, |
---|
45 | const std::string& name, u_int level=0, |
---|
46 | const std::string& title="", |
---|
47 | const std::string& color=""); |
---|
48 | |
---|
49 | /// |
---|
50 | /// @Brief print html footer of page |
---|
51 | /// |
---|
52 | void print_footer(std::ostream&); |
---|
53 | |
---|
54 | /// |
---|
55 | /// @brief print html header of page |
---|
56 | /// |
---|
57 | /// \param os stream to print to |
---|
58 | /// \param name |
---|
59 | /// \param level |
---|
60 | /// \param |
---|
61 | void print_header(std::ostream& os, std::string name, u_int level, |
---|
62 | std::string user, std::string item, std::string path); |
---|
63 | |
---|
64 | |
---|
65 | /// |
---|
66 | /// @return if trac-revision is set in config file anchor to trac is |
---|
67 | /// given otherwise just a string corresponding to passed parameter. |
---|
68 | /// |
---|
69 | std::string trac_revision(size_t, std::string color=""); |
---|
70 | |
---|
71 | }} // end of namespace svndigest end of namespace theplu |
---|
72 | |
---|
73 | #endif |
---|