// Path: src/main/java/com/sun/jna/win32/W32APIFunctionMapper.java
// public class W32APIFunctionMapper implements FunctionMapper {
//     public static final FunctionMapper UNICODE = new W32APIFunctionMapper(true);
//     public static final FunctionMapper ASCII = new W32APIFunctionMapper(false);
//     private final String suffix;
//     protected W32APIFunctionMapper(boolean unicode) {
//         this.suffix = unicode ? "W" : "A";
//     }
//     /** Looks up the method name by adding a "W" or "A" suffix as appropriate. 
//      */
//     public String getFunctionName(NativeLibrary library, Method method) {
//         String name = method.getName();
//         if (!name.endsWith("W") && !name.endsWith("A")) {
//             try {
//                 name = library.getFunction(name + suffix, StdCallLibrary.STDCALL_CONVENTION).getName();
//             }
//             catch(UnsatisfiedLinkError e) {
//                 // ignore and let caller use undecorated name
//             }
//         }
//         return name;
//     }
// }
// 
// Path: src/main/java/com/sun/jna/win32/W32APITypeMapper.java
// public class W32APITypeMapper extends DefaultTypeMapper {
//     
//     public static final TypeMapper UNICODE = new W32APITypeMapper(true);
//     public static final TypeMapper ASCII = new W32APITypeMapper(false);
//     
//     protected W32APITypeMapper(boolean unicode) {
//         if (unicode) {
//             TypeConverter stringConverter = new TypeConverter() {
//                 public Object toNative(Object value, ToNativeContext context) {
//                     if (value == null)
//                         return null;
//                     if (value instanceof String[]) {
//                         return new StringArray((String[])value, true);
//                     }
//                     return new WString(value.toString());
//                 }
//                 public Object fromNative(Object value, FromNativeContext context) {
//                     if (value == null)
//                         return null;
//                     return value.toString();
//                 }
//                 public Class nativeType() {
//                     return WString.class;
//                 }
//             };
//             addTypeConverter(String.class, stringConverter);
//             addToNativeConverter(String[].class, stringConverter);
//         }
//         TypeConverter booleanConverter = new TypeConverter() {
//             public Object toNative(Object value, ToNativeContext context) {
//                 return new Integer(Boolean.TRUE.equals(value) ? 1 : 0);
//             }
//             public Object fromNative(Object value, FromNativeContext context) {
//                 return ((Integer)value).intValue() != 0 ? Boolean.TRUE : Boolean.FALSE;
//             }
//             public Class nativeType() {
//                 // BOOL is 32-bit int
//                 return Integer.class;
//             }
//         };
//         addTypeConverter(Boolean.class, booleanConverter);
//     }
// }


import static com.sun.jna.Library.OPTION_FUNCTION_MAPPER;
import static com.sun.jna.Library.OPTION_TYPE_MAPPER;
import java.util.HashMap;
import java.util.Map;
import com.sun.jna.win32.W32APIFunctionMapper;
import com.sun.jna.win32.W32APITypeMapper;

/*
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * <p/>
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package jnacontrib.jna;




/**
 * @author Thomas Boerkel
 */

public interface Options
{
	Map<String, Object>	UNICODE_OPTIONS	= new HashMap<String, Object>()
										{
											{

// Path: src/main/java/com/sun/jna/win32/W32APIFunctionMapper.java
// public class W32APIFunctionMapper implements FunctionMapper {
//     public static final FunctionMapper UNICODE = new W32APIFunctionMapper(true);
//     public static final FunctionMapper ASCII = new W32APIFunctionMapper(false);
//     private final String suffix;
//     protected W32APIFunctionMapper(boolean unicode) {
//         this.suffix = unicode ? "W" : "A";
//     }
//     /** Looks up the method name by adding a "W" or "A" suffix as appropriate. 
//      */
//     public String getFunctionName(NativeLibrary library, Method method) {
//         String name = method.getName();
//         if (!name.endsWith("W") && !name.endsWith("A")) {
//             try {
//                 name = library.getFunction(name + suffix, StdCallLibrary.STDCALL_CONVENTION).getName();
//             }
//             catch(UnsatisfiedLinkError e) {
//                 // ignore and let caller use undecorated name
//             }
//         }
//         return name;
//     }
// }
// 
// Path: src/main/java/com/sun/jna/win32/W32APITypeMapper.java
// public class W32APITypeMapper extends DefaultTypeMapper {
//     
//     public static final TypeMapper UNICODE = new W32APITypeMapper(true);
//     public static final TypeMapper ASCII = new W32APITypeMapper(false);
//     
//     protected W32APITypeMapper(boolean unicode) {
//         if (unicode) {
//             TypeConverter stringConverter = new TypeConverter() {
//                 public Object toNative(Object value, ToNativeContext context) {
//                     if (value == null)
//                         return null;
//                     if (value instanceof String[]) {
//                         return new StringArray((String[])value, true);
//                     }
//                     return new WString(value.toString());
//                 }
//                 public Object fromNative(Object value, FromNativeContext context) {
//                     if (value == null)
//                         return null;
//                     return value.toString();
//                 }
//                 public Class nativeType() {
//                     return WString.class;
//                 }
//             };
//             addTypeConverter(String.class, stringConverter);
//             addToNativeConverter(String[].class, stringConverter);
//         }
//         TypeConverter booleanConverter = new TypeConverter() {
//             public Object toNative(Object value, ToNativeContext context) {
//                 return new Integer(Boolean.TRUE.equals(value) ? 1 : 0);
//             }
//             public Object fromNative(Object value, FromNativeContext context) {
//                 return ((Integer)value).intValue() != 0 ? Boolean.TRUE : Boolean.FALSE;
//             }
//             public Class nativeType() {
//                 // BOOL is 32-bit int
//                 return Integer.class;
//             }
//         };
//         addTypeConverter(Boolean.class, booleanConverter);
//     }
// }


// Path: src/main/java/jnacontrib/jna/Options.java
import static com.sun.jna.Library.OPTION_FUNCTION_MAPPER;
import static com.sun.jna.Library.OPTION_TYPE_MAPPER;
import java.util.HashMap;
import java.util.Map;
import com.sun.jna.win32.W32APIFunctionMapper;
import com.sun.jna.win32.W32APITypeMapper;

/*
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * <p/>
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package jnacontrib.jna;




/**
 * @author Thomas Boerkel
 */

public interface Options
{
	Map<String, Object>	UNICODE_OPTIONS	= new HashMap<String, Object>()
										{
											{

												put(OPTION_TYPE_MAPPER, W32APITypeMapper.UNICODE);
