@@ -31,17 +31,54 @@ OFString *_scheme, *_host; uint16_t _port; OFString *_user, *_password, *_path, *_parameters, *_query, *_fragment; } -#ifdef OF_HAVE_PROPERTIES -@property (copy) OFString *scheme, *host; +/*! + * The scheme part of the URL. + */ +@property (copy) OFString *scheme; + +/*! + * The host part of the URL. + */ +@property (copy) OFString *host; + +/*! + * The port part of the URL. + */ @property uint16_t port; -@property OF_NULLABLE_PROPERTY (copy) OFString *user, *password; + +/*! + * The user part of the URL. + */ +@property OF_NULLABLE_PROPERTY (copy) OFString *user; + +/*! + * The password part of the URL. + */ +@property OF_NULLABLE_PROPERTY (copy) OFString *password; + +/*! + * The path part of the URL. + */ @property (copy) OFString *path; -@property OF_NULLABLE_PROPERTY (copy) OFString *parameters, *query, *fragment; -#endif + +/*! + * The parameters part of the URL. + */ +@property OF_NULLABLE_PROPERTY (copy) OFString *parameters; + +/*! + * The query part of the URL. + */ +@property OF_NULLABLE_PROPERTY (copy) OFString *query; + +/*! + * The fragment part of the URL. + */ +@property OF_NULLABLE_PROPERTY (copy) OFString *fragment; /*! * Creates a new URL. * * @return A new, autoreleased OFURL @@ -83,140 +120,14 @@ * @return An initialized OFURL */ - initWithString: (OFString*)string relativeToURL: (OFURL*)URL; -/*! - * @brief Returns the scheme part of the URL. - * - * @return The scheme part of the URL - */ -- (OFString*)scheme; - -/*! - * @brief Set the scheme part of the URL. - * - * @param scheme The scheme part of the URL to set - */ -- (void)setScheme: (OFString*)scheme; - -/*! - * @brief Returns the host part of the URL. - * - * @return The host part of the URL - */ -- (OFString*)host; - -/*! - * @brief Set the host part of the URL. - * - * @param host The host part of the URL to set - */ -- (void)setHost: (OFString*)host; - -/*! - * @brief Returns the port part of the URL. - * - * @return The port part of the URL - */ -- (uint16_t)port; - -/*! - * @brief Set the port part of the URL. - * - * @param port The port part of the URL to set - */ -- (void)setPort: (uint16_t)port; - -/*! - * @brief Returns the user part of the URL. - * - * @return The user part of the URL - */ -- (nullable OFString*)user; - -/*! - * @brief Set the user part of the URL. - * - * @param user The user part of the URL to set - */ -- (void)setUser: (nullable OFString*)user; - -/*! - * @brief Returns the password part of the URL. - * - * @return The password part of the URL - */ -- (nullable OFString*)password; - -/*! - * @brief Set the password part of the URL. - * - * @param password The password part of the URL to set - */ -- (void)setPassword: (nullable OFString*)password; - -/*! - * @brief Returns the path part of the URL. - * - * @return The path part of the URL - */ -- (OFString*)path; - -/*! - * @brief Set the path part of the URL. - * - * @param path The path part of the URL to set - */ -- (void)setPath: (OFString*)path; - -/*! - * @brief Returns the parameters part of the URL. - * - * @return The parameters part of the URL - */ -- (nullable OFString*)parameters; - -/*! - * @brief Set the parameters part of the URL. - * - * @param parameters The parameters part of the URL to set - */ -- (void)setParameters: (nullable OFString*)parameters; - -/*! - * @brief Returns the query part of the URL. - * - * @return The query part of the URL - */ -- (nullable OFString*)query; - -/*! - * @brief Set the query part of the URL. - * - * @param query The query part of the URL to set - */ -- (void)setQuery: (nullable OFString*)query; - -/*! - * @brief Returns the fragment part of the URL. - * - * @return The fragment part of the URL - */ -- (nullable OFString*)fragment; - -/*! - * @brief Set the fragment part of the URL. - * - * @param fragment The fragment part of the URL to set - */ -- (void)setFragment: (nullable OFString*)fragment; - /*! * @brief Returns the URL as a string. * * @return The URL as a string */ - (OFString*)string; @end OF_ASSUME_NONNULL_END