1 /* HBDistributedArray.h $
3 This file is part of the HandBrake source code.
4 Homepage: <http://handbrake.fr/>.
5 It may be used under the terms of the GNU General Public License. */
7 #import <Cocoa/Cocoa.h>
9 extern NSString
*HBDistributedArrayChanged
;
12 * Objects in HBDistributedArray
13 * must implement this protocol.
15 @protocol HBUniqueObject
<NSObject
>
17 @
property (nonatomic
, readonly
) NSString
*uuid
;
23 * a mutable array that share its content between processes.
24 * post a HBDistributedArrayChanged when the content is changed
27 * Use beginTransaction and commit to wrap atomic changes to the array.
29 * It is safe to keep a reference to an array object.
31 @interface HBDistributedArray
: NSMutableArray
33 - (instancetype
)initWithURL
:(NSURL
*)fileURL
;
36 * Begin a transaction on the array
38 - (void)beginTransaction
;
41 * Commit the changes and notify
42 * the observers about the changes.