interface Install
{
/* IID: { 0x18c2f988, 0xb09f, 0x11d2, \
  {0xbc, 0xde, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53}} */

	const int BAD_PACKAGE_NAME          = -200;
	const int UNEXPECTED_ERROR          = -201;
	const int ACCESS_DENIED             = -202;
	const int TOO_MANY_CERTIFICATES     = -203; /* Installer file must have 1 certificate */
	const int NO_INSTALLER_CERTIFICATE  = -204; /* Installer file must have a certificate */
	const int NO_CERTIFICATE            = -205; /* Extracted file is not signed */
	const int NO_MATCHING_CERTIFICATE   = -206; /* Extracted file does not match installer certificate */
	const int UNKNOWN_JAR_FILE          = -207; /* JAR file has not been opened */
	const int INVALID_ARGUMENTS         = -208; /* Bad arguments to a function */
	const int ILLEGAL_RELATIVE_PATH     = -209; /* Illegal relative path */
	const int USER_CANCELLED            = -210; /* User cancelled */
	const int INSTALL_NOT_STARTED       = -211;
	const int SILENT_MODE_DENIED        = -212;
	const int NO_SUCH_COMPONENT         = -213; /* no such component in the registry. */
	const int FILE_DOES_NOT_EXIST       = -214; /* File cannot be deleted as it does not exist */
	const int FILE_READ_ONLY            = -215; /* File cannot be deleted as it is read only. */
	const int FILE_IS_DIRECTORY         = -216; /* File cannot be deleted as it is a directory */
	const int NETWORK_FILE_IS_IN_USE    = -217; /* File on the network is in-use */
	const int APPLE_SINGLE_ERR          = -218; /* error in AppleSingle unpacking */
	const int INVALID_PATH_ERR          = -219; /* GetFolder() did not like the folderID */
	const int PATCH_BAD_DIFF            = -220; /* error in GDIFF patch */
	const int PATCH_BAD_CHECKSUM_TARGET = -221; /* source file doesn't checksum  */
	const int PATCH_BAD_CHECKSUM_RESULT = -222; /* final patched file fails checksum  */
	const int UNINSTALL_FAILED          = -223; /* error while uninstalling a package  */
	const int GESTALT_UNKNOWN_ERR       = -5550;         
	const int GESTALT_INVALID_ARGUMENT  = -5551;

	const int SUCCESS					  = 0;
	const int REBOOT_NEEDED               = 999;

	/* install types */
	const int LIMITED_INSTALL             = 0;
	const int FULL_INSTALL                = 1;
	const int NO_STATUS_DLG				  = 2;
	const int NO_FINALIZE_DLG			  = 4;

	// these should not be public...
	/* message IDs*/
	const int SU_INSTALL_FILE_UNEXPECTED_MSG_ID  = 0;
	const int SU_DETAILS_REPLACE_FILE_MSG_ID  = 1;
	const int SU_DETAILS_INSTALL_FILE_MSG_ID  = 2;
    //////////////////////////
	
	readonly attribute wstring UserPackageName;
	readonly attribute wstring RegPackageName;

	void Install();

	void AbortInstall();

	long AddDirectory(	   in wstring regName, 
						   in wstring version, 
						   in wstring jarSource,         
						   in InstallFolder folder, 
						   in wstring subdir, 
						   in boolean forceMode );


	long AddSubcomponent(  in wstring regName, 
						   in wstring version, 
						   in wstring jarSource,         
						   in InstallFolder folder, 
						   in wstring targetName, 
						   in boolean forceMode );

	long DeleteComponent(  in wstring registryName);

	long DeleteFile(       in InstallFolder folder,
						   in wstring relativeFileName );
	
	long DiskSpaceAvailable( in InstallFolder folder );
	
	long Execute(in wstring jarSource, in wstring args);
	
	long FinalizeInstall();

	long Gestalt (in wstring selector);

	InstallFolder GetComponentFolder( in wstring regName, 
						              in wstring subdirectory);

	InstallFolder GetFolder(in wstring targetFolder, 
				            in wstring subdirectory);

	long GetLastError();

	long GetWinProfile(in InstallFolder folder, in wstring file);
	
	long GetWinRegistry();

	long Patch( in wstring regName, 
				in wstring version, 
				in wstring jarSource,
				in InstallFolder folder, 
				in wstring targetName );
	
	void ResetError();

	void SetPackageFolder( in InstallFolder folder );
	
	long StartInstall( in wstring userPackageName,
					   in wstring packageName, 
					   in wstring version, 
					   in long flags );

	long Uninstall( in wstring packageName);

};