/usr/include/jreen-qt5/jreen/jreen.h is in libjreen-qt5-dev 1.2.0-2fakesync1.
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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | /****************************************************************************
**
** Jreen
**
** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
**
*****************************************************************************
**
** $JREEN_BEGIN_LICENSE$
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see http://www.gnu.org/licenses/.
** $JREEN_END_LICENSE$
**
****************************************************************************/
#ifndef JREEN_JREEN_H
#define JREEN_JREEN_H
# ifndef __cplusplus
# error "C++ is needed"
# endif // __cplusplus
# include <QtGlobal>
# include <QtCore/QString>
# include <QtCore/QXmlStreamWriter> //needed on OS X (10.5) for QXmlStreamWriter typedef
# ifndef J_BUILD_STATIC
# ifdef J_BUILD_INTERNAL
# ifdef J_BUILD_LIBRARY
# define JREEN_AUTOTEST_EXPORT Q_DECL_EXPORT
# else
# define JREEN_AUTOTEST_EXPORT Q_DECL_IMPORT
# endif
# endif
# ifdef J_BUILD_LIBRARY
# define JREEN_EXPORT Q_DECL_EXPORT
# else
# define JREEN_EXPORT Q_DECL_IMPORT
# endif
# endif
# ifndef JREEN_AUTOTEST_EXPORT
# define JREEN_AUTOTEST_EXPORT
# endif
# ifndef JREEN_EXPORT
# define JREEN_EXPORT
# endif
#ifdef QT_DEPRECATED_SINCE
# define JREEN_QT_DEPRECATED_SINCE(a, b) QT_DEPRECATED_SINCE(a, b)
#else
# define QT_DEPRECATED_SINCE(a, b) false
#endif
# define J_PURE_SINGLETON(Class) \
public: \
static Class &instance() \
{ \
static Class *pointer = 0; \
if(!pointer) \
pointer = new Class; \
return *pointer; \
} \
private:
# define J_SINGLETON(Class) \
J_PURE_SINGLETON(Class) \
Class() {} \
virtual ~Class() {}
#define J_PURE_EXTENSION(Extension,XPath) \
public: \
inline static const PayloadMeta &meta() \
{ \
static PayloadMeta staticExtensionMeta(#Extension , XPath); \
return staticExtensionMeta; \
} \
virtual QString xPath() const { return meta().xpath; } \
virtual int payloadType() const { return meta().type; } \
virtual QByteArray extensionName() const { return meta().name; } \
private:
#define J_FEATURE(XPath) \
public: \
const QString &xPath() const \
{ \
static const QString xpath; \
return xpath; \
}
class QXmlStreamAttributes;
namespace Jreen
{
class JREEN_EXPORT XmlStreamParser
{
public:
virtual ~XmlStreamParser() {}
virtual bool canParse(const QStringRef &name, const QStringRef &uri, const QXmlStreamAttributes &attributes) = 0;
virtual void handleStartElement(const QStringRef &name, const QStringRef &uri, const QXmlStreamAttributes &attributes) = 0;
virtual void handleEndElement(const QStringRef &name, const QStringRef &uri) = 0;
virtual void handleCharacterData(const QStringRef &text) = 0;
};
template <typename T>
class XmlStreamFactory : public XmlStreamParser
{
public:
virtual void serialize(T *obj, QXmlStreamWriter *writer) = 0;
};
}
#endif // JREEN_JREEN_H
|