summaryrefslogtreecommitdiffstats
path: root/macosx/InstantHandBrake/HBCore.h
diff options
context:
space:
mode:
authorritsuka <[email protected]>2008-01-11 18:41:54 +0000
committerritsuka <[email protected]>2008-01-11 18:41:54 +0000
commitdeff3a1428034c156d440e0fe02f613cb774e3dc (patch)
tree67b7f68e4a45bf195409e83379dbe3fae2c65c52 /macosx/InstantHandBrake/HBCore.h
parent934a5fd5990660575e644e656d4722f4606f18ef (diff)
IHB: A new xcode project file, plus some experimental changes to test HBCore.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1187 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/InstantHandBrake/HBCore.h')
-rw-r--r--macosx/InstantHandBrake/HBCore.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/macosx/InstantHandBrake/HBCore.h b/macosx/InstantHandBrake/HBCore.h
new file mode 100644
index 000000000..435d5f799
--- /dev/null
+++ b/macosx/InstantHandBrake/HBCore.h
@@ -0,0 +1,52 @@
+/**
+ * @file
+ * Interface of class HBCore.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+extern const NSString *HBStateIdle;
+extern const NSString *HBStateScanning;
+extern const NSString *HBStateScanDone;
+extern const NSString *HBStateWorking;
+extern const NSString *HBStatePaused;
+extern const NSString *HBStateWorkDone;
+extern const NSString *HBStateMuxing;
+extern const NSString *HBStateAll;
+
+extern NSString *HBCoreScanningNotification;
+extern NSString *HBCoreScanDoneNotification;
+extern NSString *HBCoreWorkingNotification;
+extern NSString *HBCorePausedNotification;
+extern NSString *HBCoreWorkDoneNotification;
+extern NSString *HBCoreMuxingNotification;
+
+/**
+ * HBCore is an Objective-C interface to the low-level HandBrake library.
+ * HBCore monitors state changes of libhb and provides notifications via
+ * NSNotificationCenter to any object who needs them. It can also be used
+ * to implement properties that can be directly bound to elements of the gui.
+ */
+@interface HBCore : NSObject
+{
+ /// Pointer to libhb handle.
+ struct hb_handle_s *hb_handle;
+
+ /// Pointer to latest state information returned by libhb.
+ struct hb_state_s *hb_state;
+
+ /// Timer used to poll libhb for state changes.
+ NSTimer *updateTimer;
+
+ /// Current state of HBCore; one of the HBState* constants.
+ const NSString *state;
+}
+
+- (id)init;
+- (BOOL)openInDebugMode:(BOOL)debugMode checkForUpdates:(BOOL)checkForUpdates;
+- (BOOL)close;
+- (NSString *)state;
+- (struct hb_handle_s *)hb_handle;
+- (const struct hb_state_s *)hb_state;
+
+@end