Methods Summary |
---|
public void | addListener(AEWin32AccessListener listener)
listeners.add( listener );
|
private int | addressToInt(java.net.InetAddress address)
byte[] bytes = address.getAddress();
int resp = (bytes[0]<<24)&0xff000000 | (bytes[1] << 16)&0x00ff0000 | (bytes[2] << 8)&0x0000ff00 | bytes[3]&0x000000ff;
return( resp );
|
public void | copyFilePermissions(java.lang.String from_file_name, java.lang.String to_file_name)
AEWin32AccessInterface.copyPermission( from_file_name, to_file_name );
|
public void | createProcess(java.lang.String command_line, boolean inherit_handles)
AEWin32AccessInterface.createProcess( command_line, inherit_handles );
|
public void | deleteKey(int type, java.lang.String subkey)
deleteKey( type, subkey, false );
|
public void | deleteKey(int type, java.lang.String subkey, boolean recursive)
AEWin32AccessInterface.deleteKey( type, subkey, recursive );
|
public void | deleteValue(int type, java.lang.String subkey, java.lang.String value_name)
AEWin32AccessInterface.deleteValue( type, subkey, value_name );
|
public long | generalMessage(java.lang.String str)
return( 0 );
|
public java.lang.String | getApplicationInstallDir(java.lang.String app_name)
String res = "";
try{
res = readStringValue(
HKEY_CURRENT_USER,
"software\\" + app_name,
null );
}catch( AEWin32AccessException e ){
res = readStringValue(
HKEY_LOCAL_MACHINE,
"software\\" + app_name,
null );
}
return( res );
|
public java.lang.String | getCommonAppData()
String app_data_key = "software\\microsoft\\windows\\currentversion\\explorer\\shell folders";
String app_data_name = "Common AppData";
return( readStringValue(
HKEY_LOCAL_MACHINE,
app_data_key,
app_data_name ));
|
public java.lang.String | getProgramFilesDir()
String app_data_key = "software\\microsoft\\windows\\currentversion";
String app_data_name = "ProgramFilesDir";
return( readStringValue(
HKEY_LOCAL_MACHINE,
app_data_key,
app_data_name ));
|
public static synchronized AEWin32Access | getSingleton(boolean fully_initialise)
if ( singleton == null ){
singleton = new AEWin32AccessImpl(fully_initialise);
}
return( singleton );
|
public java.lang.String | getUserAppData()
String app_data_key = "software\\microsoft\\windows\\currentversion\\explorer\\shell folders";
String app_data_name = "appdata";
return( readStringValue(
HKEY_CURRENT_USER,
app_data_key,
app_data_name ));
|
public java.lang.String | getUserDocumentsDir()
String app_data_key = "software\\microsoft\\windows\\currentversion\\explorer\\shell folders";
String app_data_name = "personal";
return( readStringValue(
HKEY_CURRENT_USER,
app_data_key,
app_data_name ));
|
public java.lang.String | getUserMusicDir()
String app_data_key = "software\\microsoft\\windows\\currentversion\\explorer\\shell folders";
String app_data_name = "my music";
try {
return( readStringValue(
HKEY_CURRENT_USER,
app_data_key,
app_data_name ));
} catch (AEWin32AccessException e) {
// Win98 doesn't have it
String s = getUserDocumentsDir();
if (s != null) {
s += "\\My Music";
}
return s;
}
|
public java.lang.String | getUserVideoDir()
String app_data_key = "software\\microsoft\\windows\\currentversion\\explorer\\shell folders";
String app_data_name = "my video";
try {
return( readStringValue(
HKEY_CURRENT_USER,
app_data_key,
app_data_name ));
} catch (AEWin32AccessException e) {
// Win98 doesn't have it
String s = getUserDocumentsDir();
if (s != null) {
s += "\\My Video";
}
return s;
}
|
public java.lang.String | getVersion()
return( AEWin32AccessInterface.getVersion());
|
private java.net.InetAddress | intToAddress(int address)
byte[] bytes = { (byte)(address>>24), (byte)(address>>16),(byte)(address>>8),(byte)address };
try{
InetAddress res = InetAddress.getByAddress(bytes);
return( res );
}catch( UnknownHostException e ){
return( null );
}
|
public boolean | isEnabled()
return( AEWin32AccessInterface.isEnabled( fully_initialise ));
|
public void | moveToRecycleBin(java.lang.String file_name)
AEWin32AccessInterface.moveToRecycleBin( file_name );
|
public void | ping(java.net.InetAddress source_address, java.net.InetAddress target_address, org.gudy.azureus2.platform.PlatformManagerPingCallback callback)
traceRoute( source_address, target_address, true, callback );
|
public java.lang.String | readStringValue(int type, java.lang.String subkey, java.lang.String value_name)
return( AEWin32AccessInterface.readStringValue( type, subkey, value_name ));
|
public int | readWordValue(int type, java.lang.String subkey, java.lang.String value_name)
return( AEWin32AccessInterface.readWordValue( type, subkey, value_name ));
|
public void | removeListener(AEWin32AccessListener listener)
listeners.remove( listener );
|
public int | shellExecute(java.lang.String operation, java.lang.String file, java.lang.String parameters, java.lang.String directory, int SW_const)
return AEWin32AccessInterface.shellExecute(operation, file, parameters,
directory, SW_const);
|
public boolean | testNativeAvailability(java.lang.String name)
return( AEWin32AccessInterface.testNativeAvailability( name ));
|
public void | traceRoute(java.net.InetAddress source_address, java.net.InetAddress target_address, org.gudy.azureus2.platform.PlatformManagerPingCallback callback)
traceRoute( source_address, target_address, false, callback );
|
protected void | traceRoute(java.net.InetAddress source_address, java.net.InetAddress target_address, boolean ping_mode, org.gudy.azureus2.platform.PlatformManagerPingCallback callback)
int trace_id;
synchronized( this ){
trace_id = trace_id_next++;
}
AEWin32AccessCallback cb = new traceRouteCallback( ping_mode, callback );
AEWin32AccessInterface.traceRoute(
trace_id,
addressToInt( source_address ),
addressToInt( target_address ),
ping_mode?1:0,
cb );
|
public long | windowsMessage(int msg, int param1, long param2)
int type = -1;
if ( msg == AEWin32AccessInterface.WM_ENDSESSION ){
type = AEWin32AccessListener.ET_SHUTDOWN;
}else if ( msg == AEWin32AccessInterface.WM_POWERBROADCAST ){
if ( param1 == AEWin32AccessInterface.PBT_APMQUERYSUSPEND ){
type = AEWin32AccessListener.ET_SUSPEND;
}else if ( param1 == AEWin32AccessInterface.PBT_APMRESUMESUSPEND ){
type = AEWin32AccessListener.ET_RESUME;
}
}
if ( type != -1 ){
for (int i=0;i<listeners.size();i++){
try{
((AEWin32AccessListener)listeners.get(i)).eventOccurred( type );
}catch( Throwable e ){
e.printStackTrace();
}
}
}
return( -1 );
|
public void | writeStringValue(int type, java.lang.String subkey, java.lang.String value_name, java.lang.String value_value)
AEWin32AccessInterface.writeStringValue( type, subkey, value_name, value_value );
|
public void | writeWordValue(int type, java.lang.String subkey, java.lang.String value_name, int value_value)
AEWin32AccessInterface.writeWordValue( type, subkey, value_name, value_value );
|