summaryrefslogtreecommitdiffstats
path: root/macosx/HBQueueItem.h
blob: a4a96ab369be30ee2237e93e9a968f0374fac2c0 (plain)
1
2
3
4
5
6
7
8
9
10
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
/*  HBQueueItem.m $

 This file is part of the HandBrake source code.
 Homepage: <http://handbrake.fr/>.
 It may be used under the terms of the GNU General Public License. */

#import <Foundation/Foundation.h>
#import "HBDistributedArray.h"

@import HandBrakeKit;

NS_ASSUME_NONNULL_BEGIN

/**
 *  A flag to indicate the item's state
 */
typedef NS_ENUM(NSUInteger, HBQueueItemState){
    HBQueueItemStateReady,
    HBQueueItemStateWorking,
    HBQueueItemStateCompleted,
    HBQueueItemStateCanceled,
    HBQueueItemStateFailed
};

@interface HBQueueItem : NSObject<NSSecureCoding, HBUniqueObject>

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithJob:(HBJob *)job;

/// Current state of the job.
@property (nonatomic, readwrite) HBQueueItemState state;

/// The file URL of the source.
@property (nonatomic, readonly) NSURL *fileURL;

/// The file URL at which the new file will be created.
@property (nonatomic, readonly, copy) NSURL *outputURL;

/// The name of the new file that will be created.
@property (nonatomic, readonly, copy) NSString *outputFileName;

/// The file URL at which the new file will be created.
@property (nonatomic, readonly, copy) NSURL *completeOutputURL;

@property (nonatomic, readonly) NSAttributedString *attributedTitleDescription;
@property (nonatomic, readonly) NSAttributedString *attributedDescription;

@property (nonatomic, readwrite) BOOL expanded;

@property (nonatomic, readonly) HBJob *job;

@end

NS_ASSUME_NONNULL_END