Towards building jlibusb with gradle

* rename package ch.ntb.inf.libusbJava to ch.ntb.usb/Device.java
* separate main, app, test and demo source files
* reorganise static library files
* add prebuilt libraries for testing purposes
* move auxiliary files to appropriate directories
* remove obsolete files
This commit is contained in:
2014-11-29 22:33:13 +00:00
parent f847c1a597
commit 8975760ad4
79 changed files with 2484 additions and 4011 deletions

View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse-cdt version="2.0"?>
<cdtproject id="org.eclipse.cdt.make.core.make">
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
<data>
<item id="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
</item>
<item id="org.eclipse.cdt.core.pathentry">
<pathentry kind="src" path=""/>
<pathentry kind="out" path=""/>
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
</item>
</data>
</cdtproject>

View File

@@ -1,399 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.so.debug.655628217">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.so.debug.655628217" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/LibusbJava-1.0"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/LibusbJava-1.0/Debug"/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="dll" artifactName="LibusbJava-1.0" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.mingw.so.debug.655628217" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.so.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.so.debug.655628217." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.mingw.so.debug.649953106" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.so.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.PE" id="cdt.managedbuild.target.gnu.platform.mingw.so.debug.419792570" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.so.debug"/>
<builder buildPath="${workspace_loc:/LibusbJava-1.0/Debug}" enabledIncrementalBuild="false" errorParsers="" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1336735830" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.assembler.mingw.so.debug.33475304" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.so.debug">
<option id="gnu.both.asm.option.include.paths.1659184725" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1936813267" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.191065063" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.so.debug.1164145566" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.so.debug">
<option id="gnu.cpp.compiler.mingw.so.debug.option.optimization.level.50897533" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.so.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.so.debug.option.debugging.level.156319969" name="Debug Level" superClass="gnu.cpp.compiler.mingw.so.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.872418928" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include/win32&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.other.other.913778927" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value=" -mwindows -c -fmessage-length=0" valueType="string"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1526583498" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_JNI_IMPLEMENTATION_"/>
<listOptionValue builtIn="false" value="TEST_USING_JVM=1"/>
<listOptionValue builtIn="false" value="DO_UNIT_TEST=1"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.728081923" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.mingw.so.debug.1087418309" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.so.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.so.debug.option.optimization.level.10490174" name="Optimization Level" superClass="gnu.c.compiler.mingw.so.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.so.debug.option.debugging.level.614745454" name="Debug Level" superClass="gnu.c.compiler.mingw.so.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.warnings.allwarn.26121016" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<option id="gnu.c.compiler.option.include.paths.1758454762" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include/win32&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.645355643" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DO_UNIT_TEST=1"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1861606347" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.so.debug.1427267537" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.so.debug">
<option defaultValue="true" id="gnu.c.link.mingw.so.debug.option.shared.1733298925" name="Shared (-shared)" superClass="gnu.c.link.mingw.so.debug.option.shared" valueType="boolean"/>
</tool>
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.debug.1427349250" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.debug">
<option defaultValue="true" id="gnu.cpp.link.mingw.so.debug.option.shared.1400356464" name="Shared (-shared)" superClass="gnu.cpp.link.mingw.so.debug.option.shared" value="true" valueType="boolean"/>
<option id="gnu.cpp.link.option.paths.76062345" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LibusbJava-1.0/MinGW64/dll}&quot;"/>
</option>
<option id="gnu.cpp.link.option.libs.913694978" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
<listOptionValue builtIn="false" value="usb-1.0"/>
</option>
<option id="gnu.cpp.link.option.soname.24039947" name="Shared object name (-Wl,-soname=)" superClass="gnu.cpp.link.option.soname" value="" valueType="string"/>
<option id="gnu.cpp.link.option.defname.476982875" name="DEF file name (-Wl,--output-def=)" superClass="gnu.cpp.link.option.defname" value="" valueType="string"/>
<option id="gnu.cpp.link.option.implname.1165059022" name="Import Library name (-Wl,--out-implib=)" superClass="gnu.cpp.link.option.implname" value="" valueType="string"/>
<option id="gnu.cpp.link.option.other.410145491" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other"/>
<option id="gnu.cpp.link.option.flags.1893248534" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.543939125" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
<outputType id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.debug.output.2052938897" outputPrefix="" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.debug.output"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.so.release.1888654320">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.so.release.1888654320" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/LibusbJava-1.0"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/LibusbJava-1.0/Release"/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="dll" artifactName="LibusbJava-1.0" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.so.release.1888654320" name="Release" parent="cdt.managedbuild.config.gnu.mingw.so.release">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.so.release.1888654320." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.so.release.189191138" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.so.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.so.release.265019246" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.so.release"/>
<builder buildPath="${workspace_loc:/LibusbJava-1.0/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.406358337" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.so.release.437658652" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.so.release">
<option id="gnu.both.asm.option.include.paths.44964561" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.705742913" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1096725072" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.so.release.2107865849" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.so.release">
<option id="gnu.cpp.compiler.mingw.so.release.option.optimization.level.695929934" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.so.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.so.release.option.debugging.level.359553480" name="Debug Level" superClass="gnu.cpp.compiler.mingw.so.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1978727923" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;../%JAVA_HOME%\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;../%JAVA_HOME%\include\win32&quot;"/>
<listOptionValue builtIn="false" value="&quot;${JAVA_HOME}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${JAVA_HOME}/include/win32&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1358844921" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.c.compiler.mingw.so.release.913614476" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.so.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.so.release.option.optimization.level.385731035" name="Optimization Level" superClass="gnu.c.compiler.mingw.so.release.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.so.release.option.debugging.level.1110058173" name="Debug Level" superClass="gnu.c.compiler.mingw.so.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.630929322" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:/Program Files/Java/jdk1.6.0_26/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1931731652" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.so.release.867150168" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.so.release">
<option defaultValue="true" id="gnu.c.link.mingw.so.release.option.shared.14695501" name="Shared (-shared)" superClass="gnu.c.link.mingw.so.release.option.shared" valueType="boolean"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.release.377423232" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.release">
<option defaultValue="true" id="gnu.cpp.link.mingw.so.release.option.shared.231550286" name="Shared (-shared)" superClass="gnu.cpp.link.mingw.so.release.option.shared" valueType="boolean"/>
<option id="gnu.cpp.link.option.libs.2023104843" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
<listOptionValue builtIn="false" value="libusb-1.0"/>
</option>
<option id="gnu.cpp.link.option.paths.1066955411" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LibusbJava-1.0/lib}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1533499628" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="LibusbJava-1.0.cdt.managedbuild.target.gnu.mingw.so.1106949959" name="Shared Library" projectType="cdt.managedbuild.target.gnu.mingw.so"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
<pathentry include="C:/Program Files/Java/jdk1.6.0_31/include" kind="inc" path="" system="true"/>
<pathentry include="C:/Program Files/Java/jdk1.6.0_31/include/win32" kind="inc" path="" system="true"/>
<pathentry kind="src" path=""/>
<pathentry kind="out" path=""/>
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="1">
<resource resourceType="PROJECT" workspacePath="/LibusbJava"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.so.release.1888654320;cdt.managedbuild.config.gnu.mingw.so.release.1888654320.;cdt.managedbuild.tool.gnu.c.compiler.mingw.so.release.913614476;cdt.managedbuild.tool.gnu.c.compiler.input.1931731652">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.so.debug.655628217;cdt.managedbuild.config.gnu.mingw.so.debug.655628217.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.so.debug.1164145566;cdt.managedbuild.tool.gnu.cpp.compiler.input.728081923">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.so.release.1888654320;cdt.managedbuild.config.gnu.mingw.so.release.1888654320.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.so.release.2107865849;cdt.managedbuild.tool.gnu.cpp.compiler.input.1358844921">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.so.debug.655628217;cdt.managedbuild.config.gnu.mingw.so.debug.655628217.;cdt.managedbuild.tool.gnu.c.compiler.mingw.so.debug.1087418309;cdt.managedbuild.tool.gnu.c.compiler.input.1861606347">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
</cproject>

View File

@@ -1,70 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>LibusbJava-1.0</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/LibusbJava-1.0/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@@ -1,207 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="LibusbJava" basedir=".">
<!-- ======================================================================
Build file for libusbJava Shared Library
REQUIREMENTS:
g++
http://libusbJava.sourceforge.net
====================================================================== -->
<description>
Build file for libusbJava Shared Library
</description>
<property file="version.properties" />
<property name="abi" value="0" />
<property name="version" value="${abi}.0.0" />
<property name="out_dir" value="${basedir}/out" />
<property name="ver_info" value="${out_dir}/LibusbJava.res" />
<property name="Unit-Test Executable" value="${out_dir}/LibusbJava-UnitTest.exe" />
<property name="Source Files" value=" ${basedir}/LibusbJava.cpp
${basedir}/objects/Usb_Device.cpp"
/>
<property name="LIB_CCFLAGS_WIN" value="-I&quot;C:/Program Files/Java/jdk${java.version}/include&quot;
-I&quot;C:/Program Files/Java/jdk${java.version}/include/win32&quot;
-I${basedir}
-I${basedir}/libusb/include
-Wall
-Wno-write-strings
-D_JNI_IMPLEMENTATION_
-Wl,--kill-at
-mwindows
-m32
-m64
-static
-shared
${Source Files}
${ver_info}
-o ${out_dir}/LibusbJava-1_0.dll
-L${basedir}/libusb/MinGW64/static
-L${basedir}/libusb/MinGW32/static
-lusb-1.0"
/>
<property name="APP_CCFLAGS_WIN" value="-Wall
-Wno-write-strings
-D_JNI_IMPLEMENTATION_
-DDO_UNIT_TEST=1
-DTEST_USING_JVM=1
-Wl,--kill-at
-O0
-g
-mwindows
-static
-I&quot;C:/Program Files/Java/jdk${java.version}/include&quot;
-I&quot;C:/Program Files/Java/jdk${java.version}/include/win32&quot;
${basedir}/test/LibusbJavaTest.cpp
${basedir}/test/CuTest.c
-o
${Unit-Test Executable}
-L&quot;C:/Program Files/Java/jdk${java.version}/lib&quot;" />
<property name="LIB_CCFLAGS_LIN" value="-Wno-write-strings
-shared
-fPIC
-Wl,-soname,libusbJava-1.0.so
-I/usr/lib
-I/usr/lib/jvm/java-6-openjdk/include/
-I${basedir}
-I${basedir}/libusb/include
${Source Files}
-o${out_dir}/libusbJava-1.0.so.${version}
/usr/lib/libusb-1.0.so" />
<property name="APP_CCFLAGS_LIN" value="-Wall
-Wno-write-strings
-D_JNI_IMPLEMENTATION_
-Wl,--kill-at
-static
-I/usr/lib
-I/usr/lib/jvm/java-6-openjdk/include/
-I${basedir}
${basedir}/test/CuTest.c
${basedir}/test/LibusbJavaTest.cpp
-o
${Unit-Test Executable}" />
<patternset id="buildfiles">
<include name="**/*.o" />
<include name="**/*.dll" />
<include name="**/*.exe" />
<include name="**/*.res" />
<include name="**/*.rc" />
<include name="**/*.so.*" />
</patternset>
<target name="clean" description="--> Clean build files">
<delete>
<fileset dir=".">
<patternset refid="buildfiles" />
</fileset>
</delete>
</target>
<!-- Linux targets -->
<target name="linux" depends="clean, LibusbJava Test Linux" description="--> Build libusbJava-1.0.so">
<echo level="info" message="Building Library" />
<exec dir="." executable="g++" failonerror="true">
<arg line="${LIB_CCFLAGS_LIN}" />
</exec>
</target>
<target name="LibusbJava Test Linux" depends="Build LibusbJava Test Linux" description="--> Execute Unit-Tests">
<echo level="info" message="Executing Unit-Tests" />
<exec dir="." executable="${Unit-Test Executable}" failonerror="true" />
</target>
<target name="Build LibusbJava Test Linux">
<property name="LIB_CCFLAGS" value="${LIB_CCFLAGS_LIN}" />
<property name="APP_CCFLAGS" value="${APP_CCFLAGS_LIN}" />
<antcall target="Build LibusbJava Test" />
</target>
<!-- Windows targets -->
<target name="Windows 64Bit" depends="clean, LibusbJava Test Windows, Windows Resource" description="--> Build LibusbJava-1_0.dll">
<echo level="info" message="Building Library" />
<exec dir="." executable="g++" failonerror="true">
<arg line="${LIB_CCFLAGS_WIN}" />
</exec>
</target>
<target name="Windows 64Bit Debug" depends="clean, Windows Resource" description="--> Build LibusbJava-1_0.dll">
<echo level="info" message="Building Library" />
<exec dir="." executable="g++" failonerror="true">
<arg line="${LIB_CCFLAGS_WIN} -g -O0" />
</exec>
</target>
<target name="LibusbJava Test Windows" depends="Build LibusbJava Test Windows" description="--> Execute Unit-Tests">
<echo level="info" message="Executing Unit-Tests" />
<exec dir="." executable="${Unit-Test Executable}" failonerror="true" />
</target>
<target name="Build LibusbJava Test Windows" depends="Windows Resource">
<property name="LIB_CCFLAGS" value="${LIB_CCFLAGS_WIN}" />
<property name="APP_CCFLAGS" value="${APP_CCFLAGS_WIN}" />
<antcall target="Build LibusbJava Test" />
</target>
<target name="Windows Resource" description="--> Build Version resource">
<property name="rc_file" value="${out_dir}/LibusbJava.rc" />
<basename property="filename" file="${rc_file}" />
<echo level="info" message="Generating rc-File: ${filename}" />
<exec dir="." executable="build_rc.cmd">
<arg value="${rc_file}" />
<arg value="${version.major}" />
<arg value="${version.minor}" />
<arg value="${version.micro}" />
<arg value="${version.nano}" />
</exec>
<basename property="target_file" file="${ver_info}" />
<echo level="info" message="Compiling res-File: ${target_file}" />
<exec dir="." executable="windres">
<arg value="-Ocoff" />
<arg value="-o${ver_info}" />
<arg value="${rc_file}" />
</exec>
</target>
<!-- Mac -->
<target name="mac" depends="clean" description="--> Build LibusbJava-1.0.jnilib">
<exec dir="." executable="g++" failonerror="true">
<arg value="-v" />
<arg value="-dynamiclib" />
<arg line="-I /System/Library/Frameworks/JavaVM.framework/Headers/" />
<arg value="ch_ntb_inf_libusbJava_LibusbJava.cpp" />
<arg line="-o LibusbJava-1_0.jnilib" />
<arg line="-l stdc++" />
<arg value="/usr/local/lib/libusb.dylib" />
<arg value="/usr/local/lib/libusbpp.dylib" />
</exec>
</target>
<!-- Generic targets -->
<target name="Build LibusbJava Test" description="--> Build Unit-Tests">
<echo level="info" message="Building Library for unit tests:" />
<exec dir="." executable="g++" failonerror="true">
<arg line="${LIB_CCFLAGS}" />
<arg value="-DDO_UNIT_TEST" />
<arg value="-DTEST_USING_JVM" />
<arg value="${basedir}/test/CuTest.c" />
<arg value="-O0" />
<arg value="-g" />
</exec>
<echo level="info" message="Building Unit-Tests with JDK ${java.version}" />
<exec dir="." executable="g++" failonerror="true">
<arg line="${APP_CCFLAGS}" />
<arg value="-DDO_UNIT_TEST=1" />
<arg value="-DTEST_USING_JVM=1" />
<arg value="-O0" />
<arg value="-g" />
</exec>
</target>
</project>

View File

@@ -1,32 +0,0 @@
@echo off
echo #include ^<winver.h^> > %1
echo. >> %1
echo VS_VERSION_INFO VERSIONINFO >> %1
echo FILEVERSION %2, %3, %4, %5 >> %1
echo PRODUCTVERSION %2, %3, %4, %5 >> %1
echo FILEFLAGSMASK 0x3FL >> %1
echo FILEFLAGS 0x0L >> %1
echo FILEOS VOS_NT_WINDOWS32 >> %1
echo FILETYPE VFT_DLL >> %1
echo FILESUBTYPE VFT2_UNKNOWN >> %1
echo BEGIN >> %1
echo BLOCK "StringFileInfo" >> %1
echo BEGIN >> %1
echo BLOCK "040904b0" >> %1
echo BEGIN >> %1
echo VALUE "CompanyName", "http://libusbjava.sourceforge.net" >> %1
echo VALUE "FileDescription", "JNI Library for LibusbJava stub" >> %1
echo VALUE "FileVersion", "%2.%3.%4.%5\0" >> %1
echo VALUE "InternalName", "LibusbJava-1_0.dll" >> %1
echo VALUE "LegalCopyright", "2012 NTB Interstate University of Applied Sciences of Technology Buchs/Chur/St.Gallen" >> %1
echo VALUE "OriginalFilename","LibusbJava-1_0.dll" >> %1
echo VALUE "ProductName", "LibusbJava" >> %1
echo VALUE "ProductVersion", "%2.%3.%4.%5\0" >> %1
echo END >> %1
echo END >> %1
echo. >> %1
echo BLOCK "VarFileInfo" >> %1
echo BEGIN >> %1
echo VALUE "Translation", 0x409, 1200 >> %1
echo END >> %1
echo END >> %1

View File

@@ -1,54 +0,0 @@
############################
# common build properties #
############################
# folders
build.dir.src=src
build.dir.bin=bin
# filenames
build.lib.libusb=libusb.a
build.lib.libusbpp=libusbpp.a
build.linux.lib.libusb=libusb.so
build.linux.lib.libusbpp=libusbpp.so
build.mac.lib.libusb=libusb.dylib
build.mac.lib.libusbpp=libusbpp.dylib
build.shlib.srcname=LibusbJava.cpp
build.shlib.win.shlibname=LibusbJava.dll
build.shlib.linux.shlibname=libusbJava.so
build.shlib.mac.shlibname=libusbJava.jnilib
build.test.srcname=LibusbTest
build.test.execname=LibusbTest
#####################################
# Windows specific build properties #
#####################################
build.win.compiler=g++
build.win.windres=windres
build.win.resource.rc=resource.rc
build.win.resource.obj=resource.o
####################################
# Linux specific build properties #
####################################
build.linux.compiler=g++
build.linux.includes=/usr/lib
build.linux.includes2=${build.linux.includes}
build.linux.includes3=${build.linux.includes}
## set the following properties if you require additional include paths
#
## e.g. on ubuntu linux (with gcj)
# build.linux.includes2=/usr/lib/jvm/java-1.4.2.gcj-4.1-1.4.2.0/include
#
## e.g. on ubuntu linux (with jdk 6) use
# build.linux.includes2=/usr/lib/jvm/java-6-sun-1.6.0.00/include
# build.linux.includes3=${build.linux.includes2}/linux
####################################
# Mac specific build properties #
####################################
build.mac.compiler=gcc
build.mac.jni=/System/Library/Frameworks/JavaVM.framework/Headers/
build.mac.includes=/usr/local/lib
build.mac.stdclib=stdc++

View File

@@ -1,4 +0,0 @@
version.major=1
version.minor=0
version.micro=1
version.nano=0

View File

@@ -1,27 +1,27 @@
Project description Project description
------------------- -------------------
Java libusb wrapper is a Java wrapper for the libsub and libusb-win32 USB library. Java libusb wrapper is a Java wrapper for the libsub and libusb-win32 USB library.
* libusb aim is to create a library for use by user level applications to access USB devices regardless of OS. * libusb aim is to create a library for use by user level applications to access USB devices regardless of OS.
* libusb-win32 is a port of the libusb library to the Windows operating systems. The library allows user space applications to access any USB device on Windows in a generic way without writing any line of kernel driver code. * libusb-win32 is a port of the libusb library to the Windows operating systems. The library allows user space applications to access any USB device on Windows in a generic way without writing any line of kernel driver code.
For more information about libusb visit: For more information about libusb visit:
http://libusb.sourceforge.net/ http://libusb.sourceforge.net/
For more information about LibUsb-Win32 visit: For more information about LibUsb-Win32 visit:
http://libusb-win32.sourceforge.net http://libusb-win32.sourceforge.net
http://sourceforge.net/projects/libusb-win32 http://sourceforge.net/projects/libusb-win32
For more information about Java LibUsb-Win32 wrapper visit: For more information about Java LibUsb-Win32 wrapper visit:
http://libusbjava.sourceforge.net http://libusbjava.sourceforge.net
http://sourceforge.net/projects/libusbjava http://sourceforge.net/projects/libusbjava
License License
------- -------
The Java libusb wrapper library is released under the LGPL. See LGPL.txt The Java libusb wrapper library is released under the LGPL. See LGPL.txt
for more information. for more information.
For licensing information about libusb see http://sourceforge.net/projects/libusb/. For licensing information about libusb see http://sourceforge.net/projects/libusb/.
For licensing information about LibUsb-Win32 see http://libusb-win32.sourceforge.net/#license. For licensing information about LibUsb-Win32 see http://libusb-win32.sourceforge.net/#license.
Authors Authors
------- -------
Andreas Schläpfer <spandi at users.sourceforge.net> Andreas Schläpfer <spandi at users.sourceforge.net>

View File

@@ -3,20 +3,162 @@ apply plugin: 'cpp'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'eclipse' apply plugin: 'eclipse'
group = 'com.github.boukefalos'
archivesBaseName = 'jlibusb'
version = '0.5.7'
repositories { repositories {
maven {
url 'https://github.com/Boukefalos/jlibloader/raw/mvn-repo/'
}
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
compile 'com.github.boukefalos:jlibloader:0.2'
testCompile 'junit:junit:4.11' testCompile 'junit:junit:4.11'
} }
uploadArchives { group = 'com.github.boukefalos'
repositories.mavenDeployer { project.archivesBaseName = 'jlibusb'
repository(url: uri('.maven')) version = '0.5.7'
def jniVersion = '0.2.3.0'
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}
model {
platforms {
windows_i386 {
architecture 'i386'
operatingSystem 'windows'
}
windows_amd64 {
architecture 'amd64'
operatingSystem 'windows'
}
}
toolChains {
gcc(Gcc) {
addPlatformConfiguration(new TargetPlatformConfiguration() {
boolean supportsPlatform(Platform platform) {
platform.operatingSystem.current && platform.operatingSystem.name == 'windows' &&
platform.architecture.name == 'amd64'
}
List<String> getCppCompilerArgs() { ['-m64', '-fpermissive'] }
List<String> getCCompilerArgs() { ['-m64'] }
List<String> getObjectiveCCompilerArgs() { ['-m64'] }
List<String> getObjectiveCppCompilerArgs() { ['-m64'] }
List<String> getAssemblerArgs() { ['--64'] }
List<String> getLinkerArgs() { ['-m64'] }
List<String> getStaticLibraryArchiverArgs() { [] }
})
}
}
repositories {
libs(PrebuiltLibraries) {
usb { lib ->
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("lib/${targetPlatform.name}/libusb-1.0.dll.a")
}
}
}
}
}
def jniHeadersDir = file("$buildDir/headers")
task jniHeaders(dependsOn: compileJava) {
def outputFile = file("$jniHeadersDir/LibusbJava.h")
inputs.files sourceSets.main.output
outputs.file outputFile
exec {
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah')
args '-o', outputFile
args '-classpath', sourceSets.main.output.classesDir
args '-classpath', file("$buildDir/../bin")
args 'ch.ntb.usb.LibusbJava1'
} }
}
libraries {
main {
baseName project.archivesBaseName
}
all {
binaries.all {
cppCompiler.args '-I' + jniHeadersDir
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32"
linker.args '-Wl,--kill-at', '-static-libgcc', '-static-libstdc++'
tasks.withType(CppCompile) { task ->
//task.dependsOn jniHeaders
}
lib library: 'usb', linkage: 'static'
}
}
}
tasks.withType(Upload) {
repositories {
mavenDeployer {
repository(url: uri('.maven'))
}
}
}
configurations {
jni
}
def deployer = uploadJni.repositories.mavenDeployer
binaries.withType(SharedLibraryBinary) { binary ->
if (!buildable) {
return
}
def variantName = "${targetPlatform.operatingSystem.name}-${targetPlatform.architecture.name}"
def taskName = "jar-${variantName}"
def nativeJar = project.tasks.findByName(taskName)
if (nativeJar == null) {
nativeJar = project.task(taskName, type: Jar) {
baseName = "${project.archivesBaseName}-$variantName"
}
artifacts {
jni nativeJar
}
def jniPom = deployer.addFilter(variantName) { artifact, file ->
return file == nativeJar.archivePath
}
jniPom.groupId = project.group
jniPom.artifactId = nativeJar.baseName
jniPom.version = jniVersion
jniPom.scopeMappings.mappings.clear()
}
def builderTask = binary.tasks.builder
def libraryDirectory = project.group.replace('.', '/') + "/${project.archivesBaseName}/${variantName}"
nativeJar.into(libraryDirectory) { from builderTask.outputFile }
nativeJar.dependsOn builderTask
}
def mainPom = uploadArchives.repositories.mavenDeployer.pom
mainPom.groupId = project.group
mainPom.artifactId = jar.baseName
mainPom.version = project.version
mainPom.scopeMappings.mappings.clear()
mainPom.withXml { provider ->
def node = provider.asNode()
def deps = node.appendNode('dependencies')
['windows-amd64', 'windows-i386'].each { platform ->
def dep = deps.appendNode('dependency')
dep.appendNode('groupId', project.group)
dep.appendNode('artifactId', "${project.archivesBaseName}-${platform}")
dep.appendNode('version', jniVersion)
}
def dep = deps.appendNode('dependency')
dep.appendNode('groupId', 'com.github.boukefalos')
dep.appendNode('artifactId', 'jlibloader')
dep.appendNode('version', '0.2')
}
jar {
from sourceSets.main.allSource
} }

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="LibusbJava-1.0/out"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="test">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="LibusbJava-1.0/out"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ch.ntb.inf.libusbJava</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsensis.installoptions.InstallOptionsBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>net.sf.eclipsensis.installoptions.InstallOptionsNature</nature>
</natures>
</projectDescription>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/ch.ntb.inf.libusbJava/src/ch/ntb/inf/libusbJava/usbView/UsbView.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ch.ntb.inf.libusbJava.usbView.UsbView"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ch.ntb.inf.libusbJava"/>
</launchConfiguration>

View File

@@ -1 +0,0 @@
# MTJ Build Properties

View File

@@ -1,66 +0,0 @@
<?xml version="1.0"?>
<!-- ======================================================================
ch.ntb.inf.libusbJava
Ant tasks for ch.ntb.inf.libusbJava
====================================================================== -->
<project name="ch.ntb.inf.libusbJava" basedir="." default="javadoc">
<description>
Ant tasks for ch.ntb.inf.libusbJava
</description>
<tstamp />
<property file="project.properties" />
<property file="version.properties" />
<patternset id="classfiles">
<include name="**/libusbJava/**/*.class" />
<exclude name="**/test/*" />
</patternset>
<patternset id="configfiles">
<include name="**/*.configure" />
</patternset>
<target name="clean" description="--> Clean all folders">
<delete dir="${project.dir.bin}" />
<delete dir="${project.dir.doc}" />
<delete dir="${project.dir.lib}" />
<delete dir="${project.dir.demos}" />
</target>
<target name="compile" depends="clean" description="--> Compile Java files">
<mkdir dir="${project.dir.bin}" />
<javac srcdir="${project.dir.src}" destdir="${project.dir.bin}" debug="on" encoding="iso-8859-1"/>
</target>
<target name="jar" depends="compile" description="--> Create Jar">
<mkdir dir="${project.dir.lib}" />
<echo>Building Version ${version.major}.${version.minor}.${version.release}</echo>
<jar destfile="${project.dir.lib}/${project.jarfile}.jar">
<fileset dir="${project.dir.bin}">
<patternset refid="classfiles" />
</fileset>
<fileset dir="${project.dir.src}">
<patternset refid="configfiles" />
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="${project.manifest.mainclass}" />
<section name="common">
<attribute name="Implementation-Title" value="${project.name}" />
<attribute name="Implementation-Version" value="${version.major}.${version.minor}.${version.release} ${TODAY}" />
<attribute name="Implementation-Vendor" value="${project.vendor}" />
</section>
</manifest>
</jar>
<!-- copy and rename to versioned jar -->
<copy file="${project.dir.lib}/${project.jarfile}.jar" tofile="${project.dir.lib}/${project.jarfile}-${version.major}.${version.minor}.${version.release}.jar"/>
</target>
<target name="javadoc" description="--> Create Javadoc">
<javadoc destdir="${project.dir.doc}" encoding="iso-8859-1">
<fileset dir="${project.dir.src}" includes="**/*.java" />
</javadoc>
</target>
</project>

View File

@@ -1,8 +0,0 @@
java2html.dir.lib=D:/MyDocuments/Download/Programming/java2html
java2html.dir.src=test/ch/ntb/usb/demo/
project.server.name=shell.sourceforge.net
project.server.dir=/home/groups/l/li/libusbjava/htdocs/wp/res
project.server.dir.doc=${project.server.dir}/doc
project.server.dir.bin=${project.server.dir}/bin
project.server.dir.demos=${project.server.dir}/demos

View File

@@ -1,60 +0,0 @@
<?xml version="1.0"?>
<!-- ======================================================================
ch.ntb.inf.libusbJava
Ant deployment tasks for ch.ntb.inf.libusbJava
NOTE: for deployment the properties
project.server.username
project.server.password
must be set on the command line
(e.g. -Dproject.server.username=X as jvm command line argument).
====================================================================== -->
<project name="ch.ntb.inf.libusbJava.deployment" basedir=".">
<description>
Ant deployment tasks for ch.ntb.inf.libusbJava
</description>
<import file="build.xml" />
<property file="deployment.properties" />
<taskdef name="java2html" classname="de.java2html.anttasks.Java2HtmlTask" classpath="${java2html.dir.lib}/java2html.jar" />
<target name="java2html">
<java2html srcdir="${java2html.dir.src}" destdir="${project.dir.demos}" includes="**/*.java" overwrite="true" style="eclipse" showFileName="true" />
</target>
<!--
<target name="deploy" depends="jar, javadoc, java2html" description="-> Deploy to server">
<echo message="\\www-server\web must be mapped to W:" />
<echo message="copy jar file to server" />
<copy file="${project.dir.lib}/${project.jarfile}.jar" todir="${project.server.dir.bin}" />
<echo message="copy javadoc to server" />
<copy todir="${project.server.dir.doc}">
<fileset dir="${project.dir.doc}" />
</copy>
<echo message="copy html demo files to server" />
<copy todir="${project.server.dir.demos}">
<fileset dir="${project.dir.demos}" />
</copy>
</target>
-->
<target name="deploy" depends="javadoc, java2html" description="-> Deploy to server">
<!--
<echo message="copy jar file to server" />
<scp trust="true" file="${project.dir.lib}/${project.jarfile}.jar" todir="${project.server.username}:${project.server.password}@${project.server.name}:${project.server.dir.bin}" />
-->
<echo message="copy javadoc to server" />
<scp trust="true" todir="${project.server.username}:${project.server.password}@${project.server.name}:${project.server.dir.doc}">
<fileset dir="${project.dir.doc}" />
</scp>
<echo message="copy html demo files to server" />
<scp trust="true" todir="${project.server.username}:${project.server.password}@${project.server.name}:${project.server.dir.demos}">
<fileset dir="${project.dir.demos}" />
</scp>
</target>
</project>

View File

@@ -1,10 +0,0 @@
#Tue Mar 30 10:58:35 CEST 2010
project.name=ch.ntb.inf.libusbJava
project.vendor=inf.ntb.ch
project.dir.src=src
project.dir.bin=bin
project.dir.lib=lib
project.dir.doc=doc
project.dir.demos=demos
project.jarfile=${project.name}
project.manifest.mainclass=ch.ntb.inf.libusbJava.usbView.UsbView

View File

@@ -1,4 +0,0 @@
#Tue Mar 30 10:58:35 CEST 2010
version.major=1
version.minor=0
version.release=0

View File

@@ -1,126 +0,0 @@
LIBRARY "libusb-1.0.dll"
EXPORTS
libusb_alloc_transfer
libusb_alloc_transfer@4 = libusb_alloc_transfer
libusb_attach_kernel_driver
libusb_attach_kernel_driver@8 = libusb_attach_kernel_driver
libusb_bulk_transfer
libusb_bulk_transfer@24 = libusb_bulk_transfer
libusb_cancel_transfer
libusb_cancel_transfer@4 = libusb_cancel_transfer
libusb_claim_interface
libusb_claim_interface@8 = libusb_claim_interface
libusb_clear_halt
libusb_clear_halt@8 = libusb_clear_halt
libusb_close
libusb_close@4 = libusb_close
libusb_control_transfer
libusb_control_transfer@32 = libusb_control_transfer
libusb_detach_kernel_driver
libusb_detach_kernel_driver@8 = libusb_detach_kernel_driver
libusb_error_name
libusb_error_name@4 = libusb_error_name
libusb_event_handler_active
libusb_event_handler_active@4 = libusb_event_handler_active
libusb_event_handling_ok
libusb_event_handling_ok@4 = libusb_event_handling_ok
libusb_exit
libusb_exit@4 = libusb_exit
libusb_free_config_descriptor
libusb_free_config_descriptor@4 = libusb_free_config_descriptor
libusb_free_device_list
libusb_free_device_list@8 = libusb_free_device_list
libusb_free_transfer
libusb_free_transfer@4 = libusb_free_transfer
libusb_get_active_config_descriptor
libusb_get_active_config_descriptor@8 = libusb_get_active_config_descriptor
libusb_get_bus_number
libusb_get_bus_number@4 = libusb_get_bus_number
libusb_get_config_descriptor
libusb_get_config_descriptor@12 = libusb_get_config_descriptor
libusb_get_config_descriptor_by_value
libusb_get_config_descriptor_by_value@12 = libusb_get_config_descriptor_by_value
libusb_get_configuration
libusb_get_configuration@8 = libusb_get_configuration
libusb_get_device
libusb_get_device@4 = libusb_get_device
libusb_get_device_address
libusb_get_device_address@4 = libusb_get_device_address
libusb_get_device_descriptor
libusb_get_device_descriptor@8 = libusb_get_device_descriptor
libusb_get_device_list
libusb_get_device_list@8 = libusb_get_device_list
libusb_get_device_speed
libusb_get_device_speed@4 = libusb_get_device_speed
libusb_get_max_iso_packet_size
libusb_get_max_iso_packet_size@8 = libusb_get_max_iso_packet_size
libusb_get_max_packet_size
libusb_get_max_packet_size@8 = libusb_get_max_packet_size
libusb_get_next_timeout
libusb_get_next_timeout@8 = libusb_get_next_timeout
libusb_get_parent
libusb_get_parent@4 = libusb_get_parent
libusb_get_pollfds
libusb_get_pollfds@4 = libusb_get_pollfds
libusb_get_port_number
libusb_get_port_number@4 = libusb_get_port_number
libusb_get_port_path
libusb_get_port_path@16 = libusb_get_port_path
libusb_get_string_descriptor_ascii
libusb_get_string_descriptor_ascii@16 = libusb_get_string_descriptor_ascii
libusb_get_version
libusb_get_version@0 = libusb_get_version
libusb_handle_events
libusb_handle_events@4 = libusb_handle_events
libusb_handle_events_completed
libusb_handle_events_completed@8 = libusb_handle_events_completed
libusb_handle_events_locked
libusb_handle_events_locked@8 = libusb_handle_events_locked
libusb_handle_events_timeout
libusb_handle_events_timeout@8 = libusb_handle_events_timeout
libusb_handle_events_timeout_completed
libusb_handle_events_timeout_completed@12 = libusb_handle_events_timeout_completed
libusb_has_capability
libusb_has_capability@4 = libusb_has_capability
libusb_init
libusb_init@4 = libusb_init
libusb_interrupt_transfer
libusb_interrupt_transfer@24 = libusb_interrupt_transfer
libusb_kernel_driver_active
libusb_kernel_driver_active@8 = libusb_kernel_driver_active
libusb_lock_event_waiters
libusb_lock_event_waiters@4 = libusb_lock_event_waiters
libusb_lock_events
libusb_lock_events@4 = libusb_lock_events
libusb_open
libusb_open@8 = libusb_open
libusb_open_device_with_vid_pid
libusb_open_device_with_vid_pid@12 = libusb_open_device_with_vid_pid
libusb_pollfds_handle_timeouts
libusb_pollfds_handle_timeouts@4 = libusb_pollfds_handle_timeouts
libusb_ref_device
libusb_ref_device@4 = libusb_ref_device
libusb_release_interface
libusb_release_interface@8 = libusb_release_interface
libusb_reset_device
libusb_reset_device@4 = libusb_reset_device
libusb_set_configuration
libusb_set_configuration@8 = libusb_set_configuration
libusb_set_debug
libusb_set_debug@8 = libusb_set_debug
libusb_set_interface_alt_setting
libusb_set_interface_alt_setting@12 = libusb_set_interface_alt_setting
libusb_set_pollfd_notifiers
libusb_set_pollfd_notifiers@16 = libusb_set_pollfd_notifiers
libusb_submit_transfer
libusb_submit_transfer@4 = libusb_submit_transfer
libusb_try_lock_events
libusb_try_lock_events@4 = libusb_try_lock_events
libusb_unlock_event_waiters
libusb_unlock_event_waiters@4 = libusb_unlock_event_waiters
libusb_unlock_events
libusb_unlock_events@4 = libusb_unlock_events
libusb_unref_device
libusb_unref_device@4 = libusb_unref_device
libusb_wait_for_event
libusb_wait_for_event@8 = libusb_wait_for_event

Binary file not shown.

Binary file not shown.

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.testApp; package ch.ntb.usb.testApp;
public abstract class AbstractDeviceInfo { public abstract class AbstractDeviceInfo {

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.testApp; package ch.ntb.usb.testApp;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;

View File

@@ -5,16 +5,16 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.testApp; package ch.ntb.usb.testApp;
import java.util.Vector; import java.util.Vector;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import ch.ntb.inf.libusbJava.Device; import ch.ntb.usb.Device;
import ch.ntb.inf.libusbJava.USB; import ch.ntb.usb.USB;
import ch.ntb.inf.libusbJava.USBException; import ch.ntb.usb.USBException;
import ch.ntb.inf.libusbJava.logger.LogUtil; import ch.ntb.usb.logger.LogUtil;
public class TestDevice extends AbstractDeviceInfo { public class TestDevice extends AbstractDeviceInfo {

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.usbView; package ch.ntb.usb.usbView;
import java.util.Vector; import java.util.Vector;
@@ -18,15 +18,15 @@ import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeModel; import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import ch.ntb.inf.libusbJava.LibusbJava1; import ch.ntb.usb.LibusbJava1;
import ch.ntb.inf.libusbJava.Usb_Bus; import ch.ntb.usb.Usb_Bus;
import ch.ntb.inf.libusbJava.Usb_Config_Descriptor; import ch.ntb.usb.Usb_Config_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Device; import ch.ntb.usb.Usb_Device;
import ch.ntb.inf.libusbJava.Usb_Device_Descriptor; import ch.ntb.usb.Usb_Device_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Endpoint_Descriptor; import ch.ntb.usb.Usb_Endpoint_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Interface; import ch.ntb.usb.Usb_Interface;
import ch.ntb.inf.libusbJava.Usb_Interface_Descriptor; import ch.ntb.usb.Usb_Interface_Descriptor;
import ch.ntb.inf.libusbJava.exceptions.LibusbError; import ch.ntb.usb.exceptions.LibusbError;
public class UsbTreeModel implements TreeModel, TreeSelectionListener { public class UsbTreeModel implements TreeModel, TreeSelectionListener {

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.usbView; package ch.ntb.usb.usbView;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
@@ -28,16 +28,16 @@ import javax.swing.JTree;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import ch.ntb.inf.libusbJava.LibusbJava; import ch.ntb.usb.LibusbJava;
import ch.ntb.inf.libusbJava.Usb_Bus; import ch.ntb.usb.Usb_Bus;
import ch.ntb.inf.libusbJava.Usb_Config_Descriptor; import ch.ntb.usb.Usb_Config_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Device; import ch.ntb.usb.Usb_Device;
import ch.ntb.inf.libusbJava.Usb_Device_Descriptor; import ch.ntb.usb.Usb_Device_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Endpoint_Descriptor; import ch.ntb.usb.Usb_Endpoint_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Interface_Descriptor; import ch.ntb.usb.Usb_Interface_Descriptor;
import ch.ntb.inf.libusbJava.testApp.TestApp; import ch.ntb.usb.testApp.AbstractDeviceInfo.TransferMode;
import ch.ntb.inf.libusbJava.testApp.TestDevice; import ch.ntb.usb.testApp.TestApp;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo.TransferMode; import ch.ntb.usb.testApp.TestDevice;
public class UsbView extends JFrame { public class UsbView extends JFrame {

View File

@@ -5,11 +5,11 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.demo; package ch.ntb.usb.demo;
import ch.ntb.inf.libusbJava.LibusbJava; import ch.ntb.usb.LibusbJava;
import ch.ntb.inf.libusbJava.Usb_Bus; import ch.ntb.usb.Usb_Bus;
import ch.ntb.inf.libusbJava.Utils; import ch.ntb.usb.Utils;
/** /**
* Initalises Libusb and prints the bus(ses) with attached devices to the * Initalises Libusb and prints the bus(ses) with attached devices to the

View File

@@ -5,11 +5,11 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.demo; package ch.ntb.usb.demo;
import ch.ntb.inf.libusbJava.Device; import ch.ntb.usb.Device;
import ch.ntb.inf.libusbJava.USB; import ch.ntb.usb.USB;
import ch.ntb.inf.libusbJava.USBException; import ch.ntb.usb.USBException;
/** /**
* Demo class to demonstrate simple read and write operations to an USB device.<br> * Demo class to demonstrate simple read and write operations to an USB device.<br>

View File

@@ -41,7 +41,7 @@
#include <libusb.h> #include <libusb.h>
#include "LibusbJava.h" #include "LibusbJava.h"
#include "objects/Usb_Device.h" #include "Usb_Device.h"
//#define DEBUGON //#define DEBUGON
@@ -212,8 +212,8 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved)
info.jni.onLoadCalled=10; info.jni.onLoadCalled=10;
/* Load the LibusbJava1 class to force the initialization of the library */ /* Load the LibusbJava1 class to force the initialization of the library */
jclass clazz = env->FindClass("ch/ntb/inf/libusbJava/LibusbJava1"); jclass clazz = env->FindClass("ch/ntb/usb/LibusbJava1");
CuAssert(tc, "ch/ntb/inf/libusbJava/LibusbJava1 loaded", clazz != NULL); CuAssert(tc, "ch/ntb/usb/LibusbJava1 loaded", clazz != NULL);
CuAssert(tc, "JNI_OnLoad was executed", info.jni.onLoadCalled != 0); CuAssert(tc, "JNI_OnLoad was executed", info.jni.onLoadCalled != 0);
env->DeleteLocalRef(clazz); env->DeleteLocalRef(clazz);
@@ -253,11 +253,11 @@ void JNI_OnUnload(JavaVM *vm, void *reserved)
*******************************************************************************************/ *******************************************************************************************/
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_set_debug * Method: libusb_set_debug
* Signature: (JI)V * Signature: (JI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1debug( JNIEnv *env, jclass obj, jlong ctx, jint level) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1set_1debug( JNIEnv *env, jclass obj, jlong ctx, jint level) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_context *context = NULL; libusb_context *context = NULL;
if (ctx) { if (ctx) {
@@ -267,11 +267,11 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1debug
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_init * Method: libusb_init
* Signature: ()J * Signature: ()J
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1init( JNIEnv *env, jclass obj) { JNIEXPORT jlong JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1init( JNIEnv *env, jclass obj) {
int res; int res;
libusb_context *context; libusb_context *context;
clearLibusbJavaError(); clearLibusbJavaError();
@@ -296,11 +296,11 @@ JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1init( JNI
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_exit * Method: libusb_exit
* Signature: (J)V * Signature: (J)V
*******************************************************************************************/ *******************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1exit(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1exit(JNIEnv *env, jclass obj, jlong ctx) {
libusb_context *context = NULL; libusb_context *context = NULL;
clearLibusbJavaError(); clearLibusbJavaError();
if (ctx) { if (ctx) {
@@ -310,11 +310,11 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1exit(JNIEn
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_device_list * Method: libusb_get_device_list
* Signature: (J)Lch/ntb/inf/libusbJava/Usb_Device; * Signature: (J)Lch/ntb/usb/Usb_Device;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1device_1list( JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT jobject JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1device_1list( JNIEnv *env, jclass obj, jlong ctx) {
libusb_device **devs; libusb_device **devs;
libusb_context *context = (ctx != 0) ? (libusb_context*)ctx : NULL; libusb_context *context = (ctx != 0) ? (libusb_context*)ctx : NULL;
ssize_t cnt; ssize_t cnt;
@@ -576,11 +576,11 @@ JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1de
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_bus_number * Method: libusb_get_bus_number
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)S * Signature: (Lch/ntb/usb/Usb_Device;)S
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jshort JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1bus_1number( JNIEnv *env, jclass obj, jobject dev) { JNIEXPORT jshort JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1bus_1number( JNIEnv *env, jclass obj, jobject dev) {
clearLibusbJavaError(); clearLibusbJavaError();
if (ReferencesCheck(&info, env) != 0) return 0; if (ReferencesCheck(&info, env) != 0) return 0;
@@ -595,12 +595,12 @@ JNIEXPORT jshort JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1bus
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_max_iso_packet_size * Method: libusb_get_max_iso_packet_size
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;S)I * Signature: (Lch/ntb/usb/Usb_Device;S)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNIEXPORT jint
JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1max_1iso_1packet_1size( JNIEnv *env, jclass obj, jobject dev, jshort epAddr) { JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1max_1iso_1packet_1size( JNIEnv *env, jclass obj, jobject dev, jshort epAddr) {
clearLibusbJavaError(); clearLibusbJavaError();
if (ReferencesCheck(&info, env) != 0) return 0; if (ReferencesCheck(&info, env) != 0) return 0;
@@ -615,11 +615,11 @@ JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1max_1iso_1packet_1si
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_ref_device * Method: libusb_ref_device
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)Lch/ntb/inf/libusbJava/Usb_Device; * Signature: (Lch/ntb/usb/Usb_Device;)Lch/ntb/usb/Usb_Device;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1ref_1device(JNIEnv *env, jclass obj, jobject dev) { JNIEXPORT jobject JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1ref_1device(JNIEnv *env, jclass obj, jobject dev) {
clearLibusbJavaError(); clearLibusbJavaError();
if (ReferencesCheck(&info, env) != 0) return NULL; if (ReferencesCheck(&info, env) != 0) return NULL;
@@ -635,11 +635,11 @@ JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1ref_1de
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_unref_device * Method: libusb_unref_device
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)V * Signature: (Lch/ntb/usb/Usb_Device;)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1unref_1device(JNIEnv *env, jclass obj, jobject dev) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1unref_1device(JNIEnv *env, jclass obj, jobject dev) {
clearLibusbJavaError(); clearLibusbJavaError();
if (ReferencesCheck(&info, env) != 0) return; if (ReferencesCheck(&info, env) != 0) return;
libusb_device *libusb_dev = Usb_Device_HandleGet(env, dev); libusb_device *libusb_dev = Usb_Device_HandleGet(env, dev);
@@ -652,11 +652,11 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1unref_1dev
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_open * Method: libusb_open
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)J * Signature: (Lch/ntb/usb/Usb_Device;)J
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1open( JNIEnv *env, jclass obj, jobject dev) { JNIEXPORT jlong JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1open( JNIEnv *env, jclass obj, jobject dev) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_device_handle *handle = NULL; libusb_device_handle *handle = NULL;
if (ReferencesCheck(&info, env) != 0) return 0; if (ReferencesCheck(&info, env) != 0) return 0;
@@ -678,32 +678,32 @@ JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1open( JNI
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_open_device_with_vid_pid * Method: libusb_open_device_with_vid_pid
* Signature: (JII)J * Signature: (JII)J
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jlong JNIEXPORT jlong
JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1open_1device_1with_1vid_1pid(JNIEnv *env, jclass obj, jlong ctx, jint vendor_id, jint product_id) { JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1open_1device_1with_1vid_1pid(JNIEnv *env, jclass obj, jlong ctx, jint vendor_id, jint product_id) {
clearLibusbJavaError(); clearLibusbJavaError();
return (jlong) libusb_open_device_with_vid_pid((libusb_context*) (unsigned long) ctx, vendor_id, product_id); return (jlong) libusb_open_device_with_vid_pid((libusb_context*) (unsigned long) ctx, vendor_id, product_id);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_close * Method: libusb_close
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1close(JNIEnv *env, jclass obj, jlong dev_handle) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1close(JNIEnv *env, jclass obj, jlong dev_handle) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_close((libusb_device_handle*) (unsigned long) dev_handle); libusb_close((libusb_device_handle*) (unsigned long) dev_handle);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_device * Method: libusb_get_device
* Signature: (J)Lch/ntb/inf/libusbJava/Usb_Device; * Signature: (J)Lch/ntb/usb/Usb_Device;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1device(JNIEnv *env, jclass obj, jlong handle) { JNIEXPORT jobject JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1device(JNIEnv *env, jclass obj, jlong handle) {
int res, a; int res, a;
uint8_t c, h, e; uint8_t c, h, e;
clearLibusbJavaError(); clearLibusbJavaError();
@@ -910,11 +910,11 @@ JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1de
return usb_devObj; return usb_devObj;
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_configuration * Method: libusb_get_configuration
* Signature: (J)I * Signature: (J)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1configuration(JNIEnv *env, jclass obj, jlong handle) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1configuration(JNIEnv *env, jclass obj, jlong handle) {
int config = 0; int config = 0;
int libusb_result = 0; int libusb_result = 0;
@@ -931,71 +931,71 @@ JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1confi
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_set_configuration * Method: libusb_set_configuration
* Signature: (JI)V * Signature: (JI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1configuration(JNIEnv *env, jclass obj, jlong handle, jint config) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1set_1configuration(JNIEnv *env, jclass obj, jlong handle, jint config) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_set_configuration((libusb_device_handle*) (unsigned long) handle, config)); ThrowIfUnsuccessful(env, libusb_set_configuration((libusb_device_handle*) (unsigned long) handle, config));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_claim_interface * Method: libusb_claim_interface
* Signature: (JI)V * Signature: (JI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1claim_1interface(JNIEnv *env, jclass obj, jlong handle, jint iNumber) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1claim_1interface(JNIEnv *env, jclass obj, jlong handle, jint iNumber) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_claim_interface((libusb_device_handle*) (unsigned long) handle, iNumber)); ThrowIfUnsuccessful(env, libusb_claim_interface((libusb_device_handle*) (unsigned long) handle, iNumber));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_release_interface * Method: libusb_release_interface
* Signature: (JI)V * Signature: (JI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1release_1interface(JNIEnv *env, jclass obj, jlong handle, jint iNumber) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1release_1interface(JNIEnv *env, jclass obj, jlong handle, jint iNumber) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_release_interface((libusb_device_handle*) (unsigned long) handle, iNumber)); ThrowIfUnsuccessful(env, libusb_release_interface((libusb_device_handle*) (unsigned long) handle, iNumber));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_set_interface_alt_setting * Method: libusb_set_interface_alt_setting
* Signature: (JII)V * Signature: (JII)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1interface_1alt_1setting(JNIEnv *env, jclass obj, jlong handle, jint iNumber, jint altSet) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1set_1interface_1alt_1setting(JNIEnv *env, jclass obj, jlong handle, jint iNumber, jint altSet) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_set_interface_alt_setting((libusb_device_handle*) (unsigned long) handle, iNumber, altSet)); ThrowIfUnsuccessful(env, libusb_set_interface_alt_setting((libusb_device_handle*) (unsigned long) handle, iNumber, altSet));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_clear_halt * Method: libusb_clear_halt
* Signature: (JS)V * Signature: (JS)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1clear_1halt(JNIEnv *env, jclass obj, jlong handle, jshort ep) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1clear_1halt(JNIEnv *env, jclass obj, jlong handle, jshort ep) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_clear_halt((libusb_device_handle*) (unsigned long) handle, ep)); ThrowIfUnsuccessful(env, libusb_clear_halt((libusb_device_handle*) (unsigned long) handle, ep));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_reset_device * Method: libusb_reset_device
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1reset_1device(JNIEnv *env, jclass obj, jlong handle) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1reset_1device(JNIEnv *env, jclass obj, jlong handle) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_reset_device((libusb_device_handle*) (unsigned long) handle)); ThrowIfUnsuccessful(env, libusb_reset_device((libusb_device_handle*) (unsigned long) handle));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_kernel_driver_active * Method: libusb_kernel_driver_active
* Signature: (JI)I * Signature: (JI)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1kernel_1driver_1active(JNIEnv *env, jclass obj, jlong handle, jint iNumber) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1kernel_1driver_1active(JNIEnv *env, jclass obj, jlong handle, jint iNumber) {
int libusb_result = 0; int libusb_result = 0;
clearLibusbJavaError(); clearLibusbJavaError();
@@ -1011,31 +1011,31 @@ JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1kernel_1dr
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_detach_kernel_driver * Method: libusb_detach_kernel_driver
* Signature: (JI)V * Signature: (JI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1detach_1kernel_1driver(JNIEnv *env, jclass obj, jlong handle, jint iNumber) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1detach_1kernel_1driver(JNIEnv *env, jclass obj, jlong handle, jint iNumber) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_detach_kernel_driver((libusb_device_handle*) (unsigned long) handle, iNumber)); ThrowIfUnsuccessful(env, libusb_detach_kernel_driver((libusb_device_handle*) (unsigned long) handle, iNumber));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_attach_kernel_driver * Method: libusb_attach_kernel_driver
* Signature: (JI)V * Signature: (JI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1attach_1kernel_1driver(JNIEnv *env, jclass obj, jlong handle, jint iNumber) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1attach_1kernel_1driver(JNIEnv *env, jclass obj, jlong handle, jint iNumber) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_attach_kernel_driver((libusb_device_handle*) (unsigned long) handle, iNumber)); ThrowIfUnsuccessful(env, libusb_attach_kernel_driver((libusb_device_handle*) (unsigned long) handle, iNumber));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_active_config_descriptor * Method: libusb_get_active_config_descriptor
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)Lch/ntb/inf/libusbJava/Usb_Config_Descriptor; * Signature: (Lch/ntb/usb/Usb_Device;)Lch/ntb/usb/Usb_Config_Descriptor;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1active_1config_1descriptor(JNIEnv *env, jclass obj, jobject dev) { JNIEXPORT jobject JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1active_1config_1descriptor(JNIEnv *env, jclass obj, jobject dev) {
uint8_t a, e; uint8_t a, e;
clearLibusbJavaError(); clearLibusbJavaError();
if (ReferencesCheck(&info, env) != 0) return NULL; if (ReferencesCheck(&info, env) != 0) return NULL;
@@ -1185,11 +1185,11 @@ JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1ac
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_string_descriptor_ascii * Method: libusb_get_string_descriptor_ascii
* Signature: (JSI)Ljava/lang/String; * Signature: (JSI)Ljava/lang/String;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jstring JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1string_1descriptor_1ascii( JNIEnv *env, jclass obj, jlong handle, jshort desc_index, jint length) { JNIEXPORT jstring JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1string_1descriptor_1ascii( JNIEnv *env, jclass obj, jlong handle, jshort desc_index, jint length) {
jstring string; jstring string;
int res = 0; int res = 0;
clearLibusbJavaError(); clearLibusbJavaError();
@@ -1211,12 +1211,12 @@ JNIEXPORT jstring JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1st
return string; return string;
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_descriptor * Method: libusb_get_descriptor
* Signature: (JISI)[B * Signature: (JISI)[B
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1descriptor( JNIEXPORT jbyteArray JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1descriptor(
JNIEnv *env, jclass obj, jlong handle, jint desc_type, JNIEnv *env, jclass obj, jlong handle, jint desc_type,
jshort desc_index, jint size) { jshort desc_index, jint size) {
@@ -1234,12 +1234,12 @@ JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_
return to_byteArray(env, data, res); return to_byteArray(env, data, res);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_string_descriptor * Method: libusb_get_string_descriptor
* Signature: (JSII)Ljava/lang/String; * Signature: (JSII)Ljava/lang/String;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jstring JNIEXPORT jstring
JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1string_1descriptor(JNIEnv *env, jclass obj, jlong handle, jshort desc_index, jint langid, jint size) { JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1string_1descriptor(JNIEnv *env, jclass obj, jlong handle, jshort desc_index, jint langid, jint size) {
clearLibusbJavaError(); clearLibusbJavaError();
int res; int res;
jstring string; jstring string;
@@ -1260,50 +1260,50 @@ JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1string_1descriptor(J
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_alloc_transfer * Method: libusb_alloc_transfer
* Signature: (I)J * Signature: (I)J
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1alloc_1transfer( JNIEnv *env, jclass obj, jint iso_packets) { JNIEXPORT jlong JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1alloc_1transfer( JNIEnv *env, jclass obj, jint iso_packets) {
clearLibusbJavaError(); clearLibusbJavaError();
return (jlong) libusb_alloc_transfer(iso_packets); return (jlong) libusb_alloc_transfer(iso_packets);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_free_transfer * Method: libusb_free_transfer
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1free_1transfer( JNIEnv *env, jclass obj, jlong transfernumber) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1free_1transfer( JNIEnv *env, jclass obj, jlong transfernumber) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_free_transfer((libusb_transfer*) (unsigned long) transfernumber); libusb_free_transfer((libusb_transfer*) (unsigned long) transfernumber);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_submit_transfer * Method: libusb_submit_transfer
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1submit_1transfer(JNIEnv *env, jclass obj, jlong transfernumber) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1submit_1transfer(JNIEnv *env, jclass obj, jlong transfernumber) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_submit_transfer((libusb_transfer*) (unsigned long) transfernumber)); ThrowIfUnsuccessful(env, libusb_submit_transfer((libusb_transfer*) (unsigned long) transfernumber));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_cancel_transfer * Method: libusb_cancel_transfer
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1cancel_1transfer(JNIEnv *env, jclass obj, jlong transfernumber) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1cancel_1transfer(JNIEnv *env, jclass obj, jlong transfernumber) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_cancel_transfer((libusb_transfer*) (unsigned long) transfernumber)); ThrowIfUnsuccessful(env, libusb_cancel_transfer((libusb_transfer*) (unsigned long) transfernumber));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_control_transfer_get_data * Method: libusb_control_transfer_get_data
* Signature: (J)[B * Signature: (J)[B
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1control_1transfer_1get_1data(JNIEnv *env, jclass obj, jlong transfernumber) { JNIEXPORT jbyteArray JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1control_1transfer_1get_1data(JNIEnv *env, jclass obj, jlong transfernumber) {
clearLibusbJavaError(); clearLibusbJavaError();
unsigned char *data; unsigned char *data;
libusb_transfer* trans = (libusb_transfer*) (unsigned long) transfernumber; libusb_transfer* trans = (libusb_transfer*) (unsigned long) transfernumber;
@@ -1316,11 +1316,11 @@ JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1cont
} }
/********************************************************************************************* /*********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_control_transfer_get_setup * Method: libusb_control_transfer_get_setup
* Signature: (J)[B * Signature: (J)[B
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1control_1transfer_1get_1setup(JNIEnv *env, jclass obj, jlong transfernumber) { JNIEXPORT jbyteArray JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1control_1transfer_1get_1setup(JNIEnv *env, jclass obj, jlong transfernumber) {
clearLibusbJavaError(); clearLibusbJavaError();
unsigned char *data; unsigned char *data;
libusb_transfer* trans = (libusb_transfer*) (unsigned long) transfernumber; libusb_transfer* trans = (libusb_transfer*) (unsigned long) transfernumber;
@@ -1334,11 +1334,11 @@ JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1cont
return to_byteArray(env, data, 8); return to_byteArray(env, data, 8);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_fill_control_setup * Method: libusb_fill_control_setup
* Signature: (IIIII)[B * Signature: (IIIII)[B
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1control_1setup(JNIEnv *env, jclass obj, jint bmRequestType, jint bRequest, jint wValue, jint wIndex, jint wLength) { JNIEXPORT jbyteArray JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1fill_1control_1setup(JNIEnv *env, jclass obj, jint bmRequestType, jint bRequest, jint wValue, jint wIndex, jint wLength) {
clearLibusbJavaError(); clearLibusbJavaError();
unsigned char setup[8]; unsigned char setup[8];
@@ -1348,11 +1348,11 @@ JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_fill_control_transfer * Method: libusb_fill_control_transfer
* Signature: (JJ[BI)V * Signature: (JJ[BI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1control_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle, jbyteArray buffer, jint timeout) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1fill_1control_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle, jbyteArray buffer, jint timeout) {
clearLibusbJavaError(); clearLibusbJavaError();
jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL); jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL);
libusb_fill_control_transfer((libusb_transfer*) (unsigned long) transfernumber,(libusb_device_handle*) (unsigned long) handle,(unsigned char*) byteArrayElements, transfer_callback, env,(unsigned int) timeout); libusb_fill_control_transfer((libusb_transfer*) (unsigned long) transfernumber,(libusb_device_handle*) (unsigned long) handle,(unsigned char*) byteArrayElements, transfer_callback, env,(unsigned int) timeout);
@@ -1360,11 +1360,11 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1cont
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_fill_bulk_transfer * Method: libusb_fill_bulk_transfer
* Signature: (JJB[BII)V * Signature: (JJB[BII)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1bulk_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint timeout) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1fill_1bulk_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint timeout) {
clearLibusbJavaError(); clearLibusbJavaError();
jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL); jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL);
libusb_fill_bulk_transfer((libusb_transfer*) (unsigned long) transfernumber,(libusb_device_handle*) (unsigned long) handle, endpoint,(unsigned char*) byteArrayElements, length, transfer_callback, env,(unsigned int) timeout); libusb_fill_bulk_transfer((libusb_transfer*) (unsigned long) transfernumber,(libusb_device_handle*) (unsigned long) handle, endpoint,(unsigned char*) byteArrayElements, length, transfer_callback, env,(unsigned int) timeout);
@@ -1372,11 +1372,11 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1bulk
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_fill_interrupt_transfer * Method: libusb_fill_interrupt_transfer
* Signature: (JJB[BII)V * Signature: (JJB[BII)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1interrupt_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle,jbyte endpoint, jbyteArray buffer, jint length, jint timeout) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1fill_1interrupt_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle,jbyte endpoint, jbyteArray buffer, jint length, jint timeout) {
clearLibusbJavaError(); clearLibusbJavaError();
jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL); jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL);
libusb_fill_interrupt_transfer((libusb_transfer*) (unsigned long) transfernumber,(libusb_device_handle*) (unsigned long) handle, endpoint,(unsigned char*) byteArrayElements, length, transfer_callback, env, timeout); libusb_fill_interrupt_transfer((libusb_transfer*) (unsigned long) transfernumber,(libusb_device_handle*) (unsigned long) handle, endpoint,(unsigned char*) byteArrayElements, length, transfer_callback, env, timeout);
@@ -1384,11 +1384,11 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1inte
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_fill_iso_transfer * Method: libusb_fill_iso_transfer
* Signature: (JJB[BIII)V * Signature: (JJB[BIII)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1iso_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint num_iso_packets, jint timeout) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1fill_1iso_1transfer(JNIEnv *env, jclass obj, jlong transfernumber, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint num_iso_packets, jint timeout) {
clearLibusbJavaError(); clearLibusbJavaError();
jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL); jbyte *byteArrayElements = env->GetByteArrayElements(buffer, NULL);
libusb_fill_iso_transfer((libusb_transfer*) (unsigned long) transfernumber, (libusb_device_handle*) (unsigned long) handle, endpoint, (unsigned char*) byteArrayElements, length, num_iso_packets, transfer_callback, env, timeout); libusb_fill_iso_transfer((libusb_transfer*) (unsigned long) transfernumber, (libusb_device_handle*) (unsigned long) handle, endpoint, (unsigned char*) byteArrayElements, length, num_iso_packets, transfer_callback, env, timeout);
@@ -1396,22 +1396,22 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1iso_
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_set_iso_packet_lengths * Method: libusb_set_iso_packet_lengths
* Signature: (JI)V * Signature: (JI)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1iso_1packet_1lengths(JNIEnv *env, jclass obj, jlong transfernumber, jint length) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1set_1iso_1packet_1lengths(JNIEnv *env, jclass obj, jlong transfernumber, jint length) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_set_iso_packet_lengths((libusb_transfer*) (unsigned long) transfernumber, length); libusb_set_iso_packet_lengths((libusb_transfer*) (unsigned long) transfernumber, length);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_iso_packet_buffer * Method: libusb_get_iso_packet_buffer
* Signature: (JI)[B * Signature: (JI)[B
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1iso_1packet_1buffer(JNIEnv *env, jclass obj, jlong transfernumber, jint packet) { JNIEXPORT jbyteArray JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1iso_1packet_1buffer(JNIEnv *env, jclass obj, jlong transfernumber, jint packet) {
clearLibusbJavaError(); clearLibusbJavaError();
int size = 0; int size = 0;
unsigned char *data = NULL; unsigned char *data = NULL;
@@ -1436,11 +1436,11 @@ JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_iso_packet_buffer_simple * Method: libusb_get_iso_packet_buffer_simple
* Signature: (JI)[B * Signature: (JI)[B
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1iso_1packet_1buffer_1simple(JNIEnv *env, jclass obj, jlong transfernumber, jint packet) { JNIEXPORT jbyteArray JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1iso_1packet_1buffer_1simple(JNIEnv *env, jclass obj, jlong transfernumber, jint packet) {
clearLibusbJavaError(); clearLibusbJavaError();
int size = 0; int size = 0;
unsigned char *data = NULL; unsigned char *data = NULL;
@@ -1466,82 +1466,82 @@ JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_try_lock_events * Method: libusb_try_lock_events
* Signature: (J)I * Signature: (J)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1try_1lock_1events(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1try_1lock_1events(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
return libusb_try_lock_events((libusb_context*) (unsigned long) ctx); return libusb_try_lock_events((libusb_context*) (unsigned long) ctx);
// return libusb_try_lock_events(NULL); // return libusb_try_lock_events(NULL);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_lock_events * Method: libusb_lock_events
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1lock_1events(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1lock_1events(JNIEnv *env, jclass obj, jlong ctx) {
libusb_lock_events((libusb_context*) (unsigned long) ctx); libusb_lock_events((libusb_context*) (unsigned long) ctx);
// libusb_lock_events(NULL); // libusb_lock_events(NULL);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_unlock_events * Method: libusb_unlock_events
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1unlock_1events(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1unlock_1events(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_unlock_events((libusb_context*) (unsigned long) ctx); libusb_unlock_events((libusb_context*) (unsigned long) ctx);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_event_handling_ok * Method: libusb_event_handling_ok
* Signature: (J)I * Signature: (J)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1event_1handling_1ok(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1event_1handling_1ok(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
return libusb_event_handling_ok((libusb_context*) (unsigned long) ctx); return libusb_event_handling_ok((libusb_context*) (unsigned long) ctx);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_event_handler_active * Method: libusb_event_handler_active
* Signature: (J)I * Signature: (J)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1event_1handler_1active(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1event_1handler_1active(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
return libusb_event_handler_active((libusb_context*) (unsigned long) ctx); return libusb_event_handler_active((libusb_context*) (unsigned long) ctx);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_lock_event_waiters * Method: libusb_lock_event_waiters
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1lock_1event_1waiters(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1lock_1event_1waiters(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_lock_event_waiters((libusb_context*) (unsigned long) ctx); libusb_lock_event_waiters((libusb_context*) (unsigned long) ctx);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_unlock_event_waiters * Method: libusb_unlock_event_waiters
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1unlock_1event_1waiters(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1unlock_1event_1waiters(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
libusb_unlock_event_waiters((libusb_context*) (unsigned long) ctx); libusb_unlock_event_waiters((libusb_context*) (unsigned long) ctx);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_wait_for_event * Method: libusb_wait_for_event
* Signature: (JJ)I * Signature: (JJ)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1wait_1for_1event(JNIEnv *env, jclass obj, jlong ctx, jlong timevalue) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1wait_1for_1event(JNIEnv *env, jclass obj, jlong ctx, jlong timevalue) {
clearLibusbJavaError(); clearLibusbJavaError();
if (timevalue) { if (timevalue) {
timeval tv; timeval tv;
@@ -1553,11 +1553,11 @@ JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1wait_1for_
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_handle_events_timeout * Method: libusb_handle_events_timeout
* Signature: (JJ)V * Signature: (JJ)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1events_1timeout(JNIEnv *env, jclass obj, jlong ctx, jlong timevalue) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1handle_1events_1timeout(JNIEnv *env, jclass obj, jlong ctx, jlong timevalue) {
clearLibusbJavaError(); clearLibusbJavaError();
if (timevalue != 0) if (timevalue != 0)
{ {
@@ -1573,21 +1573,21 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1ev
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_handle_events * Method: libusb_handle_events
* Signature: (J)V * Signature: (J)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1events(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1handle_1events(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
ThrowIfUnsuccessful(env, libusb_handle_events((libusb_context*) (unsigned long) ctx)); ThrowIfUnsuccessful(env, libusb_handle_events((libusb_context*) (unsigned long) ctx));
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_handle_events_locked * Method: libusb_handle_events_locked
* Signature: (JJ)V * Signature: (JJ)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1events_1locked(JNIEnv *env, jclass obj, jlong ctx, jlong timevalue) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1handle_1events_1locked(JNIEnv *env, jclass obj, jlong ctx, jlong timevalue) {
clearLibusbJavaError(); clearLibusbJavaError();
if (timevalue) { if (timevalue) {
timeval tv; timeval tv;
@@ -1602,21 +1602,21 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1ev
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_pollfds_handle_timeouts * Method: libusb_pollfds_handle_timeouts
* Signature: (J)I * Signature: (J)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1pollfds_1handle_1timeouts(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1pollfds_1handle_1timeouts(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
return libusb_pollfds_handle_timeouts((libusb_context*) (unsigned long) ctx); return libusb_pollfds_handle_timeouts((libusb_context*) (unsigned long) ctx);
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_next_timeout * Method: libusb_get_next_timeout
* Signature: (J)I * Signature: (J)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1next_1timeout(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1next_1timeout(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
int res; int res;
timeval tv; timeval tv;
@@ -1643,11 +1643,11 @@ JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1next_
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_set_pollfd_notifiers * Method: libusb_set_pollfd_notifiers
* Signature: (JZ)V * Signature: (JZ)V
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1pollfd_1notifiers(JNIEnv *env, jclass obj, jlong ctx, jboolean remove) { JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1set_1pollfd_1notifiers(JNIEnv *env, jclass obj, jlong ctx, jboolean remove) {
clearLibusbJavaError(); clearLibusbJavaError();
if (remove) if (remove)
{ {
@@ -1660,11 +1660,11 @@ JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1pollf
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_get_pollfds * Method: libusb_get_pollfds
* Signature: (J)[Lch/ntb/inf/libusbJava/Libusb_pollfd; * Signature: (J)[Lch/ntb/usb/Libusb_pollfd;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jobjectArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1pollfds(JNIEnv *env, jclass obj, jlong ctx) { JNIEXPORT jobjectArray JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1get_1pollfds(JNIEnv *env, jclass obj, jlong ctx) {
clearLibusbJavaError(); clearLibusbJavaError();
int count = 0; int count = 0;
jobjectArray pollfdArray; jobjectArray pollfdArray;
@@ -1699,11 +1699,11 @@ JNIEXPORT jobjectArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1ge
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_control_transfer * Method: libusb_control_transfer
* Signature: (JIIII[BII)I * Signature: (JIIII[BII)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1control_1transfer(JNIEnv *env, jclass obj, jlong handle, jint bmRequestType, jint bRequest, jint wValue, jint wIndex, jbyteArray buffer, jint wLength, jint timeout) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1control_1transfer(JNIEnv *env, jclass obj, jlong handle, jint bmRequestType, jint bRequest, jint wValue, jint wIndex, jbyteArray buffer, jint wLength, jint timeout) {
clearLibusbJavaError(); clearLibusbJavaError();
int res; int res;
unsigned char* data; unsigned char* data;
@@ -1715,11 +1715,11 @@ JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1control_1t
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_bulk_transfer * Method: libusb_bulk_transfer
* Signature: (JB[BII)I * Signature: (JB[BII)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1bulk_1transfer(JNIEnv *env, jclass obj, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint timeout) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1bulk_1transfer(JNIEnv *env, jclass obj, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint timeout) {
clearLibusbJavaError(); clearLibusbJavaError();
int libusb_result = 0; int libusb_result = 0;
int bytes_transferred = 0; int bytes_transferred = 0;
@@ -1738,11 +1738,11 @@ JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1bulk_1tran
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_interrupt_transfer * Method: libusb_interrupt_transfer
* Signature: (JB[BII)I * Signature: (JB[BII)I
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1interrupt_1transfer(JNIEnv *env, jclass obj, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint timeout) { JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1interrupt_1transfer(JNIEnv *env, jclass obj, jlong handle, jbyte endpoint, jbyteArray buffer, jint length, jint timeout) {
clearLibusbJavaError(); clearLibusbJavaError();
int libusb_result; int libusb_result;
int bytes_transferred = 0; int bytes_transferred = 0;
@@ -1760,11 +1760,11 @@ JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1interrupt_
} }
/******************************************************************************************** /********************************************************************************************
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: libusb_strerror * Method: libusb_strerror
* Signature: ()Ljava/lang/String; * Signature: ()Ljava/lang/String;
********************************************************************************************/ ********************************************************************************************/
JNIEXPORT jstring JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1strerror(JNIEnv *env, jclass obj) { JNIEXPORT jstring JNICALL Java_ch_ntb_usb_LibusbJava1_libusb_1strerror(JNIEnv *env, jclass obj) {
char *str = "Libusb-1.0 Error"; char *str = "Libusb-1.0 Error";
/* check for LibusbJava specific errors first*/ /* check for LibusbJava specific errors first*/
@@ -1777,21 +1777,21 @@ JNIEXPORT jstring JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1strerro
} }
/* /*
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: setup * Method: setup
* Signature: ()I * Signature: ()I
*/ */
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_setup(JNIEnv *env, jclass obj) JNIEXPORT jint JNICALL Java_ch_ntb_usb_LibusbJava1_setup(JNIEnv *env, jclass obj)
{ {
return ReferencesLoad(&info, env, jniObjects); return ReferencesLoad(&info, env, jniObjects);
} }
/* /*
* Class: ch_ntb_inf_libusbJava_LibusbJava1 * Class: ch_ntb_usb_LibusbJava1
* Method: teardown * Method: teardown
* Signature: ()V * Signature: ()V
*/ */
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_teardown(JNIEnv *env, jclass obj) JNIEXPORT void JNICALL Java_ch_ntb_usb_LibusbJava1_teardown(JNIEnv *env, jclass obj)
{ {
ReferencesUnload(&info, env); ReferencesUnload(&info, env);
} }
@@ -1923,7 +1923,7 @@ static __inline void JNICALL ThrowLibusbError(JNIEnv *env, jint code)
jmethodID constructor = NULL; jmethodID constructor = NULL;
jthrowable exception = NULL; jthrowable exception = NULL;
jclass clazz = env->FindClass("ch/ntb/inf/libusbJava/exceptions/LibusbError"); jclass clazz = env->FindClass("ch/ntb/usb/exceptions/LibusbError");
if (clazz == NULL) if (clazz == NULL)
{ {
goto no_class; goto no_class;
@@ -1970,7 +1970,7 @@ no_class:
#ifdef DO_UNIT_TEST #ifdef DO_UNIT_TEST
static void ThrowLibusbErrorTestEvaluate(CuTest *tc, JNIEnv *env, int code) { static void ThrowLibusbErrorTestEvaluate(CuTest *tc, JNIEnv *env, int code) {
/* Prepare the needed environment */ /* Prepare the needed environment */
jclass clazz = env->FindClass("ch/ntb/inf/libusbJava/exceptions/LibusbError"); jclass clazz = env->FindClass("ch/ntb/usb/exceptions/LibusbError");
CuAssert(tc, "LibusbError class not found!", clazz != NULL); CuAssert(tc, "LibusbError class not found!", clazz != NULL);
jfieldID f_code = env->GetFieldID(clazz, "code", "I"); jfieldID f_code = env->GetFieldID(clazz, "code", "I");
CuAssert(tc, "LibusbError has a field \"code\"", f_code != NULL); CuAssert(tc, "LibusbError has a field \"code\"", f_code != NULL);
@@ -2087,7 +2087,7 @@ static __inline int ReferencesLoad(tLUJ_Instance *instance, JNIEnv *env, const t
printf("usb_device references loaded\n"); printf("usb_device references loaded\n");
#endif #endif
/* usb_device_descriptor*/ /* usb_device_descriptor*/
jobject devDescClazz = env->FindClass("ch/ntb/inf/libusbJava/Usb_Device_Descriptor");//returns a local reference jobject devDescClazz = env->FindClass("ch/ntb/usb/Usb_Device_Descriptor");//returns a local reference
usb_devDescClazz = (jclass)env->NewGlobalRef(devDescClazz);//make it global usb_devDescClazz = (jclass)env->NewGlobalRef(devDescClazz);//make it global
if (usb_devDescClazz == NULL) { if (usb_devDescClazz == NULL) {
return -1; /* exception thrown */ return -1; /* exception thrown */
@@ -2116,7 +2116,7 @@ static __inline int ReferencesLoad(tLUJ_Instance *instance, JNIEnv *env, const t
printf("usb_device_descriptor references loaded\n"); printf("usb_device_descriptor references loaded\n");
#endif #endif
/* usb_configuration_descriptor*/ /* usb_configuration_descriptor*/
jobject confDescClazz = env->FindClass("ch/ntb/inf/libusbJava/Usb_Config_Descriptor");//returns a local reference jobject confDescClazz = env->FindClass("ch/ntb/usb/Usb_Config_Descriptor");//returns a local reference
usb_confDescClazz = (jclass)env->NewGlobalRef(confDescClazz);//make it global usb_confDescClazz = (jclass)env->NewGlobalRef(confDescClazz);//make it global
if (usb_confDescClazz == NULL) { if (usb_confDescClazz == NULL) {
return -1; /* exception thrown */ return -1; /* exception thrown */
@@ -2134,14 +2134,14 @@ static __inline int ReferencesLoad(tLUJ_Instance *instance, JNIEnv *env, const t
usb_confDescFID_iConfiguration = env->GetFieldID(usb_confDescClazz, "iConfiguration", "B"); usb_confDescFID_iConfiguration = env->GetFieldID(usb_confDescClazz, "iConfiguration", "B");
usb_confDescFID_bmAttributes = env->GetFieldID(usb_confDescClazz, "bmAttributes", "B"); usb_confDescFID_bmAttributes = env->GetFieldID(usb_confDescClazz, "bmAttributes", "B");
usb_confDescFID_MaxPower = env->GetFieldID(usb_confDescClazz, "MaxPower", "B"); usb_confDescFID_MaxPower = env->GetFieldID(usb_confDescClazz, "MaxPower", "B");
usb_confDescFID_interface_ = env->GetFieldID(usb_confDescClazz, "interface_", "[Lch/ntb/inf/libusbJava/Usb_Interface;"); usb_confDescFID_interface_ = env->GetFieldID(usb_confDescClazz, "interface_", "[Lch/ntb/usb/Usb_Interface;");
usb_confDescFID_extra = env->GetFieldID(usb_confDescClazz, "extra", "[B"); usb_confDescFID_extra = env->GetFieldID(usb_confDescClazz, "extra", "[B");
usb_confDescFID_extralen = env->GetFieldID(usb_confDescClazz, "extralen", "I"); usb_confDescFID_extralen = env->GetFieldID(usb_confDescClazz, "extralen", "I");
#ifdef DEBUGON #ifdef DEBUGON
printf("usb_configuration_descriptor references loaded\n"); printf("usb_configuration_descriptor references loaded\n");
#endif #endif
/* usb_interface*/ /* usb_interface*/
jobject intClazz = env->FindClass("ch/ntb/inf/libusbJava/Usb_Interface");//returns a local reference jobject intClazz = env->FindClass("ch/ntb/usb/Usb_Interface");//returns a local reference
usb_intClazz = (jclass)env->NewGlobalRef(intClazz);//make it global usb_intClazz = (jclass)env->NewGlobalRef(intClazz);//make it global
if (usb_intClazz == NULL) { if (usb_intClazz == NULL) {
return -1; /* exception thrown */ return -1; /* exception thrown */
@@ -2150,13 +2150,13 @@ static __inline int ReferencesLoad(tLUJ_Instance *instance, JNIEnv *env, const t
if (usb_intMid == NULL) { if (usb_intMid == NULL) {
return -1; return -1;
} }
usb_intFID_altsetting = env->GetFieldID(usb_intClazz, "altsetting", "[Lch/ntb/inf/libusbJava/Usb_Interface_Descriptor;"); usb_intFID_altsetting = env->GetFieldID(usb_intClazz, "altsetting", "[Lch/ntb/usb/Usb_Interface_Descriptor;");
usb_intFID_num_altsetting = env->GetFieldID(usb_intClazz, "num_altsetting", "I"); usb_intFID_num_altsetting = env->GetFieldID(usb_intClazz, "num_altsetting", "I");
#ifdef DEBUGON #ifdef DEBUGON
printf("usb_interface references loaded\n"); printf("usb_interface references loaded\n");
#endif #endif
/* usb_interface_descriptor*/ /* usb_interface_descriptor*/
jobject intDescClazz = env->FindClass( "ch/ntb/inf/libusbJava/Usb_Interface_Descriptor");//returns a local reference jobject intDescClazz = env->FindClass( "ch/ntb/usb/Usb_Interface_Descriptor");//returns a local reference
usb_intDescClazz = (jclass)env->NewGlobalRef(intDescClazz);//make it global usb_intDescClazz = (jclass)env->NewGlobalRef(intDescClazz);//make it global
if (usb_intDescClazz == NULL) { if (usb_intDescClazz == NULL) {
return -1; /* exception thrown */ return -1; /* exception thrown */
@@ -2174,14 +2174,14 @@ static __inline int ReferencesLoad(tLUJ_Instance *instance, JNIEnv *env, const t
usb_intDescFID_bInterfaceSubClass = env->GetFieldID(usb_intDescClazz, "bInterfaceSubClass", "B"); usb_intDescFID_bInterfaceSubClass = env->GetFieldID(usb_intDescClazz, "bInterfaceSubClass", "B");
usb_intDescFID_bInterfaceProtocol = env->GetFieldID(usb_intDescClazz, "bInterfaceProtocol", "B"); usb_intDescFID_bInterfaceProtocol = env->GetFieldID(usb_intDescClazz, "bInterfaceProtocol", "B");
usb_intDescFID_iInterface = env->GetFieldID(usb_intDescClazz, "iInterface", "B"); usb_intDescFID_iInterface = env->GetFieldID(usb_intDescClazz, "iInterface", "B");
usb_intDescFID_endpoint = env->GetFieldID(usb_intDescClazz, "endpoint", "[Lch/ntb/inf/libusbJava/Usb_Endpoint_Descriptor;"); usb_intDescFID_endpoint = env->GetFieldID(usb_intDescClazz, "endpoint", "[Lch/ntb/usb/Usb_Endpoint_Descriptor;");
usb_intDescFID_extra = env->GetFieldID(usb_intDescClazz, "extra", "[B"); usb_intDescFID_extra = env->GetFieldID(usb_intDescClazz, "extra", "[B");
usb_intDescFID_extralen = env->GetFieldID(usb_intDescClazz, "extralen", "I"); usb_intDescFID_extralen = env->GetFieldID(usb_intDescClazz, "extralen", "I");
#ifdef DEBUGON #ifdef DEBUGON
printf("usb_interface_descriptor references loaded\n"); printf("usb_interface_descriptor references loaded\n");
#endif #endif
/* usb_endpoint_descriptor*/ /* usb_endpoint_descriptor*/
jobject epDescClazz = env->FindClass("ch/ntb/inf/libusbJava/Usb_Endpoint_Descriptor");//returns a local reference jobject epDescClazz = env->FindClass("ch/ntb/usb/Usb_Endpoint_Descriptor");//returns a local reference
usb_epDescClazz = (jclass)env->NewGlobalRef(epDescClazz);//make it global usb_epDescClazz = (jclass)env->NewGlobalRef(epDescClazz);//make it global
if (usb_epDescClazz == NULL) { if (usb_epDescClazz == NULL) {
return -1; /* exception thrown */ return -1; /* exception thrown */
@@ -2204,7 +2204,7 @@ static __inline int ReferencesLoad(tLUJ_Instance *instance, JNIEnv *env, const t
printf("usb_endpoint_descriptor references loaded\n"); printf("usb_endpoint_descriptor references loaded\n");
#endif #endif
/*libusb_event*/ /*libusb_event*/
jobject cb_clazz = env->FindClass("ch/ntb/inf/libusbJava/Libusb_event");//returns a local reference jobject cb_clazz = env->FindClass("ch/ntb/usb/Libusb_event");//returns a local reference
usb_cb_clazz = (jclass)env->NewGlobalRef(cb_clazz);//make it global usb_cb_clazz = (jclass)env->NewGlobalRef(cb_clazz);//make it global
if (usb_cb_clazz == NULL) { if (usb_cb_clazz == NULL) {
printf("load Clazz failed\n"); printf("load Clazz failed\n");
@@ -2229,13 +2229,13 @@ static __inline int ReferencesLoad(tLUJ_Instance *instance, JNIEnv *env, const t
printf("usb_event_descriptor references loaded\n"); printf("usb_event_descriptor references loaded\n");
#endif #endif
/*Libusb_pollfd*/ /*Libusb_pollfd*/
jobject pollfd_clazz = env->FindClass("ch/ntb/inf/libusbJava/Libusb_pollfd");//returns a local reference jobject pollfd_clazz = env->FindClass("ch/ntb/usb/Libusb_pollfd");//returns a local reference
usb_pollfd_clazz = (jclass)env->NewGlobalRef(pollfd_clazz);//make it global usb_pollfd_clazz = (jclass)env->NewGlobalRef(pollfd_clazz);//make it global
if (usb_pollfd_clazz == NULL) { if (usb_pollfd_clazz == NULL) {
return -1; /*exception thrown*/ return -1; /*exception thrown*/
} }
usb_pollfd_Mid = env->GetMethodID(usb_pollfd_clazz, "<init>", "()V"); usb_pollfd_Mid = env->GetMethodID(usb_pollfd_clazz, "<init>", "()V");
// Bugfix: if (usb_devMid == NULL) @ Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1device_1list - Copy-paste error // Bugfix: if (usb_devMid == NULL) @ Java_ch_ntb_usb_LibusbJava1_libusb_1get_1device_1list - Copy-paste error
if (usb_pollfd_Mid == NULL) { if (usb_pollfd_Mid == NULL) {
return -1; /*exception thrown*/ return -1; /*exception thrown*/
} }

View File

@@ -8,7 +8,7 @@
#include <string.h> #include <string.h>
#ifdef DO_UNIT_TEST #ifdef DO_UNIT_TEST
# include <test/CuTest.h> # include <CuTest.h>
# define TEST_CASE(name) static void name(CuTest *tc) # define TEST_CASE(name) static void name(CuTest *tc)
#endif #endif
@@ -50,7 +50,7 @@ static tUsb_Device *me = &instance;
int Usb_Device_connect(JNIEnv *env) int Usb_Device_connect(JNIEnv *env)
{ {
jobject theClass = env->FindClass("ch/ntb/inf/libusbJava/Usb_Device"); jobject theClass = env->FindClass("ch/ntb/usb/Usb_Device");
if (theClass == NULL) goto no_class; if (theClass == NULL) goto no_class;
me->clazz = (jclass) env->NewGlobalRef(theClass); // make it global to avoid class unloading and therefore me->clazz = (jclass) env->NewGlobalRef(theClass); // make it global to avoid class unloading and therefore
@@ -60,15 +60,15 @@ int Usb_Device_connect(JNIEnv *env)
me->constructor = env->GetMethodID(me->clazz, "<init>", "()V"); me->constructor = env->GetMethodID(me->clazz, "<init>", "()V");
if (me->constructor == NULL) goto no_constructor; if (me->constructor == NULL) goto no_constructor;
LOAD_FIELD(env, me, "Lch/ntb/inf/libusbJava/Usb_Device;", next); LOAD_FIELD(env, me, "Lch/ntb/usb/Usb_Device;", next);
LOAD_FIELD(env, me, "Lch/ntb/inf/libusbJava/Usb_Device;", prev); LOAD_FIELD(env, me, "Lch/ntb/usb/Usb_Device;", prev);
LOAD_FIELD(env, me, "Ljava/lang/String;", filename); LOAD_FIELD(env, me, "Ljava/lang/String;", filename);
LOAD_FIELD(env, me, "Lch/ntb/inf/libusbJava/Usb_Bus;", bus); LOAD_FIELD(env, me, "Lch/ntb/usb/Usb_Bus;", bus);
LOAD_FIELD(env, me, "Lch/ntb/inf/libusbJava/Usb_Device_Descriptor;", descriptor); LOAD_FIELD(env, me, "Lch/ntb/usb/Usb_Device_Descriptor;", descriptor);
LOAD_FIELD(env, me, "[Lch/ntb/inf/libusbJava/Usb_Config_Descriptor;", config); LOAD_FIELD(env, me, "[Lch/ntb/usb/Usb_Config_Descriptor;", config);
LOAD_FIELD(env, me, "B", devnum); LOAD_FIELD(env, me, "B", devnum);
LOAD_FIELD(env, me, "B", num_children); LOAD_FIELD(env, me, "B", num_children);
LOAD_FIELD(env, me, "Lch/ntb/inf/libusbJava/Usb_Device;", children); LOAD_FIELD(env, me, "Lch/ntb/usb/Usb_Device;", children);
LOAD_FIELD(env, me, "J", devStructAddr); LOAD_FIELD(env, me, "J", devStructAddr);
me->loaded = 1; me->loaded = 1;

View File

@@ -1,509 +0,0 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class ch_ntb_inf_libusbJava_LibusbJava1 */
#ifndef _Included_ch_ntb_inf_libusbJava_LibusbJava1
#define _Included_ch_ntb_inf_libusbJava_LibusbJava1
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_set_debug
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1debug
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_init
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1init
(JNIEnv *, jclass);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_exit
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1exit
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_device_list
* Signature: (J)Lch/ntb/inf/libusbJava/Usb_Device;
*/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1device_1list
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_bus_number
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)S
*/
JNIEXPORT jshort JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1bus_1number
(JNIEnv *, jclass, jobject);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_max_iso_packet_size
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;S)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1max_1iso_1packet_1size
(JNIEnv *, jclass, jobject, jshort);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_ref_device
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)Lch/ntb/inf/libusbJava/Usb_Device;
*/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1ref_1device
(JNIEnv *, jclass, jobject);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_unref_device
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1unref_1device
(JNIEnv *, jclass, jobject);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_open
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)J
*/
JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1open
(JNIEnv *, jclass, jobject);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_open_device_with_vid_pid
* Signature: (JII)J
*/
JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1open_1device_1with_1vid_1pid
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_close
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1close
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_device
* Signature: (J)Lch/ntb/inf/libusbJava/Usb_Device;
*/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1device
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_configuration
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1configuration
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_set_configuration
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1configuration
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_claim_interface
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1claim_1interface
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_release_interface
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1release_1interface
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_set_interface_alt_setting
* Signature: (JII)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1interface_1alt_1setting
(JNIEnv *, jclass, jlong, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_clear_halt
* Signature: (JS)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1clear_1halt
(JNIEnv *, jclass, jlong, jshort);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_reset_device
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1reset_1device
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_kernel_driver_active
* Signature: (JI)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1kernel_1driver_1active
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_detach_kernel_driver
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1detach_1kernel_1driver
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_attach_kernel_driver
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1attach_1kernel_1driver
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_active_config_descriptor
* Signature: (Lch/ntb/inf/libusbJava/Usb_Device;)Lch/ntb/inf/libusbJava/Usb_Config_Descriptor;
*/
JNIEXPORT jobject JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1active_1config_1descriptor
(JNIEnv *, jclass, jobject);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_string_descriptor_ascii
* Signature: (JSI)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1string_1descriptor_1ascii
(JNIEnv *, jclass, jlong, jshort, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_descriptor
* Signature: (JISI)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1descriptor
(JNIEnv *, jclass, jlong, jint, jshort, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_string_descriptor
* Signature: (JSII)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1string_1descriptor
(JNIEnv *, jclass, jlong, jshort, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_alloc_transfer
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1alloc_1transfer
(JNIEnv *, jclass, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_free_transfer
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1free_1transfer
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_submit_transfer
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1submit_1transfer
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_cancel_transfer
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1cancel_1transfer
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_control_transfer_get_data
* Signature: (J)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1control_1transfer_1get_1data
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_control_transfer_get_setup
* Signature: (J)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1control_1transfer_1get_1setup
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_fill_control_setup
* Signature: (IIIII)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1control_1setup
(JNIEnv *, jclass, jint, jint, jint, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_fill_control_transfer
* Signature: (JJ[BI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1control_1transfer
(JNIEnv *, jclass, jlong, jlong, jbyteArray, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_fill_bulk_transfer
* Signature: (JJB[BII)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1bulk_1transfer
(JNIEnv *, jclass, jlong, jlong, jbyte, jbyteArray, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_fill_interrupt_transfer
* Signature: (JJB[BII)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1interrupt_1transfer
(JNIEnv *, jclass, jlong, jlong, jbyte, jbyteArray, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_fill_iso_transfer
* Signature: (JJB[BIII)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1fill_1iso_1transfer
(JNIEnv *, jclass, jlong, jlong, jbyte, jbyteArray, jint, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_set_iso_packet_lengths
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1iso_1packet_1lengths
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_iso_packet_buffer
* Signature: (JI)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1iso_1packet_1buffer
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_iso_packet_buffer_simple
* Signature: (JI)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1iso_1packet_1buffer_1simple
(JNIEnv *, jclass, jlong, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_try_lock_events
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1try_1lock_1events
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_lock_events
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1lock_1events
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_unlock_events
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1unlock_1events
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_event_handling_ok
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1event_1handling_1ok
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_event_handler_active
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1event_1handler_1active
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_lock_event_waiters
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1lock_1event_1waiters
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_unlock_event_waiters
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1unlock_1event_1waiters
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_wait_for_event
* Signature: (JJ)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1wait_1for_1event
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_handle_events_timeout
* Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1events_1timeout
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_handle_events
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1events
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_handle_events_locked
* Signature: (JJ)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1handle_1events_1locked
(JNIEnv *, jclass, jlong, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_pollfds_handle_timeouts
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1pollfds_1handle_1timeouts
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_next_timeout
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1next_1timeout
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_set_pollfd_notifiers
* Signature: (JZ)V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1set_1pollfd_1notifiers
(JNIEnv *, jclass, jlong, jboolean);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_get_pollfds
* Signature: (J)[Lch/ntb/inf/libusbJava/Libusb_pollfd;
*/
JNIEXPORT jobjectArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1get_1pollfds
(JNIEnv *, jclass, jlong);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_control_transfer
* Signature: (JIIII[BII)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1control_1transfer
(JNIEnv *, jclass, jlong, jint, jint, jint, jint, jbyteArray, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_bulk_transfer
* Signature: (JB[BII)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1bulk_1transfer
(JNIEnv *, jclass, jlong, jbyte, jbyteArray, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_interrupt_transfer
* Signature: (JB[BII)I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1interrupt_1transfer
(JNIEnv *, jclass, jlong, jbyte, jbyteArray, jint, jint);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: libusb_strerror
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_libusb_1strerror
(JNIEnv *, jclass);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: setup
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_setup
(JNIEnv *, jclass);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: teardown
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_teardown
(JNIEnv *, jclass);
/*
* Class: ch_ntb_inf_libusbJava_LibusbJava1
* Method: to_byteArrayTest
* Signature: (Ljava/lang/String;I)[B
*/
JNIEXPORT jbyteArray JNICALL Java_ch_ntb_inf_libusbJava_LibusbJava1_to_1byteArrayTest
(JNIEnv *, jclass, jstring, jint);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -5,12 +5,12 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import ch.ntb.inf.libusbJava.logger.LogUtil; import ch.ntb.usb.logger.LogUtil;
/** /**
* This class represents an USB device.<br> * This class represents an USB device.<br>

View File

@@ -10,9 +10,9 @@
* 18.10.2010 NTB / Roger Millischer change from native interface to compatibility layer * 18.10.2010 NTB / Roger Millischer change from native interface to compatibility layer
* *
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
import ch.ntb.inf.libusbJava.exceptions.LibusbError; import ch.ntb.usb.exceptions.LibusbError;
/** /**
* This class is used as compatibility layer for libusb 0.1 projects. * This class is used as compatibility layer for libusb 0.1 projects.
@@ -60,14 +60,14 @@ public class LibusbJava {
if (defaultCTX != 0) { if (defaultCTX != 0) {
return; return;
} }
try { /*try {
defaultCTX = LibusbJava1.libusb_init(); defaultCTX = LibusbJava1.libusb_init();
} catch (LibusbError e) { } catch (LibusbError e) {
System.err.println("LibusbJava-1.0 init failed with errorcode: " System.err.println("LibusbJava-1.0 init failed with errorcode: "
+ e.getMessage()); + e.getMessage());
e.printStackTrace(); e.printStackTrace();
defaultCTX = 0; defaultCTX = 0;
} }*/
LibusbJava1.libusb_set_debug(0, 0); LibusbJava1.libusb_set_debug(0, 0);
} }

View File

@@ -4,9 +4,11 @@
* *
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
import ch.ntb.inf.libusbJava.exceptions.LibusbError; import ch.ntb.usb.exceptions.LibusbError;
import com.github.boukefalos.jlibloader.Native;
/** /**
* This class represents the Java Native Interface to the shared library which * This class represents the Java Native Interface to the shared library which
@@ -1378,12 +1380,7 @@ public class LibusbJava1 {
public static native String libusb_strerror(); public static native String libusb_strerror();
static { static {
String os = System.getProperty("os.name"); Native.load("com.github.boukefalos", "jlibusb");
if (os.contains("Windows")) {
System.loadLibrary("LibusbJava-1_0");
} else {
System.loadLibrary("usbJava-1.0");
}
/* /*
* After loading the library, we register a "shutdown hook" to be called * After loading the library, we register a "shutdown hook" to be called

View File

@@ -1,4 +1,4 @@
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
public class Libusb_event { public class Libusb_event {

View File

@@ -1,4 +1,4 @@
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
public class Libusb_pollfd { public class Libusb_pollfd {
int fd; int fd;

View File

@@ -5,13 +5,13 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.logging.Logger; import java.util.logging.Logger;
import ch.ntb.inf.libusbJava.logger.LogUtil; import ch.ntb.usb.logger.LogUtil;
/** /**
* This class manages all USB devices and defines some USB specific constants.<br> * This class manages all USB devices and defines some USB specific constants.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
import java.io.IOException; import java.io.IOException;

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
public class USBTimeoutException extends USBException { public class USBTimeoutException extends USBException {

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Represents an USB bus.<br> * Represents an USB bus.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Represents the descriptor of a USB configuration.<br> * Represents the descriptor of a USB configuration.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Common USB descriptor values.<br> * Common USB descriptor values.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Represents an USB device.<br> * Represents an USB device.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Represents the descriptor of a USB device.<br> * Represents the descriptor of a USB device.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Represents the descriptor of an USB endpoint.<br> * Represents the descriptor of an USB endpoint.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Represents an USB interface.<br> * Represents an USB interface.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
/** /**
* Represents the descriptor of a USB interface.<br> * Represents the descriptor of a USB interface.<br>

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava; package ch.ntb.usb;
import java.io.PrintStream; import java.io.PrintStream;

View File

@@ -1,4 +1,4 @@
package ch.ntb.inf.libusbJava.exceptions; package ch.ntb.usb.exceptions;
public class LibusbError extends Exception { public class LibusbError extends Exception {
private static final long serialVersionUID = 9096323614080207236L; private static final long serialVersionUID = 9096323614080207236L;

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.logger; package ch.ntb.usb.logger;
import java.io.InputStream; import java.io.InputStream;
import java.util.Properties; import java.util.Properties;

View File

@@ -0,0 +1,6 @@
# enable or disable logging
ch.ntb.inf.libusbJava/debug = true
# set and configure individual loggers here
# the format is: projectName/debug/<loggerX> = <logger name>/<log level>
ch.ntb.inf.libusbJava/debug/logger0 = ch.ntb.inf.libusbJava/OFF
ch.ntb.inf.libusbJava/debug/logger1 = ch.ntb.inf.libusbJava.test/INFO

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.test; package ch.ntb.usb.test;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
@@ -26,16 +26,16 @@ import org.junit.AfterClass;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import ch.ntb.inf.libusbJava.Device; import ch.ntb.usb.Device;
import ch.ntb.inf.libusbJava.LibusbJava; import ch.ntb.usb.LibusbJava;
import ch.ntb.inf.libusbJava.USB; import ch.ntb.usb.USB;
import ch.ntb.inf.libusbJava.USBException; import ch.ntb.usb.USBException;
import ch.ntb.inf.libusbJava.Usb_Bus; import ch.ntb.usb.Usb_Bus;
import ch.ntb.inf.libusbJava.Usb_Config_Descriptor; import ch.ntb.usb.Usb_Config_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Device_Descriptor; import ch.ntb.usb.Usb_Device_Descriptor;
import ch.ntb.inf.libusbJava.Utils; import ch.ntb.usb.Utils;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo; import ch.ntb.usb.testApp.AbstractDeviceInfo;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo.TransferMode; import ch.ntb.usb.testApp.AbstractDeviceInfo.TransferMode;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class DeviceTest { public class DeviceTest {

View File

@@ -1,4 +1,4 @@
package ch.ntb.inf.libusbJava.test; package ch.ntb.usb.test;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
@@ -6,9 +6,9 @@ import static org.junit.Assert.fail;
import org.junit.Test; import org.junit.Test;
import ch.ntb.inf.libusbJava.LibusbJava1; import ch.ntb.usb.LibusbJava1;
import ch.ntb.inf.libusbJava.Usb_Device; import ch.ntb.usb.Usb_Device;
import ch.ntb.inf.libusbJava.exceptions.LibusbError; import ch.ntb.usb.exceptions.LibusbError;
public class LibusbJava1Test { public class LibusbJava1Test {
/** /**

View File

@@ -5,7 +5,7 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.test; package ch.ntb.usb.test;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
@@ -21,14 +21,14 @@ import org.junit.AfterClass;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import ch.ntb.inf.libusbJava.Device; import ch.ntb.usb.Device;
import ch.ntb.inf.libusbJava.LibusbJava; import ch.ntb.usb.LibusbJava;
import ch.ntb.inf.libusbJava.USB; import ch.ntb.usb.USB;
import ch.ntb.inf.libusbJava.USBException; import ch.ntb.usb.USBException;
import ch.ntb.inf.libusbJava.Usb_Bus; import ch.ntb.usb.Usb_Bus;
import ch.ntb.inf.libusbJava.Utils; import ch.ntb.usb.Utils;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo; import ch.ntb.usb.testApp.AbstractDeviceInfo;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo.TransferMode; import ch.ntb.usb.testApp.AbstractDeviceInfo.TransferMode;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class MemoryLeakTest { public class MemoryLeakTest {

View File

@@ -5,15 +5,15 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.test; package ch.ntb.usb.test;
import ch.ntb.inf.libusbJava.LibusbJava; import ch.ntb.usb.LibusbJava;
import ch.ntb.inf.libusbJava.Usb_Bus; import ch.ntb.usb.Usb_Bus;
import ch.ntb.inf.libusbJava.Usb_Config_Descriptor; import ch.ntb.usb.Usb_Config_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Device; import ch.ntb.usb.Usb_Device;
import ch.ntb.inf.libusbJava.Usb_Endpoint_Descriptor; import ch.ntb.usb.Usb_Endpoint_Descriptor;
import ch.ntb.inf.libusbJava.Usb_Interface; import ch.ntb.usb.Usb_Interface;
import ch.ntb.inf.libusbJava.Usb_Interface_Descriptor; import ch.ntb.usb.Usb_Interface_Descriptor;
/** /**
* This class replicates the code from testlibusb.c supplied in the * This class replicates the code from testlibusb.c supplied in the

View File

@@ -5,10 +5,10 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.test.devices; package ch.ntb.usb.test.devices;
import ch.ntb.inf.libusbJava.USB; import ch.ntb.usb.USB;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo; import ch.ntb.usb.testApp.AbstractDeviceInfo;
public class AT90USB1287 extends AbstractDeviceInfo { public class AT90USB1287 extends AbstractDeviceInfo {

View File

@@ -5,10 +5,10 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.test.devices; package ch.ntb.usb.test.devices;
import ch.ntb.inf.libusbJava.USB; import ch.ntb.usb.USB;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo; import ch.ntb.usb.testApp.AbstractDeviceInfo;
public class CY7C68013A extends AbstractDeviceInfo { public class CY7C68013A extends AbstractDeviceInfo {

View File

@@ -5,9 +5,9 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.test.devices; package ch.ntb.usb.test.devices;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo; import ch.ntb.usb.testApp.AbstractDeviceInfo;
public class MX500 extends AbstractDeviceInfo { public class MX500 extends AbstractDeviceInfo {

View File

@@ -5,9 +5,9 @@
* http://libusbjava.sourceforge.net * http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details. * This library is covered by the LGPL, read LGPL.txt for details.
*/ */
package ch.ntb.inf.libusbJava.test.devices; package ch.ntb.usb.test.devices;
import ch.ntb.inf.libusbJava.testApp.AbstractDeviceInfo; import ch.ntb.usb.testApp.AbstractDeviceInfo;
public class MousePlus extends AbstractDeviceInfo { public class MousePlus extends AbstractDeviceInfo {

View File

@@ -1,4 +1,4 @@
package ch.ntb.inf.libusbJava.test.exceptions; package ch.ntb.usb.test.exceptions;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@@ -10,7 +10,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters; import org.junit.runners.Parameterized.Parameters;
import ch.ntb.inf.libusbJava.exceptions.LibusbError; import ch.ntb.usb.exceptions.LibusbError;
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
public class LibusbErrorTest { public class LibusbErrorTest {

View File

@@ -1,13 +1,13 @@
################################################################ ################################################################
# define the usb test class for test/ch.ntb.inf.libusbJava.DeviceTest here # define the usb test class for test/ch.ntb.inf.libusbJava.DeviceTest here
# it must implement ch.ntb.inf.libusbJava.AbstractDeviceInfo # it must implement ch.ntb.inf.libusbJava.AbstractDeviceInfo
################################################################ ################################################################
# Atmel AVR AT90USB1287 # Atmel AVR AT90USB1287
testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.AT90USB1287 testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.AT90USB1287
# Cypress FX2 CY7C68013A # Cypress FX2 CY7C68013A
#testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.CY7C68013A #testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.CY7C68013A
# MX500 Mouse # MX500 Mouse
#testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.MX500 #testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.MX500
# Logitech Notebook Mouse Plus # Logitech Notebook Mouse Plus
#testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.MousePlus #testdeviceInfo=ch.ntb.inf.libusbJava.test.devices.MousePlus

View File

@@ -1,3 +1,3 @@
[InternetShortcut] [InternetShortcut]
URL=http://staruml.sourceforge.net/ URL=http://staruml.sourceforge.net/
Modified=7081E8FF540DC70101 Modified=7081E8FF540DC70101

View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

File diff suppressed because it is too large Load Diff