/usr/include/libxml++-2.6/libxml++/io/outputbuffer.h is in libxml++2.6-dev 2.40.1-2.
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | /* outputbuffer.h
* this file is part of libxml++
*
* copyright (C) 2003 by libxml++ developer's team
*
* this file is covered by the GNU Lesser General Public License,
* which should be included with libxml++ as the file COPYING.
*/
#ifndef __LIBXMLPP_OUTPUTBUFFER_H
#define __LIBXMLPP_OUTPUTBUFFER_H
#include <glibmm/ustring.h>
#include <libxml++/noncopyable.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
struct _xmlOutputBuffer;
}
#endif //DOXYGEN_SHOULD_SKIP_THIS
namespace xmlpp
{
struct OutputBufferCallback;
/** Base class for xmlOutputBuffer wrapper
*
* It can be derived from to create a new output buffer.
* A child class has to override do_write(), and possibly
* do_close() if some actions are required before buffer closing.
*/
class OutputBuffer: public NonCopyable
{
public:
/**
* @param encoding The encoding that the derived class waits for in do_write. If
* not provided, UTF-8 will be sent to do_write.
*
* @warning The encoding is done by libxml. As a consequence, libxml must
* have a translator to the target encoding.
*/
OutputBuffer(const Glib::ustring& encoding = Glib::ustring());
~OutputBuffer() override;
public:
/** gives an access to the underlying libxml structure to the children
*/
_xmlOutputBuffer* cobj();
/** gives an access to the underlying libxml structure to the children
*/
const _xmlOutputBuffer* cobj() const;
private:
bool on_write(const char * buffer, int len);
bool on_close();
/** Function called when some data are sent to the buffer.
* @param buffer The datas encoded in the charset given to the constructor
* @param len Buffer length
*
* This function MUST be overriden in derived classes.
*/
virtual bool do_write(const char * buffer, int len) = 0;
/** Function called before closing the buffer.
* Derived classes should override it if some actions are required before
* closing the buffer, instead of doing them in the destructor.
*/
virtual bool do_close();
/**
* Underlying libxml2 structure.
*/
_xmlOutputBuffer* impl_;
friend struct OutputBufferCallback;
};
}
#endif
|