ObjFW
OFString+XMLUnescaping.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This file is part of ObjFW. It may be distributed under the terms of the
7  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8  * the packaging of this file.
9  *
10  * Alternatively, it may be distributed under the terms of the GNU General
11  * Public License, either version 2 or 3, which can be found in the file
12  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13  * file.
14  */
15 
16 #import "OFString.h"
17 
18 OF_ASSUME_NONNULL_BEGIN
19 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 extern int _OFString_XMLUnescaping_reference;
26 #ifdef __cplusplus
27 }
28 #endif
29 
30 #ifdef OF_HAVE_BLOCKS
40  OFString *string, OFString *entity);
41 #endif
42 
62 - (nullable OFString *)string: (OFString *)string
63  containsUnknownEntityNamed: (OFString *)entity;
64 @end
65 
66 @interface OFString (XMLUnescaping)
70 @property (readonly, nonatomic) OFString *stringByXMLUnescaping;
71 
78 - (OFString *)stringByXMLUnescapingWithDelegate:
79  (nullable id <OFStringXMLUnescapingDelegate>)delegate;
80 
81 #ifdef OF_HAVE_BLOCKS
88 - (OFString *)stringByXMLUnescapingWithBlock:
90 #endif
91 @end
92 
93 OF_ASSUME_NONNULL_END
OFString *_Nullable(^ of_string_xml_unescaping_block_t)(OFString *string, OFString *entity)
A block which is called to replace unknown XML entities in an XML string.
Definition: OFString+XMLUnescaping.h:39
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A class for handling strings.
Definition: OFString.h:132
A protocol that needs to be implemented by delegates for stringByXMLUnescapingWithHandler:.
Definition: OFString+XMLUnescaping.h:49