11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
57
58
59
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
#ifndef OF_HAVE_SOCKETS
# error No sockets available!
#endif
OF_ASSUME_NONNULL_BEGIN
/**
* @class OFAlreadyConnectedException \
* OFAlreadyConnectedException.h ObjFW/OFAlreadyConnectedException.h
*
* @brief An exception indicating an attempt to connect or bind an already
* connected or bound socket.
*/
@interface OFAlreadyConnectedException: OFException
{
id _socket;
OF_RESERVE_IVARS(OFAlreadyConnectedException, 4)
}
/**
* @brief The socket which is already connected.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id socket;
/**
* @brief Creates a new, autoreleased already connected exception.
*
* @param socket The socket which is already connected
* @return A new, autoreleased already connected exception
*/
+ (instancetype)exceptionWithSocket: (nullable id)socket;
/**
* @brief Initializes an already allocated already connected exception.
*
* @param socket The socket which is already connected
* @return An initialized already connected exception
*/
- (instancetype)initWithSocket: (nullable id)socket OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
<
<
<
<
|
|
|
|
|
|
|
>
>
>
>
>
<
<
<
<
<
|
|
|
|
>
>
|
|
|
>
>
|
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
57
58
59
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFException.h"
OF_ASSUME_NONNULL_BEGIN
/**
* @class OFAlreadyOpenException \
* OFAlreadyOpenException.h ObjFW/OFAlreadyOpenException.h
*
* @brief An exception indicating that an object is already open and thus
* cannot be opened again.
*/
@interface OFAlreadyOpenException: OFException
{
id _object;
OF_RESERVE_IVARS(OFAlreadyOpenException, 4)
}
/**
* @brief The object which is already open.
*/
@property (readonly, nonatomic) id object;
/**
* @brief Creates a new, autoreleased already open exception.
*
* @param object The object which is already open
* @return A new, autoreleased already open exception
*/
+ (instancetype)exceptionWithObject: (id)object;
+ (instancetype)exception OF_UNAVAILABLE;
/**
* @brief Initializes an already allocated already open exception.
*
* @param object The object which is already open
* @return An initialized already open exception
*/
- (instancetype)initWithObject: (id)object OF_DESIGNATED_INITIALIZER;
- (instancetype)init OF_UNAVAILABLE;
@end
OF_ASSUME_NONNULL_END
|