/*
 *  SUCarbonAPI.h
 *  Sparkle
 *
 *  Created by Jack Small on 2/22/07.
 *  Copyright 2007 Jack Small. All rights reserved.
 *
 */

#ifndef SUCARBONAPI
#define SUCARBONAPI

#include <Carbon/Carbon.h>

enum {
	/* This HICommand is handeled automatically by Sparkle and calls SUSparkleCheckForUpdates( TRUE ); */
	kHICommandSparkleCheckForUpdates = 'sCUP',
	
	/* This HICommand is sent to the application by Sparkle before kHICommandQuit.  If your event
	   handler returns noErr the kHICommandQuit command is not sent.  */
	kHICommandSparkleQuitApplication = 'sQAP'
};

enum {
	kEventClassSparkle = 'Sprk'
};

enum {
	kEventSparkleFoundVersion = 1,
	kEventParamSparkleVersion = 'sVrs',		/* typeCFStringRef (optional) */
	kEventParamSparkleIsNew = 'sNew'		/* typeBoolean */
}; 


#ifdef __cplusplus
extern "C" {
#endif
void SUSparkleInitializeForCarbon( void );
void SUSparkleCheckForUpdates( Boolean showUI );
void SUSparkleCheckWithInterval( double interval );
void SUSparkleCheckStatus( EventTargetRef theEventTarget );
Boolean SUSparkleIsUpdateInProgress( void );

// TLJF 19-Jan-2008 Added for Feral Interactive, Ltd.
void SUSparkleCallNSApplicationLoad(void);
Boolean SUSparkleWillCheckForUpdates(void);
void SUSparkleShouldCheckForUpdates(Boolean shouldCheck);
Boolean SUSparkleAppShouldQuit(void);
#ifdef __cplusplus
};
#endif
#endif /* SUCARBONAPI */

