12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
* 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 "OFObject.h"
/*!
* @protocol OFLocking OFLocking.h ObjFW/OFLocking.h
*
* @brief A protocol for locks.
*/
@protocol OFLocking <OFObject>
#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *name;
#endif
/*!
* @brief Locks the lock.
*/
- (void)lock;
|
>
>
|
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
* 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 "OFObject.h"
OF_ASSUME_NONNULL_BEGIN
/*!
* @protocol OFLocking OFLocking.h ObjFW/OFLocking.h
*
* @brief A protocol for locks.
*/
@protocol OFLocking <OFObject>
#ifdef OF_HAVE_PROPERTIES
@property (copy, nullable) OFString *name;
#endif
/*!
* @brief Locks the lock.
*/
- (void)lock;
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
- (void)unlock;
/*!
* @brief Sets a name for the lock.
*
* @param name The name for the lock
*/
- (void)setName: (OFString*)name;
/*!
* @brief Returns the name for the lock.
*
* @return The name for the lock
*/
- (OFString*)name;
@end
|
|
|
>
>
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
- (void)unlock;
/*!
* @brief Sets a name for the lock.
*
* @param name The name for the lock
*/
- (void)setName: (nullable OFString*)name;
/*!
* @brief Returns the name for the lock.
*
* @return The name for the lock
*/
- (nullable OFString*)name;
@end
OF_ASSUME_NONNULL_END
|