org.gudy.azureus2.platform.win32.access.impl
Class AEWin32AccessImpl

java.lang.Object
  extended by org.gudy.azureus2.platform.win32.access.impl.AEWin32AccessImpl
All Implemented Interfaces:
AEWin32Access, AEWin32AccessCallback

public class AEWin32AccessImpl
extends Object
implements AEWin32Access, AEWin32AccessCallback


Nested Class Summary
protected  class AEWin32AccessImpl.traceRouteCallback
           
 
Field Summary
protected static AEWin32AccessImpl singleton
           
 
Fields inherited from interface org.gudy.azureus2.platform.win32.access.AEWin32Access
HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, SW_FORCEMINIMIZE, SW_HIDE, SW_MAX, SW_MAXIMIZE, SW_MINIMIZE, SW_NORMAL, SW_RESTORE, SW_SHOW, SW_SHOWDEFAULT, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED, SW_SHOWMINNOACTIVE, SW_SHOWNA, SW_SHOWNOACTIVATE, SW_SHOWNORMAL
 
Constructor Summary
protected AEWin32AccessImpl(boolean _fully_initialise)
           
 
Method Summary
 void addListener(AEWin32AccessListener listener)
           
 void copyFilePermissions(String from_file_name, String to_file_name)
           
 void createProcess(String command_line, boolean inherit_handles)
           
 void deleteKey(int type, String subkey)
           
 void deleteKey(int type, String subkey, boolean recursive)
           
 void deleteValue(int type, String subkey, String value_name)
           
 long generalMessage(String str)
           
 Map<File,Map> getAllDrives()
           
 String getApplicationInstallDir(String app_name)
           
 String getCommonAppData()
           
 String getLocalAppData()
           
 String getProgramFilesDir()
           
static AEWin32Access getSingleton(boolean fully_initialise)
           
 String getUserAppData()
           
 String getUserDocumentsDir()
           
 String getUserMusicDir()
           
 String getUserVideoDir()
           
 String getVersion()
           
 boolean isEnabled()
           
 boolean isUSBDrive(Map driveInfo)
           
 void moveToRecycleBin(String file_name)
           
 void ping(InetAddress source_address, InetAddress target_address, PlatformManagerPingCallback callback)
           
 String readStringValue(int type, String subkey, String value_name)
           
 int readWordValue(int type, String subkey, String value_name)
           
 void removeListener(AEWin32AccessListener listener)
           
 void setThreadExecutionState(int state)
           
 int shellExecute(String operation, String file, String parameters, String directory, int SW_const)
           
 int shellExecuteAndWait(String file, String params)
           
 boolean testNativeAvailability(String name)
           
protected  void traceRoute(InetAddress source_address, InetAddress target_address, boolean ping_mode, PlatformManagerPingCallback callback)
           
 void traceRoute(InetAddress source_address, InetAddress target_address, PlatformManagerPingCallback callback)
           
 long windowsMessage(int msg, int param1, long param2)
           
 void writeStringValue(int type, String subkey, String value_name, String value_value)
           
 void writeWordValue(int type, String subkey, String value_name, int value_value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

protected static AEWin32AccessImpl singleton
Constructor Detail

AEWin32AccessImpl

protected AEWin32AccessImpl(boolean _fully_initialise)
Method Detail

getSingleton

public static AEWin32Access getSingleton(boolean fully_initialise)

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface AEWin32Access

windowsMessage

public long windowsMessage(int msg,
                           int param1,
                           long param2)
Specified by:
windowsMessage in interface AEWin32AccessCallback

generalMessage

public long generalMessage(String str)
Specified by:
generalMessage in interface AEWin32AccessCallback

getVersion

public String getVersion()
Specified by:
getVersion in interface AEWin32Access

readStringValue

public String readStringValue(int type,
                              String subkey,
                              String value_name)
                       throws AEWin32AccessException
Specified by:
readStringValue in interface AEWin32Access
Throws:
AEWin32AccessException

writeStringValue

public void writeStringValue(int type,
                             String subkey,
                             String value_name,
                             String value_value)
                      throws AEWin32AccessException
Specified by:
writeStringValue in interface AEWin32Access
Throws:
AEWin32AccessException

readWordValue

public int readWordValue(int type,
                         String subkey,
                         String value_name)
                  throws AEWin32AccessException
Specified by:
readWordValue in interface AEWin32Access
Throws:
AEWin32AccessException

writeWordValue

public void writeWordValue(int type,
                           String subkey,
                           String value_name,
                           int value_value)
                    throws AEWin32AccessException
Specified by:
writeWordValue in interface AEWin32Access
Throws:
AEWin32AccessException

deleteKey

public void deleteKey(int type,
                      String subkey)
               throws AEWin32AccessException
Specified by:
deleteKey in interface AEWin32Access
Throws:
AEWin32AccessException

deleteKey

public void deleteKey(int type,
                      String subkey,
                      boolean recursive)
               throws AEWin32AccessException
Specified by:
deleteKey in interface AEWin32Access
Throws:
AEWin32AccessException

deleteValue

public void deleteValue(int type,
                        String subkey,
                        String value_name)
                 throws AEWin32AccessException
Specified by:
deleteValue in interface AEWin32Access
Throws:
AEWin32AccessException

getUserAppData

public String getUserAppData()
                      throws AEWin32AccessException
Specified by:
getUserAppData in interface AEWin32Access
Throws:
AEWin32AccessException

getCommonAppData

public String getCommonAppData()
                        throws AEWin32AccessException
Specified by:
getCommonAppData in interface AEWin32Access
Returns:
Throws:
AEWin32AccessException

getLocalAppData

public String getLocalAppData()
                       throws AEWin32AccessException
Specified by:
getLocalAppData in interface AEWin32Access
Returns:
Throws:
AEWin32AccessException

getUserDocumentsDir

public String getUserDocumentsDir()
                           throws AEWin32AccessException
Specified by:
getUserDocumentsDir in interface AEWin32Access
Returns:
Throws:
AEWin32AccessException

getUserMusicDir

public String getUserMusicDir()
                       throws AEWin32AccessException
Specified by:
getUserMusicDir in interface AEWin32Access
Returns:
Throws:
AEWin32AccessException

getUserVideoDir

public String getUserVideoDir()
                       throws AEWin32AccessException
Specified by:
getUserVideoDir in interface AEWin32Access
Returns:
Throws:
AEWin32AccessException

getProgramFilesDir

public String getProgramFilesDir()
                          throws AEWin32AccessException
Specified by:
getProgramFilesDir in interface AEWin32Access
Throws:
AEWin32AccessException

getApplicationInstallDir

public String getApplicationInstallDir(String app_name)
                                throws AEWin32AccessException
Specified by:
getApplicationInstallDir in interface AEWin32Access
Throws:
AEWin32AccessException

createProcess

public void createProcess(String command_line,
                          boolean inherit_handles)
                   throws AEWin32AccessException
Specified by:
createProcess in interface AEWin32Access
Throws:
AEWin32AccessException

moveToRecycleBin

public void moveToRecycleBin(String file_name)
                      throws AEWin32AccessException
Specified by:
moveToRecycleBin in interface AEWin32Access
Throws:
AEWin32AccessException

copyFilePermissions

public void copyFilePermissions(String from_file_name,
                                String to_file_name)
                         throws AEWin32AccessException
Specified by:
copyFilePermissions in interface AEWin32Access
Throws:
AEWin32AccessException

testNativeAvailability

public boolean testNativeAvailability(String name)
                               throws AEWin32AccessException
Specified by:
testNativeAvailability in interface AEWin32Access
Throws:
AEWin32AccessException

shellExecute

public int shellExecute(String operation,
                        String file,
                        String parameters,
                        String directory,
                        int SW_const)
                 throws AEWin32AccessException
Specified by:
shellExecute in interface AEWin32Access
Throws:
AEWin32AccessException

shellExecuteAndWait

public int shellExecuteAndWait(String file,
                               String params)
                        throws AEWin32AccessException
Specified by:
shellExecuteAndWait in interface AEWin32Access
Throws:
AEWin32AccessException

traceRoute

public void traceRoute(InetAddress source_address,
                       InetAddress target_address,
                       PlatformManagerPingCallback callback)
                throws AEWin32AccessException
Specified by:
traceRoute in interface AEWin32Access
Throws:
AEWin32AccessException

ping

public void ping(InetAddress source_address,
                 InetAddress target_address,
                 PlatformManagerPingCallback callback)
          throws AEWin32AccessException
Specified by:
ping in interface AEWin32Access
Throws:
AEWin32AccessException

traceRoute

protected void traceRoute(InetAddress source_address,
                          InetAddress target_address,
                          boolean ping_mode,
                          PlatformManagerPingCallback callback)
                   throws AEWin32AccessException
Throws:
AEWin32AccessException

addListener

public void addListener(AEWin32AccessListener listener)
Specified by:
addListener in interface AEWin32Access

removeListener

public void removeListener(AEWin32AccessListener listener)
Specified by:
removeListener in interface AEWin32Access

getAllDrives

public Map<File,Map> getAllDrives()
Specified by:
getAllDrives in interface AEWin32Access
Returns:

isUSBDrive

public boolean isUSBDrive(Map driveInfo)
Specified by:
isUSBDrive in interface AEWin32Access

setThreadExecutionState

public void setThreadExecutionState(int state)
Specified by:
setThreadExecutionState in interface AEWin32Access