OSDN Git Service

MacGui: Remove Target Size as a rate control option as it doesn't really work correct...
[handbrake-jp/handbrake-jp-git.git] / macosx / HBCore.h
1 /**
2  * @file
3  * Interface of class HBCore.
4  */
5
6 #import <Cocoa/Cocoa.h>
7
8 extern const NSString *HBStateIdle;
9 extern const NSString *HBStateScanning;
10 extern const NSString *HBStateScanDone;
11 extern const NSString *HBStateWorking;
12 extern const NSString *HBStatePaused;
13 extern const NSString *HBStateWorkDone;
14 extern const NSString *HBStateMuxing;
15 extern const NSString *HBStateAll;
16
17 extern NSString *HBCoreScanningNotification;
18 extern NSString *HBCoreScanDoneNotification;
19 extern NSString *HBCoreWorkingNotification;
20 extern NSString *HBCorePausedNotification;
21 extern NSString *HBCoreWorkDoneNotification;
22 extern NSString *HBCoreMuxingNotification;
23
24 /**
25  * HBCore is an Objective-C interface to the low-level HandBrake library.
26  * HBCore monitors state changes of libhb and provides notifications via
27  * NSNotificationCenter to any object who needs them. It can also be used
28  * to implement properties that can be directly bound to elements of the gui.
29  */
30 @interface HBCore : NSObject
31 {
32     /// Pointer to libhb handle.
33     struct hb_handle_s *hb_handle;
34     
35     /// Pointer to latest state information returned by libhb.
36     struct hb_state_s *hb_state;
37     
38     /// Timer used to poll libhb for state changes.
39     NSTimer *updateTimer;
40
41     /// Current state of HBCore; one of the HBState* constants.
42     const NSString *state;  
43 }
44
45 - (id)init;
46 - (BOOL)openInDebugMode:(BOOL)debugMode checkForUpdates:(BOOL)checkForUpdates;
47 - (BOOL)close;
48 - (NSString *)state;
49 - (struct hb_handle_s *)hb_handle;
50 - (const struct hb_state_s *)hb_state;
51
52 @end