ObjFW
OFMutableURL.h
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 "OFURL.h"
17 
18 OF_ASSUME_NONNULL_BEGIN
19 
25 @interface OFMutableURL: OFURL
26 {
27  OF_RESERVE_IVARS(OFMutableURL, 4)
28 }
29 
33 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *scheme;
34 
41 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
42  OFString *URLEncodedScheme;
43 
47 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *host;
48 
55 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
56  OFString *URLEncodedHost;
57 
61 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFNumber *port;
62 
66 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *user;
67 
74 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
75  OFString *URLEncodedUser;
76 
80 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *password;
81 
88 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
89  OFString *URLEncodedPassword;
90 
94 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *path;
95 
102 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
103  OFString *URLEncodedPath;
104 
110 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
111  OFArray OF_GENERIC(OFString *) *pathComponents;
112 
116 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *query;
117 
124 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
125  OFString *URLEncodedQuery;
126 
138 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
139  OFDictionary OF_GENERIC(OFString *, OFString *) *queryDictionary;
140 
144 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *fragment;
145 
152 @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
153  OFString *URLEncodedFragment;
154 
160 + (instancetype)URL;
161 
167 - (void)appendPathComponent: (OFString *)component;
168 
176 - (void)appendPathComponent: (OFString *)component
177  isDirectory: (bool)isDirectory;
178 
182 - (void)standardizePath;
183 
187 - (void)makeImmutable;
188 @end
189 
190 OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition: OFArray.h:92
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:58
A class for parsing URLs and accessing parts of it.
Definition: OFMutableURL.h:26
OFString * scheme
The scheme part of the URL.
Definition: OFMutableURL.h:33
Provides a way to store a number in an object.
Definition: OFNumber.h:49
A class for handling strings.
Definition: OFString.h:132
A class for parsing URLs and accessing parts of it.
Definition: OFURL.h:34