ObjFW
OFMutableIRI.h
1 /*
2  * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License version 3.0 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13  * version 3.0 for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * version 3.0 along with this program. If not, see
17  * <https://www.gnu.org/licenses/>.
18  */
19 
20 #import "OFIRI.h"
21 
22 OF_ASSUME_NONNULL_BEGIN
23 
32 @interface OFMutableIRI: OFIRI
33 {
34  OF_RESERVE_IVARS(OFMutableIRI, 4)
35 }
36 
43 @property (readwrite, copy, nonatomic) OFString *scheme;
44 
48 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *host;
49 
59 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
60  OFString *percentEncodedHost;
61 
68 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFNumber *port;
69 
73 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *user;
74 
84 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
85  OFString *percentEncodedUser;
86 
90 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *password;
91 
101 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
102  OFString *percentEncodedPassword;
103 
107 @property (readwrite, copy, nonatomic) OFString *path;
108 
118 @property (readwrite, copy, nonatomic) OFString *percentEncodedPath;
119 
128 @property (readwrite, copy, nonatomic)
129  OFArray OF_GENERIC(OFString *) *pathComponents;
130 
134 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *query;
135 
145 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
146  OFString *percentEncodedQuery;
147 
161 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
162  OFArray OF_GENERIC(OFPair OF_GENERIC(OFString *, OFString *) *) *queryItems;
163 
167 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *fragment;
168 
178 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
179  OFString *percentEncodedFragment;
180 
187 + (instancetype)IRIWithScheme: (OFString *)scheme;
188 
196 - (instancetype)initWithScheme: (OFString *)scheme;
197 
203 - (void)appendPathComponent: (OFString *)component;
204 
212 - (void)appendPathComponent: (OFString *)component
213  isDirectory: (bool)isDirectory;
214 
220 - (void)appendPathExtension: (OFString *)extension;
221 
225 - (void)deleteLastPathComponent;
226 
230 - (void)deletePathExtension;
231 
235 - (void)standardizePath;
236 
240 - (void)makeImmutable;
241 @end
242 
243 OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition: OFArray.h:107
A class for representing IRIs, URIs, URLs and URNs, for parsing them, accessing parts of them as well...
Definition: OFMutableIRI.h:32
A class for storing a pair of two objects.
Definition: OFPair.h:29
A class for handling strings.
Definition: OFString.h:142
Provides a way to store a number in an object.
Definition: OFNumber.h:46
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition: OFIRI.h:39