Differences From Artifact [9ffb55b5cf]:
- File
src/OFURI.h
— part of check-in
[13ead1212f]
at
2022-10-11 00:18:40
on branch trunk
— OFURI: Remove percentEncodedScheme
The scheme does not allow percent encoding. (user: js, size: 11331) [annotate] [blame] [check-ins using]
To Artifact [b3a4d03434]:
- File
src/OFURI.h
— part of check-in
[3e455c4839]
at
2022-10-11 19:27:09
on branch trunk
— OFURI: Make scheme and path nonnull
This is as per the RFC, which says the scheme and path can never be
missing, while the path can be empty. (user: js, size: 11236) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
28 29 30 31 32 33 34 | /** * @class OFURI OFURI.h ObjFW/OFURI.h * * @brief A class for parsing URIs as per RFC 3986 and accessing parts of it. */ @interface OFURI: OFObject <OFCopying, OFMutableCopying, OFSerialization> { | | | | | 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 | /** * @class OFURI OFURI.h ObjFW/OFURI.h * * @brief A class for parsing URIs as per RFC 3986 and accessing parts of it. */ @interface OFURI: OFObject <OFCopying, OFMutableCopying, OFSerialization> { OFString *_scheme; OFString *_Nullable _percentEncodedHost; OFNumber *_Nullable _port; OFString *_Nullable _percentEncodedUser; OFString *_Nullable _percentEncodedPassword; OFString *_percentEncodedPath; OFString *_Nullable _percentEncodedQuery; OFString *_Nullable _percentEncodedFragment; OF_RESERVE_IVARS(OFURI, 4) } /** * @brief The scheme part of the URI. */ @property (readonly, copy, nonatomic) OFString *scheme; /** * @brief The host part of the URI. */ @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *host; /** |
︙ | ︙ | |||
85 86 87 88 89 90 91 | */ @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *percentEncodedPassword; /** * @brief The path part of the URI. */ | | < | | < | | 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 | */ @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *percentEncodedPassword; /** * @brief The path part of the URI. */ @property (readonly, copy, nonatomic) OFString *path; /** * @brief The path part of the URI in percent-encoded form. */ @property (readonly, copy, nonatomic) OFString *percentEncodedPath; /** * @brief The path of the URI split into components. * * The first component must always be `/` to designate the root. */ @property (readonly, copy, nonatomic) OFArray OF_GENERIC(OFString *) *pathComponents; /** * @brief The last path component of the URI. * * Returns the empty string if the path is the root. */ @property (readonly, copy, nonatomic) OFString *lastPathComponent; /** * @brief The query part of the URI. */ @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *query; /** |
︙ | ︙ | |||
261 262 263 264 265 266 267 268 269 270 271 272 273 274 | * @param isDirectory Whether the path is a directory, in which case a slash is * appened if there is no slash yet * @return An initialized OFURI */ - (instancetype)initFileURIWithPath: (OFString *)path isDirectory: (bool)isDirectory; #endif /** * @brief Returns a new URI with the specified path component appended. * * If the URI is a file URI, the file system is queried whether the appended * component is a directory. * | > > | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | * @param isDirectory Whether the path is a directory, in which case a slash is * appened if there is no slash yet * @return An initialized OFURI */ - (instancetype)initFileURIWithPath: (OFString *)path isDirectory: (bool)isDirectory; #endif - (instancetype)init OF_UNAVAILABLE; /** * @brief Returns a new URI with the specified path component appended. * * If the URI is a file URI, the file system is queried whether the appended * component is a directory. * |
︙ | ︙ |