ObjFW  Diff

Differences From Artifact [bc1c1fb01a]:

To Artifact [0cd8345c79]:


12
13
14
15
16
17
18


19
20
21
22
23
24
25
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"
#import "OFXMLParser.h"



@class OFMutableArray OF_GENERIC(ObjectType);
@class OFXMLElement;
@class OFXMLElementBuilder;

/*!
 * @protocol OFXMLElementBuilderDelegate







>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"
#import "OFXMLParser.h"

OF_ASSUME_NONNULL_BEGIN

@class OFMutableArray OF_GENERIC(ObjectType);
@class OFXMLElement;
@class OFXMLElementBuilder;

/*!
 * @protocol OFXMLElementBuilderDelegate
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
 * @param builder The builder which did not expect the close tag
 * @param name The name of the close tag
 * @param prefix The prefix of the close tag
 * @param namespace_ The namespace of the close tag
 */
- (void)elementBuilder: (OFXMLElementBuilder*)builder
  didNotExpectCloseTag: (OFString*)name
		prefix: (OFString*)prefix
	     namespace: (OFString*)namespace_;

/*!
 * @brief This callback is called when the XML parser for the element builder
 *	  found an unknown entity.
 *
 * @param builder The element builder which found an unknown entity
 * @param entity The name of the entity







|
|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 * @param builder The builder which did not expect the close tag
 * @param name The name of the close tag
 * @param prefix The prefix of the close tag
 * @param namespace_ The namespace of the close tag
 */
- (void)elementBuilder: (OFXMLElementBuilder*)builder
  didNotExpectCloseTag: (OFString*)name
		prefix: (nullable OFString*)prefix
	     namespace: (nullable OFString*)namespace_;

/*!
 * @brief This callback is called when the XML parser for the element builder
 *	  found an unknown entity.
 *
 * @param builder The element builder which found an unknown entity
 * @param entity The name of the entity
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


@interface OFXMLElementBuilder: OFObject <OFXMLParserDelegate>
{
	OFMutableArray OF_GENERIC(OFXMLElement*) *_stack;
	id <OFXMLElementBuilderDelegate> _delegate;
}

#ifdef OF_HAVE_PROPERTIES
@property (assign) id <OFXMLElementBuilderDelegate> delegate;
#endif

/*!
 * @brief Creates a new element builder.
 *
 * @return A new, autoreleased OFXMLElementBuilder
 */
+ (instancetype)elementBuilder;

/*!
 * @brief Returns the delegate for the OFXMLElementBuilder.
 *
 * @return The delegate for the OFXMLElementBuilder
 */
- (id <OFXMLElementBuilderDelegate>)delegate;

/*!
 * @brief Sets the delegate for the OFXMLElementBuilder.
 *
 * @param delegate The delegate for the OFXMLElementBuilder
 */







- (void)setDelegate: (id <OFXMLElementBuilderDelegate>)delegate;
@end

@interface OFObject (OFXMLElementBuilderDelegate) <OFXMLElementBuilderDelegate>
@end









|









<
<
<
<
<
<
<





>
>
>
>
>
>
>
|




>
>
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
@interface OFXMLElementBuilder: OFObject <OFXMLParserDelegate>
{
	OFMutableArray OF_GENERIC(OFXMLElement*) *_stack;
	id <OFXMLElementBuilderDelegate> _delegate;
}

#ifdef OF_HAVE_PROPERTIES
@property (assign, nullable) id <OFXMLElementBuilderDelegate> delegate;
#endif

/*!
 * @brief Creates a new element builder.
 *
 * @return A new, autoreleased OFXMLElementBuilder
 */
+ (instancetype)elementBuilder;








/*!
 * @brief Sets the delegate for the OFXMLElementBuilder.
 *
 * @param delegate The delegate for the OFXMLElementBuilder
 */
- (void)setDelegate: (nullable id <OFXMLElementBuilderDelegate>)delegate;

/*!
 * @brief Returns the delegate for the OFXMLElementBuilder.
 *
 * @return The delegate for the OFXMLElementBuilder
 */
- (nullable id <OFXMLElementBuilderDelegate>)delegate;
@end

@interface OFObject (OFXMLElementBuilderDelegate) <OFXMLElementBuilderDelegate>
@end

OF_ASSUME_NONNULL_END