FileDocCategorySizeDatePackage
Test.javaAPI DocAzureus 3.0.3.43997Fri Nov 10 13:40:26 GMT 2006org.gudy.azureus2.platform.win32.access.impl

Test

public class Test extends Object
author
parg

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		try{
			/*
			AEWin32Access access = AEWin32Manager.getAccessor();
			
			String	app_data = access.getUserAppData();
			
			System.out.println( "AppData = " + app_data );

			String az_home = access.getApplicationInstallDir("azureus");
			
			File	az_exe = new File( az_home + File.separator + "Azureus.exe" ).getAbsoluteFile();
			
			if ( az_exe.exists()){
				
				//<Nolar> 	WriteRegStr HKCR ".torrent" "" "BitTorrent"
				//<Nolar> 	WriteRegStr HKCR "BitTorrent" "" "Bittorrent File"
				//<Nolar> 	WriteRegStr HKCR "BitTorrent\shell" "" "open"
				//<Nolar> 	WriteRegStr HKCR "BitTorrent\DefaultIcon" "" $INSTDIR\Azureus.exe,1
				//<Nolar>   	WriteRegStr HKCR "BitTorrent\shell\open\command" "" '"$INSTDIR\Azureus.exe" "%1"'
				//<Nolar>   	WriteRegStr HKCR "BitTorrent\Content Type" "" "application/x-bittorrent"
				
				System.out.println( "current = " + 
						access.readStringValue( 	
						AEWin32Access.HKEY_CLASSES_ROOT,
						"BitTorrent\\shell\\open\\command",
						"" ));
				
				access.deleteKey( 	AEWin32Access.HKEY_CLASSES_ROOT,
									".torrent" );
			
				access.deleteKey( 	AEWin32Access.HKEY_CLASSES_ROOT,
									"BitTorrent",
									true );
			
				access.writeStringValue( 	AEWin32Access.HKEY_CLASSES_ROOT,
											".torrent",
											"",
											"BitTorrent" );
				
				access.writeStringValue( 	
						AEWin32Access.HKEY_CLASSES_ROOT,
						"BitTorrent",
						"",
						"Bittorrent File" );

				access.writeStringValue( 	
						AEWin32Access.HKEY_CLASSES_ROOT,
						"BitTorrent\\shell",
						"",
						"open" );
				
				access.writeStringValue( 	
						AEWin32Access.HKEY_CLASSES_ROOT,
						"BitTorrent\\DefaultIcon",
						"",
						az_exe.toString() + ",1" );
				
				access.writeStringValue( 	
						AEWin32Access.HKEY_CLASSES_ROOT,
						"BitTorrent\\shell\\open\\command",
						"",
						"\"" + az_exe.toString() + "\" \"%1\"" );
				
				access.writeStringValue( 	
						AEWin32Access.HKEY_CLASSES_ROOT,
						"BitTorrent\\Content Type" ,
						"",
						"application/x-bittorrent" );
				
			}else{
				
				System.out.println( "can't find Azureus.exe");
			}
		*/
			
			//AEWin32AccessInterface.copyPermission( "C:\\temp\\fred", "C:\\temp\\bill" );
			
			
			AEWin32AccessImpl.getSingleton( false ).traceRoute(
					InetAddress.getByName( "192.168.1.143" ),
					InetAddress.getByName( "www.google.com"),
					new PlatformManagerPingCallback()
					{
						public boolean
						reportNode(
							int				distance,
							InetAddress		address,
							int				millis )
						{
							System.out.println( distance + ": " + address + " - " + millis );
							
							return( true );
						}
					});
			
			// AEWin32AccessInterface.ping( "www.google.com" );
			
		}catch( Throwable e ){
			
			e.printStackTrace();
		}