This file is indexed.

/usr/include/GNUstep/DOM/DOMProtocols.h is in libsope-dev 3.2.6-1.

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
/*
  Copyright (C) 2000-2005 SKYRIX Software AG

  This file is part of SOPE.

  SOPE is free software; you can redistribute it and/or modify it under
  the terms of the GNU Lesser General Public License as published by the
  Free Software Foundation; either version 2, or (at your option) any
  later version.

  SOPE 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 Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with SOPE; see the file COPYING.  If not, write to the
  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.
*/

#ifndef __DOM_DOMProtocols_H__
#define __DOM_DOMProtocols_H__

/*
  Protocols for DOM objects ...
  
  IDL taken from
    http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010913/DOM3-Core.html
*/

typedef enum {
  DOM_UNKNOWN_NODE                = 0,
  DOM_ATTRIBUTE_NODE              = 1,
  DOM_CDATA_SECTION_NODE          = 2,
  DOM_COMMENT_NODE                = 3,
  DOM_DOCUMENT_FRAGMENT_NODE      = 4,
  DOM_DOCUMENT_NODE               = 5,
  DOM_DOCUMENT_TYPE_NODE          = 6,
  DOM_ELEMENT_NODE                = 7,
  DOM_ENTITY_NODE                 = 8,
  DOM_ENTITY_REFERENCE_NODE       = 9,
  DOM_NOTATION_NODE               = 10,
  DOM_PROCESSING_INSTRUCTION_NODE = 11,
  DOM_TEXT_NODE                   = 12
} DOMNodeType;

// TODO: find out which GCC version started to have forward protocols decls ...
//#define HAVE_FORWARD_PROTOCOLS 1

#if HAVE_FORWARD_PROTOCOLS
@protocol DOMNode;
@protocol DOMAttr, DOMCDATASection, DOMComment, DOMDocumentFragment;
@protocol DOMDocument, DOMDocumentType, DOMElement, DOMEntity;
@protocol DOMEntityReference, DOMNotation, DOMProcessingInstruction;
@protocol DOMText;

// NOTE: _ONLY_ use those defines for forward declarations!

#define IDOMNode     id<NSObject,DOMNode>
#define IDOMDocument id<NSObject,DOMDocument>
#define IDOMElement  id<NSObject,DOMElement>

#else
#define IDOMNode     id
#define IDOMDocument id
#define IDOMElement  id
#endif

@protocol DOMNodeList

- (NSUInteger)length;
- (id)objectAtIndex:(NSUInteger)_idx; // returns the proper attribute node

@end /* DOMNodeList */

@protocol DOMNamedNodeMap

- (NSUInteger)length;
- (id)objectAtIndex:(NSUInteger)_idx; // returns the proper attribute node

- (IDOMNode)namedItem:(NSString *)_name;
- (IDOMNode)setNamedItem:(IDOMNode)_node;
- (IDOMNode)removeNamedItem:(NSString *)_name;

/* DOM2 access */

- (IDOMNode)namedItem:(NSString *)_name namespaceURI:(NSString *)_uri;
- (IDOMNode)setNamedItemNS:(IDOMNode)_node;
- (IDOMNode)removeNamedItem:(NSString *)_name namespaceURI:(NSString *)_uri;

@end /* DOMNamedNodeMap */

@protocol DOMNode

- (DOMNodeType)nodeType;
- (NSString *)nodeName;
- (NSString *)nodeValue;

- (NSString *)localName;
- (NSString *)namespaceURI;
- (void)setPrefix:(NSString *)_prefix;
- (NSString *)prefix;

/* element attributes */

- (id<NSObject,DOMNamedNodeMap>)attributes;

/* navigation */

- (id<NSObject,DOMNode>)parentNode;
- (id<NSObject,DOMNode>)previousSibling;
- (id<NSObject,DOMNode>)nextSibling;

- (id<NSObject,DOMNodeList>)childNodes;
- (BOOL)hasChildNodes;
- (id<NSObject,DOMNode>)firstChild;
- (id<NSObject,DOMNode>)lastChild;

/* modification */

- (id<NSObject,DOMNode>)appendChild:(id<NSObject,DOMNode>)_node;
- (id<NSObject,DOMNode>)removeChild:(id<NSObject,DOMNode>)_node;

/* owner */

- (IDOMDocument)ownerDocument;

@end /* DOMNode */

@protocol DOMDocumentFragment < DOMNode >
@end

@protocol DOMAttr < DOMNode >

- (NSString *)name;
- (BOOL)specified;
- (void)setValue:(NSString *)_value;
- (NSString *)value;

/* owner */

- (IDOMElement)ownerElement;

@end /* DOMAttr */

@protocol DOMCharacterData < DOMNode >

- (void)setData:(NSString *)_data;
- (NSString *)data;
- (NSUInteger)length;

- (NSString *)substringData:(NSUInteger)_offset count:(NSUInteger)_count;
- (void)appendData:(NSString *)_data;
- (void)insertData:(NSString *)_data offset:(NSUInteger)_offset;
- (void)deleteData:(NSUInteger)_offset count:(NSUInteger)_count;
- (void)replaceData:(NSUInteger)_offs count:(NSUInteger)_count with:(NSString *)_s;

@end /* DOMCharacterData */

@protocol DOMComment < DOMCharacterData >
@end /* DOMComment */

@protocol DOMText < DOMCharacterData >

- (id<NSObject,DOMText>)splitText:(NSUInteger)_offset;

/* DOM Level 3 */

- (BOOL)isWhitespaceInElementContent;
- (NSString *)wholeText;
- (id<NSObject,DOMText>)replaceWholeText:(NSString *)_content;

@end

@protocol DOMCDATASection < DOMText >
@end

@protocol DOMElement < DOMNode >

/* attributes */

- (NSString *)tagName;

/* lookup */

- (id<NSObject,DOMNodeList>)getElementsByTagName:(NSString *)_tagName;
- (id<NSObject,DOMNodeList>)getElementsByTagName:(NSString *)_tagName
  namespaceURI:(NSString *)_uri;

/* element attributes */

- (BOOL)hasAttribute:(NSString *)_attrName;
- (BOOL)hasAttribute:(NSString *)_localName namespaceURI:(NSString *)_ns;

- (void)setAttribute:(NSString *)_attrName value:(NSString *)_value;
- (void)setAttribute:(NSString *)_localName namespaceURI:(NSString *)_ns
  value:(NSString *)_value;

- (NSString *)attribute:(NSString *)_attrName;
- (NSString *)attribute:(NSString *)_localName namespaceURI:(NSString *)_ns;
- (void)removeAttribute:(NSString *)_attrName;
- (void)removeAttribute:(NSString *)_attrName namespaceURI:(NSString *)_ns;

- (id<NSObject,DOMAttr>)setAttributeNode:(id<NSObject,DOMAttr>)_attrNode;
- (id<NSObject,DOMAttr>)removeAttributeNode:(id<NSObject,DOMAttr>)_attrNode;
- (id<NSObject,DOMAttr>)setAttributeNodeNS:(id<NSObject,DOMAttr>)_attrNode;
- (id<NSObject,DOMAttr>)removeAttributeNodeNS:(id<NSObject,DOMAttr>)_attrNode;

@end /* DOMElement */

@protocol DOMDocumentType < DOMNode >
@end /* DOMDocumentType */

@protocol DOMProcessingInstruction < DOMNode >

- (NSString *)target;
- (NSString *)data;

@end /* DOMProcessingInstruction */

@protocol DOMEntityReference < DOMNode >
@end

@class NGDOMImplementation;

@protocol DOMDocument < DOMNode >

- (id<NSObject,DOMDocumentType>)doctype;
- (NGDOMImplementation *)implementation;
- (id<NSObject,DOMElement>)documentElement;

- (id<NSObject,DOMNodeList>)getElementsByTagName:(NSString *)_tagName;
- (id<NSObject,DOMNodeList>)getElementsByTagName:(NSString *)_tagName
  namespaceURI:(NSString *)_uri;
- (id<NSObject,DOMElement>)getElementById:(NSString *)_eid;

/* creation */

- (id<NSObject,DOMElement>)createElement:(NSString *)_tagName;
- (id<NSObject,DOMElement>)createElement:(NSString *)_tagName
  namespaceURI:(NSString *)_uri;

- (id<NSObject,DOMDocumentFragment>)createDocumentFragment;
- (id<NSObject,DOMText>)createTextNode:(NSString *)_data;
- (id<NSObject,DOMComment>)createComment:(NSString *)_data;
- (id<NSObject,DOMCDATASection>)createCDATASection:(NSString *)_data;

- (id<NSObject,DOMProcessingInstruction>)
  createProcessingInstruction:(NSString *)_target data:(NSString *)_data;

- (id<NSObject,DOMAttr>)createAttribute:(NSString *)_name;
- (id<NSObject,DOMAttr>)createAttribute:(NSString *)_name
  namespaceURI:(NSString *)_uri;

- (id<NSObject,DOMEntityReference>)createEntityReference:(NSString *)_name;

@end /* DOMDocument */

#endif /* __DOM_DOMProtocols_H__ */