mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
[224873] WinCE cleanup: RAPI version 0.1.0, Javadoc fixes, adding README.txt for native build, NLS class, 4KB buffersize
This commit is contained in:
parent
535eca4bbd
commit
c206b003e4
17 changed files with 66 additions and 41 deletions
|
@ -12,8 +12,8 @@ Require-Bundle: org.eclipse.core.resources,
|
|||
org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
|
||||
org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
|
||||
org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
|
||||
org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)"
|
||||
Import-Package: org.eclipse.tm.rapi
|
||||
org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
|
||||
org.eclipse.tm.rapi;bundle-version="[0.1.0,1.0.0)"
|
||||
Export-Package: org.eclipse.rse.internal.connectorservice.wince;x-internal:=true,
|
||||
org.eclipse.rse.internal.services.wince;x-internal:=true,
|
||||
org.eclipse.rse.internal.services.wince.files;x-internal:=true,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from ISshSubSystem
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.connectorservice.wince;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from SshConnectorService
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.connectorservice.wince;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from SshConnectorServiceManager
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.connectorservice.wince;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from ISshService
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.services.wince;
|
||||
|
||||
|
|
|
@ -10,23 +10,17 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.services.wince.files;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public class Messages {
|
||||
public class Messages extends NLS {
|
||||
private static final String BUNDLE_NAME = "org.eclipse.rse.internal.services.wince.files.messages"; //$NON-NLS-1$
|
||||
|
||||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
|
||||
.getBundle(BUNDLE_NAME);
|
||||
public static String WinCEFileService_0;
|
||||
public static String WinCEFileService_1;
|
||||
static {
|
||||
// initialize resource bundle
|
||||
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||
}
|
||||
|
||||
private Messages() {
|
||||
}
|
||||
|
||||
public static String getString(String key) {
|
||||
try {
|
||||
return RESOURCE_BUNDLE.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return '!' + key + '!';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from SftpFileService and LocalFileService
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.services.wince.files;
|
||||
|
||||
|
@ -225,8 +225,8 @@ public class WinCEFileService extends AbstractFileService implements IWinCEServi
|
|||
handle = session.createFile(fullPath, OS.GENERIC_READ,
|
||||
OS.FILE_SHARE_READ, OS.OPEN_EXISTING, OS.FILE_ATTRIBUTE_NORMAL);
|
||||
bos = new BufferedOutputStream(new FileOutputStream(localFile));
|
||||
// TODO: find the optimal buffer size
|
||||
byte[] buffer = new byte[8 * 1024];
|
||||
// don't increase the buffer size! the native functions sometimes fail with large buffers, 4K always work
|
||||
byte[] buffer = new byte[4 * 1024];
|
||||
while (true) {
|
||||
int bytesRead = session.readFile(handle, buffer);
|
||||
if (bytesRead == -1) {
|
||||
|
@ -334,8 +334,8 @@ public class WinCEFileService extends AbstractFileService implements IWinCEServi
|
|||
try {
|
||||
handle = session.createFile(fullPath, OS.GENERIC_WRITE,
|
||||
OS.FILE_SHARE_READ, OS.CREATE_ALWAYS, OS.FILE_ATTRIBUTE_NORMAL);
|
||||
// TODO: find the optimal buffer size
|
||||
byte[] buffer = new byte[8 * 1024];
|
||||
// don't increase the buffer size! the native functions sometimes fail with large buffers, 4K always work
|
||||
byte[] buffer = new byte[4 * 1024];
|
||||
while (true) {
|
||||
int bytesRead = bis.read(buffer);
|
||||
if (bytesRead == -1) {
|
||||
|
@ -414,11 +414,11 @@ public class WinCEFileService extends AbstractFileService implements IWinCEServi
|
|||
}
|
||||
|
||||
public String getDescription() {
|
||||
return Messages.getString("WinCEFileService.12"); //$NON-NLS-1$
|
||||
return Messages.WinCEFileService_0;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return Messages.getString("WinCEFileService.13"); //$NON-NLS-1$
|
||||
return Messages.WinCEFileService_1;
|
||||
}
|
||||
|
||||
public void initService(IProgressMonitor monitor) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from SftpHostFile
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.services.wince.files;
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
WinCEFileService.12=The WinCE File Service uses ActiveSync/RAPI2 to provide service to the Files subsystem on the device.
|
||||
WinCEFileService.13=WinCE File Service
|
||||
WinCEFileService_0=The WinCE File Service uses ActiveSync/RAPI2 to provide service to the Files subsystem on the device.
|
||||
WinCEFileService_1=WinCE File Service
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from SftpFileAdapter
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.subsystems.files.wince;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from SftpRemoteFile
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.internal.subsystems.files.wince;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from FileServiceSubSystem
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.subsystems.files.wince;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Radoslav Gerganov - initial API and implementation
|
||||
* Radoslav Gerganov - derived from SftpFileSubSystemConfiguration
|
||||
*******************************************************************************/
|
||||
package org.eclipse.rse.subsystems.files.wince;
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class WinCEFileSubSystemConfiguration extends FileServiceSubSystemConfigu
|
|||
RemoteFileFilterString myHomeFilterString = new RemoteFileFilterString(this);
|
||||
myHomeFilterString.setPath("\\My Documents\\"); //$NON-NLS-1$
|
||||
filterStrings.add(myHomeFilterString.toString());
|
||||
mgr.createSystemFilter(pool, "My Home", filterStrings);
|
||||
mgr.createSystemFilter(pool, "My Home", filterStrings); //$NON-NLS-1$
|
||||
//filter.setNonChangable(true);
|
||||
//filter.setSingleFilterStringOnly(true);
|
||||
|
||||
|
@ -77,7 +77,7 @@ public class WinCEFileSubSystemConfiguration extends FileServiceSubSystemConfigu
|
|||
filterStrings = new Vector();
|
||||
RemoteFileFilterString rootFilesFilterString = new RemoteFileFilterString(this);
|
||||
filterStrings.add(rootFilesFilterString.toString());
|
||||
mgr.createSystemFilter(pool, "Root", filterStrings);
|
||||
mgr.createSystemFilter(pool, "Root", filterStrings); //$NON-NLS-1$
|
||||
} catch (Exception exc) {
|
||||
SystemBasePlugin.logError("Error creating default filter pool",exc); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ Bundle-Version: 1.0.0.qualifier
|
|||
Bundle-Activator: org.eclipse.tm.rapi.examples.Activator
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.core.runtime
|
||||
Import-Package: org.eclipse.tm.rapi
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.tm.rapi;bundle-version="[0.1.0,1.0.0)"
|
||||
Export-Package: org.eclipse.tm.rapi.examples
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Eclipse-LazyStart: true
|
||||
|
|
|
@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.tm.rapi.tests
|
|||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.junit
|
||||
Import-Package: org.eclipse.tm.rapi
|
||||
Require-Bundle: org.junit,
|
||||
org.eclipse.tm.rapi;bundle-version="[0.1.0,1.0.0)"
|
||||
Export-Package: org.eclipse.tm.rapi.tests
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.tm.rapi
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Version: 0.1.0.qualifier
|
||||
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
|
|
31
wince/org.eclipse.tm.rapi/build/README.txt
Normal file
31
wince/org.eclipse.tm.rapi/build/README.txt
Normal file
|
@ -0,0 +1,31 @@
|
|||
Instructions for building the native library (jrapi.dll) for win32-x86
|
||||
======================================================================
|
||||
|
||||
Requirements:
|
||||
Windows 2000/XP/Vista,
|
||||
Visual Studio 2005 or newer,
|
||||
Windows Mobile (PocketPC/Smartphone) SDK 5.0 or newer,
|
||||
JDK 1.4 or newer
|
||||
|
||||
Building the library:
|
||||
1. Open the solution file (jrapi.sln) in Visual Studio.
|
||||
|
||||
2. Navigate to "Tools" -> "Options", and expand "Projects and Solutions",
|
||||
and click "VC++ Directories".
|
||||
|
||||
3. In "Show directories for:" select "Include files".
|
||||
|
||||
4. Add the Activesync include directory from your Windows Mobile SDK:
|
||||
<WinMobile-SDK-path>\Activesync\Inc
|
||||
|
||||
5. Add the JNI include directories from your JDK:
|
||||
<JDK-path>\include
|
||||
<JDK-path>\include\win32
|
||||
|
||||
6. In "Show directories for:" select "Library files".
|
||||
|
||||
7. Add the Activesync library directory from your Windows Mobile SDK:
|
||||
<WinMobile-SDK-path>\Activesync\Lib
|
||||
|
||||
8. Navigate to "Build", and click "Rebuild Solution" to rebuild the library.
|
||||
The output dll will be placed in \lib\os\win32\x86
|
Loading…
Add table
Reference in a new issue