harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r386087 [45/45] - in /incubator/harmony/enhanced/classlib/trunk: make/ make/patternsets/ modules/jndi/ modules/jndi/META-INF/ modules/jndi/make/ modules/jndi/make/common/ modules/jndi/src/ modules/jndi/src/main/ modules/jndi/src/main/java/ ...
Date Wed, 15 Mar 2006 14:57:17 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XAResourceTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XAResourceTest.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XAResourceTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XAResourceTest.java
Wed Mar 15 06:55:38 2006
@@ -0,0 +1,94 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.javax.transaction.xa;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashMap;
+
+import javax.transaction.xa.XAResource;
+
+import junit.framework.TestCase;
+
+public class XAResourceTest extends TestCase {
+
+	/*
+	 * Public statics test
+	 */
+	public void testPublicStatics() {
+
+		HashMap thePublicStatics = new HashMap();
+		thePublicStatics.put("XA_OK", new Integer(0));
+		thePublicStatics.put("XA_RDONLY", new Integer(3));
+		thePublicStatics.put("TMSUSPEND", new Integer(33554432));
+		thePublicStatics.put("TMSUCCESS", new Integer(67108864));
+		thePublicStatics.put("TMSTARTRSCAN", new Integer(16777216));
+		thePublicStatics.put("TMRESUME", new Integer(134217728));
+		thePublicStatics.put("TMONEPHASE", new Integer(1073741824));
+		thePublicStatics.put("TMNOFLAGS", new Integer(0));
+		thePublicStatics.put("TMJOIN", new Integer(2097152));
+		thePublicStatics.put("TMFAIL", new Integer(536870912));
+		thePublicStatics.put("TMENDRSCAN", new Integer(8388608));
+
+		System.out.println("XA_OK: " + XAResource.XA_OK);
+		System.out.println("XA_RDONLY: " + XAResource.XA_RDONLY);
+		System.out.println("TMSUSPEND: " + XAResource.TMSUSPEND);
+		System.out.println("TMSUCCESS: " + XAResource.TMSUCCESS);
+		System.out.println("TMSTARTRSCAN: " + XAResource.TMSTARTRSCAN);
+		System.out.println("TMRESUME: " + XAResource.TMRESUME);
+		System.out.println("TMONEPHASE: " + XAResource.TMONEPHASE);
+		System.out.println("TMNOFLAGS: " + XAResource.TMNOFLAGS);
+		System.out.println("TMJOIN: " + XAResource.TMJOIN);
+		System.out.println("TMFAIL: " + XAResource.TMFAIL);
+		System.out.println("TMENDRSCAN: " + XAResource.TMENDRSCAN);
+
+		Class xAResourceClass;
+		try {
+			xAResourceClass = Class.forName("javax.transaction.xa.XAResource");
+		} catch (ClassNotFoundException e) {
+			fail("javax.transaction.xa.XAResource class not found!");
+			return;
+		} // end try
+
+		Field[] theFields = xAResourceClass.getDeclaredFields();
+		int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
+				+ Modifier.FINAL;
+
+		int countPublicStatics = 0;
+		for (int i = 0; i < theFields.length; i++) {
+			String fieldName = theFields[i].getName();
+			int theMods = theFields[i].getModifiers();
+			if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
+				try {
+					Object fieldValue = theFields[i].get(null);
+					Object expectedValue = thePublicStatics.get(fieldName);
+					if (expectedValue == null) {
+						fail("Field " + fieldName + " missing!");
+					} // end
+					assertEquals("Field " + fieldName + " value mismatch: ",
+							expectedValue, fieldValue);
+					assertEquals("Field " + fieldName + " modifier mismatch: ",
+							requiredModifier, theMods);
+					countPublicStatics++;
+				} catch (IllegalAccessException e) {
+					fail("Illegal access to Field " + fieldName);
+				} // end try
+			} // end if
+		} // end for
+
+	} // end method testPublicStatics
+
+} // end class XAResourceTest

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XidTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XidTest.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XidTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/javax/transaction/xa/XidTest.java
Wed Mar 15 06:55:38 2006
@@ -0,0 +1,77 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.javax.transaction.xa;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashMap;
+
+import javax.transaction.xa.Xid;
+
+import junit.framework.TestCase;
+
+public class XidTest extends TestCase {
+
+	/*
+	 * Public statics test
+	 */
+	public void testPublicStatics() {
+
+		HashMap thePublicStatics = new HashMap();
+		thePublicStatics.put("MAXBQUALSIZE", new Integer(64));
+		thePublicStatics.put("MAXGTRIDSIZE", new Integer(64));
+
+		System.out.println("MAXBQUALSIZE: " + Xid.MAXBQUALSIZE);
+		System.out.println("MAXGTRIDSIZE: " + Xid.MAXGTRIDSIZE);
+
+		Class xidClass;
+		try {
+			xidClass = Class.forName("javax.transaction.xa.Xid");
+		} catch (ClassNotFoundException e) {
+			fail("javax.transaction.xa.Xid class not found!");
+			return;
+		} // end try
+
+		Field[] theFields = xidClass.getDeclaredFields();
+		int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
+				+ Modifier.FINAL;
+
+		int countPublicStatics = 0;
+		for (int i = 0; i < theFields.length; i++) {
+			String fieldName = theFields[i].getName();
+			int theMods = theFields[i].getModifiers();
+			if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
+				try {
+					Object fieldValue = theFields[i].get(null);
+					Object expectedValue = thePublicStatics.get(fieldName);
+					if (expectedValue == null) {
+						fail("Field " + fieldName + " missing!");
+					} // end
+					assertEquals("Field " + fieldName + " value mismatch: ",
+							expectedValue, fieldValue);
+					assertEquals("Field " + fieldName + " modifier mismatch: ",
+							requiredModifier, theMods);
+					countPublicStatics++;
+				} catch (IllegalAccessException e) {
+					fail("Illegal access to Field " + fieldName);
+				} // end try
+			} // end if
+		} // end for
+
+	} // end method testPublicStatics
+
+} // end class XidTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/sql/AllTests.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/sql/AllTests.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/sql/AllTests.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/sql/AllTests.java
Wed Mar 15 06:55:38 2006
@@ -0,0 +1,41 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.sql;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test suite that includes all tests for the SQL project.
+ * 
+ */
+public class AllTests {
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllTests.suite());
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("All SQL test suites");
+		// $JUnit-BEGIN$
+		suite.addTest(tests.api.java.sql.AllTests.suite());
+		suite.addTest(tests.api.javax.sql.AllTests.suite());
+		suite.addTest(tests.api.javax.transaction.AllTests.suite());
+		suite.addTest(tests.api.javax.transaction.xa.AllTests.suite());
+		// $JUnit-END$
+		return suite;
+	}
+}

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/makefile?rev=386087&r1=386086&r2=386087&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/makefile Wed Mar 15 06:55:38
2006
@@ -10,145 +10,153 @@
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Main Makefile
-#
-
-!include <ntwin32.mak>
-
-all: \
-	_sig _pool _thread _port _fdlibm _zip \
-	_zlib _common _nio _luni _vmi _auth \
-	_archive _math _launcher _text
+# limitations under the License.
+
+#
+# Main Makefile
+#
+
+!include <ntwin32.mak>
+
+all: \
+	_sig _pool _thread _port _fdlibm _zip \
+	_zlib _common _nio _luni _vmi _auth \
+	_archive _math _launcher _text _prefs
 
 _auth:
 	cd auth
 	$(MAKE) /NOLOGO
 	cd ..
-	
-_pool: 
-	cd pool
-	$(MAKE) /NOLOGO
-	cd ..
-
-_vmi: _zip _pool
-	cd vmi
-	$(MAKE) /NOLOGO
-	cd ..
-
-_thread: _pool _common
-	cd thread
-	$(MAKE) /NOLOGO
-	cd ..
-
-_port: _thread _sig _common
-	cd port
-	$(MAKE) /NOLOGO
-	cd ..
-
-_sig:
-	cd sig
-	$(MAKE) /NOLOGO
-	cd ..
-
-_fdlibm: 
-	cd fdlibm
-	$(MAKE) /NOLOGO
-	cd ..
-
-_zip: 
-	cd zip
-	$(MAKE) /NOLOGO
-	cd ..
-
-_zlib: 
-	cd zlib
-	$(MAKE) /NOLOGO
-	cd ..
-
-_common: 
-	cd common
-	$(MAKE) /NOLOGO
-	cd ..
-	
-_math: _common _sig _zip _zlib _pool _fdlibm _thread
-	cd math
-	$(MAKE) /NOLOGO
-	cd ..
-
-_luni: _common _sig _zip _zlib _pool _fdlibm _thread
-	cd luni
-	$(MAKE) /NOLOGO
-	cd ..
-
-_archive: _common _sig _zip _zlib _pool _fdlibm _thread
-	cd archive
-	$(MAKE) /NOLOGO
-	cd ..
-
-_nio: _sig _zip _zlib _pool _fdlibm _thread _vmi
-	cd nio
-	$(MAKE) /NOLOGO
-	cd ..
-
-_text: _sig _zip _zlib _pool _fdlibm _thread
-	cd text
-	$(MAKE) /NOLOGO
-	cd ..	
-
-_launcher: _port _thread
-	cd launcher
-	$(MAKE) /NOLOGO
-	cd ..
-
-clean:
+	
+_pool: 
+	cd pool
+	$(MAKE) /NOLOGO
+	cd ..
+
+_vmi: _zip _pool
+	cd vmi
+	$(MAKE) /NOLOGO
+	cd ..
+
+_thread: _pool _common
+	cd thread
+	$(MAKE) /NOLOGO
+	cd ..
+
+_port: _thread _sig _common
+	cd port
+	$(MAKE) /NOLOGO
+	cd ..
+
+_sig:
+	cd sig
+	$(MAKE) /NOLOGO
+	cd ..
+
+_fdlibm: 
+	cd fdlibm
+	$(MAKE) /NOLOGO
+	cd ..
+
+_zip: 
+	cd zip
+	$(MAKE) /NOLOGO
+	cd ..
+
+_zlib: 
+	cd zlib
+	$(MAKE) /NOLOGO
+	cd ..
+
+_common: 
+	cd common
+	$(MAKE) /NOLOGO
+	cd ..
+	
+_math: _common _sig _zip _zlib _pool _fdlibm _thread
+	cd math
+	$(MAKE) /NOLOGO
+	cd ..
+
+_luni: _common _sig _zip _zlib _pool _fdlibm _thread
+	cd luni
+	$(MAKE) /NOLOGO
+	cd ..
+
+_archive: _common _sig _zip _zlib _pool _fdlibm _thread
+	cd archive
+	$(MAKE) /NOLOGO
+	cd ..
+
+_nio: _sig _zip _zlib _pool _fdlibm _thread _vmi
+	cd nio
+	$(MAKE) /NOLOGO
+	cd ..
+
+_text: _sig _zip _zlib _pool _fdlibm _thread
+	cd text
+	$(MAKE) /NOLOGO
+	cd ..	
+
+_prefs:
+	cd prefs
+	$(MAKE) /NOLOGO
+	cd ..
+
+_launcher: _port _thread
+	cd launcher
+	$(MAKE) /NOLOGO
+	cd ..
+
+clean:
 	cd auth
 	$(MAKE) /NOLOGO clean
 	cd ..
-	cd archive
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd launcher
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd common
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd luni
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd math
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd nio
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd text
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd vmi
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd fdlibm
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd sig
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd pool
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd port
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd thread
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd zip
-	$(MAKE) /NOLOGO clean
-	cd ..
-	cd zlib
-	$(MAKE) /NOLOGO clean
-	cd ..
+	cd archive
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd launcher
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd common
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd luni
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd math
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd nio
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd text
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd vmi
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd fdlibm
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd sig
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd pool
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd port
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd thread
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd zip
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd zlib
+	$(MAKE) /NOLOGO clean
+	cd ..
+	cd prefs
+	$(MAKE) /NOLOGO clean
+	cd ..

Added: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/PreferencesImpl.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/PreferencesImpl.c?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/PreferencesImpl.c
(added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/PreferencesImpl.c
Wed Mar 15 06:55:38 2006
@@ -0,0 +1,542 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <windows.h>
+#include <harmony.h>
+
+#include "java_util_prefs_RegistryPreferencesImpl.h"
+
+// max buffer size in bytes
+#define MAX_KEY_LENGTH 255
+#define MAX_VALUE_NAME 255
+#define MAX_VALUE_DATA 16383
+
+//map windows error code to customized error code
+int
+checkErrorCode (DWORD err)
+{
+  switch (err)
+    {
+    case ERROR_ACCESS_DENIED:
+      return java_util_prefs_RegistryPreferencesImpl_RETURN_ACCESS_DENIED;
+    case ERROR_SUCCESS:
+      return java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS;
+    case ERROR_FILE_NOT_FOUND:
+      return java_util_prefs_RegistryPreferencesImpl_RETURN_FILE_NOT_FOUND;
+    default:
+      return java_util_prefs_RegistryPreferencesImpl_RETURN_UNKNOWN_ERROR;
+    }
+}
+
+// convert java byte array to c string
+jbyte *
+byte2str (JNIEnv * env, const jbyteArray jkey)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  jboolean isCopy = JNI_TRUE;
+  jbyte *keyByte = (*env)->GetPrimitiveArrayCritical (env, jkey, &isCopy);
+  const jsize keyLen = (*env)->GetArrayLength (env, jkey);
+  jbyte *keyStr = hymem_allocate_memory ((keyLen + 1) * sizeof (jbyte));
+  jsize i = 0;
+
+  if (keyByte == NULL)
+    {
+      return NULL;
+    }
+  while (i < keyLen)
+    keyStr[i] = keyByte[i++];
+  keyStr[i] = '\0';
+
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jkey, keyByte, JNI_ABORT);
+    }
+  return keyStr;
+}
+
+DWORD
+openRegKey (JNIEnv * env, jbyteArray jpath, jboolean jUserNode, PHKEY phKey,
+	    REGSAM samDesired)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  jbyte *path = byte2str (env, jpath);
+  const HKEY root = jUserNode ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
+  DWORD err;
+
+  err = RegOpenKeyEx (root, path, 0, samDesired, phKey);
+  if (err == ERROR_FILE_NOT_FOUND)
+    {
+      err =
+	RegCreateKeyEx (root, path, 0, NULL, REG_OPTION_NON_VOLATILE,
+			samDesired, NULL, phKey, NULL);
+    }
+  hymem_free_memory (path);
+  return err;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    getValue
+ * Signature: ([B[BZ[I)[B
+ */
+JNIEXPORT jbyteArray JNICALL
+  Java_java_util_prefs_RegistryPreferencesImpl_getValue
+  (JNIEnv * env, jobject obj, jbyteArray jpath, jbyteArray jkey,
+   jboolean jUserNode, jintArray jErrorCode)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  HKEY hKey;
+  DWORD type = REG_SZ, errorCode;
+  jbyteArray result;
+  jboolean isCopy = JNI_TRUE;
+  jint *err = NULL;
+  jbyte *keyStr = NULL;
+  TCHAR *value;
+  DWORD dwBufLen = MAX_VALUE_DATA + 1;
+  int localErrorCode = 0;
+
+  err = (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+  keyStr = byte2str (env, jkey);
+  errorCode = openRegKey (env, jpath, jUserNode, &hKey, KEY_QUERY_VALUE);
+  localErrorCode = checkErrorCode (errorCode);
+  err[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] = localErrorCode;
+  if (localErrorCode !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, err, 0);
+	}
+      RegCloseKey (hKey);
+      hymem_free_memory (keyStr);
+      return NULL;
+    }
+  value = hymem_allocate_memory ((MAX_VALUE_DATA + 1) * sizeof (TCHAR));
+  errorCode = RegQueryValueEx (hKey, keyStr, 0, &type, value, &dwBufLen);
+  localErrorCode = checkErrorCode (errorCode);
+  RegCloseKey (hKey);
+  hymem_free_memory (keyStr);
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, err, 0);
+    }
+  err[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] = localErrorCode;
+  if (localErrorCode !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      hymem_free_memory (value);
+      return NULL;
+    }
+  if(dwBufLen > 0)
+    {
+      result = (*env)->NewByteArray (env, dwBufLen-1);
+      (*env)->SetByteArrayRegion (env, result, 0, dwBufLen-1, value);
+    }
+      else
+    {
+      result = (*env)->NewByteArray (env, 0);
+    }
+  hymem_free_memory (value);
+  return result;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    putValue
+ * Signature: ([B[B[BZ[I)V
+ */
+JNIEXPORT void JNICALL Java_java_util_prefs_RegistryPreferencesImpl_putValue
+  (JNIEnv * env, jobject obj, jbyteArray jpath, jbyteArray jkey,
+   jbyteArray jvalue, jboolean jUserNode, jintArray jErrorCode)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  DWORD err;
+  HKEY hKey;
+  jbyte *keyStr;
+  jbyte *valueByte;
+  int localErrorCode = 0;
+  const jint valueLen = (*env)->GetArrayLength (env, jvalue);
+  jboolean isCopy = JNI_TRUE;
+  jint *errArray =
+    (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+
+  err = openRegKey (env, jpath, jUserNode, &hKey, KEY_SET_VALUE);
+  localErrorCode = checkErrorCode (err);
+  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+    localErrorCode;
+  if (localErrorCode !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      return;
+    }
+
+  keyStr = byte2str (env, jkey);
+  valueByte = byte2str (env, jvalue);
+  err = RegSetValueEx (hKey, keyStr, 0, REG_SZ, valueByte, valueLen);
+  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+    checkErrorCode (err);
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray, 0);
+    }
+  hymem_free_memory (keyStr);
+  hymem_free_memory (valueByte);
+  RegCloseKey (hKey);
+  return;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    removeKey
+ * Signature: ([B[BZ[I)V
+ */
+JNIEXPORT void JNICALL Java_java_util_prefs_RegistryPreferencesImpl_removeKey
+  (JNIEnv * env, jobject obj, jbyteArray jpath, jbyteArray jkey,
+   jboolean jUserNode, jintArray jErrorCode)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  DWORD err;
+  HKEY hKey;
+  jbyte *keyStr;
+  jboolean isCopy = JNI_TRUE;
+  jint *errArray =
+    (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+
+  err = openRegKey (env, jpath, jUserNode, &hKey, KEY_SET_VALUE);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      return;
+    }
+
+  keyStr = byte2str (env, jkey);
+  err = RegDeleteValue (hKey, keyStr);
+  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+    checkErrorCode (err);
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray, 0);
+    }
+  hymem_free_memory (keyStr);
+  RegCloseKey (hKey);
+  return;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    keys
+ * Signature: ([BZ[I)[[B
+ */
+JNIEXPORT jobjectArray JNICALL
+  Java_java_util_prefs_RegistryPreferencesImpl_keys
+  (JNIEnv * env, jobject obj, jbyteArray jpath, jboolean jUserNode,
+   jintArray jErrorCode)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  DWORD number, size;
+  jclass objectClazz;
+  jobjectArray result;
+  TCHAR *value;
+  DWORD i = 0, j, err;
+  HKEY hKey;
+  jboolean isCopy = JNI_TRUE;
+  jint *errArray =
+    (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+
+  err = openRegKey (env, jpath, jUserNode, &hKey, KEY_QUERY_VALUE);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      return NULL;
+    }
+
+  err =
+    RegQueryInfoKey (hKey, NULL, NULL, NULL, NULL, NULL, NULL, &number, NULL,
+		     NULL, NULL, NULL);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      RegCloseKey (hKey);
+      return NULL;
+    }
+  objectClazz = (*env)->FindClass (env, "java/lang/Object");
+  result = (*env)->NewObjectArray (env, number, objectClazz, NULL);
+
+  value = hymem_allocate_memory ((MAX_VALUE_NAME + 1) * sizeof (TCHAR));
+  for (j = 0; j < number; j++)
+    {
+      value[0] = '\0';
+      size = MAX_VALUE_NAME + 1;
+      err = RegEnumValue (hKey, j, value, &size, NULL, NULL, NULL, NULL);
+      if (err == ERROR_SUCCESS)
+	{
+	  jbyteArray key = (*env)->NewByteArray (env, strlen (value));
+	  (*env)->SetByteArrayRegion (env, key, 0, strlen (value), value);
+	  (*env)->SetObjectArrayElement (env, result, i++, key);
+	}
+      else
+	{
+	  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+	    checkErrorCode (err);
+	}
+    }
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray, 0);
+    }
+  hymem_free_memory (value);
+  RegCloseKey (hKey);
+  return result;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    removeNode
+ * Signature: ([B[BZ[I)V
+ */
+JNIEXPORT void JNICALL Java_java_util_prefs_RegistryPreferencesImpl_removeNode
+  (JNIEnv * env, jobject obj, jbyteArray jpath, jbyteArray jname,
+   jboolean jUserNode, jintArray jErrorCode)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  jbyte *nameStr;
+  HKEY hKey;
+  DWORD err;
+  jboolean isCopy = JNI_TRUE;
+  jint *errArray =
+    (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+
+  err = openRegKey (env, jpath, jUserNode, &hKey, KEY_SET_VALUE);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      return;
+    }
+
+  nameStr = byte2str (env, jname);
+  err = RegDeleteKey (hKey, nameStr);
+  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+    checkErrorCode (err);
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray, 0);
+    }
+  hymem_free_memory (nameStr);
+  RegCloseKey (hKey);
+  return;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    getNode
+ * Signature: ([B[BZ[I)Z
+ */
+JNIEXPORT jboolean JNICALL
+  Java_java_util_prefs_RegistryPreferencesImpl_getNode
+  (JNIEnv * env, jobject obj, jbyteArray jpath, jbyteArray jname,
+   jboolean jUserNode, jintArray jErrorCode)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  jbyte *name;
+  HKEY hKey, childKey;
+  DWORD dwDisposition, err;
+  jboolean isCopy = JNI_TRUE;
+  jint *errArray =
+    (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+
+  err = openRegKey (env, jpath, jUserNode, &hKey, KEY_QUERY_VALUE);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      return JNI_FALSE;
+    }
+
+  name = byte2str (env, jname);
+  err =
+    RegCreateKeyEx (hKey, name, 0, NULL, REG_OPTION_NON_VOLATILE,
+		    KEY_ALL_ACCESS, NULL, &childKey, &dwDisposition);
+  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+    checkErrorCode (err);
+
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray, 0);
+    }
+
+  hymem_free_memory (name);
+  RegCloseKey (hKey);
+  RegCloseKey (childKey);
+
+  return dwDisposition == REG_CREATED_NEW_KEY;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    getChildNames
+ * Signature: ([BZ[I)[[B
+ */
+JNIEXPORT jobjectArray JNICALL
+Java_java_util_prefs_RegistryPreferencesImpl_getChildNames (JNIEnv * env,
+							    jobject obj,
+							    jbyteArray jpath,
+							    jboolean
+							    jUserNode,
+							    jintArray
+							    jErrorCode)
+{
+  PORT_ACCESS_FROM_ENV (env);
+  DWORD number, size;
+  jclass objectClazz = NULL;
+  jobjectArray result = NULL;
+  TCHAR *value;
+  DWORD i = 0, j;
+  HKEY hKey;
+  DWORD err;
+  jboolean isCopy = JNI_TRUE;
+  jint *errArray =
+    (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+
+  err = openRegKey (env, jpath, jUserNode, &hKey, KEY_READ);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      return NULL;
+    }
+
+  err =
+    RegQueryInfoKey (hKey, NULL, NULL, NULL, &number, NULL, NULL, NULL, NULL,
+		     NULL, NULL, NULL);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      RegCloseKey (hKey);
+      return NULL;
+    }
+
+  objectClazz = (*env)->FindClass (env, "java/lang/Object");
+  result = (*env)->NewObjectArray (env, number, objectClazz, NULL);
+  value = hymem_allocate_memory ((MAX_VALUE_DATA + 1) * sizeof (TCHAR));
+  for (j = 0; j < number; j++)
+    {
+      value[0] = '\0';
+      size = MAX_VALUE_DATA + 1;
+      err = RegEnumKeyEx (hKey, j, value, &size, NULL, NULL, NULL, NULL);
+      if (err == ERROR_SUCCESS)
+	{
+	  jbyteArray name = (*env)->NewByteArray (env, strlen (value));
+	  (*env)->SetByteArrayRegion (env, name, 0, strlen (value), value);
+	  (*env)->SetObjectArrayElement (env, result, i++, name);
+	}
+      else
+	{
+	  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+	    checkErrorCode (err);
+	}
+    }
+
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray, 0);
+    }
+  hymem_free_memory (value);
+  RegCloseKey (hKey);
+  return result;
+}
+
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    flushPrefs
+ * Signature: ([BZ[I)V
+ */
+JNIEXPORT void JNICALL Java_java_util_prefs_RegistryPreferencesImpl_flushPrefs
+  (JNIEnv * env, jobject obj, jbyteArray jpath, jboolean jUserNode,
+   jintArray jErrorCode)
+{
+  HKEY hKey;
+  DWORD err;
+  jboolean isCopy = JNI_TRUE;
+  jint *errArray =
+    (*env)->GetPrimitiveArrayCritical (env, jErrorCode, &isCopy);
+
+  err = openRegKey (env, jpath, jUserNode, &hKey, KEY_ALL_ACCESS);
+  if ((errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+       checkErrorCode (err)) !=
+      java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS)
+    {
+      if (isCopy == JNI_TRUE)
+	{
+	  (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray,
+						 0);
+	}
+      return;
+    }
+
+  errArray[java_util_prefs_RegistryPreferencesImpl_ERROR_CODE] =
+    checkErrorCode (RegFlushKey (hKey));
+
+  if (isCopy == JNI_TRUE)
+    {
+      (*env)->ReleasePrimitiveArrayCritical (env, jErrorCode, errArray, 0);
+    }
+  RegCloseKey (hKey);
+  return;
+}

Added: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.def
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.def?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.def (added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.def Wed Mar
15 06:55:38 2006
@@ -0,0 +1,15 @@
+LIBRARY	HYPREFS
+
+SECTIONS
+	.data	READ WRITE
+	.text	EXECUTE READ
+
+EXPORTS
+	Java_java_util_prefs_RegistryPreferencesImpl_getValue
+	Java_java_util_prefs_RegistryPreferencesImpl_putValue
+	Java_java_util_prefs_RegistryPreferencesImpl_removeKey
+	Java_java_util_prefs_RegistryPreferencesImpl_keys
+	Java_java_util_prefs_RegistryPreferencesImpl_removeNode
+	Java_java_util_prefs_RegistryPreferencesImpl_getNode
+	Java_java_util_prefs_RegistryPreferencesImpl_getChildNames
+	Java_java_util_prefs_RegistryPreferencesImpl_flushPrefs

Added: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.rc
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.rc?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.rc (added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/hyprefs.rc Wed Mar
15 06:55:38 2006
@@ -0,0 +1,47 @@
+;
+; Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+; 
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+; 
+;     http://www.apache.org/licenses/LICENSE-2.0
+; 
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+
+#include <windows.h>
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,1,0,0
+ PRODUCTVERSION 0,1,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0x0L
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+			VALUE "CompanyName", "The Apache Software Foundation.\0"
+			VALUE "FileDescription", "Prefs native code\0"
+			VALUE "FileVersion", "0.1\0"
+			VALUE "InternalName", "prefs\0"
+			VALUE "LegalCopyright", "(c) Copyright 2005 The Apache Software Foundation or its licensors,
as applicable.\0"
+			VALUE "OriginalFilename", "hyprefs.dll\0"
+			VALUE "ProductName", "Apache Harmony\0"
+			VALUE "ProductVersion", "0.1\0"
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END

Added: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/java_util_prefs_RegistryPreferencesImpl.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/java_util_prefs_RegistryPreferencesImpl.h?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/java_util_prefs_RegistryPreferencesImpl.h
(added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/java_util_prefs_RegistryPreferencesImpl.h
Wed Mar 15 06:55:38 2006
@@ -0,0 +1,137 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class java_util_prefs_RegistryPreferencesImpl */
+
+#if !defined(_Included_java_util_prefs_RegistryPreferencesImpl)
+#define _Included_java_util_prefs_RegistryPreferencesImpl
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+/* Inaccessible static: factory */
+#undef java_util_prefs_RegistryPreferencesImpl_MAX_KEY_LENGTH
+#define java_util_prefs_RegistryPreferencesImpl_MAX_KEY_LENGTH 80L
+#undef java_util_prefs_RegistryPreferencesImpl_MAX_VALUE_LENGTH
+#define java_util_prefs_RegistryPreferencesImpl_MAX_VALUE_LENGTH 8192L
+#undef java_util_prefs_RegistryPreferencesImpl_MAX_NAME_LENGTH
+#define java_util_prefs_RegistryPreferencesImpl_MAX_NAME_LENGTH 80L
+/* Inaccessible static: prefsPerm */
+/* Inaccessible static: EMPTY_STRING_ARRAY */
+/* Inaccessible static: EMPTY_ABSTRACT_PREFS_ARRAY */
+/* Inaccessible static: eventQueue */
+/* Inaccessible static: eventDispatchThread */
+#undef java_util_prefs_RegistryPreferencesImpl_ERROR_CODE
+#define java_util_prefs_RegistryPreferencesImpl_ERROR_CODE 0L
+#undef java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS
+#define java_util_prefs_RegistryPreferencesImpl_RETURN_SUCCESS 0L
+#undef java_util_prefs_RegistryPreferencesImpl_RETURN_FILE_NOT_FOUND
+#define java_util_prefs_RegistryPreferencesImpl_RETURN_FILE_NOT_FOUND 1L
+#undef java_util_prefs_RegistryPreferencesImpl_RETURN_ACCESS_DENIED
+#define java_util_prefs_RegistryPreferencesImpl_RETURN_ACCESS_DENIED 2L
+#undef java_util_prefs_RegistryPreferencesImpl_RETURN_UNKNOWN_ERROR
+#define java_util_prefs_RegistryPreferencesImpl_RETURN_UNKNOWN_ERROR 3L
+/* Inaccessible static: USER_ROOT */
+/* Inaccessible static: SYSTEM_ROOT */
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    getValue
+ * Signature: ([B[BZ[I)[B
+ */
+  JNIEXPORT jbyteArray JNICALL
+    Java_java_util_prefs_RegistryPreferencesImpl_getValue (JNIEnv *, jobject,
+                                                           jbyteArray,
+                                                           jbyteArray,
+                                                           jboolean,
+                                                           jintArray);
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    putValue
+ * Signature: ([B[B[BZ[I)V
+ */
+  JNIEXPORT void JNICALL Java_java_util_prefs_RegistryPreferencesImpl_putValue
+    (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jboolean,
+     jintArray);
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    removeKey
+ * Signature: ([B[BZ[I)V
+ */
+  JNIEXPORT void JNICALL
+    Java_java_util_prefs_RegistryPreferencesImpl_removeKey (JNIEnv *, jobject,
+                                                            jbyteArray,
+                                                            jbyteArray,
+                                                            jboolean,
+                                                            jintArray);
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    keys
+ * Signature: ([BZ[I)[[B
+ */
+  JNIEXPORT jobjectArray JNICALL
+    Java_java_util_prefs_RegistryPreferencesImpl_keys (JNIEnv *, jobject,
+                                                       jbyteArray, jboolean,
+                                                       jintArray);
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    removeNode
+ * Signature: ([B[BZ[I)V
+ */
+  JNIEXPORT void JNICALL
+    Java_java_util_prefs_RegistryPreferencesImpl_removeNode (JNIEnv *,
+                                                             jobject,
+                                                             jbyteArray,
+                                                             jbyteArray,
+                                                             jboolean,
+                                                             jintArray);
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    getNode
+ * Signature: ([B[BZ[I)Z
+ */
+  JNIEXPORT jboolean JNICALL
+    Java_java_util_prefs_RegistryPreferencesImpl_getNode (JNIEnv *, jobject,
+                                                          jbyteArray,
+                                                          jbyteArray,
+                                                          jboolean,
+                                                          jintArray);
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    getChildNames
+ * Signature: ([BZ[I)[[B
+ */
+  JNIEXPORT jobjectArray JNICALL
+    Java_java_util_prefs_RegistryPreferencesImpl_getChildNames (JNIEnv *,
+                                                                jobject,
+                                                                jbyteArray,
+                                                                jboolean,
+                                                                jintArray);
+/*
+ * Class:     java_util_prefs_RegistryPreferencesImpl
+ * Method:    flushPrefs
+ * Signature: ([BZ[I)V
+ */
+  JNIEXPORT void JNICALL
+    Java_java_util_prefs_RegistryPreferencesImpl_flushPrefs (JNIEnv *,
+                                                             jobject,
+                                                             jbyteArray,
+                                                             jboolean,
+                                                             jintArray);
+#if defined(__cplusplus)
+}
+#endif
+#endif

Added: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/jcl.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/jcl.h?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/jcl.h (added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/jcl.h Wed Mar 15 06:55:38
2006
@@ -0,0 +1,22 @@
+/* Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(jcl_h)
+#define jcl_h
+
+#define USING_VMI
+#include "vmi.h"
+
+#endif /* jcl_h */

Added: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/makefile?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/makefile (added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/makefile Wed Mar 15
06:55:38 2006
@@ -0,0 +1,41 @@
+# Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Makefile for module 'prefs'
+#
+
+!include <..\defines.mak>
+
+SHAREDSUB=$(SHARED)prefs\# comment to avoid \ being treated as continuation
+LIBBASE=hyprefs
+DLLNAME=$(DLLPATH)$(LIBBASE).dll
+LIBNAME=$(LIBPATH)$(LIBBASE).lib
+HYCFLAGS = $(HYCFLAGS) /I$(SHAREDSUB) /I..\zlib\dist /I..\zip /I..\fdlibm
+HYLDFLAGS = $(HYLDFLAGS) -def:$(LIBBASE).def
+
+BUILDFILES = prefs_copyright.obj PreferencesImpl.obj
+
+VIRTFILES = $(LIBBASE).res
+
+SYSLIBFILES = ws2_32.lib Iphlpapi.lib
+
+MDLLIBFILES = \
+	..\lib\hycommon.lib ..\lib\hysig.lib ..\lib\hyzip.lib \
+        ..\lib\hyzlib.lib ..\lib\hypool.lib ..\lib\hyfdlibm.lib \
+	..\lib\hythr.lib ..\lib\vmi.lib
+DLLBASE=0x13300000
+COMMENT=/comment:"Preferences component native code. (c) Copyright 1993, 2005 The Apache
Software Foundation or its licensors, as applicable."
+
+!include <..\rules.mak>

Added: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/prefs_copyright.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/prefs_copyright.c?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/prefs_copyright.c
(added)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/prefs/prefs_copyright.c
Wed Mar 15 06:55:38 2006
@@ -0,0 +1,19 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* A copyright string included in each DLL and executable */
+
+const char hyCopyright[] =
+  "(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable.";



Mime
View raw message