ObjFW  Check-in [ee3632817a]

Overview
Comment:Document more exceptions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ee3632817a8c585e493a960e8218fe746932c4c8f800dfc405fb1303ab53cfc6
User & Date: js on 2022-10-14 19:46:00
Other Links: manifest | tags
Context
2022-10-14
21:34
Work around a bug in GNU windres check-in: 31c277d1d9 user: js tags: trunk
19:46
Document more exceptions check-in: ee3632817a user: js tags: trunk
19:36
Document more exceptions check-in: 6c6c413432 user: js tags: trunk
Changes

Modified src/OFSocket.h from [0929d955af] to [6ae41ef6ce].

170
171
172
173
174
175
176

177
178
179
180
181
182
183
184
185

186
187
188
189
190
191
192
193
194

195
196
197
198
199
200
201
/**
 * @brief Parses the specified IP (either v4 or v6) and port into an
 *	  @ref OFSocketAddress.
 *
 * @param IP The IP to parse
 * @param port The port to use
 * @return The parsed IP and port as an OFSocketAddress

 */
extern OFSocketAddress OFSocketAddressParseIP(OFString *IP, uint16_t port);

/**
 * @brief Parses the specified IPv4 and port into an @ref OFSocketAddress.
 *
 * @param IP The IPv4 to parse
 * @param port The port to use
 * @return The parsed IPv4 and port as an OFSocketAddress

 */
extern OFSocketAddress OFSocketAddressParseIPv4(OFString *IP, uint16_t port);

/**
 * @brief Parses the specified IPv6 and port into an @ref OFSocketAddress.
 *
 * @param IP The IPv6 to parse
 * @param port The port to use
 * @return The parsed IPv6 and port as an OFSocketAddress

 */
extern OFSocketAddress OFSocketAddressParseIPv6(OFString *IP, uint16_t port);

/**
 * @brief Creates a UNIX socket address from the specified path.
 *
 * @param path The path of the UNIX socket







>









>









>







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/**
 * @brief Parses the specified IP (either v4 or v6) and port into an
 *	  @ref OFSocketAddress.
 *
 * @param IP The IP to parse
 * @param port The port to use
 * @return The parsed IP and port as an OFSocketAddress
 * @throw OFInvalidFormatException The specified string is not a valid IP
 */
extern OFSocketAddress OFSocketAddressParseIP(OFString *IP, uint16_t port);

/**
 * @brief Parses the specified IPv4 and port into an @ref OFSocketAddress.
 *
 * @param IP The IPv4 to parse
 * @param port The port to use
 * @return The parsed IPv4 and port as an OFSocketAddress
 * @throw OFInvalidFormatException The specified string is not a valid IPv4
 */
extern OFSocketAddress OFSocketAddressParseIPv4(OFString *IP, uint16_t port);

/**
 * @brief Parses the specified IPv6 and port into an @ref OFSocketAddress.
 *
 * @param IP The IPv6 to parse
 * @param port The port to use
 * @return The parsed IPv6 and port as an OFSocketAddress
 * @throw OFInvalidFormatException The specified string is not a valid IPv6
 */
extern OFSocketAddress OFSocketAddressParseIPv6(OFString *IP, uint16_t port);

/**
 * @brief Creates a UNIX socket address from the specified path.
 *
 * @param path The path of the UNIX socket

Modified src/OFURIHandler.h from [bafac28b57] to [09864efcca].

53
54
55
56
57
58
59

60
61
62
63
64
65
66
 */
+ (bool)registerClass: (Class)class_ forScheme: (OFString *)scheme;

/**
 * @brief Returns the handler for the specified URI.
 *
 * @return The handler for the specified URI.

 */
+ (OFURIHandler *)handlerForURI: (OFURI *)URI;

/**
 * @brief Opens the item at the specified URI.
 *
 * @param URI The URI of the item which should be opened







>







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 */
+ (bool)registerClass: (Class)class_ forScheme: (OFString *)scheme;

/**
 * @brief Returns the handler for the specified URI.
 *
 * @return The handler for the specified URI.
 * @throw OFUnsupportedProtocolException The specified URI is not supported
 */
+ (OFURIHandler *)handlerForURI: (OFURI *)URI;

/**
 * @brief Opens the item at the specified URI.
 *
 * @param URI The URI of the item which should be opened
78
79
80
81
82
83
84

85
86
87
88
89
90
91
 *	       `a`            | Write-only, create or append
 *	       `a+`           | Read-write, create or append
 *	       @n
 *	       The handler is allowed to not implement all modes and is also
 *	       allowed to implement additional, scheme-specific modes.
 * @return The opened stream if it was successfully opened
 * @throw OFOpenItemFailedException Opening the item failed

 */
+ (OFStream *)openItemAtURI: (OFURI *)URI mode: (OFString *)mode;

- (instancetype)init OF_UNAVAILABLE;

/**
 * @brief Initializes the handler for the specified scheme.







>







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 *	       `a`            | Write-only, create or append
 *	       `a+`           | Read-write, create or append
 *	       @n
 *	       The handler is allowed to not implement all modes and is also
 *	       allowed to implement additional, scheme-specific modes.
 * @return The opened stream if it was successfully opened
 * @throw OFOpenItemFailedException Opening the item failed
 * @throw OFUnsupportedProtocolException The specified URI is not supported
 */
+ (OFStream *)openItemAtURI: (OFURI *)URI mode: (OFString *)mode;

- (instancetype)init OF_UNAVAILABLE;

/**
 * @brief Initializes the handler for the specified scheme.
113
114
115
116
117
118
119


120
121
122
123
124
125
126
 *	       `a`            | Write-only, create or append
 *	       `a+`           | Read-write, create or append
 *	       @n
 *	       The handler is allowed to not implement all modes and is also
 *	       allowed to implement additional, scheme-specific modes.
 * @return The opened stream if it was successfully opened
 * @throw OFOpenItemFailedException Opening the item failed


 */
- (OFStream *)openItemAtURI: (OFURI *)URI mode: (OFString *)mode;

/**
 * @brief Returns the attributes for the item at the specified URI.
 *
 * @param URI The URI to return the attributes for







>
>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
 *	       `a`            | Write-only, create or append
 *	       `a+`           | Read-write, create or append
 *	       @n
 *	       The handler is allowed to not implement all modes and is also
 *	       allowed to implement additional, scheme-specific modes.
 * @return The opened stream if it was successfully opened
 * @throw OFOpenItemFailedException Opening the item failed
 * @throw OFUnsupportedProtocolException The specified URI is not supported by
 *					 the handler
 */
- (OFStream *)openItemAtURI: (OFURI *)URI mode: (OFString *)mode;

/**
 * @brief Returns the attributes for the item at the specified URI.
 *
 * @param URI The URI to return the attributes for