WinGui: Fix another instance of the Caliburn vs Json.net sillyness where objects...
[HandBrake.git] / macosx / HBDistributedArray.h
blobe72484aae133f87a72868e7f28df1127174315db
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;
11 /**
12 * Objects in HBDistributedArray
13 * must implement this protocol.
15 @protocol HBUniqueObject <NSObject>
17 @property (nonatomic, readonly) NSString *uuid;
19 @end
21 /**
22 * HBDistributedArray
23 * a mutable array that share its content between processes.
24 * post a HBDistributedArrayChanged when the content is changed
25 * by another process.
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;
35 /**
36 * Begin a transaction on the array
38 - (void)beginTransaction;
40 /**
41 * Commit the changes and notify
42 * the observers about the changes.
44 - (void)commit;
46 @end