FileDocCategorySizeDatePackage
AEWin32AccessInterface.javaAPI DocAzureus 3.0.3.45301Mon Jul 30 20:38:58 BST 2007org.gudy.azureus2.platform.win32.access.impl

AEWin32AccessInterface

public class AEWin32AccessInterface extends Object
author
parg

Fields Summary
public static final int
HKEY_CLASSES_ROOT
public static final int
HKEY_CURRENT_CONFIG
public static final int
HKEY_LOCAL_MACHINE
public static final int
HKEY_CURRENT_USER
public static final int
WM_QUERYENDSESSION
public static final int
WM_ENDSESSION
public static final int
WM_POWERBROADCAST
public static final int
PBT_APMQUERYSUSPEND
public static final int
PBT_APMSUSPEND
public static final int
PBT_APMRESUMESUSPEND
private static boolean
enabled
private static boolean
enabled_set
private static AEWin32AccessCallback
cb
Constructors Summary
Methods Summary
public static longcallback(int msg, int param1, long param2)

		if ( cb == null ){
						
			return( -1 );
			
		}else{
			
			return( cb.windowsMessage( msg, param1, param2 ));
		}
	
public static native voidcopyPermission(java.lang.String from_file_name, java.lang.String to_file_name)

public static native voidcreateProcess(java.lang.String command_line, boolean inherit_handles)

protected static native voiddeleteKey(int type, java.lang.String subkey, boolean recursive)

protected static native voiddeleteValue(int type, java.lang.String subkey, java.lang.String value_namae)

protected static native voiddestroy()

protected static native java.lang.StringgetVersion()

protected static native voidinitialise()

protected static booleanisEnabled(boolean check_if_disabled)

	
	
		System.loadLibrary( PlatformManagerImpl.DLL_NAME );
	
		if ( !check_if_disabled ){
			
			return( true );
		}
		
		if ( enabled_set ){
			
			return( enabled );
		}
		
		try{
				// protection against something really bad in the dll

			enabled = !UpdaterUtils.disableNativeCode( getVersion());
			
			if ( !enabled ){
			
				System.err.println( "Native code has been disabled" );
			}
		}finally{
			
			enabled_set	= true;
		}
		
		return( enabled );
	
protected static voidload(AEWin32AccessCallback _callback, boolean _fully_initialise)

	
		cb = _callback;
		
		if ( _fully_initialise ){
			
			try{
				initialise();
				
			}catch( Throwable e ){
				
				// get here when running 2400 java against old non-updated aereg.dll (for example)
				// System.out.println( "Old aereg version, please update!" );
			}
		}
	
public static native voidmoveToRecycleBin(java.lang.String file_name)

protected static native java.lang.StringreadStringValue(int type, java.lang.String subkey, java.lang.String value_name)

protected static native intreadWordValue(int type, java.lang.String subkey, java.lang.String value_name)

public static native intshellExecute(java.lang.String operation, java.lang.String file, java.lang.String parameters, java.lang.String directory, int sw_const)

public static native booleantestNativeAvailability(java.lang.String name)

public static native voidtraceRoute(int trace_id, int source_address, int target_address, int pice_mode, AEWin32AccessCallback callback)

protected static native voidwriteStringValue(int type, java.lang.String subkey, java.lang.String value_name, java.lang.String value_value)

protected static native voidwriteWordValue(int type, java.lang.String subkey, java.lang.String value_name, int value_value)