plugins/org.symbian.tools.tmw.ui/src/org/symbian/tools/tmw/ui/deployment/bluetooth/BluetoothTargetType.java
changeset 484 f5df819c1852
parent 483 109da596fa9d
equal deleted inserted replaced
483:109da596fa9d 484:f5df819c1852
    42 import org.symbian.tools.tmw.ui.deployment.IDeploymentTargetType;
    42 import org.symbian.tools.tmw.ui.deployment.IDeploymentTargetType;
    43 
    43 
    44 import com.intel.bluetooth.BlueCoveImpl;
    44 import com.intel.bluetooth.BlueCoveImpl;
    45 
    45 
    46 /**
    46 /**
    47  * Discovers Bluetooth-enabled devices. This code is generic and will not 
    47  * Discovers Bluetooth-enabled devices. This code is generic and will not
    48  * perform any checks if the discovered device can run application being 
    48  * perform any checks if the discovered device can run application being
    49  * deployed.
    49  * deployed.
    50  * 
    50  *
    51  * @author Eugene Ostroukhov (eugeneo@symbian.org)
    51  * @author Eugene Ostroukhov (eugeneo@symbian.org)
    52  */
    52  */
    53 public class BluetoothTargetType implements IDeploymentTargetType {
    53 public class BluetoothTargetType implements IDeploymentTargetType {
    54     private final class TargetDiscoveryListener implements DiscoveryListener {
    54     private final class TargetDiscoveryListener implements DiscoveryListener {
    55         final Object inquiryCompletedEvent;
    55         private final Object inquiryCompletedEvent;
    56         boolean isCanceled;
    56         private boolean isCanceled;
    57         final Map<String, BluetoothTarget> prevTargets;
    57         private final Map<String, BluetoothTarget> prevTargets;
    58         final IProgressMonitor progressMonitor;
    58         private final IProgressMonitor progressMonitor;
    59 
    59 
    60         private TargetDiscoveryListener(Map<String, BluetoothTarget> previousTargets, Object inquiryCompletedEvent,
    60         private TargetDiscoveryListener(Map<String, BluetoothTarget> previousTargets, Object inquiryCompletedEvent,
    61                 IProgressMonitor progressMonitor) {
    61                 IProgressMonitor progressMonitor) {
    62             this.prevTargets = previousTargets;
    62             this.prevTargets = previousTargets;
    63             this.inquiryCompletedEvent = inquiryCompletedEvent;
    63             this.inquiryCompletedEvent = inquiryCompletedEvent;
   173         }
   173         }
   174     }
   174     }
   175 
   175 
   176     /**
   176     /**
   177      * Check whether the bluetooth is on or not.
   177      * Check whether the bluetooth is on or not.
   178      * 
   178      *
   179      * @return whether the device is on.
   179      * @return whether the device is on.
   180      */
   180      */
   181     public boolean isBloothToothConnected() {
   181     public boolean isBloothToothConnected() {
   182         return LocalDevice.isPowerOn();
   182         return LocalDevice.isPowerOn();
   183     }
   183     }