source: trunk/lib/html_utility.h @ 687

Last change on this file since 687 was 687, checked in by Peter Johansson, 13 years ago

Merged patch release 0.6.6 to trunk. Delta 0.6.6 - 0.6.5

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