//
//  BXUQuickTimeComponent.h
//  BXQuickTime
//
//  Created by Michael Ehrmann on 24.04.06.
//  Copyright 2006 Boinx Software. All rights reserved.
//

#if !__LP64__

#pragma mark Imports

#import <QuickTime/QuickTime.h>



#pragma mark -
#pragma mark Constants

extern NSString *BXQuickTimeComponentName; /**< Key for component name. */
extern NSString *BXQuickTimeComponentType; /**< Key for component sub type. */
extern NSString *BXQuickTimeComponentSubType; /**< Key for component sub type. */
extern NSString *BXQuickTimeComponentManufacturer; /**< Key for component manufacturer. */
extern NSString *BXQuickTimeComponentHasUserInterface; /**< Key for component has user interface. */
extern NSString *BXQuickTimeComponentFileExtension; /**< Key for component exported file extension. */
extern NSString *BXQuickTimeComponentSubTypeFourCharCode; /**< Key for component subtype as four char code string. */


#pragma mark -
@interface BXUQuickTimeComponent : NSObject {
	
}


#pragma mark -
#pragma mark component availability

/** Class method to find all available movie exporters.
 * @returns An array of dictionarys with values for the BXQuickTimeComponentKeys.
 */

+ (NSArray *) allAvailableMovieExportComponents;



/******************************************************************************************************
 isComponentInstalledWithType:subType:manufacturer:withComponentData:
 ******************************************************************************************************/

+ (BOOL) isComponentInstalledWithType:(OSType)inType
							  subType:(OSType)inSubType
						 manufacturer:(OSType)inManufacturer
					withComponentData:(NSData *)inComponentData;


+ (BOOL) isComponentThreadSafe:(OSType)inComponentType withComponentSubType:(OSType)inComponentSubType;
/** Class method to check if a given component is thread safe
 * @returns YES, if the component is thread safe, otherwise NO.
 */


#pragma mark -
#pragma mark finding components

/** Class method to find a component by all QT FindNextComponent parameters
 * @returns The requested Component.
 */

+ (Component) findComponentForType:(OSType)inType
						   subType:(OSType)inSubType
					  manufacturer:(OSType)inManufacturer
							 flags:(UInt32)inFlags
						 flagsMask:(UInt32)inFlagsMask;



#pragma mark -
#pragma mark open & close components

/** Class method to open a component by all QT FindNextComponent parameters
 * @returns The requested ComponentInstance.
 */

+ (ComponentInstance) openComponentForType:(OSType)inType
								   subType:(OSType)inSubType
							  manufacturer:(OSType)inManufacturer
									 flags:(UInt32)inFlags
								 flagsMask:(UInt32)inFlagsMask;


/** Class to open a component.
 * @returns The requested ComponentInstance.
 */

+ (ComponentInstance) openComponent:(Component)inComponent;



/** Class to close a componentInstance
 * @returns OSStatus of closing the component.
 */

+ (OSStatus) closeComponent:(ComponentInstance *)ioComponentInstancePointer;



#pragma mark -
#pragma mark settings of a component

/** Class method getting the settings data of componentInstance.
 * @returns NSData object containing settingsAtom data.
 */

+ (NSData *) getSettingsOfComponent:(ComponentInstance)inComponentInstance;



/** Class method setting the settings data of componentInstance.
 * @returns  OSStatus of setting data for a component.
 */

+ (OSStatus) setSettings:(NSData *)inData ofComponent:(ComponentInstance)inComponentInstance;



/** Class method getting the fileextension for a exported movie.
 * @returns Default filename extension for exported movie type.
 */

+ (NSString *) filenameExtensionForComponent:(ComponentInstance)inComponentInstance;

@end

#endif
