# HG changeset patch
# User stechong
# Date 1279732308 18000
# Node ID 03f5f8bf29b48a531abfc5f73559bf83da2dfa58
# Parent d1edeecb12af5f78697ec19c6b798d03aa5bf8c4# Parent e17ab99b8f30318f1ecc7137469ef3b9ee907d89
Merge from default.
diff -r d1edeecb12af -r 03f5f8bf29b4 .branch.txt
--- a/.branch.txt Wed Jul 21 11:37:56 2010 -0500
+++ b/.branch.txt Wed Jul 21 12:11:48 2010 -0500
@@ -1,1 +1,1 @@
-Mon May 24 15:37:50 CDT 2010
+Mon May 24 15:38:04 CDT 2010
diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt
--- a/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt Wed Jul 21 11:37:56 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.input.txt Wed Jul 21 12:11:48 2010 -0500
@@ -8,6 +8,14 @@
Regression for bug 9091. Don't report info lines with SBSv2 error checker
Could not write toolcheck cache: [Errno 2] No such file or directory: u'R:\\\\epoc32\\build\\toolcheck_cache__armv5_udeb.tmp'
+tool 'SBS_JAVATC' from config 'none' did not return version 'version \"1\.[5-9]' as required.
+Command 'D:/sources/trk/tcf/tcftrk/group/[undefined] -version' returned:
+(this line excised to avoid false positive)
+
+Check your environment and configuration.
+
+
+
Executing 'make -r -f "J:/epoc32/build/Cone/makefile.default" -j 4
DESCRAMBLE="C:/Symbian/SITK/sbs/bin/sbs_descramble.exe sbs2631027042"'
diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.regression.xml
--- a/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.regression.xml Wed Jul 21 11:37:56 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/data/errorpatterns/sbsv2.errors.regression.xml Wed Jul 21 12:11:48 2010 -0500
@@ -1,6 +1,8 @@
+
+
-
+
\ No newline at end of file
diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Wed Jul 21 11:37:56 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Wed Jul 21 12:11:48 2010 -0500
@@ -217,14 +217,28 @@
BldInfViewPathHelper helper = new BldInfViewPathHelper(data, context);
for (IExtension extension : data.getExtensions()) {
IPath extensionMakefileBase = helper.convertExtensionTemplateToFilesystem(extension.getTemplatePath());
- normalFiles.add(extensionMakefileBase.addFileExtension("mk")); //$NON-NLS-1$
+ IPath makefile = getControllingFile(extensionMakefileBase);
+ normalFiles.add(makefile);
}
for (IExtension extension : data.getTestExtensions()) {
IPath extensionMakefileBase = helper.convertExtensionTemplateToFilesystem(extension.getTemplatePath());
- testFiles.add(extensionMakefileBase.addFileExtension("mk")); //$NON-NLS-1$
+ IPath makefile = getControllingFile(extensionMakefileBase);
+ testFiles.add(makefile);
}
return null;
}
+
+ private IPath getControllingFile(
+ IPath extensionMakefileBase) {
+ IPath candidate = extensionMakefileBase.addFileExtension("mk"); //$NON-NLS-1$
+ if (candidate.toFile().exists())
+ return candidate;
+ if ("export".equals(extensionMakefileBase.getFileExtension())) //$NON-NLS-1$
+ candidate = extensionMakefileBase.removeFileExtension().addFileExtension("flm"); //$NON-NLS-1$
+ else
+ candidate = extensionMakefileBase.addFileExtension("flm"); //$NON-NLS-1$
+ return candidate;
+ }
});
monitor.worked(1);
@@ -1128,7 +1142,7 @@
// get the bitmaps
List bmps = mmpData.getBitmaps();
for (IMMPBitmap bmp : bmps) {
- IPath mbmPath = bmp.getTargetFilePath().makeRelative();
+ IPath mbmPath = bmp.getTargetFilePath().makeAbsolute();
// if there's no target path then use the main target path
if (mbmPath.segmentCount() == 1) {
mbmPath = targetPath.append(mbmPath);
diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java Wed Jul 21 11:37:56 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java Wed Jul 21 12:11:48 2010 -0500
@@ -1,10 +1,14 @@
package com.nokia.carbide.cdt.internal.builder;
+import java.text.MessageFormat;
+
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+
public class CarbideBuildManagerUtils {
/**
@@ -34,4 +38,9 @@
}
}
+ public static String getBuildLabel(ICarbideBuildConfiguration buildConfig, String componentName) {
+ return MessageFormat.format("Building {0}: {1}",
+ buildConfig.getCarbideProject().getProject().getName(),
+ componentName != null ? componentName : buildConfig.getDisplayString());
+ }
}
diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Wed Jul 21 11:37:56 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Wed Jul 21 12:11:48 2010 -0500
@@ -179,7 +179,7 @@
if (areWeManagingTheMakeFiles || buildConfig.getCarbideProject().isConcurrentBuildingEnabled()) {
SubMonitor progress = SubMonitor.convert(monitor, 7);
- progress.setTaskName("Building " + componentName);
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName));
// run abld export or test export
List args = new ArrayList();
@@ -310,7 +310,7 @@
} else {
SubMonitor progress = SubMonitor.convert(monitor, 1);
- progress.setTaskName("Building " + componentName);
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName));
List argsList = new ArrayList();
if (isTest) {
@@ -838,7 +838,7 @@
// because the dependency info is in the makefiles.
SubMonitor progress = SubMonitor.convert(monitor, 3);
- progress.setTaskName("Building " + buildConfig.getDisplayString());
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
@@ -912,7 +912,7 @@
}
SubMonitor progress = SubMonitor.convert(monitor, unitsOfWork);
- progress.setTaskName("Building " + buildConfig.getDisplayString());
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
@@ -1154,7 +1154,7 @@
// because the dependency info is in the makefiles.
SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size());
- progress.setTaskName("Building " + buildConfig.getDisplayString());
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
@@ -1247,7 +1247,7 @@
}
SubMonitor progress = SubMonitor.convert(monitor, 4 + (normalMakMakePaths.size()*4) + (testMakMakePaths.size()*4));
- progress.setTaskName("Building " + buildConfig.getDisplayString());
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Wed Jul 21 11:37:56 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java Wed Jul 21 12:11:48 2010 -0500
@@ -47,7 +47,7 @@
public boolean buildAllComponents(ICarbideBuildConfiguration buildConfig, List normalMakMakePaths, List testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
SubMonitor progress = SubMonitor.convert(monitor, 3);
- progress.setTaskName("Building " + buildConfig.getDisplayString());
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
@@ -113,7 +113,7 @@
}
SubMonitor progress = SubMonitor.convert(monitor, 1);
- progress.setTaskName("Building " + componentName);
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName));
List argsList = new ArrayList();
argsList.add(COMPONENT_ARG);
@@ -136,7 +136,7 @@
public boolean buildComponentSubset(ICarbideBuildConfiguration buildConfig, List normalMakMakePaths, List testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size());
- progress.setTaskName("Building " + buildConfig.getDisplayString());
+ progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
return false;
diff -r d1edeecb12af -r 03f5f8bf29b4 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java Wed Jul 21 11:37:56 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/error/parsers/SBSv2ErrorParser.java Wed Jul 21 12:11:48 2010 -0500
@@ -21,12 +21,11 @@
import org.eclipse.cdt.core.ErrorParserManager;
import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.core.runtime.Path;
public class SBSv2ErrorParser extends CarbideBaseErrorParser {
- private static final Pattern warningPattern = Pattern.compile("(.*)"); //$NON-NLS-1$
- private static final Pattern errorPattern = Pattern.compile("(.*)"); //$NON-NLS-1$
- private static final Pattern infoPattern = Pattern.compile("(.*)"); //$NON-NLS-1$
+ private final Pattern msgPattern = Pattern.compile("(.*):(\\d*):(\\d*):(.*)"); //$NON-NLS-1$
public SBSv2ErrorParser() {
}
@@ -35,51 +34,50 @@
initialise();
- Matcher matcher = infoPattern.matcher(line);
- if (matcher.matches()) {
+ if (line.startsWith(""))
return true; // just ignore info messages
- }
- matcher = warningPattern.matcher(line);
- if (matcher.matches()) {
+
+ // full message detected
+ if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_ERROR_BUILD))
+ return true;
+ if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_WARNING))
+ return true;
+
+ // some messages are split across multiple lines, so for now, at least show the first line (where , etc. are)
+ if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_ERROR_BUILD))
+ return true;
+ if (findMessage(errorParserManager, line, "", "", IMarkerGenerator.SEVERITY_WARNING))
+ return true;
+
+ return false;
+ }
+
+ protected boolean findMessage(ErrorParserManager errorParserManager, String line,
+ String startStrip, String endStrip, int severity) {
+ int idx = line.indexOf(startStrip);
+ int endIdx = line.indexOf(endStrip);
+ if (idx >= 0 && endIdx >= 0) {
// strip the tags
- String text = line.substring("".length(), line.length() - "".length()); //$NON-NLS-1$ //$NON-NLS-2$
+ int descStart = idx + startStrip.length();
+ int descEnd = line.length() - endStrip.length();
+
+ String text = line.substring(descStart, descEnd);
if (setFirstColon(text)) {
- if (setFileNameAndLineNumber(text)) {
+ if (setFileNameAndLineNumber(text) || setSBSv2FileNameAndLineNumber(text)) {
setFile(errorParserManager);
setDescription(text);
- errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_WARNING, null, externalFilePath);
+ errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, severity, null, externalFilePath);
return true;
}
}
msgFileName = ""; //$NON-NLS-1$
- msgDescription = matcher.group(1);
+ msgDescription = text;
setFile(errorParserManager);
- errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_WARNING, null, externalFilePath);
+ errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, severity, null, externalFilePath);
return true;
}
-
- matcher = errorPattern.matcher(line);
- if (matcher.matches()) {
- // strip the tags
- String text = line.substring("".length(), line.length() - "".length()); //$NON-NLS-1$ //$NON-NLS-2$
- if (setFirstColon(text)) {
- if (setFileNameAndLineNumber(text)) {
- setFile(errorParserManager);
- setDescription(text);
- errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_ERROR_BUILD, null, externalFilePath);
- return true;
- }
- }
- msgFileName = ""; //$NON-NLS-1$
- msgDescription = matcher.group(1);
- setFile(errorParserManager);
- errorParserManager.generateExternalMarker(msgIFile, msgLineNumber, msgDescription, IMarkerGenerator.SEVERITY_ERROR_BUILD, null, externalFilePath);
- return true;
- }
-
return false;
}
-
public void setDescription(String line) {
// Get the iDescription
msgDescription = line.substring(msgFirstColon + 1).trim();
@@ -88,4 +86,21 @@
}
}
+ protected boolean setSBSv2FileNameAndLineNumber(String line) {
+ // Get the first Substring, which must be in the form of
+ // "fileName:line number:postion"
+ String firstSubstr = line.substring(msgFirstColon + 1).trim();
+ if (firstSubstr != null) {
+ Matcher matcher = msgPattern.matcher(firstSubstr);
+ if (matcher.matches()) {
+ msgFileName = matcher.group(1);
+ if (!Path.EMPTY.isValidPath(msgFileName)) {
+ return false;
+ }
+ msgLineNumber = Integer.parseInt(matcher.group(2));
+ return true;
+ }
+ }
+ return false;
+ }
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java
--- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java Wed Jul 21 12:11:48 2010 -0500
@@ -353,4 +353,12 @@
}
return loadStatus;
}
+
+ public boolean isRunning() {
+ return pccsConnection != null && pccsConnection.isOpen();
+ }
+
+ public String getId() {
+ return getClass().getName();
+ }
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/messages.properties
--- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/messages.properties Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/messages.properties Wed Jul 21 12:11:48 2010 -0500
@@ -1,4 +1,4 @@
-Activator_Agent_Name=PC Suite Device Discovery Agent
+Activator_Agent_Name=PC Suite Device Discovery
Activator_PCCS_Location=http://www2.connecting.nokia.com/nmp/swp/pcsuite.nsf/document/ES336ZAHVY?OpenDocument
Activator_PCSuite_Location=https://tools.ext.nokia.com/PCsuite
ConnAPILibrary_PCCS_Not_Found_Error=Carbide could not find the PC Connectivity Solution (PCCS) installation. For more information go to:
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java
--- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/PCCSConnection.java Wed Jul 21 12:11:48 2010 -0500
@@ -1300,4 +1300,11 @@
throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, PCCS_WRONG_VERSION, msg, null));
}
}
+
+ /**
+ * @return whether we have a valid handle
+ */
+ public boolean isOpen() {
+ return dmHandle != APIHANDLE.INVALID_HANDLE_VALUE;
+ }
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/plugin.xml
--- a/connectivity/com.nokia.carbide.remoteConnections.tests/plugin.xml Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.tests/plugin.xml Wed Jul 21 12:11:48 2010 -0500
@@ -26,26 +26,6 @@
-
-
-
-
-
-
-
-
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java
--- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java Wed Jul 21 12:11:48 2010 -0500
@@ -101,7 +101,7 @@
}
}
- private DiscoveryThread thread = new DiscoveryThread();
+ private DiscoveryThread thread;
public URL getInformation() {
return null;
@@ -131,20 +131,33 @@
}
public void start() throws CoreException {
- if (TestFilter.isTest)
+ if (TestFilter.isTest) {
+ thread = new DiscoveryThread();
thread.start();
+ }
}
public void stop() throws CoreException {
- thread.stopRunning();
+ if (TestFilter.isTest) {
+ thread.stopRunning();
+ thread = null;
+ }
}
public String getDisplayName() {
- return "Random Test Discovery Agent";
+ return "Random Test Discovery";
}
public IPrerequisiteStatus getPrerequisiteStatus() {
return (new RandomPrerequisiteStatus());
}
+ public boolean isRunning() {
+ return thread != null;
+ }
+
+ public String getId() {
+ return getClass().getName();
+ }
+
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java
--- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/RandomCycleConnectedService.java Wed Jul 21 12:11:48 2010 -0500
@@ -35,9 +35,9 @@
import org.osgi.framework.Version;
import com.nokia.carbide.remoteconnections.interfaces.IConnectedService;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
import com.nokia.carbide.remoteconnections.interfaces.IConnection;
import com.nokia.carbide.remoteconnections.interfaces.IService;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
import com.nokia.cpp.internal.api.utils.core.ListenerList;
public class RandomCycleConnectedService implements IConnectedService {
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java
--- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/TestInstallerProvider.java Wed Jul 21 12:11:48 2010 -0500
@@ -39,9 +39,9 @@
*/
public class TestInstallerProvider implements IRemoteAgentInstallerProvider {
- private static final Version S60_32 = new Version("3.2");
- private static final Version S60_50 = new Version("5.0");
- private static final Version UIQ_30 = new Version("3.0");
+ private static final String S60_32 = "3.2";
+ private static final String S60_50 = "5.0";
+ private static final String UIQ_30 = "3.0";
private static final String S60 = "S60";
private static final String UIQ = "UIQ";
private static final String INSTALLER_CONTENTS = "This is a mock installer package.";
@@ -55,9 +55,9 @@
private static class TestInstaller implements IRemoteAgentInstaller {
private final String family;
- private final Version version;
+ private final String version;
- public TestInstaller(String family, Version version) {
+ public TestInstaller(String family, String version) {
this.family = family;
this.version = version;
}
@@ -66,7 +66,7 @@
return family;
}
- public Version getVersion() {
+ public String getVersion() {
return version;
}
@@ -143,18 +143,18 @@
return new ArrayList(Arrays.asList(familyNames));
}
- public List getVersions(String familyName) {
+ public List getVersions(String familyName) {
if (familyName.equals(S60)) {
- Version[] versions = { S60_32, S60_50 };
- return new ArrayList(Arrays.asList(versions));
+ String[] versions = { S60_32, S60_50 };
+ return new ArrayList(Arrays.asList(versions));
}
else if (familyName.equals(UIQ))
return Collections.singletonList(UIQ_30);
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
- public List getRemoteAgentInstallers(String familyName, Version version) {
+ public List getRemoteAgentInstallers(String familyName, String version) {
if (familyName.equals(S60)) {
if (version.equals(S60_32))
return Collections.singletonList(installers[0]);
@@ -164,7 +164,7 @@
else if (familyName.equals(UIQ) && version.equals(UIQ_30))
return Collections.singletonList(installers[2]);
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
private static void getMockData(IProgressMonitor monitor) throws InterruptedException {
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java
--- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/extensions/UnknownStatusService.java Wed Jul 21 12:11:48 2010 -0500
@@ -18,16 +18,22 @@
package com.nokia.carbide.remoteconnections.tests.extensions;
-import com.nokia.carbide.remoteconnections.interfaces.*;
-import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.swt.graphics.Image;
import org.osgi.framework.Version;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.*;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService;
+import com.nokia.carbide.remoteconnections.interfaces.IConnection;
+import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider;
+import com.nokia.carbide.remoteconnections.interfaces.IService;
+import com.nokia.carbide.remoteconnections.interfaces.IService2;
+import com.nokia.carbide.trk.support.connection.TCPIPConnectionFactory;
@SuppressWarnings("restriction")
public class UnknownStatusService implements IService2 {
@@ -111,15 +117,15 @@
return Collections.singletonList(S60);
}
- public List getVersions(String familyName) {
+ public List getVersions(String familyName) {
if (familyName.equals(S60))
- return Collections.singletonList(new Version(_5_0));
+ return Collections.singletonList(_5_0);
return null;
}
- public List getRemoteAgentInstallers(String familyName, Version version) {
- if (familyName.equals(S60) && version.equals(new Version(_5_0))) {
+ public List getRemoteAgentInstallers(String familyName, String version) {
+ if (familyName.equals(S60) && version.equals(_5_0)) {
IRemoteAgentInstaller installer = new IRemoteAgentInstaller() {
public boolean fileSupportsInstall() {
@@ -183,6 +189,7 @@
return false;
}
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
return null;
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/plugin.properties
--- a/connectivity/com.nokia.carbide.remoteConnections/plugin.properties Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/plugin.properties Wed Jul 21 12:11:48 2010 -0500
@@ -5,4 +5,4 @@
providerName = www.example.org
OnDevice.label=On-Device Connections...
Import.desc=Import previously exported remote connections into this workspace
-Export.desc=Export remote connections from this workspace to the local file system
\ No newline at end of file
+Export.desc=Export remote connections from this workspace to the local file system
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/plugin.xml
--- a/connectivity/com.nokia.carbide.remoteConnections/plugin.xml Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/plugin.xml Wed Jul 21 12:11:48 2010 -0500
@@ -62,20 +62,6 @@
-
-
-
-
-
-
+ *
+ * @return a new object of class 'SDK Family Type'.
+ * @generated
+ */
+ SDKFamilyType createSDKFamilyType();
+
+ /**
+ * Returns a new object of class 'SDK Version Type'.
+ *
+ *
+ * @return a new object of class 'SDK Version Type'.
+ * @generated
+ */
+ SDKVersionType createSDKVersionType();
+
+ /**
* Returns the package supported by this factory.
*
*
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/InstallPackagesPackage.java Wed Jul 21 12:11:48 2010 -0500
@@ -125,13 +125,31 @@
int PACKAGES_TYPE = 1;
/**
+ * The feature id for the 'SDK Family' containment reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int PACKAGES_TYPE__SDK_FAMILY = 0;
+
+ /**
+ * The feature id for the 'SDK Version' containment reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int PACKAGES_TYPE__SDK_VERSION = 1;
+
+ /**
* The feature id for the 'Package' containment reference list.
*
*
* @generated
* @ordered
*/
- int PACKAGES_TYPE__PACKAGE = 0;
+ int PACKAGES_TYPE__PACKAGE = 2;
/**
* The number of structural features of the 'Packages Type' class.
@@ -140,7 +158,7 @@
* @generated
* @ordered
*/
- int PACKAGES_TYPE_FEATURE_COUNT = 1;
+ int PACKAGES_TYPE_FEATURE_COUNT = 3;
/**
* The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackageTypeImpl Package Type}' class.
@@ -217,6 +235,63 @@
/**
+ * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl SDK Family Type}' class.
+ *
+ *
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKFamilyType()
+ * @generated
+ */
+ int SDK_FAMILY_TYPE = 3;
+
+ /**
+ * The feature id for the 'Order' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int SDK_FAMILY_TYPE__ORDER = 0;
+
+ /**
+ * The number of structural features of the 'SDK Family Type' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int SDK_FAMILY_TYPE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl SDK Version Type}' class.
+ *
+ *
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKVersionType()
+ * @generated
+ */
+ int SDK_VERSION_TYPE = 4;
+
+ /**
+ * The feature id for the 'Order' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int SDK_VERSION_TYPE__ORDER = 0;
+
+ /**
+ * The number of structural features of the 'SDK Version Type' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int SDK_VERSION_TYPE_FEATURE_COUNT = 1;
+
+
+ /**
* Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.DocumentRoot Document Root}'.
*
*
@@ -281,6 +356,28 @@
EClass getPackagesType();
/**
+ * Returns the meta object for the containment reference '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}'.
+ *
+ *
+ * @return the meta object for the containment reference 'SDK Family'.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily()
+ * @see #getPackagesType()
+ * @generated
+ */
+ EReference getPackagesType_SDKFamily();
+
+ /**
+ * Returns the meta object for the containment reference '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}'.
+ *
+ *
+ * @return the meta object for the containment reference 'SDK Version'.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion()
+ * @see #getPackagesType()
+ * @generated
+ */
+ EReference getPackagesType_SDKVersion();
+
+ /**
* Returns the meta object for the containment reference list '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getPackage Package}'.
*
*
@@ -368,6 +465,48 @@
EAttribute getPackageType_SdkVersion();
/**
+ * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType SDK Family Type}'.
+ *
+ *
+ * @return the meta object for class 'SDK Family Type'.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType
+ * @generated
+ */
+ EClass getSDKFamilyType();
+
+ /**
+ * Returns the meta object for the attribute '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}'.
+ *
+ *
+ * @return the meta object for the attribute 'Order'.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder()
+ * @see #getSDKFamilyType()
+ * @generated
+ */
+ EAttribute getSDKFamilyType_Order();
+
+ /**
+ * Returns the meta object for class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType SDK Version Type}'.
+ *
+ *
+ * @return the meta object for class 'SDK Version Type'.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType
+ * @generated
+ */
+ EClass getSDKVersionType();
+
+ /**
+ * Returns the meta object for the attribute '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}'.
+ *
+ *
+ * @return the meta object for the attribute 'Order'.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder()
+ * @see #getSDKVersionType()
+ * @generated
+ */
+ EAttribute getSDKVersionType_Order();
+
+ /**
* Returns the factory that creates the instances of the model.
*
*
@@ -442,6 +581,22 @@
EClass PACKAGES_TYPE = eINSTANCE.getPackagesType();
/**
+ * The meta object literal for the 'SDK Family' containment reference feature.
+ *
+ *
+ * @generated
+ */
+ EReference PACKAGES_TYPE__SDK_FAMILY = eINSTANCE.getPackagesType_SDKFamily();
+
+ /**
+ * The meta object literal for the 'SDK Version' containment reference feature.
+ *
+ *
+ * @generated
+ */
+ EReference PACKAGES_TYPE__SDK_VERSION = eINSTANCE.getPackagesType_SDKVersion();
+
+ /**
* The meta object literal for the 'Package' containment reference list feature.
*
*
@@ -507,6 +662,42 @@
*/
EAttribute PACKAGE_TYPE__SDK_VERSION = eINSTANCE.getPackageType_SdkVersion();
+ /**
+ * The meta object literal for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl SDK Family Type}' class.
+ *
+ *
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKFamilyType()
+ * @generated
+ */
+ EClass SDK_FAMILY_TYPE = eINSTANCE.getSDKFamilyType();
+
+ /**
+ * The meta object literal for the 'Order' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute SDK_FAMILY_TYPE__ORDER = eINSTANCE.getSDKFamilyType_Order();
+
+ /**
+ * The meta object literal for the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl SDK Version Type}' class.
+ *
+ *
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.impl.InstallPackagesPackageImpl#getSDKVersionType()
+ * @generated
+ */
+ EClass SDK_VERSION_TYPE = eINSTANCE.getSDKVersionType();
+
+ /**
+ * The meta object literal for the 'Order' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute SDK_VERSION_TYPE__ORDER = eINSTANCE.getSDKVersionType_Order();
+
}
} //InstallPackagesPackage
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/PackagesType.java Wed Jul 21 12:11:48 2010 -0500
@@ -17,6 +17,8 @@
*
* The following features are supported:
*
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}
* - {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getPackage Package}
*
*
@@ -27,6 +29,60 @@
*/
public interface PackagesType extends EObject {
/**
+ * Returns the value of the 'SDK Family' containment reference.
+ *
+ *
+ * If the meaning of the 'SDK Family' containment reference isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'SDK Family' containment reference.
+ * @see #setSDKFamily(SDKFamilyType)
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getPackagesType_SDKFamily()
+ * @model containment="true"
+ * extendedMetaData="kind='element' name='SDKFamily' namespace='##targetNamespace'"
+ * @generated
+ */
+ SDKFamilyType getSDKFamily();
+
+ /**
+ * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKFamily SDK Family}' containment reference.
+ *
+ *
+ * @param value the new value of the 'SDK Family' containment reference.
+ * @see #getSDKFamily()
+ * @generated
+ */
+ void setSDKFamily(SDKFamilyType value);
+
+ /**
+ * Returns the value of the 'SDK Version' containment reference.
+ *
+ *
+ * If the meaning of the 'SDK Version' containment reference isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'SDK Version' containment reference.
+ * @see #setSDKVersion(SDKVersionType)
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getPackagesType_SDKVersion()
+ * @model containment="true"
+ * extendedMetaData="kind='element' name='SDKVersion' namespace='##targetNamespace'"
+ * @generated
+ */
+ SDKVersionType getSDKVersion();
+
+ /**
+ * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType#getSDKVersion SDK Version}' containment reference.
+ *
+ *
+ * @param value the new value of the 'SDK Version' containment reference.
+ * @see #getSDKVersion()
+ * @generated
+ */
+ void setSDKVersion(SDKVersionType value);
+
+ /**
* Returns the value of the 'Package' containment reference list.
* The list contents are of type {@link com.nokia.carbide.installpackages.gen.InstallPackages.PackageType}.
*
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKFamilyType.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKFamilyType.java Wed Jul 21 12:11:48 2010 -0500
@@ -0,0 +1,55 @@
+/**
+ *
+ *
+ *
+ * $Id$
+ */
+package com.nokia.carbide.installpackages.gen.InstallPackages;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * A representation of the model object 'SDK Family Type'.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}
+ *
+ *
+ *
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKFamilyType()
+ * @model extendedMetaData="name='SDKFamily_._type' kind='empty'"
+ * @generated
+ */
+public interface SDKFamilyType extends EObject {
+ /**
+ * Returns the value of the 'Order' attribute.
+ *
+ *
+ * If the meaning of the 'Order' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Order' attribute.
+ * @see #setOrder(String)
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKFamilyType_Order()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+ * extendedMetaData="kind='attribute' name='order' namespace='##targetNamespace'"
+ * @generated
+ */
+ String getOrder();
+
+ /**
+ * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType#getOrder Order}' attribute.
+ *
+ *
+ * @param value the new value of the 'Order' attribute.
+ * @see #getOrder()
+ * @generated
+ */
+ void setOrder(String value);
+
+} // SDKFamilyType
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKVersionType.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/SDKVersionType.java Wed Jul 21 12:11:48 2010 -0500
@@ -0,0 +1,55 @@
+/**
+ *
+ *
+ *
+ * $Id$
+ */
+package com.nokia.carbide.installpackages.gen.InstallPackages;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * A representation of the model object 'SDK Version Type'.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}
+ *
+ *
+ *
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKVersionType()
+ * @model extendedMetaData="name='SDKVersion_._type' kind='empty'"
+ * @generated
+ */
+public interface SDKVersionType extends EObject {
+ /**
+ * Returns the value of the 'Order' attribute.
+ *
+ *
+ * If the meaning of the 'Order' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Order' attribute.
+ * @see #setOrder(String)
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage#getSDKVersionType_Order()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+ * extendedMetaData="kind='attribute' name='order' namespace='##targetNamespace'"
+ * @generated
+ */
+ String getOrder();
+
+ /**
+ * Sets the value of the '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType#getOrder Order}' attribute.
+ *
+ *
+ * @param value the new value of the 'Order' attribute.
+ * @see #getOrder()
+ * @generated
+ */
+ void setOrder(String value);
+
+} // SDKVersionType
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/DocumentRootImpl.java Wed Jul 21 12:11:48 2010 -0500
@@ -9,6 +9,8 @@
import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage;
import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EMap;
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesFactoryImpl.java Wed Jul 21 12:11:48 2010 -0500
@@ -62,6 +62,8 @@
case InstallPackagesPackage.DOCUMENT_ROOT: return createDocumentRoot();
case InstallPackagesPackage.PACKAGES_TYPE: return createPackagesType();
case InstallPackagesPackage.PACKAGE_TYPE: return createPackageType();
+ case InstallPackagesPackage.SDK_FAMILY_TYPE: return createSDKFamilyType();
+ case InstallPackagesPackage.SDK_VERSION_TYPE: return createSDKVersionType();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -102,6 +104,26 @@
*
* @generated
*/
+ public SDKFamilyType createSDKFamilyType() {
+ SDKFamilyTypeImpl sdkFamilyType = new SDKFamilyTypeImpl();
+ return sdkFamilyType;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public SDKVersionType createSDKVersionType() {
+ SDKVersionTypeImpl sdkVersionType = new SDKVersionTypeImpl();
+ return sdkVersionType;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
public InstallPackagesPackage getInstallPackagesPackage() {
return (InstallPackagesPackage)getEPackage();
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/InstallPackagesPackageImpl.java Wed Jul 21 12:11:48 2010 -0500
@@ -11,6 +11,8 @@
import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType;
import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
@@ -49,6 +51,20 @@
private EClass packageTypeEClass = null;
/**
+ *
+ *
+ * @generated
+ */
+ private EClass sdkFamilyTypeEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass sdkVersionTypeEClass = null;
+
+ /**
* Creates an instance of the model Package, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -75,20 +91,10 @@
private static boolean isInited = false;
/**
- * Creates, registers, and initializes the Package for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- *
Invocation of this method will not affect any packages that have
- * already been initialized.
+ * Creates, registers, and initializes the Package for this model, and for any others upon which it depends.
+ *
+ *
This method is used to initialize {@link InstallPackagesPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
*
*
* @see #eNS_URI
@@ -100,7 +106,7 @@
if (isInited) return (InstallPackagesPackage)EPackage.Registry.INSTANCE.getEPackage(InstallPackagesPackage.eNS_URI);
// Obtain or create and register package
- InstallPackagesPackageImpl theInstallPackagesPackage = (InstallPackagesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof InstallPackagesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new InstallPackagesPackageImpl());
+ InstallPackagesPackageImpl theInstallPackagesPackage = (InstallPackagesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InstallPackagesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InstallPackagesPackageImpl());
isInited = true;
@@ -116,6 +122,9 @@
// Mark meta-data to indicate it can't be changed
theInstallPackagesPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(InstallPackagesPackage.eNS_URI, theInstallPackagesPackage);
return theInstallPackagesPackage;
}
@@ -178,8 +187,26 @@
*
* @generated
*/
+ public EReference getPackagesType_SDKFamily() {
+ return (EReference)packagesTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getPackagesType_SDKVersion() {
+ return (EReference)packagesTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
public EReference getPackagesType_Package() {
- return (EReference)packagesTypeEClass.getEStructuralFeatures().get(0);
+ return (EReference)packagesTypeEClass.getEStructuralFeatures().get(2);
}
/**
@@ -250,6 +277,42 @@
*
* @generated
*/
+ public EClass getSDKFamilyType() {
+ return sdkFamilyTypeEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getSDKFamilyType_Order() {
+ return (EAttribute)sdkFamilyTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getSDKVersionType() {
+ return sdkVersionTypeEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getSDKVersionType_Order() {
+ return (EAttribute)sdkVersionTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
public InstallPackagesFactory getInstallPackagesFactory() {
return (InstallPackagesFactory)getEFactoryInstance();
}
@@ -280,6 +343,8 @@
createEReference(documentRootEClass, DOCUMENT_ROOT__PACKAGES);
packagesTypeEClass = createEClass(PACKAGES_TYPE);
+ createEReference(packagesTypeEClass, PACKAGES_TYPE__SDK_FAMILY);
+ createEReference(packagesTypeEClass, PACKAGES_TYPE__SDK_VERSION);
createEReference(packagesTypeEClass, PACKAGES_TYPE__PACKAGE);
packageTypeEClass = createEClass(PACKAGE_TYPE);
@@ -289,6 +354,12 @@
createEAttribute(packageTypeEClass, PACKAGE_TYPE__PACKAGE_VERSION);
createEAttribute(packageTypeEClass, PACKAGE_TYPE__SDK_FAMILY);
createEAttribute(packageTypeEClass, PACKAGE_TYPE__SDK_VERSION);
+
+ sdkFamilyTypeEClass = createEClass(SDK_FAMILY_TYPE);
+ createEAttribute(sdkFamilyTypeEClass, SDK_FAMILY_TYPE__ORDER);
+
+ sdkVersionTypeEClass = createEClass(SDK_VERSION_TYPE);
+ createEAttribute(sdkVersionTypeEClass, SDK_VERSION_TYPE__ORDER);
}
/**
@@ -331,6 +402,8 @@
initEReference(getDocumentRoot_Packages(), this.getPackagesType(), null, "packages", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
initEClass(packagesTypeEClass, PackagesType.class, "PackagesType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPackagesType_SDKFamily(), this.getSDKFamilyType(), null, "sDKFamily", null, 0, 1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPackagesType_SDKVersion(), this.getSDKVersionType(), null, "sDKVersion", null, 0, 1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPackagesType_Package(), this.getPackageType(), null, "package", null, 0, -1, PackagesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(packageTypeEClass, PackageType.class, "PackageType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -341,6 +414,12 @@
initEAttribute(getPackageType_SdkFamily(), theXMLTypePackage.getString(), "sdkFamily", null, 1, 1, PackageType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPackageType_SdkVersion(), theXMLTypePackage.getString(), "sdkVersion", null, 1, 1, PackageType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(sdkFamilyTypeEClass, SDKFamilyType.class, "SDKFamilyType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSDKFamilyType_Order(), theXMLTypePackage.getString(), "order", null, 1, 1, SDKFamilyType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(sdkVersionTypeEClass, SDKVersionType.class, "SDKVersionType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSDKVersionType_Order(), theXMLTypePackage.getString(), "order", null, 1, 1, SDKVersionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
@@ -407,6 +486,22 @@
"kind", "elementOnly"
});
addAnnotation
+ (getPackagesType_SDKFamily(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "SDKFamily",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getPackagesType_SDKVersion(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "SDKVersion",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
(getPackagesType_Package(),
source,
new String[] {
@@ -468,6 +563,36 @@
"kind", "attribute",
"name", "sdkVersion",
"namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (sdkFamilyTypeEClass,
+ source,
+ new String[] {
+ "name", "SDKFamily_._type",
+ "kind", "empty"
+ });
+ addAnnotation
+ (getSDKFamilyType_Order(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "order",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (sdkVersionTypeEClass,
+ source,
+ new String[] {
+ "name", "SDKVersion_._type",
+ "kind", "empty"
+ });
+ addAnnotation
+ (getSDKVersionType_Order(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "order",
+ "namespace", "##targetNamespace"
});
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/PackagesTypeImpl.java Wed Jul 21 12:11:48 2010 -0500
@@ -9,8 +9,11 @@
import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType;
import com.nokia.carbide.installpackages.gen.InstallPackages.PackagesType;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType;
import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
@@ -18,6 +21,7 @@
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
@@ -30,6 +34,8 @@
*
* The following features are implemented:
*
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getSDKFamily SDK Family}
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getSDKVersion SDK Version}
* - {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.PackagesTypeImpl#getPackage Package}
*
*
@@ -38,6 +44,24 @@
*/
public class PackagesTypeImpl extends EObjectImpl implements PackagesType {
/**
+ * The cached value of the '{@link #getSDKFamily() SDK Family}' containment reference.
+ *
+ *
+ * @see #getSDKFamily()
+ * @generated
+ * @ordered
+ */
+ protected SDKFamilyType sDKFamily;
+ /**
+ * The cached value of the '{@link #getSDKVersion() SDK Version}' containment reference.
+ *
+ *
+ * @see #getSDKVersion()
+ * @generated
+ * @ordered
+ */
+ protected SDKVersionType sDKVersion;
+ /**
* The cached value of the '{@link #getPackage() Package}' containment reference list.
*
*
@@ -71,6 +95,92 @@
*
* @generated
*/
+ public SDKFamilyType getSDKFamily() {
+ return sDKFamily;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetSDKFamily(SDKFamilyType newSDKFamily, NotificationChain msgs) {
+ SDKFamilyType oldSDKFamily = sDKFamily;
+ sDKFamily = newSDKFamily;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, oldSDKFamily, newSDKFamily);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setSDKFamily(SDKFamilyType newSDKFamily) {
+ if (newSDKFamily != sDKFamily) {
+ NotificationChain msgs = null;
+ if (sDKFamily != null)
+ msgs = ((InternalEObject)sDKFamily).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, null, msgs);
+ if (newSDKFamily != null)
+ msgs = ((InternalEObject)newSDKFamily).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, null, msgs);
+ msgs = basicSetSDKFamily(newSDKFamily, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY, newSDKFamily, newSDKFamily));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public SDKVersionType getSDKVersion() {
+ return sDKVersion;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetSDKVersion(SDKVersionType newSDKVersion, NotificationChain msgs) {
+ SDKVersionType oldSDKVersion = sDKVersion;
+ sDKVersion = newSDKVersion;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, oldSDKVersion, newSDKVersion);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setSDKVersion(SDKVersionType newSDKVersion) {
+ if (newSDKVersion != sDKVersion) {
+ NotificationChain msgs = null;
+ if (sDKVersion != null)
+ msgs = ((InternalEObject)sDKVersion).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, null, msgs);
+ if (newSDKVersion != null)
+ msgs = ((InternalEObject)newSDKVersion).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, null, msgs);
+ msgs = basicSetSDKVersion(newSDKVersion, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION, newSDKVersion, newSDKVersion));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
public EList getPackage() {
if (package_ == null) {
package_ = new EObjectContainmentEList(PackageType.class, this, InstallPackagesPackage.PACKAGES_TYPE__PACKAGE);
@@ -86,6 +196,10 @@
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY:
+ return basicSetSDKFamily(null, msgs);
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION:
+ return basicSetSDKVersion(null, msgs);
case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE:
return ((InternalEList>)getPackage()).basicRemove(otherEnd, msgs);
}
@@ -100,6 +214,10 @@
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY:
+ return getSDKFamily();
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION:
+ return getSDKVersion();
case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE:
return getPackage();
}
@@ -115,6 +233,12 @@
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY:
+ setSDKFamily((SDKFamilyType)newValue);
+ return;
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION:
+ setSDKVersion((SDKVersionType)newValue);
+ return;
case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE:
getPackage().clear();
getPackage().addAll((Collection extends PackageType>)newValue);
@@ -131,6 +255,12 @@
@Override
public void eUnset(int featureID) {
switch (featureID) {
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY:
+ setSDKFamily((SDKFamilyType)null);
+ return;
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION:
+ setSDKVersion((SDKVersionType)null);
+ return;
case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE:
getPackage().clear();
return;
@@ -146,6 +276,10 @@
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_FAMILY:
+ return sDKFamily != null;
+ case InstallPackagesPackage.PACKAGES_TYPE__SDK_VERSION:
+ return sDKVersion != null;
case InstallPackagesPackage.PACKAGES_TYPE__PACKAGE:
return package_ != null && !package_.isEmpty();
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKFamilyTypeImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKFamilyTypeImpl.java Wed Jul 21 12:11:48 2010 -0500
@@ -0,0 +1,167 @@
+/**
+ *
+ *
+ *
+ * $Id$
+ */
+package com.nokia.carbide.installpackages.gen.InstallPackages.impl;
+
+import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ *
+ * An implementation of the model object 'SDK Family Type'.
+ *
+ *
+ * The following features are implemented:
+ *
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKFamilyTypeImpl#getOrder Order}
+ *
+ *
+ *
+ * @generated
+ */
+public class SDKFamilyTypeImpl extends EObjectImpl implements SDKFamilyType {
+ /**
+ * The default value of the '{@link #getOrder() Order}' attribute.
+ *
+ *
+ * @see #getOrder()
+ * @generated
+ * @ordered
+ */
+ protected static final String ORDER_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getOrder() Order}' attribute.
+ *
+ *
+ * @see #getOrder()
+ * @generated
+ * @ordered
+ */
+ protected String order = ORDER_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected SDKFamilyTypeImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return InstallPackagesPackage.Literals.SDK_FAMILY_TYPE;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public String getOrder() {
+ return order;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setOrder(String newOrder) {
+ String oldOrder = order;
+ order = newOrder;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER, oldOrder, order));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER:
+ return getOrder();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER:
+ setOrder((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER:
+ setOrder(ORDER_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_FAMILY_TYPE__ORDER:
+ return ORDER_EDEFAULT == null ? order != null : !ORDER_EDEFAULT.equals(order);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (order: ");
+ result.append(order);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SDKFamilyTypeImpl
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKVersionTypeImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/impl/SDKVersionTypeImpl.java Wed Jul 21 12:11:48 2010 -0500
@@ -0,0 +1,167 @@
+/**
+ *
+ *
+ *
+ * $Id$
+ */
+package com.nokia.carbide.installpackages.gen.InstallPackages.impl;
+
+import com.nokia.carbide.installpackages.gen.InstallPackages.InstallPackagesPackage;
+import com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ *
+ * An implementation of the model object 'SDK Version Type'.
+ *
+ *
+ * The following features are implemented:
+ *
+ * - {@link com.nokia.carbide.installpackages.gen.InstallPackages.impl.SDKVersionTypeImpl#getOrder Order}
+ *
+ *
+ *
+ * @generated
+ */
+public class SDKVersionTypeImpl extends EObjectImpl implements SDKVersionType {
+ /**
+ * The default value of the '{@link #getOrder() Order}' attribute.
+ *
+ *
+ * @see #getOrder()
+ * @generated
+ * @ordered
+ */
+ protected static final String ORDER_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getOrder() Order}' attribute.
+ *
+ *
+ * @see #getOrder()
+ * @generated
+ * @ordered
+ */
+ protected String order = ORDER_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected SDKVersionTypeImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return InstallPackagesPackage.Literals.SDK_VERSION_TYPE;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public String getOrder() {
+ return order;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setOrder(String newOrder) {
+ String oldOrder = order;
+ order = newOrder;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, InstallPackagesPackage.SDK_VERSION_TYPE__ORDER, oldOrder, order));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER:
+ return getOrder();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER:
+ setOrder((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER:
+ setOrder(ORDER_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case InstallPackagesPackage.SDK_VERSION_TYPE__ORDER:
+ return ORDER_EDEFAULT == null ? order != null : !ORDER_EDEFAULT.equals(order);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (order: ");
+ result.append(order);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SDKVersionTypeImpl
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesAdapterFactory.java Wed Jul 21 12:11:48 2010 -0500
@@ -83,6 +83,14 @@
return createPackageTypeAdapter();
}
@Override
+ public Adapter caseSDKFamilyType(SDKFamilyType object) {
+ return createSDKFamilyTypeAdapter();
+ }
+ @Override
+ public Adapter caseSDKVersionType(SDKVersionType object) {
+ return createSDKVersionTypeAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -145,6 +153,34 @@
}
/**
+ * Creates a new adapter for an object of class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType SDK Family Type}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKFamilyType
+ * @generated
+ */
+ public Adapter createSDKFamilyTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType SDK Version Type}'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see com.nokia.carbide.installpackages.gen.InstallPackages.SDKVersionType
+ * @generated
+ */
+ public Adapter createSDKVersionTypeAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
*
* This default implementation returns null.
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/gen/InstallPackages/util/InstallPackagesSwitch.java Wed Jul 21 12:11:48 2010 -0500
@@ -104,6 +104,18 @@
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case InstallPackagesPackage.SDK_FAMILY_TYPE: {
+ SDKFamilyType sdkFamilyType = (SDKFamilyType)theEObject;
+ T result = caseSDKFamilyType(sdkFamilyType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case InstallPackagesPackage.SDK_VERSION_TYPE: {
+ SDKVersionType sdkVersionType = (SDKVersionType)theEObject;
+ T result = caseSDKVersionType(sdkVersionType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -154,6 +166,36 @@
}
/**
+ * Returns the result of interpreting the object as an instance of 'SDK Family Type'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'SDK Family Type'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSDKFamilyType(SDKFamilyType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'SDK Version Type'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'SDK Version Type'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSDKVersionType(SDKVersionType object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of 'EObject'.
*
* This implementation returns null;
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/RemoteConnectionsActivator.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/RemoteConnectionsActivator.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/RemoteConnectionsActivator.java Wed Jul 21 12:11:48 2010 -0500
@@ -18,6 +18,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -27,6 +28,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IFilter;
import org.eclipse.swt.widgets.Control;
@@ -40,11 +42,12 @@
import com.nokia.carbide.remoteconnections.interfaces.IConnectionTypeProvider;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager;
import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent;
+import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent.IPrerequisiteStatus;
import com.nokia.carbide.remoteconnections.internal.api.IStatusDisplay;
-import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent.IPrerequisiteStatus;
import com.nokia.carbide.remoteconnections.internal.registry.Registry;
import com.nokia.carbide.remoteconnections.internal.ui.DeviceDiscoveryPrequisiteErrorDialog;
import com.nokia.carbide.remoteconnections.internal.ui.StatusDisplay;
+import com.nokia.cpp.internal.api.utils.core.ListenerList;
import com.nokia.cpp.internal.api.utils.core.Logging;
import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
@@ -85,6 +88,10 @@
runnable.run();
}
}
+
+ public interface IDiscoveryAgentsLoadedListener {
+ void agentsAreLoaded();
+ }
// The plug-in ID
public static final String PLUGIN_ID = "com.nokia.carbide.remoteConnections"; //$NON-NLS-1$
@@ -95,13 +102,16 @@
private static RemoteConnectionsActivator plugin;
private Collection discoveryAgents;
+ private ListenerList listeners;
private static final String IGNORE_AGENT_LOAD_ERRORS_KEY = "ignoreAgentLoadErrors"; //$NON-NLS-1$
+ private static final String AGENT_STATE_KEY_PREFIX = "agentState."; //$NON-NLS-1$
/**
* The constructor
*/
public RemoteConnectionsActivator() {
+ listeners = new ListenerList();
}
public void start(BundleContext context) throws Exception {
@@ -176,6 +186,28 @@
logError(e);
}
}
+
+ private void storeAgentRunningStates() {
+ IPreferenceStore preferenceStore = getPreferenceStore();
+ for (IDeviceDiscoveryAgent agent : discoveryAgents) {
+ String agentKey = AGENT_STATE_KEY_PREFIX + agent.getId();
+ if (!preferenceStore.contains(agentKey))
+ preferenceStore.setDefault(agentKey, true);
+ preferenceStore.setValue(agentKey, agent.isRunning());
+ }
+ try {
+ new InstanceScope().getNode(PLUGIN_ID).flush();
+ } catch (BackingStoreException e) {
+ logError(e);
+ }
+ }
+
+ private boolean getStoredAgentRunningState(IDeviceDiscoveryAgent agent) {
+ String agentKey = AGENT_STATE_KEY_PREFIX + agent.getId();
+ if (!getPreferenceStore().contains(agentKey))
+ return true;
+ return getPreferenceStore().getBoolean(agentKey);
+ }
/**
* Returns the shared instance
@@ -232,7 +264,9 @@
public boolean select(Object toTest) {
if (toTest instanceof IDeviceDiscoveryAgent) {
try {
- ((IDeviceDiscoveryAgent) toTest).start();
+ IDeviceDiscoveryAgent discoveryAgent = (IDeviceDiscoveryAgent) toTest;
+ if (getStoredAgentRunningState(discoveryAgent))
+ discoveryAgent.start();
return true;
} catch (Throwable e) {
// since we launch arbitrary code, catch any exception to prevent killing the view
@@ -242,13 +276,15 @@
return false;
}
});
-
+ fireDiscoveryAgentsLoaded();
}
private void stopDeviceDiscoveryAgents() {
+ storeAgentRunningStates();
for (IDeviceDiscoveryAgent agent : discoveryAgents) {
try {
- agent.stop();
+ if (agent.isRunning())
+ agent.stop();
} catch (CoreException e) {
logError(e);
}
@@ -287,4 +323,24 @@
public static IStatusDisplay getStatusDisplay() {
return new StatusDisplay();
}
+
+ public Collection getDiscoveryAgents() {
+ if (discoveryAgents != null)
+ return Collections.unmodifiableCollection(discoveryAgents);
+ return Collections.emptySet();
+ }
+
+ public void addDiscoveryAgentsLoadedListener(IDiscoveryAgentsLoadedListener listener) {
+ listeners.add(listener);
+ }
+
+ public void removeDiscoveryAgentsLoadedListener(IDiscoveryAgentsLoadedListener listener) {
+ listeners.remove(listener);
+ }
+
+ private void fireDiscoveryAgentsLoaded() {
+ for (IDiscoveryAgentsLoadedListener listener : listeners) {
+ listener.agentsAreLoaded();
+ }
+ }
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Wed Jul 21 12:11:48 2010 -0500
@@ -26,6 +26,7 @@
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
+import org.osgi.framework.Version;
import com.nokia.carbide.remoteconnections.Messages;
import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
@@ -220,4 +221,8 @@
currentStatus = new Status();
currentStatus.setEStatus(status.internalGetEStatus(), status.getShortDescription(), status.getLongDescription());
}
+
+ public void setDeviceOS(String familyName, Version version) {
+ // @deprecated
+ }
}
\ No newline at end of file
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractPackageInstallerProvider.java Wed Jul 21 12:11:48 2010 -0500
@@ -16,27 +16,36 @@
*/
package com.nokia.carbide.remoteconnections.interfaces;
-import com.nokia.carbide.installpackages.InstallPackages;
-import com.nokia.carbide.installpackages.InstallPackages.IServerData;
-import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType;
-import com.nokia.carbide.remoteconnections.Messages;
-import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
-import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.osgi.framework.Version;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
+import com.nokia.carbide.installpackages.InstallPackages;
+import com.nokia.carbide.installpackages.InstallPackages.IServerData;
+import com.nokia.carbide.installpackages.gen.InstallPackages.PackageType;
+import com.nokia.carbide.remoteconnections.Messages;
+import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
+@SuppressWarnings("deprecation")
public abstract class AbstractPackageInstallerProvider implements IRemoteAgentInstallerProvider {
public class PackageTypeInstaller implements IRemoteAgentInstaller {
@@ -165,11 +174,14 @@
private List packageList;
private Map imageCache;
+ /**
+ * @deprecated
+ */
protected abstract IServerData getServerData();
public List getSDKFamilyNames(IRunnableContext runnableContext) {
if (packages == null)
- packages = new InstallPackages(getServerData(), runnableContext);
+ packages = new InstallPackages(getService(), runnableContext);
Set sdkFamilyNames = new HashSet();
packageList = packages.getAvailablePackageList();
if (packageList == null)
@@ -179,30 +191,28 @@
sdkFamilyNames.add(sdkFamily);
}
List sdkFamilyNameList = new ArrayList(sdkFamilyNames);
- Collections.sort(sdkFamilyNameList);
+ Collections.sort(sdkFamilyNameList, packages.getSDKFamilyComparator());
return sdkFamilyNameList;
}
- @SuppressWarnings("unchecked")
- public List getVersions(String familyName) {
- Set versions = new HashSet();
+ public List getVersions(String familyName) {
+ Set versions = new HashSet();
for (PackageType packageType : packageList) {
if (packageType.getSdkFamily().equals(familyName)) {
try {
- versions.add(new Version(packageType.getSdkVersion()));
+ versions.add(packageType.getSdkVersion());
}
catch (IllegalArgumentException e) {
RemoteConnectionsActivator.logError(e);
}
}
}
- List versionList = new ArrayList(versions);
- Collections.sort(versionList);
- Collections.reverse(versionList);
+ List versionList = new ArrayList(versions);
+ Collections.sort(versionList, packages.getSDKVersionComparator());
return versionList;
}
- public List getRemoteAgentInstallers(String familyName, Version version) {
+ public List getRemoteAgentInstallers(String familyName, String version) {
Set installers = new HashSet();
if (packageList == null) {
getSDKFamilyNames(null);
@@ -210,7 +220,7 @@
for (PackageType packageType : packageList) {
if (packageType.getSdkFamily().equals(familyName)) {
try {
- if (version.equals(new Version(packageType.getSdkVersion()))) {
+ if (version.equals(packageType.getSdkVersion())) {
installers.add(new PackageTypeInstaller(packages, packageType));
}
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectedService.java Wed Jul 21 12:11:48 2010 -0500
@@ -20,6 +20,8 @@
import org.osgi.framework.Version;
+import com.nokia.carbide.remoteconnections.internal.api.IConnectedService2;
+
/**
* An interface for a service connected to a remote agent via a connection
*/
@@ -87,6 +89,8 @@
* Set the device OS values, to potentially affect the information for the user.
* @param familyName
* @param version
+ * @deprecated
+ * @see IConnectedService2#setDeviceOS(String, String)
*/
void setDeviceOS(String familyName, Version version);
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Wed Jul 21 12:11:48 2010 -0500
@@ -177,11 +177,13 @@
IConnection getCurrentConnection();
/**
- * Returns the IClientServiceSiteUI2 for a service. Filters connection types to those that
- * are supported by the service. Connection list UI as well as new and edit wizards are filtered.
+ * Returns the IClientServiceSiteUI2 for selecting a connection.
* Allows selecting a "current" connection which maps to #getCurrentConnection()
- * when you use #ensureConenction().
- * @param service IService
+ * when you use #ensureConnection().
+ *
+ * Optionally filters connection types to those that are supported by the
+ * service. Connection list UI as well as new and edit wizards are filtered.
+ * @param service IService or null
* @return IClientServiceSiteUI2
* @since 2.5
*/
@@ -189,7 +191,7 @@
/**
* Can be called by specific service implementors (e.g., debugger) to ensure some connection
- * exists and supports this service. If the connection does not exist or does not support
+ * exists and optionally supports this service. If the connection does not exist or does not support
* the service, a CoreException may be thrown after the framework attempts to allow the user
* to correct the situation by showing a connection selection dialog.
* If an ISelectedConnectionInfo is returned, {@link ISelectedConnectionInfo#getConnection()}
@@ -197,7 +199,7 @@
* and {@link ISelectedConnectionInfo#getStorableId()} is the id that can
* be stored by the caller that represents the user's selection.
* @param connectionId String
- * @param service IService
+ * @param service IService or null
* @return ISelectedConnectionInfo
* @throws CoreException
* @since 2.5
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IRemoteAgentInstallerProvider.java Wed Jul 21 12:11:48 2010 -0500
@@ -112,7 +112,7 @@
* @param familyName String
* @return List
*/
- List getVersions(String familyName);
+ List getVersions(String familyName);
/**
* Return the IRemoteAgentInstaller objects for a given sdk family + version qualifier
@@ -120,7 +120,7 @@
* @param version
* @return
*/
- List getRemoteAgentInstallers(String familyName, Version version);
+ List getRemoteAgentInstallers(String familyName, String version);
/**
* Dispose this provider
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ToggleDiscoveryAgentAction.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ToggleDiscoveryAgentAction.java Wed Jul 21 12:11:48 2010 -0500
@@ -0,0 +1,59 @@
+/**
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.carbide.remoteconnections.internal;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+
+import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
+import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent;
+
+public class ToggleDiscoveryAgentAction extends Action {
+
+ private final IDeviceDiscoveryAgent agent;
+
+ public ToggleDiscoveryAgentAction(IDeviceDiscoveryAgent agent) {
+ this.agent = agent;
+ setChecked(agent.isRunning());
+ }
+
+ @Override
+ public void run() {
+ try {
+ if (agent.isRunning())
+ agent.stop();
+ else
+ agent.start();
+ setChecked(agent.isRunning());
+ } catch (CoreException e) {
+ RemoteConnectionsActivator.logError(e);
+ }
+ }
+
+ @Override
+ public int getStyle() {
+ return IAction.AS_CHECK_BOX;
+ }
+
+ @Override
+ public String getText() {
+ return agent.getDisplayName();
+ }
+}
+
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IConnectedService2.java Wed Jul 21 12:11:48 2010 -0500
@@ -28,6 +28,13 @@
public interface IConnectedService2 extends IConnectedService {
/**
+ * Set the device OS values, to potentially affect the information for the user.
+ * @param familyName
+ * @param version
+ */
+ void setDeviceOS(String familyName, String version);
+
+ /**
* Return the properties for this connected service
* @return Map
*/
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IDeviceDiscoveryAgent.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IDeviceDiscoveryAgent.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IDeviceDiscoveryAgent.java Wed Jul 21 12:11:48 2010 -0500
@@ -87,6 +87,18 @@
*/
IPrerequisiteStatus getPrerequisiteStatus();
+ /**
+ * Return whether this discovery agent is running
+ * @return boolean
+ */
+ boolean isRunning();
+
+ /**
+ * The unique id for this agent
+ * @return String
+ */
+ String getId();
+
// In addition, there may need to be an additional API to do a deeper form of discovery for
// connection mechanisms that require pairing (like BT or Wifi). In these cases, normal discovery
// will probably be for already paired devices, however, the user will want to discover all
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Jul 21 12:11:48 2010 -0500
@@ -301,7 +301,11 @@
if (listeners == null)
return;
for (IConnectionsManagerListener listener : listeners) {
- listener.connectionStoreChanged();
+ try {
+ listener.connectionStoreChanged();
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -451,7 +455,11 @@
if (listeners == null)
return;
for (IConnectionsManagerListener listener : listeners) {
- listener.displayChanged();
+ try {
+ listener.displayChanged();
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -494,7 +502,11 @@
if (connectionListeners == null)
return;
for (IConnectionListener listener : connectionListeners) {
- listener.connectionAdded(connection);
+ try {
+ listener.connectionAdded(connection);
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -502,7 +514,11 @@
if (connectionListeners == null)
return;
for (IConnectionListener listener : connectionListeners) {
- listener.connectionRemoved(connection);
+ try {
+ listener.connectionRemoved(connection);
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -510,12 +526,15 @@
if (connectionListeners == null)
return;
for (IConnectionListener listener : connectionListeners) {
- listener.currentConnectionSet(connection);
+ try {
+ listener.currentConnectionSet(connection);
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
public ISelectedConnectionInfo ensureConnection(String id, IService service) throws CoreException {
- Check.checkArg(service);
final boolean wasCurrentConnection = CURRENT_CONNECTION_ID.equals(id);
final IConnection[] connectionHolder = { findConnection(id) };
final String[] storableIdHolder = { id };
@@ -566,7 +585,7 @@
private boolean isCompatibleConnection(IConnection connection, IService service) {
if (connection == null)
return false;
- return getCompatibleServices(connection.getConnectionType()).contains(service);
+ return service == null || getCompatibleServices(connection.getConnectionType()).contains(service);
}
public void setCurrentConnection(IConnection connection) {
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Wed Jul 21 12:11:48 2010 -0500
@@ -66,7 +66,6 @@
private Map connectionNames;
public ClientServiceSiteUI2(IService service) {
- Check.checkArg(service);
this.service = service;
}
@@ -297,11 +296,15 @@
private void getCompatibleConnectionTypes() {
compatibleConnectionTypes = new HashSet();
- Collection compatibleTypeIds =
- Registry.instance().getCompatibleConnectionTypeIds(service);
- for (String typeId : compatibleTypeIds) {
- compatibleConnectionTypes.add(
- Registry.instance().getConnectionType(typeId));
+ if (service != null) {
+ Collection compatibleTypeIds =
+ Registry.instance().getCompatibleConnectionTypeIds(service);
+ for (String typeId : compatibleTypeIds) {
+ compatibleConnectionTypes.add(
+ Registry.instance().getConnectionType(typeId));
+ }
+ } else {
+ compatibleConnectionTypes.addAll(Registry.instance().getConnectionTypes());
}
}
@@ -317,12 +320,15 @@
public IStatus getSelectionStatus() {
String requiredConnectionTypes = getAllowedConnectionTypesString();
+ String serviceName = service != null ? service.getDisplayName()
+ : Messages.getString("ClientServiceSiteUI2.NoConnectionErrorPlaceholderForNoServiceName"); //$NON-NLS-1$
+
// no selection yet...?
if (connection == null) {
return new Status(IStatus.ERROR, RemoteConnectionsActivator.PLUGIN_ID,
MessageFormat.format(
Messages.getString("ClientServiceSiteUI2.NoConnectionError"), //$NON-NLS-1$
- service.getDisplayName(),
+ serviceName,
requiredConnectionTypes));
}
@@ -333,26 +339,28 @@
return new Status(IStatus.ERROR, RemoteConnectionsActivator.PLUGIN_ID,
MessageFormat.format(
Messages.getString("ClientServiceSiteUI2.NoCurrentConnection"), //$NON-NLS-1$
- service.getDisplayName(),
+ serviceName,
requiredConnectionTypes));
}
- // is the service supported?
- boolean found = false;
- for (IConnectedService aService : Registry.instance().getConnectedServices(actual)) {
- if (service.getIdentifier().equals(aService.getService().getIdentifier())) {
- found = true;
- break;
+ if (service != null) {
+ // is the service supported?
+ boolean found = false;
+ for (IConnectedService aService : Registry.instance().getConnectedServices(actual)) {
+ if (service.getIdentifier().equals(aService.getService().getIdentifier())) {
+ found = true;
+ break;
+ }
}
- }
- if (!found) {
- return new Status(IStatus.WARNING, RemoteConnectionsActivator.PLUGIN_ID,
- MessageFormat.format(
- Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionService") //$NON-NLS-1$
- + "\n" //$NON-NLS-1$
- + Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionFixupAdvice"), //$NON-NLS-1$
- actual.getDisplayName(),
- service.getDisplayName()));
+ if (!found) {
+ return new Status(IStatus.WARNING, RemoteConnectionsActivator.PLUGIN_ID,
+ MessageFormat.format(
+ Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionService") //$NON-NLS-1$
+ + "\n" //$NON-NLS-1$
+ + Messages.getString("ClientServiceSiteUI2.IncompatibleCurrentConnectionFixupAdvice"), //$NON-NLS-1$
+ actual.getDisplayName(),
+ serviceName));
+ }
}
// is the hardware type supported by the service?
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Wed Jul 21 12:11:48 2010 -0500
@@ -23,6 +23,7 @@
import java.util.Comparator;
import java.util.List;
+import org.eclipse.jface.action.IContributionManager;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
@@ -518,7 +519,9 @@
*/
@Override
public void update() {
- getParent().update(true);
+ IContributionManager parent = getParent();
+ if (parent != null)
+ parent.update(true);
}
/**
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Wed Jul 21 12:11:48 2010 -0500
@@ -16,6 +16,7 @@
ClientServiceSiteUI2.NewButtonLabel=New...
ClientServiceSiteUI2.UseConnectionGroupLabel=Use connection
ClientServiceSiteUI2.NoConnectionError=A valid remote connection must be selected. If none exist, connect a device or create a connection one supporting {0} via {1}.
+ClientServiceSiteUI2.NoConnectionErrorPlaceholderForNoServiceName=connecting
ClientServiceSiteUI2.NoCurrentConnection=No current connection is available. Connect a device or create a connection supporting {0} via {1}.
ClientServiceSiteUI2.IncompatibleCurrentConnectionType=The current connection ''{0}'' does not support connection type: ''{1}''.
ClientServiceSiteUI2.IncompatibleCurrentConnectionService=The current connection ''{0}'' does not support the service: ''{1}''.
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Wed Jul 21 12:11:48 2010 -0500
@@ -83,30 +83,31 @@
import org.eclipse.ui.PlatformUI;
import org.osgi.framework.Version;
-import com.nokia.carbide.installpackages.InstallPackages;
import com.nokia.carbide.remoteconnections.Messages;
import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
import com.nokia.carbide.remoteconnections.interfaces.AbstractConnectedService2;
import com.nokia.carbide.remoteconnections.interfaces.IConnectedService;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener;
import com.nokia.carbide.remoteconnections.interfaces.IConnection;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory.IValidationErrorReporter;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2.ISettingsChangedListener;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionType;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionTypeProvider;
import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider;
+import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller;
+import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller.IPackageContents;
import com.nokia.carbide.remoteconnections.interfaces.IService;
import com.nokia.carbide.remoteconnections.interfaces.IService2;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory.IValidationErrorReporter;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectionFactory2.ISettingsChangedListener;
-import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller;
-import com.nokia.carbide.remoteconnections.interfaces.IRemoteAgentInstallerProvider.IRemoteAgentInstaller.IPackageContents;
+import com.nokia.carbide.remoteconnections.internal.api.IConnectedService2;
import com.nokia.carbide.remoteconnections.internal.registry.Registry;
import com.nokia.cpp.internal.api.utils.core.Check;
import com.nokia.cpp.internal.api.utils.core.FileUtils;
import com.nokia.cpp.internal.api.utils.core.HostOS;
+import com.nokia.cpp.internal.api.utils.core.ObjectUtils;
import com.nokia.cpp.internal.api.utils.core.Pair;
import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
@@ -307,20 +308,20 @@
@SuppressWarnings("unchecked")
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) deviceOSComboViewer.getSelection();
- Pair pair = (Pair) selection.getFirstElement();
+ Pair pair = (Pair) selection.getFirstElement();
setSelectionToInstallComposite(pair);
- if (connectedService != null)
- connectedService.setDeviceOS(pair.first, pair.second);
+ if (connectedService instanceof IConnectedService2)
+ ((IConnectedService2) connectedService).setDeviceOS(pair.first, pair.second);
}
});
deviceOSComboViewer.setContentProvider(new ArrayContentProvider());
deviceOSComboViewer.setLabelProvider(new LabelProvider() {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public String getText(Object element) {
Check.checkState(element instanceof Pair);
Pair pair = (Pair) element;
- return MessageFormat.format("{0} {1}", pair.first, InstallPackages.formatSDKVersion(pair.second)); //$NON-NLS-1$
+ return MessageFormat.format("{0} {1}", pair.first, pair.second); //$NON-NLS-1$
}
});
deviceOSComboViewer.getControl().setToolTipText(Messages.getString("ConnectionSettingsPage.DeviceOSComboToolTip")); //$NON-NLS-1$
@@ -446,9 +447,6 @@
String label = ((IRemoteAgentInstaller) value).getLabel();
return label == null ? Messages.getString("ConnectionSettingsPage.UnlabeledPackageLabel") : label; //$NON-NLS-1$
}
- if (value instanceof Version)
- return InstallPackages.formatSDKVersion((Version) value);
-
return value.toString();
}
@@ -715,7 +713,7 @@
}
// update sdk combo
- List> deviceOSPairs = createDeviceOSPairs();
+ List> deviceOSPairs = createDeviceOSPairs();
deviceOSComboViewer.setInput(deviceOSPairs);
if (!deviceOSPairs.isEmpty()) {
deviceOSComboViewer.getCombo().select(0);
@@ -737,7 +735,7 @@
}
- protected void setSelectionToInstallComposite(Pair pair) {
+ protected void setSelectionToInstallComposite(Pair pair) {
Object input = installerTreeViewer.getInput();
if (input instanceof TreeNode[]) {
TreeNode node = findTreeNodeForPair((TreeNode[]) input, pair);
@@ -748,14 +746,14 @@
}
}
- @SuppressWarnings("unchecked")
- private TreeNode findTreeNodeForPair(TreeNode[] treeNodes, Pair pair) {
+ private TreeNode findTreeNodeForPair(TreeNode[] treeNodes, Pair pair) {
for (TreeNode treeNode : treeNodes) {
Object value = treeNode.getValue();
if (value instanceof IRemoteAgentInstaller) {
TreeNode versionNode = treeNode.getParent();
TreeNode familyNode = versionNode.getParent();
- if (pair.equals(new Pair(familyNode.getValue(), versionNode.getValue())))
+ if (ObjectUtils.equals(pair.first, familyNode.getValue()) &&
+ ObjectUtils.equals(pair.second, versionNode.getValue()))
return treeNode;
}
TreeNode[] children = treeNode.getChildren();
@@ -786,9 +784,10 @@
connectedService =
Registry.instance().createConnectedService(service, connection);
IStructuredSelection selection = (IStructuredSelection) deviceOSComboViewer.getSelection();
- Pair pair = (Pair) selection.getFirstElement();
- if (pair != null)
- connectedService.setDeviceOS(pair.first, pair.second);
+ Pair pair = (Pair) selection.getFirstElement();
+ if (pair != null && connectedService instanceof IConnectedService2) {
+ ((IConnectedService2) connectedService).setDeviceOS(pair.first, pair.second);
+ }
connectedService.addStatusChangedListener(statusListener = new IStatusChangedListener() {
public void statusChanged(final IStatus status) {
Display.getDefault().asyncExec(new Runnable() {
@@ -899,12 +898,12 @@
private void createFamilySubNodes(TreeNode familyNode, IRemoteAgentInstallerProvider installerProvider) {
String familyName = familyNode.getValue().toString();
- List versions = installerProvider.getVersions(familyName);
+ List versions = installerProvider.getVersions(familyName);
List childList = new ArrayList();
TreeNode[] children = familyNode.getChildren();
if (children != null)
childList.addAll(Arrays.asList(children));
- for (Version version : versions) {
+ for (String version : versions) {
TreeNode versionNode = getVersionNode(familyNode, version);
if (versionNode == null) {
versionNode = new TreeNode(version);
@@ -916,7 +915,7 @@
familyNode.setChildren((TreeNode[]) childList.toArray(new TreeNode[childList.size()]));
}
- private TreeNode getVersionNode(TreeNode familyNode, Version version) {
+ private TreeNode getVersionNode(TreeNode familyNode, String version) {
TreeNode[] children = familyNode.getChildren();
if (children != null) {
for (TreeNode node : children) {
@@ -929,7 +928,7 @@
private void createInstallerNodes(TreeNode versionNode, IRemoteAgentInstallerProvider installerProvider) {
String familyName = versionNode.getParent().getValue().toString();
- Version version = (Version) versionNode.getValue();
+ String version = versionNode.getValue().toString();
List installers =
installerProvider.getRemoteAgentInstallers(familyName, version);
List childList = new ArrayList();
@@ -944,14 +943,14 @@
versionNode.setChildren((TreeNode[]) childList.toArray(new TreeNode[childList.size()]));
}
- private synchronized List> createDeviceOSPairs() {
- List> deviceOSPairs = new ArrayList>();
+ private synchronized List> createDeviceOSPairs() {
+ List> deviceOSPairs = new ArrayList>();
for (IRemoteAgentInstallerProvider installerProvider : installerProviders) {
List familyNames = installerProvider.getSDKFamilyNames(null);
for (String familyName : familyNames) {
- List versions = installerProvider.getVersions(familyName);
- for (Version version : versions) {
- Pair pair = new Pair(familyName, version);
+ List versions = installerProvider.getVersions(familyName);
+ for (String version : versions) {
+ Pair pair = new Pair(familyName, version);
if (!deviceOSPairs.contains(pair))
deviceOSPairs.add(pair);
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionTypePage.java Wed Jul 21 12:11:48 2010 -0500
@@ -161,7 +161,7 @@
return getConnectionType().getDescription();
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
private int getCurrentTypeIndex() {
IConnection connectionToEdit = settingsWizard.getConnectionToEdit();
if (connectionToEdit != null) {
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Wed Jul 21 12:11:48 2010 -0500
@@ -43,6 +43,7 @@
import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.ICellEditorListener;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -76,19 +77,22 @@
import com.nokia.carbide.remoteconnections.Messages;
import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
+import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.IDiscoveryAgentsLoadedListener;
import com.nokia.carbide.remoteconnections.interfaces.IConnectedService;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
+import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener;
import com.nokia.carbide.remoteconnections.interfaces.IConnection;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionType;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener;
-import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionListener;
import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionsManagerListener;
+import com.nokia.carbide.remoteconnections.internal.ToggleDiscoveryAgentAction;
import com.nokia.carbide.remoteconnections.internal.api.IConnection2;
import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus;
+import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus;
import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatusChangedListener;
-import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus;
+import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent;
import com.nokia.carbide.remoteconnections.internal.registry.Registry;
import com.nokia.carbide.remoteconnections.internal.ui.ConnectionUIUtils;
import com.nokia.carbide.remoteconnections.settings.ui.SettingsWizard;
@@ -111,6 +115,7 @@
private List actions;
private List connectionSelectedActions;
private List serviceSelectedActions;
+ private List discoveryAgentActions;
private static final String UID = ".uid"; //$NON-NLS-1$
private static final ImageDescriptor CONNECTION_NEW_IMGDESC = RemoteConnectionsActivator.getImageDescriptor("icons/connectionNew.png"); //$NON-NLS-1$
@@ -131,7 +136,9 @@
// handle, do not dispose
private Font boldViewerFont;
-
+ private TextCellEditor nameEditor;
+ private boolean refreshPending;
+
private TreeNode[] loadConnections() {
if (serviceToListenerMap == null)
serviceToListenerMap = new HashMap();
@@ -146,7 +153,7 @@
IConnectionStatusChangedListener statusChangedListener =
new IConnectionStatusChangedListener() {
public void statusChanged(IConnectionStatus status) {
- handleStatusChanged();
+ refreshViewer();
}
};
IConnection2 connection2 = (IConnection2) connection;
@@ -163,7 +170,7 @@
final TreeNode treeNode = new TreeNode(connectedService);
IStatusChangedListener statusChangedListener = new IStatusChangedListener() {
public void statusChanged(final IStatus status) {
- handleStatusChanged();
+ refreshViewer();
}
};
connectedService.addStatusChangedListener(statusChangedListener);
@@ -181,23 +188,42 @@
return (TreeNode[]) connectionNodes.toArray(new TreeNode[connectionNodes.size()]);
}
- private void handleStatusChanged() {
+ private void refreshViewer() {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
+ if (nameEditor != null && nameEditor.isActivated()) {
+ refreshPending = true;
+ return;
+ }
+
if (!isDisposed && !viewer.getControl().isDisposed()) {
viewer.refresh(true);
packColumns();
}
+ refreshPending = false;
}
});
}
private class NameEditingSupport extends EditingSupport {
- private TextCellEditor editor;
private NameEditingSupport(ColumnViewer viewer) {
super(viewer);
- editor = new TextCellEditor((Composite) viewer.getControl(), SWT.BORDER);
+ nameEditor = new TextCellEditor((Composite) viewer.getControl(), SWT.BORDER);
+ nameEditor.addListener(new ICellEditorListener() {
+ public void editorValueChanged(boolean oldValidState, boolean newValidState) {
+ }
+
+ public void cancelEditor() {
+ if (refreshPending)
+ refreshViewer();
+ }
+
+ public void applyEditorValue() {
+ if (refreshPending)
+ refreshViewer();
+ }
+ });
}
@Override
@@ -210,7 +236,7 @@
@Override
protected CellEditor getCellEditor(Object element) {
- return editor;
+ return nameEditor;
}
@Override
@@ -223,8 +249,6 @@
protected void setValue(Object element, Object value) {
IConnection connection = (IConnection) ((TreeNode) element).getValue();
connection.setDisplayName(value.toString());
- //viewer.refresh(true);
- //packColumns();
Registry.instance().updateDisplays();
Registry.instance().storeConnections();
}
@@ -544,12 +568,7 @@
}
public void displayChanged() {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- viewer.refresh(true);
- packColumns();
- }
- });
+ refreshViewer();
}
};
Registry.instance().addConnectionStoreChangedListener(connectionStoreChangedListener);
@@ -557,12 +576,7 @@
connectionListener = new IConnectionListener() {
public void currentConnectionSet(IConnection connection) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- viewer.refresh(true);
- packColumns();
- }
- });
+ refreshViewer();
}
public void connectionRemoved(IConnection connection) {
@@ -624,8 +638,30 @@
fillLocalToolBar(bars.getToolBarManager());
}
- private void fillLocalPullDown(IMenuManager manager) {
- // nothing for now
+ private void fillLocalPullDown(final IMenuManager manager) {
+ if (discoveryAgentActions.isEmpty()) {
+ IDiscoveryAgentsLoadedListener listener = new IDiscoveryAgentsLoadedListener() {
+ public void agentsAreLoaded() {
+ makeToggleDiscoveryAgentActions();
+ addDiscoveryAgentActions(manager);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ manager.update(true);
+ }
+ });
+ }
+ };
+ RemoteConnectionsActivator.getDefault().addDiscoveryAgentsLoadedListener(listener);
+ }
+ else {
+ addDiscoveryAgentActions(manager);
+ }
+ }
+
+ private void addDiscoveryAgentActions(IMenuManager manager) {
+ for (Action action : discoveryAgentActions) {
+ manager.add(action);
+ }
}
private void fillContextMenu(IMenuManager manager) {
@@ -827,8 +863,19 @@
enableConnectionSelectedActions(false);
enableServiceSelectedActions(false);
+
+ makeToggleDiscoveryAgentActions();
}
+ private void makeToggleDiscoveryAgentActions() {
+ discoveryAgentActions = new ArrayList();
+ Collection discoveryAgents = RemoteConnectionsActivator.getDefault().getDiscoveryAgents();
+ for (IDeviceDiscoveryAgent agent : discoveryAgents) {
+ discoveryAgentActions.add(new ToggleDiscoveryAgentAction(agent));
+ }
+
+ }
+
private void enableConnectionSelectedActions(boolean enable) {
for (Action action : connectionSelectedActions) {
action.setEnabled(enable);
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/InputStream.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/InputStream.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/InputStream.h Wed Jul 21 12:11:48 2010 -0500
@@ -103,7 +103,7 @@
void SetClientId(long id);
BOOL Open(DWORD dwSize, CHAR *filePath);
BOOL Init();
- Close();
+ void Close();
long m_ClientID;
HANDLE m_hFile; // handle from CreateFile
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCConstants.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCConstants.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCConstants.h Wed Jul 21 12:11:48 2010 -0500
@@ -19,23 +19,29 @@
#include
+#ifdef _MSC_VER
+#define LL(x) x##i64
+#else
+#define LL(x) x##LL
+#endif
+
// com.nokia.tcf.api.ITCConnection.java
-#define DEFAULT_COMM_ERROR_RETRY_INTERVAL 1i64
-#define DEFAULT_COMM_ERROR_RETRY_TIMEOUT 300i64
+#define DEFAULT_COMM_ERROR_RETRY_INTERVAL LL(1)
+#define DEFAULT_COMM_ERROR_RETRY_TIMEOUT LL(300)
// com.nokia.tcf.api.ITCMessageOptions.java
-#define DESTINATION_INPUTSTREAM 0i64
-#define DESTINATION_CLIENTFILE 1i64
-#define DEFAULT_DESTINATION 0i64
-#define DEFAULT_INPUTSTREAM_OVERFLOW 1i64
-#define UNWRAP_LEAVE_HEADERS 0i64
-#define UNWRAP_DELETE_HEADERS 1i64
-#define DEFAULT_UNWRAP_OPTION 0i64
-#define ENCODE_NO_FORMAT 0i64
-#define ENCODE_FORMAT 1i64
-#define ENCODE_TRK_FORMAT 2i64
-#define DEFAULT_ENCODE_FORMAT 0i64
+#define DESTINATION_INPUTSTREAM LL(0)
+#define DESTINATION_CLIENTFILE LL(1)
+#define DEFAULT_DESTINATION LL(0)
+#define DEFAULT_INPUTSTREAM_OVERFLOW LL(1)
+#define UNWRAP_LEAVE_HEADERS LL(0)
+#define UNWRAP_DELETE_HEADERS LL(1)
+#define DEFAULT_UNWRAP_OPTION LL(0)
+#define ENCODE_NO_FORMAT LL(0)
+#define ENCODE_FORMAT LL(1)
+#define ENCODE_TRK_FORMAT LL(2)
+#define DEFAULT_ENCODE_FORMAT LL(0)
#define DEFAULT_OST_VERSION 1L
#endif //__TCCONSTANTS_H__
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCErrorConstants.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCErrorConstants.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/TCErrorConstants.h Wed Jul 21 12:11:48 2010 -0500
@@ -44,7 +44,7 @@
#define TCAPI_ERR_MEDIA_IS_BUSY 20 // used for Trace bpx when someone else is connected
#define TCAPI_ERR_PROTOCOL_NOT_SUPPORTED_BY_MEDIA 21 // TraceBox does not support protocol
#define TCAPI_ERR_FEATURE_NOT_IMPLEMENTED 22 // API feature not implemented yet
- #define TCAPI_ERR_COMM_ERROR 23 // error while polling/reading COMM port
+ #define TCAPI_ERR_COMM_ERROR 23 // error while writing/polling/reading COMM port (h/w)
#define TCAPI_ERR_COMM_TIMEOUT 24 // comm error retry timeout
#define TCAPI_ERR_COMM_MULTIPLE_OPEN 25 // there are multiple connections open - cannot attach
#define TCAPI_ERR_NO_COMM_OPEN 26 // there are no connections open - cannot attach
@@ -82,5 +82,6 @@
#define TCAPI_INFO_TRACEBOX_MEMORY_IS_NORMAL 58 // TRACEBOX buffer overflowed and is now closed
#define TCAPI_ERR_TRACEBOX_DATA_CORRUPTED 59 // TRACEBOX received corrupted trace data from phone
#define TCAPI_ERR_TRACEBOX_PROTOCOL_MEMORY_OVERFLOW 60 // TRACEBOX protocol processing buffer overflowed - fatal
+ #define TCAPI_ERR_COMM_ERROR_DEVICE_NOT_READING 61 // target device not reading output from TCF (USB)
#endif //__TCERRORCONSTANTS_H__
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/mutex.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/mutex.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/mutex.h Wed Jul 21 12:11:48 2010 -0500
@@ -38,4 +38,4 @@
DWORD m_waitTimeout;
BOOL m_mutexOpen;
};
-#endif __MUTEX_H__
+#endif //__MUTEX_H__
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/shareddata.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/shareddata.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/shareddata.h Wed Jul 21 12:11:48 2010 -0500
@@ -25,7 +25,7 @@
BOOL Open(DWORD dwSize, CHAR *sharedName);
BOOL Open(HANDLE hFile, DWORD dwSize, CHAR *sharedName);
- Close();
+ void Close();
virtual BOOL Init();
LPVOID GetDataPtr();
BOOL IsCreator();
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Source/InputStream.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/InputStream.cpp Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/InputStream.cpp Wed Jul 21 12:11:48 2010 -0500
@@ -982,7 +982,7 @@
return fOk;
}
-CInputStreamFile::Close()
+void CInputStreamFile::Close()
{
// close all mapping handles
CSharedData::Close();
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/Common/Source/shareddata.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/shareddata.cpp Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/Common/Source/shareddata.cpp Wed Jul 21 12:11:48 2010 -0500
@@ -107,7 +107,7 @@
}
return fOK;
}
-CSharedData::Close()
+void CSharedData::Close()
{
BOOL fIgnore = FALSE;
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.cpp Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.cpp Wed Jul 21 12:11:48 2010 -0500
@@ -23,6 +23,9 @@
#include "TCErrorConstants.h"
#include "resource.h"
#include
+#ifdef _PSAPI_PRESENT
+ #include
+#endif
#ifdef _DEBUG
extern BOOL gDoLogging;
@@ -201,6 +204,99 @@
m_DebugLog = NULL;
}
}
+
+#ifdef _PSAPI_PRESENT
+void
+CClientManager::FindOrCreateRunningServer()
+{
+ TCDEBUGOPEN();
+ TCDEBUGLOGS("CClientManager::FindOrCreateRunningServer: searching for existing TCFServer.exe\n");
+
+ // Directory where TCFServer.exe lives
+ char exeDirectory[MAX_DLLPATHNAME] = {0};
+
+ BOOL foundRunningServer = FALSE;
+
+ // Get the list of process identifiers.
+
+ DWORD aProcesses[1024], cbNeeded, cProcesses;
+ unsigned int i;
+
+ if ( EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )
+ {
+ // Calculate how many process identifiers were returned.
+
+ cProcesses = cbNeeded / sizeof(DWORD);
+
+ // Find existing TCFServer
+ for ( i = 0; i < cProcesses; i++ )
+ {
+ if( aProcesses[i] != 0 )
+ {
+ TCHAR szProcessName[MAX_PATH] = TEXT("");
+
+ // Get a handle to the process.
+ HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
+ PROCESS_VM_READ,
+ FALSE, aProcesses[i] );
+
+ // Get the process name.
+ if (NULL != hProcess )
+ {
+ HMODULE hMod;
+ DWORD cbNeeded;
+
+ if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod),
+ &cbNeeded) )
+ {
+ if (GetModuleBaseNameA( hProcess, hMod, szProcessName,
+ sizeof(szProcessName)/sizeof(char) ))
+ {
+ if (strcmp(SERVER_PROCESS_NAME, szProcessName) == 0)
+ {
+ // get the full path
+ GetModuleFileNameExA(hProcess, hMod, exeDirectory,
+ sizeof(exeDirectory)/sizeof(char) );
+
+ TCDEBUGLOGA1("Found TCFServer at %s\n", exeDirectory);
+ CloseHandle( hProcess );
+ foundRunningServer = TRUE;
+ break;
+ }
+ }
+ }
+ }
+
+ CloseHandle( hProcess );
+ }
+ }
+ }
+
+ if (!foundRunningServer)
+ {
+ // start the one next to the DLL
+ strncpy(exeDirectory, m_DllLocation, strlen(m_DllLocation) + 1);
+ size_t len = strlen(exeDirectory);
+ // remove file
+ for (int i = len-1; i > 0; i--)
+ {
+ if (exeDirectory[i] == PATH_DELIMITER)
+ break;
+ }
+ exeDirectory[i] = NULL;
+ }
+
+ m_ServerExeFile = new char[MAX_DLLPATHNAME];
+ sprintf(m_ServerExeFile, "\"%s%c%s\"", exeDirectory, PATH_DELIMITER, SERVER_PROCESS_NAME);
+
+ m_ServerLockFile = new char[MAX_DLLPATHNAME];
+ sprintf(m_ServerLockFile, "%s%c%s", exeDirectory, PATH_DELIMITER, SERVER_LOCKFILE_NAME);
+
+ TCDEBUGCLOSE();
+
+}
+#endif
+
CErrorMonitor*
CClientManager::FindErrorMonitor(long inClientId)
{
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/ClientManager.h Wed Jul 21 12:11:48 2010 -0500
@@ -59,6 +59,9 @@
virtual ~CClientManager();
// starting/stopping server
+#ifdef _PSAPI_PRESENT
+ void FindOrCreateRunningServer();
+#endif
BOOL StartServer(pServerProcessData pData);
BOOL StopServer(pServerProcessData pData);
long StartServer();
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCAPIConnectionJni.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCAPIConnectionJni.cpp Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCAPIConnectionJni.cpp Wed Jul 21 12:11:48 2010 -0500
@@ -1326,11 +1326,11 @@
TCDEBUGLOGA3("nativeSendMessage return ret=%d, osError=%d : %s\n", ret, osError, GetErrorText(osError));
TCDEBUGCLOSE();
- if (ret == TCAPI_ERR_COMM_ERROR && osError > 0)
- {
- jclass clazz = env->FindClass("Ljava/lang/Exception;");
- env->ThrowNew(clazz, GetErrorText(osError));
- }
+// if (ret == TCAPI_ERR_COMM_ERROR && osError > 0)
+// {
+// jclass clazz = env->FindClass("Ljava/lang/Exception;");
+// env->ThrowNew(clazz, GetErrorText(osError));
+// }
return ret;
}
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCFClient.plg
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCFClient.plg Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFClient/TCFClient.plg Wed Jul 21 12:11:48 2010 -0500
@@ -3,36 +3,134 @@
Build Log
---------------------Configuration: TCFCommSerial - Win32 Release--------------------
+--------------------Configuration: TCFClient - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60C.tmp" with contents
+Creating command line "rc.exe /l 0x409 /fo"Debug/resource.res" /d "_DEBUG" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\resource.rc""
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7C.tmp" with contents
+[
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I ".\jdk1.5.0_10\include" /I ".\jdk1.5.0_10\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCLIENT_EXPORTS" /FR"Debug/" /Fp"Debug/TCFClient.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\ClientManager.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\ErrorMonitorData.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\InputStream.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\ServerClient.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\shareddata.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\TCAPIConnectionJni.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\TCFClient.cpp"
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\TCFCppApi.cpp"
+]
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7C.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7D.tmp" with contents
+[
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I ".\jdk1.5.0_10\include" /I ".\jdk1.5.0_10\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCLIENT_EXPORTS" /FR"Debug/" /Fp"Debug/TCFClient.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFClient\StdAfx.cpp"
+]
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7D.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7E.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Release/TCFCommSerial.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib shlwapi.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFClient.pdb" /map:"Debug/TCFClient.map" /debug /machine:I386 /out:"Debug/TCFClient.dll" /implib:"Debug/TCFClient.lib" /pdbtype:sept
+.\Debug\ClientManager.obj
+.\Debug\ErrorMonitorData.obj
+.\Debug\InputStream.obj
+.\Debug\mutex.obj
+.\Debug\ServerClient.obj
+.\Debug\shareddata.obj
+.\Debug\StdAfx.obj
+.\Debug\TCAPIConnectionJni.obj
+.\Debug\TCDebugLog.obj
+.\Debug\TCFClient.obj
+.\Debug\TCFCppApi.obj
+.\Debug\resource.res
+]
+Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC7E.tmp"
+Output Window
+Compiling resources...
+Compiling...
+StdAfx.cpp
+Compiling...
+ClientManager.cpp
+ErrorMonitorData.cpp
+InputStream.cpp
+mutex.cpp
+ServerClient.cpp
+shareddata.cpp
+TCAPIConnectionJni.cpp
+TCDebugLog.cpp
+TCFClient.cpp
+TCFCppApi.cpp
+Generating Code...
+Linking...
+ Creating library Debug/TCFClient.lib and object Debug/TCFClient.exp
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC82.tmp" with contents
+[
+/nologo /o"Debug/TCFClient.bsc"
+.\Debug\StdAfx.sbr
+.\Debug\ClientManager.sbr
+.\Debug\ErrorMonitorData.sbr
+.\Debug\InputStream.sbr
+.\Debug\mutex.sbr
+.\Debug\ServerClient.sbr
+.\Debug\shareddata.sbr
+.\Debug\TCAPIConnectionJni.sbr
+.\Debug\TCDebugLog.sbr
+.\Debug\TCFClient.sbr
+.\Debug\TCFCppApi.sbr]
+Creating command line "bscmake.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC82.tmp"
+Creating browse info file...
+Output Window
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC83.bat" with contents
+[
+@echo off
+copybinaries Debug
+]
+Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC83.bat"
+copy libs
+Copy binaries to ..\..\..\os\win32\x86
+The system cannot find the path specified.
+ 0 file(s) copied.
+The system cannot find the path specified.
+ 0 file(s) copied.
+The system cannot find the path specified.
+ 0 file(s) copied.
+Error executing c:\winnt\system32\cmd.exe.
+
+
+
+Results
+TCFClient.dll - 1 error(s), 0 warning(s)
+
+--------------------Configuration: TCFCommSerial - Win32 Debug--------------------
+
+Command Lines
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC84.tmp" with contents
+[
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Debug/TCFCommSerial.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\TCFCommSerial.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60C.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60D.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC84.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC85.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Release/TCFCommSerial.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMSERIAL_EXPORTS" /Fp"Debug/TCFCommSerial.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\StdAfx.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60D.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60E.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC85.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC86.tmp" with contents
[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommSerial.pdb" /map:"Release/TCFCommSerial.map" /machine:I386 /out:"Release/TCFCommSerial.dll" /implib:"Release/TCFCommSerial.lib"
-.\Release\BaseCom.obj
-.\Release\mutex.obj
-.\Release\RealSerialComm.obj
-.\Release\StdAfx.obj
-.\Release\TCDebugLog.obj
-.\Release\TCFCommSerial.obj
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommSerial.pdb" /map:"Debug/TCFCommSerial.map" /debug /machine:I386 /out:"Debug/TCFCommSerial.dll" /implib:"Debug/TCFCommSerial.lib" /pdbtype:sept
+.\Debug\BaseCom.obj
+.\Debug\mutex.obj
+.\Debug\RealSerialComm.obj
+.\Debug\StdAfx.obj
+.\Debug\TCDebugLog.obj
+.\Debug\TCFCommSerial.obj
]
-Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP60E.tmp"
+Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC86.tmp"
Output Window
Compiling...
StdAfx.cpp
@@ -44,13 +142,13 @@
TCFCommSerial.cpp
Generating Code...
Linking...
- Creating library Release/TCFCommSerial.lib and object Release/TCFCommSerial.exp
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP612.bat" with contents
+ Creating library Debug/TCFCommSerial.lib and object Debug/TCFCommSerial.exp
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8A.bat" with contents
[
@echo off
-copyBinaries Release
+copyBinaries Debug
]
-Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP612.bat"
+Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8A.bat"
copy libs
Copy binaries to ..\..\..\os\win32\x86
The system cannot find the path specified.
@@ -66,36 +164,36 @@
Results
TCFCommSerial.dll - 1 error(s), 0 warning(s)
---------------------Configuration: TCFCommTCP - Win32 Release--------------------
+--------------------Configuration: TCFCommTCP - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP613.tmp" with contents
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8B.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /Fp"Release/TCFCommTCP.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /FR"Debug/" /Fp"Debug/TCFCommTCP.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommTCP\TCFCommTCP.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommTCP\TcpComm.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP613.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP614.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8B.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8C.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /Fp"Release/TCFCommTCP.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /I "..\Common\Headers" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMTCP_EXPORTS" /FR"Debug/" /Fp"Debug/TCFCommTCP.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommTCP\StdAfx.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP614.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP615.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8C.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8D.tmp" with contents
[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommTCP.pdb" /map:"Release/TCFCommTCP.map" /machine:I386 /out:"Release/TCFCommTCP.dll" /implib:"Release/TCFCommTCP.lib"
-.\Release\BaseCom.obj
-.\Release\mutex.obj
-.\Release\StdAfx.obj
-.\Release\TCDebugLog.obj
-.\Release\TCFCommTCP.obj
-.\Release\TcpComm.obj
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommTCP.pdb" /map:"Debug/TCFCommTCP.map" /debug /machine:I386 /out:"Debug/TCFCommTCP.dll" /implib:"Debug/TCFCommTCP.lib" /pdbtype:sept
+.\Debug\BaseCom.obj
+.\Debug\mutex.obj
+.\Debug\StdAfx.obj
+.\Debug\TCDebugLog.obj
+.\Debug\TCFCommTCP.obj
+.\Debug\TcpComm.obj
]
-Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP615.tmp"
+Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC8D.tmp"
Output Window
Compiling...
StdAfx.cpp
@@ -107,13 +205,13 @@
TcpComm.cpp
Generating Code...
Linking...
- Creating library Release/TCFCommTCP.lib and object Release/TCFCommTCP.exp
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP619.bat" with contents
+ Creating library Debug/TCFCommTCP.lib and object Debug/TCFCommTCP.exp
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC91.bat" with contents
[
@echo off
-copybinaries Release
+copybinaries Debug
]
-Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP619.bat"
+Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC91.bat"
copy libs
Copy binaries to ..\..\..\os\win32\x86
The system cannot find the path specified.
@@ -129,12 +227,12 @@
Results
TCFCommTCP.dll - 1 error(s), 0 warning(s)
---------------------Configuration: TCFCommVirtualSerial - Win32 Release--------------------
+--------------------Configuration: TCFCommVirtualSerial - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61A.tmp" with contents
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC92.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Release/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp"
@@ -142,25 +240,25 @@
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\TCFCommVirtualSerial.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\VirtualSerialComm.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61A.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61B.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC92.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC93.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Release/TCFCommVirtualSerial.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\StdAfx.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61B.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61C.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC93.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC94.tmp" with contents
[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommVirtualSerial.pdb" /map:"Release/TCFCommVirtualSerial.map" /machine:I386 /out:"Release/TCFCommVirtualSerial.dll" /implib:"Release/TCFCommVirtualSerial.lib"
-.\Release\BaseCom.obj
-.\Release\mutex.obj
-.\Release\RealSerialComm.obj
-.\Release\StdAfx.obj
-.\Release\TCDebugLog.obj
-.\Release\TCFCommVirtualSerial.obj
-.\Release\VirtualSerialComm.obj
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommVirtualSerial.pdb" /map:"Debug/TCFCommVirtualSerial.map" /debug /machine:I386 /out:"Debug/TCFCommVirtualSerial.dll" /implib:"Debug/TCFCommVirtualSerial.lib" /pdbtype:sept
+.\Debug\BaseCom.obj
+.\Debug\mutex.obj
+.\Debug\RealSerialComm.obj
+.\Debug\StdAfx.obj
+.\Debug\TCDebugLog.obj
+.\Debug\TCFCommVirtualSerial.obj
+.\Debug\VirtualSerialComm.obj
]
-Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP61C.tmp"
+Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC94.tmp"
Output Window
Compiling...
StdAfx.cpp
@@ -173,13 +271,13 @@
VirtualSerialComm.cpp
Generating Code...
Linking...
- Creating library Release/TCFCommVirtualSerial.lib and object Release/TCFCommVirtualSerial.exp
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP620.bat" with contents
+ Creating library Debug/TCFCommVirtualSerial.lib and object Debug/TCFCommVirtualSerial.exp
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC98.bat" with contents
[
@echo off
-copyBinaries Release
+copyBinaries Debug
]
-Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP620.bat"
+Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC98.bat"
copy libs
Copy binaries to ..\..\..\os\win32\x86
The system cannot find the path specified.
@@ -195,32 +293,32 @@
Results
TCFCommVirtualSerial.dll - 1 error(s), 0 warning(s)
---------------------Configuration: TCFProtOST - Win32 Release--------------------
+--------------------Configuration: TCFProtOST - Win32 Debug--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP621.tmp" with contents
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC99.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Release/TCFProtOST.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Debug/TCFProtOST.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseProtocol.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFProtOST\OSTProtocol.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFProtOST\TCFProtOST.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP621.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP622.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC99.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9A.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Release/TCFProtOST.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFPROTOST_EXPORTS" /Fp"Debug/TCFProtOST.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFProtOST\StdAfx.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP622.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP623.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9A.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9B.tmp" with contents
[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFProtOST.pdb" /map:"Release/TCFProtOST.map" /machine:I386 /out:"Release/TCFProtOST.dll" /implib:"Release/TCFProtOST.lib"
-.\Release\BaseProtocol.obj
-.\Release\OSTProtocol.obj
-.\Release\StdAfx.obj
-.\Release\TCFProtOST.obj
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFProtOST.pdb" /map:"Debug/TCFProtOST.map" /debug /machine:I386 /out:"Debug/TCFProtOST.dll" /implib:"Debug/TCFProtOST.lib" /pdbtype:sept
+.\Debug\BaseProtocol.obj
+.\Debug\OSTProtocol.obj
+.\Debug\StdAfx.obj
+.\Debug\TCFProtOST.obj
]
-Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP623.tmp"
+Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9B.tmp"
Output Window
Compiling...
StdAfx.cpp
@@ -230,13 +328,13 @@
TCFProtOST.cpp
Generating Code...
Linking...
- Creating library Release/TCFProtOST.lib and object Release/TCFProtOST.exp
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP627.bat" with contents
+ Creating library Debug/TCFProtOST.lib and object Debug/TCFProtOST.exp
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9F.bat" with contents
[
@echo off
-copyBinaries Release
+copyBinaries Debug
]
-Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP627.bat"
+Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPC9F.bat"
copy libs
Copy binaries to ..\..\..\os\win32\x86
The system cannot find the path specified.
@@ -252,13 +350,13 @@
Results
TCFProtOST.dll - 1 error(s), 0 warning(s)
---------------------Configuration: TCFServer - Win32 Release--------------------
+--------------------Configuration: TCFServer - Win32 Debug--------------------
Command Lines
-Creating command line "rc.exe /l 0x409 /fo"Release/resource.res" /d "NDEBUG" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\resource.rc""
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP628.tmp" with contents
+Creating command line "rc.exe /l 0x409 /fo"Debug/resource.res" /d "_DEBUG" "C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\resource.rc""
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA0.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Release/TCFServer.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/TCFServer.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\Client.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\CommRegistryItem.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\Connection.cpp"
@@ -276,36 +374,36 @@
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp"
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\TCFServer.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP628.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP629.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA0.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA1.tmp" with contents
[
-/nologo /Zp2 /MT /W3 /GX /O2 /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Release/TCFServer.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/TCFServer.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\StdAfx.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP629.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62A.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA1.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA2.tmp" with contents
[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /subsystem:console /incremental:no /pdb:"Release/TCFServer.pdb" /machine:I386 /out:"Release/TCFServer.exe"
-.\Release\Client.obj
-.\Release\CommRegistryItem.obj
-.\Release\Connection.obj
-.\Release\ConnectionImpl.obj
-.\Release\ErrorMonitorData.obj
-.\Release\InputStream.obj
-.\Release\MessageFile.obj
-.\Release\mutex.obj
-.\Release\ProtocolRegistryItem.obj
-.\Release\Registry.obj
-.\Release\RegistryImpl.obj
-.\Release\ServerClient.obj
-.\Release\ServerManager.obj
-.\Release\shareddata.obj
-.\Release\StdAfx.obj
-.\Release\TCDebugLog.obj
-.\Release\TCFServer.obj
-.\Release\resource.res
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/TCFServer.pdb" /debug /machine:I386 /out:"Debug/TCFServer.exe" /pdbtype:sept
+.\Debug\Client.obj
+.\Debug\CommRegistryItem.obj
+.\Debug\Connection.obj
+.\Debug\ConnectionImpl.obj
+.\Debug\ErrorMonitorData.obj
+.\Debug\InputStream.obj
+.\Debug\MessageFile.obj
+.\Debug\mutex.obj
+.\Debug\ProtocolRegistryItem.obj
+.\Debug\Registry.obj
+.\Debug\RegistryImpl.obj
+.\Debug\ServerClient.obj
+.\Debug\ServerManager.obj
+.\Debug\shareddata.obj
+.\Debug\StdAfx.obj
+.\Debug\TCDebugLog.obj
+.\Debug\TCFServer.obj
+.\Debug\resource.res
]
-Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62A.tmp"
+Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA2.tmp"
Output Window
Compiling resources...
Compiling...
@@ -329,12 +427,35 @@
TCFServer.cpp
Generating Code...
Linking...
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62C.bat" with contents
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA4.tmp" with contents
+[
+/nologo /o"Debug/TCFServer.bsc"
+.\Debug\StdAfx.sbr
+.\Debug\Client.sbr
+.\Debug\CommRegistryItem.sbr
+.\Debug\Connection.sbr
+.\Debug\ConnectionImpl.sbr
+.\Debug\ErrorMonitorData.sbr
+.\Debug\InputStream.sbr
+.\Debug\MessageFile.sbr
+.\Debug\mutex.sbr
+.\Debug\ProtocolRegistryItem.sbr
+.\Debug\Registry.sbr
+.\Debug\RegistryImpl.sbr
+.\Debug\ServerClient.sbr
+.\Debug\ServerManager.sbr
+.\Debug\shareddata.sbr
+.\Debug\TCDebugLog.sbr
+.\Debug\TCFServer.sbr]
+Creating command line "bscmake.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA4.tmp"
+Creating browse info file...
+Output Window
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA5.bat" with contents
[
@echo off
-copybinaries Release
+copybinaries Debug
]
-Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSP62C.bat"
+Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPCA5.bat"
copy binary
Copy binaries to ..\..\..\os\win32\x86
The system cannot find the path specified.
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFCommSerial/RealSerialComm.cpp Wed Jul 21 12:11:48 2010 -0500
@@ -366,7 +366,7 @@
long CRealSerialComm::ClosePort()
{
COMMLOGOPEN();
- COMMLOGS("CRealSerialComm::ClosePort\n");
+ COMMLOGA1("CRealSerialComm::ClosePort connected=%d\n", IsConnected());
long err = TCAPI_ERR_NONE;
@@ -443,8 +443,9 @@
// and there was some kind of error
if (lclNumBytes != inSize)
{
+ m_lastCommError = 0;
COMMLOGOPEN();
- COMMLOGA3("CRealSerialComm::SendDataToPort WriteFile not all bytes sent: lclNumBytes=%d inSize=%d err=%d\n", lclNumBytes, inSize, GetLastError());
+ COMMLOGA3("CRealSerialComm::SendDataToPort WriteFile not all bytes sent: lclNumBytes=%d inSize=%d err=%d\n", lclNumBytes, inSize, m_lastCommError);
COMMLOGCLOSE();
COMSTAT lclComStat;
@@ -465,19 +466,27 @@
if (lclErrorFlags)
{
// there really was an error
- m_lastCommError = lclErrorFlags;
err = TCAPI_ERR_COMM_ERROR;
COMMLOGOPEN();
- COMMLOGA1("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=%d\n", m_lastCommError);
+ COMMLOGA1("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=%d\n", lclErrorFlags);
COMMLOGCLOSE();
}
else
{
// No OS error returned, but WriteFile failed to write out all bytes
// therefore, since we are not doing overlapped I/O, this is an error.
- err = TCAPI_ERR_COMM_ERROR;
+// DUMPCOMSTAT(&lclComStat);
+ BOOL flush = FlushFileBuffers(m_hSerial); // flush transmit buffer
+// ClearCommError(m_hSerial, &lclErrorFlags, &lclComStat);
+// if (WriteFile(m_hSerial, inData, inSize, &lclNumBytes, NULL))
+// {
+// COMMLOGOPEN();
+// COMMLOGA1("CRealSerialComm::SendDataToPort WriteFile#2 succeeded lclNumBytes=%d\n", lclNumBytes);
+// COMMLOGCLOSE();
+// }
+ err = TCAPI_ERR_COMM_ERROR_DEVICE_NOT_READING;
COMMLOGOPEN();
- COMMLOGS("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=0\n");
+ COMMLOGA2("CRealSerialComm::SendDataToPort ClearCommError succeeded lclErrorFlags=0 err=%d flush=%d\n", m_lastCommError, flush);
COMMLOGCLOSE();
// DUMPCOMSTAT(&lclComStat);
}
@@ -492,7 +501,7 @@
COMMLOGS("CRealSerialComm::SendDataToPort WriteFile successful\n");
BYTE* ptr = (BYTE*)inData;
long numBytes = (inSize > 80) ? 80 : inSize;
- char msg[200];
+ char msg[300];
sprintf(msg, "CRealSerialComm::SendDataToPort = ");
for (int i = 0; i < numBytes; i++)
{
@@ -524,12 +533,16 @@
COMSTAT lclComStat;
DWORD lclErrorFlags=0;
- if (!IsConnected())
+ if (!IsConnected() || m_hSerial == INVALID_HANDLE_VALUE)
return TCAPI_ERR_MEDIA_NOT_OPEN;
+
// Sleep(1);
if (!ClearCommError( m_hSerial, &lclErrorFlags, &lclComStat ))
{
+ if (!IsConnected() || m_hSerial == INVALID_HANDLE_VALUE)
+ return TCAPI_ERR_MEDIA_NOT_OPEN;
+
m_lastCommError = GetLastError();
err = TCAPI_ERR_COMM_ERROR;
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFCommVirtualSerial/TCFCommVirtualSerial.plg
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFCommVirtualSerial/TCFCommVirtualSerial.plg Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFCommVirtualSerial/TCFCommVirtualSerial.plg Wed Jul 21 12:11:48 2010 -0500
@@ -3,57 +3,38 @@
Build Log
---------------------Configuration: TCFCommVirtualSerial - Win32 Debug--------------------
+--------------------Configuration: TCFCommVirtualSerial - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFA.tmp" with contents
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE38.tmp" with contents
[
-/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\BaseCom.cpp"
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\mutex.cpp"
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp"
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\Common\Source\TCDebugLog.cpp"
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\TCFCommVirtualSerial.cpp"
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\VirtualSerialComm.cpp"
+/nologo /Zp2 /MT /W3 /GX /O2 /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Release/TCFCommVirtualSerial.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
+"C:\dev22clone2\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommSerial\RealSerialComm.cpp"
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFA.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFB.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE38.tmp"
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE39.tmp" with contents
[
-/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\TCFCommSerial" /I "..\Common\Headers" /I "..\TCFServer" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TCFCOMMVIRTUALSERIAL_EXPORTS" /Fp"Debug/TCFCommVirtualSerial.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFCommVirtualSerial\StdAfx.cpp"
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/TCFCommVirtualSerial.pdb" /map:"Release/TCFCommVirtualSerial.map" /machine:I386 /out:"Release/TCFCommVirtualSerial.dll" /implib:"Release/TCFCommVirtualSerial.lib"
+.\Release\BaseCom.obj
+.\Release\mutex.obj
+.\Release\RealSerialComm.obj
+.\Release\StdAfx.obj
+.\Release\TCDebugLog.obj
+.\Release\TCFCommVirtualSerial.obj
+.\Release\VirtualSerialComm.obj
]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFB.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFC.tmp" with contents
-[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/TCFCommVirtualSerial.pdb" /map:"Debug/TCFCommVirtualSerial.map" /debug /machine:I386 /out:"Debug/TCFCommVirtualSerial.dll" /implib:"Debug/TCFCommVirtualSerial.lib" /pdbtype:sept
-.\Debug\BaseCom.obj
-.\Debug\mutex.obj
-.\Debug\RealSerialComm.obj
-.\Debug\StdAfx.obj
-.\Debug\TCDebugLog.obj
-.\Debug\TCFCommVirtualSerial.obj
-.\Debug\VirtualSerialComm.obj
-]
-Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAFC.tmp"
+Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE39.tmp"
Output Window
Compiling...
-StdAfx.cpp
-Compiling...
-BaseCom.cpp
-mutex.cpp
RealSerialComm.cpp
-TCDebugLog.cpp
-TCFCommVirtualSerial.cpp
-VirtualSerialComm.cpp
-Generating Code...
Linking...
- Creating library Debug/TCFCommVirtualSerial.lib and object Debug/TCFCommVirtualSerial.exp
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPB00.bat" with contents
+ Creating library Release/TCFCommVirtualSerial.lib and object Release/TCFCommVirtualSerial.exp
+Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE3D.bat" with contents
[
@echo off
-copyBinaries Debug
+copyBinaries Release
]
-Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPB00.bat"
+Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPE3D.bat"
copy libs
Copy binaries to ..\..\..\os\win32\x86
The system cannot find the path specified.
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFNative.ncb
Binary file connectivity/com.nokia.tcf/native/TCFNative/TCFNative.ncb has changed
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFNative.opt
Binary file connectivity/com.nokia.tcf/native/TCFNative/TCFNative.opt has changed
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/BaseCom.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/BaseCom.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/BaseCom.h Wed Jul 21 12:11:48 2010 -0500
@@ -124,4 +124,4 @@
#define COMMDLL_BASENAME "TCFComm"
-#endif __BASECOM_H__
+#endif //__BASECOM_H__
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.cpp
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.cpp Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.cpp Wed Jul 21 12:11:48 2010 -0500
@@ -27,7 +27,7 @@
extern BOOL gDoLogging;
#endif
-//#define LOG_CONNECTION
+#define LOG_CONNECTION
#if defined(LOG_CONNECTION) && defined(_DEBUG)
#define TCDEBUGOPEN() if (gDoLogging) { this->m_DebugLog->WaitForAccess(); }
#define TCDEBUGLOGS(s) if (gDoLogging) { sprintf(this->m_DebugLogMsg,"%s", s); this->m_DebugLog->log(this->m_DebugLogMsg); }
@@ -407,9 +407,10 @@
delete[] encodedMessage;
TCDEBUGLOGS("CConnectionImpl::DoSendMessage done\n");
- if (err == TCAPI_ERR_COMM_ERROR)
+ if (err != TCAPI_ERR_NONE)
{
// EnterRetryPeriod(err, true, m_BaseComm->m_lastCommError);
+ HandleFatalPortError(err, true, m_BaseComm->m_lastCommError);
m_OsError = m_BaseComm->m_lastCommError;
}
}
@@ -662,6 +663,19 @@
return m_Registry->AddClient(client, numberIds, ids);
}
+long CConnectionImpl::HandleFatalPortError(long err, bool passOsErr, DWORD osErr)
+{
+ TCDEBUGOPEN();
+ TCDEBUGLOGA3("CConnectionImpl::HandleFatalPortError err=%d passOsErr=%d osErr=%d\n", err, passOsErr, osErr);
+ TCDEBUGCLOSE();
+
+ m_BaseComm->ClosePort();
+ m_Status = eDisconnected;
+
+ NotifyClientsCommError(err);
+
+ return TCAPI_ERR_NONE;
+}
void CConnectionImpl::NotifyClientsCommError(long tcfError, bool passOsError, DWORD osError)
{
// TCDEBUGOPEN();
@@ -769,6 +783,8 @@
{
MPLOGA2("MessageProcessor err = %d osError = %d\n", err, pThis->m_BaseComm->m_lastCommError);
// pThis->EnterRetryPeriod(err, true, pThis->m_BaseComm->m_lastCommError);
+ if (err == TCAPI_ERR_COMM_ERROR)
+ pThis->HandleFatalPortError(err, true, pThis->m_BaseComm->m_lastCommError);
}
else
{
@@ -786,8 +802,11 @@
if (err == TCAPI_ERR_COMM_ERROR)
{
+ MPLOGA2("MessageProcessor err = %d osError = %d\n", err, pThis->m_BaseComm->m_lastCommError);
// for this error we have os error, but we probably caught this in PollPort already
// pThis->EnterRetryPeriod(err, true, pThis->m_BaseComm->m_lastCommError);
+ if (err == TCAPI_ERR_COMM_ERROR)
+ pThis->HandleFatalPortError(err, true, pThis->m_BaseComm->m_lastCommError);
}
else if (err != TCAPI_ERR_NONE)
{
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.h
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.h Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/ConnectionImpl.h Wed Jul 21 12:11:48 2010 -0500
@@ -48,6 +48,7 @@
long DoSendMessage(long encodeOption, BYTE protocolVersion, BOOL useMsgId, BYTE msgId, DWORD msgLength, BYTE* msg);
long DoRetryProcessing();
long EnterRetryPeriod(long err, bool passOsErr, DWORD osErr);
+ long HandleFatalPortError(long err, bool passOsErr, DWORD osErr);
BOOL PauseProcessing(); // pause processing thread (not exit)
BOOL RestartProcessing(); // restart processing after a pause
diff -r d1edeecb12af -r 03f5f8bf29b4 connectivity/com.nokia.tcf/native/TCFNative/TCFServer/TCFServer.plg
--- a/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/TCFServer.plg Wed Jul 21 11:37:56 2010 -0500
+++ b/connectivity/com.nokia.tcf/native/TCFNative/TCFServer/TCFServer.plg Wed Jul 21 12:11:48 2010 -0500
@@ -3,81 +3,14 @@
Build Log
---------------------Configuration: TCFServer - Win32 Debug--------------------
+--------------------Configuration: TCFServer - Win32 Release--------------------
Command Lines
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAC9.tmp" with contents
-[
-/nologo /Zp2 /MTd /W3 /Gm /GX /ZI /Od /I "..\Common\Headers" /I "..\Common\Source" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/TCFServer.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
-"C:\dev22clone\carbidecpp\connectivity\com.nokia.tcf\native\TCFNative\TCFServer\ServerManager.cpp"
-]
-Creating command line "cl.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPAC9.tmp"
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACA.tmp" with contents
-[
-kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib shlwapi.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/TCFServer.pdb" /debug /machine:I386 /out:"Debug/TCFServer.exe" /pdbtype:sept
-.\Debug\Client.obj
-.\Debug\CommRegistryItem.obj
-.\Debug\Connection.obj
-.\Debug\ConnectionImpl.obj
-.\Debug\ErrorMonitorData.obj
-.\Debug\InputStream.obj
-.\Debug\MessageFile.obj
-.\Debug\mutex.obj
-.\Debug\ProtocolRegistryItem.obj
-.\Debug\Registry.obj
-.\Debug\RegistryImpl.obj
-.\Debug\ServerClient.obj
-.\Debug\ServerManager.obj
-.\Debug\shareddata.obj
-.\Debug\StdAfx.obj
-.\Debug\TCDebugLog.obj
-.\Debug\TCFServer.obj
-.\Debug\resource.res
-]
-Creating command line "link.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACA.tmp"
-Output Window
-Compiling...
-ServerManager.cpp
-Linking...
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACC.tmp" with contents
-[
-/nologo /o"Debug/TCFServer.bsc"
-.\Debug\StdAfx.sbr
-.\Debug\Client.sbr
-.\Debug\CommRegistryItem.sbr
-.\Debug\Connection.sbr
-.\Debug\ConnectionImpl.sbr
-.\Debug\ErrorMonitorData.sbr
-.\Debug\InputStream.sbr
-.\Debug\MessageFile.sbr
-.\Debug\mutex.sbr
-.\Debug\ProtocolRegistryItem.sbr
-.\Debug\Registry.sbr
-.\Debug\RegistryImpl.sbr
-.\Debug\ServerClient.sbr
-.\Debug\ServerManager.sbr
-.\Debug\shareddata.sbr
-.\Debug\TCDebugLog.sbr
-.\Debug\TCFServer.sbr]
-Creating command line "bscmake.exe @C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACC.tmp"
-Creating browse info file...
-Output Window
-Creating temporary file "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACD.bat" with contents
-[
-@echo off
-copybinaries Debug
-]
-Creating command line "C:\DOCUME~1\chpeckha\LOCALS~1\Temp\RSPACD.bat"
-copy binary
-Copy binaries to ..\..\..\os\win32\x86
-The system cannot find the path specified.
- 0 file(s) copied.
-Error executing c:\winnt\system32\cmd.exe.
Results
-TCFServer.exe - 1 error(s), 0 warning(s)
+TCFServer.exe - 0 error(s), 0 warning(s)