1
|
1 /****************************************************************************
|
|
2 **
|
35
|
3 ** Copyright (C) 1992-2009 Nokia. All rights reserved.
|
1
|
4 **
|
|
5 ** This file is part of Qt Jambi.
|
|
6 **
|
35
|
7 ** Commercial Usage
|
|
8 Licensees holding valid Qt Commercial licenses may use this file in
|
|
9 accordance with the Qt Commercial License Agreement provided with the
|
|
10 Software or, alternatively, in accordance with the terms contained in
|
|
11 a written agreement between you and Nokia.
|
|
12
|
|
13 GNU Lesser General Public License Usage
|
|
14 Alternatively, this file may be used under the terms of the GNU Lesser
|
|
15 General Public License version 2.1 as published by the Free Software
|
|
16 Foundation and appearing in the file LICENSE.LGPL included in the
|
|
17 packaging of this file. Please review the following information to
|
|
18 ensure the GNU Lesser General Public License version 2.1 requirements
|
|
19 will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
20
|
|
21 In addition, as a special exception, Nokia gives you certain
|
|
22 additional rights. These rights are described in the Nokia Qt LGPL
|
|
23 Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
|
24 package.
|
|
25
|
|
26 GNU General Public License Usage
|
|
27 Alternatively, this file may be used under the terms of the GNU
|
|
28 General Public License version 3.0 as published by the Free Software
|
|
29 Foundation and appearing in the file LICENSE.GPL included in the
|
|
30 packaging of this file. Please review the following information to
|
|
31 ensure the GNU General Public License version 3.0 requirements will be
|
|
32 met: http://www.gnu.org/copyleft/gpl.html.
|
|
33
|
|
34 If you are unsure which license is appropriate for your use, please
|
|
35 contact the sales department at qt-sales@nokia.com.
|
1
|
36
|
|
37 **
|
|
38 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
39 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
40 **
|
|
41 ****************************************************************************/
|
|
42
|
|
43 package generator;
|
|
44
|
35
|
45 import com.trolltech.qt.*;
|
|
46 import com.trolltech.qt.xml.*;
|
1
|
47
|
|
48 class QDomDocument___ extends QDomDocument {
|
|
49
|
|
50 public class Result {
|
|
51 private Result(boolean success, QNativePointer errorMessage, QNativePointer errorLine, QNativePointer errorColumn) {
|
|
52 this.success = success;
|
|
53 this.errorMessage = errorMessage.stringValue();
|
|
54 this.errorLine = errorLine.intValue();
|
|
55 this.errorColumn = errorColumn.intValue();
|
|
56 }
|
|
57
|
|
58 public boolean success;
|
|
59 public String errorMessage;
|
|
60 public int errorLine;
|
|
61 public int errorColumn;
|
|
62
|
|
63 }
|
|
64
|
35
|
65 public final Result setContent(QXmlInputSource source, boolean namespaceProcessing)
|
|
66 {
|
|
67 QNativePointer errorStr = new QNativePointer(QNativePointer.Type.String);
|
|
68 QNativePointer errorLine = new QNativePointer(QNativePointer.Type.Int);
|
|
69 QNativePointer errorColumn = new QNativePointer(QNativePointer.Type.Int);
|
|
70
|
|
71 boolean success = setContent(source, namespaceProcessing, errorStr, errorLine, errorColumn);
|
|
72
|
|
73 return new Result(success, errorStr, errorLine, errorColumn);
|
|
74 }
|
|
75
|
1
|
76 }// class
|
|
77
|
|
78 class QXmlNamespaceSupport___ extends QXmlNamespaceSupport {
|
|
79
|
|
80 public static class ProcessedName {
|
|
81 public ProcessedName(String nsuri, String localName) {
|
|
82 this.nsuri = nsuri;
|
|
83 this.localName = localName;
|
|
84 }
|
|
85
|
|
86 public String nsuri;
|
|
87 public String localName;
|
|
88 }
|
|
89
|
|
90 public final ProcessedName processName(String qname, boolean isAttribute) {
|
|
91 QNativePointer nsUri = new QNativePointer(QNativePointer.Type.String);
|
|
92 QNativePointer localName = new QNativePointer(QNativePointer.Type.String);
|
|
93 processName(qname, isAttribute, nsUri, localName);
|
|
94
|
|
95 return new ProcessedName(nsUri.stringValue(), localName.stringValue());
|
|
96 }
|
|
97
|
|
98 public static class SplitName {
|
|
99 public SplitName(String prefix, String localname) {
|
|
100 this.prefix = prefix;
|
|
101 this.localname = localname;
|
|
102 }
|
|
103
|
|
104 public String prefix;
|
|
105 public String localname;
|
|
106 }
|
|
107
|
|
108 public final SplitName splitName(String qname) {
|
|
109 QNativePointer prefix = new QNativePointer(QNativePointer.Type.String);
|
|
110 QNativePointer localName = new QNativePointer(QNativePointer.Type.String);
|
|
111 splitName(qname, prefix, localName);
|
|
112
|
|
113 return new SplitName(prefix.stringValue(), localName.stringValue());
|
|
114 }
|
|
115
|
|
116 }// class
|
|
117
|
|
118 class QXmlStreamWriter___ extends QXmlStreamWriter {
|
|
119
|
35
|
120 public QXmlStreamWriter(com.trolltech.qt.core.QByteArray array) {
|
1
|
121 this(array.nativePointer());
|
|
122 __rcDevice = array;
|
|
123 }
|
|
124
|
|
125 public final void setCodec(String codecName) {
|
|
126 setCodec(QNativePointer.createCharPointer(codecName));
|
|
127 __rcCodec = null;
|
|
128 }
|
|
129
|
|
130 }// class
|
|
131
|
|
132 interface QXmlEntityResolver___ extends QXmlEntityResolver {
|
|
133
|
|
134 public static class ResolvedEntity {
|
|
135
|
|
136 public boolean error;
|
|
137 public QXmlInputSource inputSource;
|
|
138
|
|
139 public ResolvedEntity(boolean error, QXmlInputSource inputSource) {
|
|
140
|
|
141 this.error = error;
|
|
142 this.inputSource = inputSource;
|
|
143
|
|
144 }
|
|
145
|
|
146 }
|
|
147
|
|
148 }// class
|
35
|
149
|
|
150
|