ObjFW  Diff

Differences From Artifact [5f7cf70e41]:

To Artifact [24ff162053]:


16
17
18
19
20
21
22




23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38














39

#import "OFObject.h"

/*!
 * @brief A protocol for locks.
 */
@protocol OFLocking <OFObject>




/*!
 * @brief Locks the lock.
 */
- (void)lock;

/*!
 * @brief Tries to lock the lock.
 *
 * @return A boolean whether the lock could be locked
 */
- (BOOL)tryLock;

/*!
 * @brief Unlocks the lock.
 */
- (void)unlock;














@end







>
>
>
>
















>
>
>
>
>
>
>
>
>
>
>
>
>
>

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

#import "OFObject.h"

/*!
 * @brief A protocol for locks.
 */
@protocol OFLocking <OFObject>
#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *name;
#endif

/*!
 * @brief Locks the lock.
 */
- (void)lock;

/*!
 * @brief Tries to lock the lock.
 *
 * @return A boolean whether the lock could be locked
 */
- (BOOL)tryLock;

/*!
 * @brief Unlocks the lock.
 */
- (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