/usr/include/ui-gxmlcpp/Conf.hpp is in libui-gxmlcpp-dev 1.4.4-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | /**
* @file
* @version @$Id$
* @author
* ui-gxmlcpp: C++ wrapper for Gnome libxml2/libxsl.
* Copyright (C) Schlund+Partner AG 2002-2004.
* Licensed under the GNU Lesser General Public License (LGPL). See
* @ref License, or the file COPYING in distribution.
*/
#ifndef UI_GXML_CONF_HPP
#define UI_GXML_CONF_HPP
// STDC++
#include <string>
namespace UI {
namespace GXML {
/** @brief libxml2/libxslt configuration helper.
*
* You would normally have one instance of this alive while
* operational. For custom logging, overwrite customLog().
*
*/
class Conf
{
public:
Conf();
virtual ~Conf();
/** @brief Overwrite this for custom logging.
*
* This defaults to logging to std::clog.
*
* @param msg Fragmented log stream including newlines.
*
* If you have line based logging, you might consider streaming msg
* into a stream buffer (with multi thread safety) and log only when
* you got a complete line. Unfortunately, @param msg may or may not
* include newlines and/or be a complete log line or not (i.e.,
* lines are being broadcast to the hooks in fragments).
*/
virtual void customLog(std::string const & msg);
/** @brief Set/unset custom logging (optionally with custom prefix).
*
* When enabled, logging will be done through us (i.e.,
* libxmlLog()). You would normally want to call this in a derived
* class' constructor where customLog() is overwritten.
*/
Conf & setCustomLogging(bool on=true, std::string prefix="[libxml2/xslt] ");
/** @brief En/disable custom logging. Defaults to "enable" ("don't care" if custom logging is unset). */
Conf & setCustomLoggingEnable(bool on=true);
/** @brief Odd libxml2 global feature ;). See libxml2 docs. */
static void setKeepBlanks(bool on=true);
/** @brief Register exslt functions for use with xsl transformations. */
Conf & setEXSLT();
private:
void memberLog(std::string const & msg);
static void libxmlLog(void * ctx, const char * msg, ...);
bool customLoggingEnabled_;
std::string logPrefix_;
};
}}
#endif
|