Search in sources :

Example 1 with IAroDevices

use of com.att.aro.core.mobiledevice.pojo.IAroDevices in project VideoOptimzer by attdevsupport.

the class Application method showDevices.

/**
 * Scans for and delivers an IAroDevices model
 *
 * @param context
 * @param cmds
 * @return IAroDevices
 */
private IAroDevices showDevices(ApplicationContext context, Commands cmds) {
    outln("scanning devices...");
    IAroDevices aroDevices = aroController.getAroDevices();
    outln("list devices");
    if (aroDevices.size() > 0) {
        outln(aroDevices.toString());
    } else {
        outln(" No devices detected");
    }
    return aroDevices;
}
Also used : IAroDevices(com.att.aro.core.mobiledevice.pojo.IAroDevices)

Example 2 with IAroDevices

use of com.att.aro.core.mobiledevice.pojo.IAroDevices in project VideoOptimzer by attdevsupport.

the class AROController method getAroDevices.

/**
 * Builds a list of IAroDevices
 *
 * @return a list of IAroDevices
 */
public IAroDevices getAroDevices() {
    // IDevice[] androidDevices = null;
    IAroDevices aroDevices = new AroDevices();
    List<IDataCollector> collectors = getAvailableCollectors();
    if (Util.isMacOS()) {
        getDevices(aroDevices, collectors, DataCollectorType.IOS);
    }
    if (getDevices(aroDevices, collectors, DataCollectorType.ROOTED_ANDROID) == 0) {
        getDevices(aroDevices, collectors, DataCollectorType.NON_ROOTED_ANDROID);
    }
    return aroDevices;
}
Also used : IAroDevices(com.att.aro.core.mobiledevice.pojo.IAroDevices) IDataCollector(com.att.aro.core.datacollector.IDataCollector) IAroDevices(com.att.aro.core.mobiledevice.pojo.IAroDevices) AroDevices(com.att.aro.core.mobiledevice.pojo.AroDevices)

Example 3 with IAroDevices

use of com.att.aro.core.mobiledevice.pojo.IAroDevices in project VideoOptimzer by attdevsupport.

the class ARODataCollectorMenu method actionPerformed.

@Override
public void actionPerformed(ActionEvent aEvent) {
    if (aEvent.getActionCommand().equalsIgnoreCase(menuItemDatacollectorStart)) {
        Object event = aEvent.getSource();
        if (event instanceof JMenuItem) {
            List<IDataCollector> collectors = parent.getAvailableCollectors();
            if (collectors == null || collectors.isEmpty()) {
                MessageDialogFactory.showMessageDialog(((MainFrame) parent).getJFrame(), ResourceBundleHelper.getMessageString("collector.nocollectors"), ResourceBundleHelper.getMessageString("menu.error.title"), JOptionPane.ERROR_MESSAGE);
                return;
            }
            LOG.info("collector count:" + collectors.size());
            for (IDataCollector collector : collectors) {
                LOG.info(collector.getName());
            }
            IAroDevices aroDevices = parent.getAroDevices();
            IAroDevice device = null;
            if (aroDevices.size() != 0) {
                device = chooseDevice(aroDevices, collectors);
            } else {
                MessageDialogFactory.showMessageDialog(((MainFrame) parent).getJFrame(), ResourceBundleHelper.getMessageString("collector.nodevices"), ResourceBundleHelper.getMessageString("menu.error.title"), JOptionPane.INFORMATION_MESSAGE);
                return;
            }
            if (device == null) {
                MessageDialogFactory.showMessageDialog(((MainFrame) parent).getJFrame(), ResourceBundleHelper.getMessageString("collector.cancelled"), ResourceBundleHelper.getMessageString("menu.info.title"), JOptionPane.INFORMATION_MESSAGE);
                return;
            }
        }
    } else if (aEvent.getActionCommand().equalsIgnoreCase(menuItemDatacollectorStop)) {
        ((MainFrame) parent).stopCollector();
        setStartMenuItem(true);
    }
}
Also used : IAroDevice(com.att.aro.core.mobiledevice.pojo.IAroDevice) IAroDevices(com.att.aro.core.mobiledevice.pojo.IAroDevices) JMenuItem(javax.swing.JMenuItem) IDataCollector(com.att.aro.core.datacollector.IDataCollector)

Aggregations

IAroDevices (com.att.aro.core.mobiledevice.pojo.IAroDevices)3 IDataCollector (com.att.aro.core.datacollector.IDataCollector)2 AroDevices (com.att.aro.core.mobiledevice.pojo.AroDevices)1 IAroDevice (com.att.aro.core.mobiledevice.pojo.IAroDevice)1 JMenuItem (javax.swing.JMenuItem)1