/usr/share/sip/PyQt4/QtXml/qxmlstream.sip is in python-qt4-dev 4.9.1-2ubuntu1.
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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | // qxmlstream.sip generated by MetaSIP on Fri Feb 10 10:35:13 2012
//
// This file is part of the QtXml Python extension module.
//
// Copyright (c) 2011 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt.
//
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file. Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
//
// If you are unsure which license is appropriate for your use, please
// contact the sales department at sales@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
%If (Qt_4_3_0 - Qt_4_4_0)
class QXmlStreamAttribute
{
%TypeHeaderCode
#include <qxmlstream.h>
%End
public:
QXmlStreamAttribute();
QXmlStreamAttribute(const QString &qualifiedName, const QString &value);
QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value);
QXmlStreamAttribute(const QXmlStreamAttribute &);
~QXmlStreamAttribute();
QStringRef namespaceUri() const;
QStringRef name() const;
QStringRef qualifiedName() const;
QStringRef value() const;
bool isDefault() const;
bool operator==(const QXmlStreamAttribute &other) const;
bool operator!=(const QXmlStreamAttribute &other) const;
};
%End
%If (Qt_4_3_0 - Qt_4_4_0)
class QXmlStreamAttributes
{
%TypeHeaderCode
#include <qxmlstream.h>
%End
public:
QStringRef value(const QString &namespaceUri, const QString &name) const;
QStringRef value(const QString &qualifiedName) const;
void append(const QString &namespaceUri, const QString &name, const QString &value);
void append(const QString &qualifiedName, const QString &value);
void append(const QXmlStreamAttribute &attribute);
// Methods inherited from QVector<QXmlStreamAttribute> and Python special methods.
// Keep in sync with QPolygon and QPolygonF.
// This is picked up with "using" by QXmlStreamAttributes.
//void append(const QXmlStreamAttribute &value);
const QXmlStreamAttribute &at(int i) const;
void clear();
bool contains(const QXmlStreamAttribute &value) const;
int count(const QXmlStreamAttribute &value) const;
int count() const /__len__/;
void *data();
// Note the Qt return value is discarded as it would require handwritten code
// and seems pretty useless.
void fill(const QXmlStreamAttribute &value, int size = -1);
QXmlStreamAttribute &first();
int indexOf(const QXmlStreamAttribute &value, int from = 0) const;
void insert(int i, const QXmlStreamAttribute &value);
bool isEmpty() const;
QXmlStreamAttribute &last();
int lastIndexOf(const QXmlStreamAttribute &value, int from = -1) const;
// Note the Qt return type is QVector<QXmlStreamAttribute>. We can't do the
// usual trick because there is no QXmlStreamAttributes ctor that takes a
// QVector<QXmlStreamAttribute> argument. We could use handwritten code but we
// don't bother.
//QXmlStreamAttributes mid(int pos, int length = -1) const;
void prepend(const QXmlStreamAttribute &value);
void remove(int i);
void remove(int i, int count);
void replace(int i, const QXmlStreamAttribute &value);
int size() const;
// These are hidden by other implementations in QXmlStreamAttributes.
//QXmlStreamAttribute value(int i) const;
//QXmlStreamAttribute value(int i, const QXmlStreamAttribute &defaultValue) const;
bool operator!=(const QXmlStreamAttributes &other) const;
// Note the Qt return type is QVector<QXmlStreamAttribute>. We can't do the
// usual trick because there is no QXmlStreamAttributes ctor that takes a
// QVector<QXmlStreamAttribute> argument. We could use handwritten code but we
// don't bother.
//QXmlStreamAttributes operator+(const QXmlStreamAttributes &other) const;
QXmlStreamAttributes &operator+=(const QXmlStreamAttributes &other);
QXmlStreamAttributes &operator+=(const QXmlStreamAttribute &value);
bool operator==(const QXmlStreamAttributes &other) const;
SIP_PYOBJECT operator<<(const QXmlStreamAttribute &value);
%MethodCode
*a0 << *a1;
sipRes = sipArg0;
Py_INCREF(sipRes);
%End
QXmlStreamAttribute &operator[](int i);
%MethodCode
SIP_SSIZE_T idx = sipConvertFromSequenceIndex(a0, sipCpp->count());
if (idx < 0)
sipIsErr = 1;
else
sipRes = new QXmlStreamAttribute(sipCpp->operator[]((int)idx));
%End
// Some additional Python special methods.
void __setitem__(int i, const QXmlStreamAttribute &value);
%MethodCode
int len;
len = sipCpp->count();
if ((a0 = (int)sipConvertFromSequenceIndex(a0, len)) < 0)
sipIsErr = 1;
else
(*sipCpp)[a0] = *a1;
%End
void __setitem__(SIP_PYSLICE slice, const QXmlStreamAttributes &list);
%MethodCode
SIP_SSIZE_T len, start, stop, step, slicelength, i;
len = sipCpp->count();
#if PY_VERSION_HEX >= 0x03020000
if (PySlice_GetIndicesEx(a0, len, &start, &stop, &step, &slicelength) < 0)
#else
if (PySlice_GetIndicesEx((PySliceObject *)a0, len, &start, &stop, &step, &slicelength) < 0)
#endif
sipIsErr = 1;
else
{
int vlen = a1->count();
if (vlen != slicelength)
{
sipBadLengthForSlice(vlen, slicelength);
sipIsErr = 1;
}
else
{
QVector<QXmlStreamAttribute>::const_iterator it = a1->begin();
for (i = 0; i < slicelength; ++i)
{
(*sipCpp)[start] = *it;
start += step;
++it;
}
}
}
%End
void __delitem__(int i);
%MethodCode
int len;
len = sipCpp->count();
if ((a0 = (int)sipConvertFromSequenceIndex(a0, len)) < 0)
sipIsErr = 1;
else
sipCpp->remove(a0);
%End
void __delitem__(SIP_PYSLICE slice);
%MethodCode
SIP_SSIZE_T len, start, stop, step, slicelength, i;
len = sipCpp->count();
#if PY_VERSION_HEX >= 0x03020000
if (PySlice_GetIndicesEx(a0, len, &start, &stop, &step, &slicelength) < 0)
#else
if (PySlice_GetIndicesEx((PySliceObject *)a0, len, &start, &stop, &step, &slicelength) < 0)
#endif
sipIsErr = 1;
else
for (i = 0; i < slicelength; ++i)
{
sipCpp->remove(start);
start += step - 1;
}
%End
QXmlStreamAttributes &operator[](SIP_PYSLICE slice);
%MethodCode
SIP_SSIZE_T len, start, stop, step, slicelength, i;
len = sipCpp->count();
#if PY_VERSION_HEX >= 0x03020000
if (PySlice_GetIndicesEx(a0, len, &start, &stop, &step, &slicelength) < 0)
#else
if (PySlice_GetIndicesEx((PySliceObject *)a0, len, &start, &stop, &step, &slicelength) < 0)
#endif
sipIsErr = 1;
else
{
sipRes = new QXmlStreamAttributes();
for (i = 0; i < slicelength; ++i)
{
(*sipRes) += (*sipCpp)[start];
start += step;
}
}
%End
int __contains__(const QXmlStreamAttribute &value);
%MethodCode
// It looks like you can't assign QBool to int.
sipRes = bool(sipCpp->contains(*a0));
%End
};
%End
%If (Qt_4_3_0 - Qt_4_4_0)
class QXmlStreamNamespaceDeclaration
{
%TypeHeaderCode
#include <qxmlstream.h>
%End
public:
QXmlStreamNamespaceDeclaration();
QXmlStreamNamespaceDeclaration(const QXmlStreamNamespaceDeclaration &);
~QXmlStreamNamespaceDeclaration();
QStringRef prefix() const;
QStringRef namespaceUri() const;
bool operator==(const QXmlStreamNamespaceDeclaration &other) const;
bool operator!=(const QXmlStreamNamespaceDeclaration &other) const;
};
%End
%If (Qt_4_3_0 - Qt_4_4_0)
typedef QVector<QXmlStreamNamespaceDeclaration> QXmlStreamNamespaceDeclarations;
%End
%If (Qt_4_3_0 - Qt_4_4_0)
class QXmlStreamNotationDeclaration
{
%TypeHeaderCode
#include <qxmlstream.h>
%End
public:
QXmlStreamNotationDeclaration();
QXmlStreamNotationDeclaration(const QXmlStreamNotationDeclaration &);
~QXmlStreamNotationDeclaration();
QStringRef name() const;
QStringRef systemId() const;
QStringRef publicId() const;
bool operator==(const QXmlStreamNotationDeclaration &other) const;
bool operator!=(const QXmlStreamNotationDeclaration &other) const;
};
%End
%If (Qt_4_3_0 - Qt_4_4_0)
typedef QVector<QXmlStreamNotationDeclaration> QXmlStreamNotationDeclarations;
%End
%If (Qt_4_3_0 - Qt_4_4_0)
class QXmlStreamEntityDeclaration
{
%TypeHeaderCode
#include <qxmlstream.h>
%End
public:
QXmlStreamEntityDeclaration();
QXmlStreamEntityDeclaration(const QXmlStreamEntityDeclaration &);
~QXmlStreamEntityDeclaration();
QStringRef name() const;
QStringRef notationName() const;
QStringRef systemId() const;
QStringRef publicId() const;
QStringRef value() const;
bool operator==(const QXmlStreamEntityDeclaration &other) const;
bool operator!=(const QXmlStreamEntityDeclaration &other) const;
};
%End
%If (Qt_4_3_0 - Qt_4_4_0)
typedef QVector<QXmlStreamEntityDeclaration> QXmlStreamEntityDeclarations;
%End
%If (Qt_4_3_0 - Qt_4_4_0)
class QXmlStreamReader
{
%TypeHeaderCode
#include <qxmlstream.h>
%End
public:
enum Error
{
NoError,
UnexpectedElementError,
CustomError,
NotWellFormedError,
PrematureEndOfDocumentError,
};
enum TokenType
{
NoToken,
Invalid,
StartDocument,
EndDocument,
StartElement,
EndElement,
Characters,
Comment,
DTD,
EntityReference,
ProcessingInstruction,
};
QXmlStreamReader();
QXmlStreamReader(QIODevice *device);
QXmlStreamReader(const QByteArray &data);
QXmlStreamReader(const QString &data);
~QXmlStreamReader();
void setDevice(QIODevice *device);
QIODevice *device() const;
void addData(const QByteArray &data);
void addData(const QString &data);
void clear();
bool atEnd() const;
QXmlStreamReader::TokenType readNext();
QXmlStreamReader::TokenType tokenType() const;
QString tokenString() const;
void setNamespaceProcessing(bool);
bool namespaceProcessing() const;
bool isStartDocument() const;
bool isEndDocument() const;
bool isStartElement() const;
bool isEndElement() const;
bool isCharacters() const;
bool isWhitespace() const;
bool isCDATA() const;
bool isComment() const;
bool isDTD() const;
bool isEntityReference() const;
bool isProcessingInstruction() const;
bool isStandaloneDocument() const;
qint64 lineNumber() const;
qint64 columnNumber() const;
qint64 characterOffset() const;
QXmlStreamAttributes attributes() const;
QString readElementText();
QStringRef name() const;
QStringRef namespaceUri() const;
QStringRef qualifiedName() const;
QStringRef processingInstructionTarget() const;
QStringRef processingInstructionData() const;
QStringRef text() const;
QXmlStreamNamespaceDeclarations namespaceDeclarations() const;
QXmlStreamNotationDeclarations notationDeclarations() const;
QXmlStreamEntityDeclarations entityDeclarations() const;
void raiseError(const QString &message /DocValue="Py_v3:''"/ = QString());
QString errorString() const;
QXmlStreamReader::Error error() const;
bool hasError() const;
private:
QXmlStreamReader(const QXmlStreamReader &);
};
%End
%If (Qt_4_3_0 - Qt_4_4_0)
class QXmlStreamWriter
{
%TypeHeaderCode
#include <qxmlstream.h>
%End
public:
QXmlStreamWriter();
QXmlStreamWriter(QIODevice *device);
QXmlStreamWriter(QByteArray *array);
QXmlStreamWriter(QString *string /Constrained/) /API=QString: - 2/;
~QXmlStreamWriter();
void setDevice(QIODevice *device);
QIODevice *device() const;
void setCodec(QTextCodec *codec /KeepReference/);
void setCodec(const char *codecName);
QTextCodec *codec() const;
void setAutoFormatting(bool);
bool autoFormatting() const;
void writeAttribute(const QString &qualifiedName, const QString &value);
void writeAttribute(const QString &namespaceUri, const QString &name, const QString &value);
void writeAttribute(const QXmlStreamAttribute &attribute);
void writeAttributes(const QXmlStreamAttributes &attributes);
void writeCDATA(const QString &text);
void writeCharacters(const QString &text);
void writeComment(const QString &text);
void writeDTD(const QString &dtd);
void writeEmptyElement(const QString &qualifiedName);
void writeEmptyElement(const QString &namespaceUri, const QString &name);
void writeTextElement(const QString &qualifiedName, const QString &text);
void writeTextElement(const QString &namespaceUri, const QString &name, const QString &text);
void writeEndDocument();
void writeEndElement();
void writeEntityReference(const QString &name);
void writeNamespace(const QString &namespaceUri, const QString &prefix /DocValue="Py_v3:''"/ = QString());
void writeDefaultNamespace(const QString &namespaceUri);
void writeProcessingInstruction(const QString &target, const QString &data /DocValue="Py_v3:''"/ = QString());
void writeStartDocument();
void writeStartDocument(const QString &version);
void writeStartElement(const QString &qualifiedName);
void writeStartElement(const QString &namespaceUri, const QString &name);
void writeCurrentToken(const QXmlStreamReader &reader);
private:
QXmlStreamWriter(const QXmlStreamWriter &);
};
%End
|