Merge branch 'develop' of C:/Users/Rik/Git/project/mimis/develop into develop

This commit is contained in:
2013-07-21 11:04:30 +02:00
30 changed files with 638 additions and 496 deletions

19
.gitignore vendored
View File

@@ -1,10 +1,13 @@
<<<<<<< HEAD
<<<<<<< HEAD
/cpp/wiipair/.settings
/cpp/wiipair/Release/src
=======
/java/bin /java/bin
>>>>>>> c9d82ef8e884d27d6c5215d5b2fb851cf81162f8 /cpp/wiipair/.settings
======= /cpp/wiipair/Debug/src
/cpp/wiipair/Release/src
/cpp/wiiuse/.settings
/cpp/wiiuse/Debug/src /cpp/wiiuse/Debug/src
>>>>>>> develop-wiiuse /cpp/wiiuse/Release/src
/cpp/wiiusej/.settings
/cpp/wiiusej/Debug/src
/cpp/wiiusej/Release/src
/cpp/mimis/.settings
/cpp/mimis/Debug/src
/cpp/mimis/Release/src

157
cpp/mimis/.cproject Normal file
View File

@@ -0,0 +1,157 @@
<?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.exe.debug.850231290">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.850231290" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<macros>
<stringMacro name="target" type="VALUE_TEXT" value="mimis"/>
<stringMacro name="jdk" type="VALUE_PATH_DIR" value="C:\Program Files (x86)\Java\jdk1.7.0"/>
</macros>
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/Mimis library"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/Mimis library/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="mimis" srcPrefixMapping="" srcRootPath=""/>
</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="${target}" 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="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.850231290" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug" postbuildStep="./copy.bat">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.850231290." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1828925779" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.759162706" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
<builder buildPath="${workspace_loc:/Mimis library/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.2052509842" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2073686457" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.589684161" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1625849973" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1346899635" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1047370047" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.2116609685" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.267589759" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${jdk}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${jdk}/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1597457612" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1636659551" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.146669690" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.2025405197" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1363771931" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${jdk}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${jdk}/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.198285536" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1274190515" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
<option defaultValue="true" id="gnu.c.link.option.shared.1517638640" name="Shared (-shared)" superClass="gnu.c.link.option.shared" valueType="boolean"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.2031822380" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug">
<option defaultValue="true" id="gnu.cpp.link.option.shared.772342780" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.118183058" 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.output.base.2143929910" outputPrefix="" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.output.base"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.85332402">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.85332402" moduleId="org.eclipse.cdt.core.settings" name="Release">
<macros>
<stringMacro name="target" type="VALUE_TEXT" value="mimis"/>
<stringMacro name="jdk" type="VALUE_PATH_DIR" value="C:\Program Files (x86)\Java\jdk1.7.0"/>
</macros>
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/Mimis library"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/Mimis library/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="mimis" srcPrefixMapping="" srcRootPath=""/>
</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="${target}" 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.exe.release.85332402" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release" postbuildStep="./copy.bat">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.85332402." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.2049166315" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1428195893" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
<builder buildPath="${workspace_loc:/Mimis library/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.755715721" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.576051356" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2123566528" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.588581964" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1059535716" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
<option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.258122478" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.1498034696" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.240821712" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${jdk}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${jdk}/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.278049181" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1003519130" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.1471372421" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.1001860138" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1224683247" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${jdk}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${jdk}/include/win32&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2004727249" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.869037606" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
<option defaultValue="true" id="gnu.c.link.option.shared.2036725929" name="Shared (-shared)" superClass="gnu.c.link.option.shared" valueType="boolean"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.1036255767" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release">
<option defaultValue="true" id="gnu.cpp.link.option.shared.1672917672" name="Shared (-shared)" superClass="gnu.cpp.link.option.shared" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1374294851" 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.output.base.1656459230" outputPrefix="" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.so.output.base"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="Mimis library.cdt.managedbuild.target.gnu.mingw.exe.1631527228" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.850231290;cdt.managedbuild.config.gnu.mingw.exe.debug.850231290.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1346899635;cdt.managedbuild.tool.gnu.cpp.compiler.input.1597457612">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.85332402;cdt.managedbuild.config.gnu.mingw.exe.release.85332402.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1059535716;cdt.managedbuild.tool.gnu.cpp.compiler.input.278049181">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.85332402;cdt.managedbuild.config.gnu.mingw.exe.release.85332402.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1003519130;cdt.managedbuild.tool.gnu.c.compiler.input.2004727249">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.850231290;cdt.managedbuild.config.gnu.mingw.exe.debug.850231290.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1636659551;cdt.managedbuild.tool.gnu.c.compiler.input.198285536">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>

27
cpp/mimis/.project Normal file
View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Mimis library</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<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>

BIN
cpp/mimis/Debug/mimis.dll Normal file

Binary file not shown.

BIN
cpp/mimis/Release/mimis.dll Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -1,25 +0,0 @@
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/appendContributed=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1313294112/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.1147005981/appendContributed=true

Binary file not shown.

Binary file not shown.

View File

@@ -13,7 +13,7 @@
<externalSetting> <externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/Wiiuse"/> <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/Wiiuse"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/Wiiuse/Debug"/> <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/Wiiuse/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="wiiuse"/> <entry flags="RESOLVED" kind="libraryFile" name="wiiuse" srcPrefixMapping="" srcRootPath=""/>
</externalSetting> </externalSetting>
</externalSettings> </externalSettings>
<extensions> <extensions>
@@ -87,7 +87,7 @@
<externalSetting> <externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/Wiiuse"/> <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/Wiiuse"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/Wiiuse/Release"/> <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/Wiiuse/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="wiiuse"/> <entry flags="RESOLVED" kind="libraryFile" name="wiiuse" srcPrefixMapping="" srcRootPath=""/>
</externalSetting> </externalSetting>
</externalSettings> </externalSettings>
<extensions> <extensions>
@@ -184,4 +184,6 @@
</scannerConfigBuildInfo> </scannerConfigBuildInfo>
</storageModule> </storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject> </cproject>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>Wiiuse</name> <name>Wiiuse library</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>

Binary file not shown.

Binary file not shown.

View File

@@ -1,46 +0,0 @@
#Wed Sep 28 12:08:21 CEST 2011
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/appendContributed=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/appendContributed=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/appendContributed=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/CPLUS_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/CPLUS_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.so.release.872708280/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1519811348/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.release.905874158/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.debug.1025362616/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.release.872708280/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.release.872708280/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.release.872708280/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.so.release.872708280/appendContributed=true

View File

@@ -8,6 +8,7 @@
<classpathentry kind="lib" path="lib/jxinput.jar"/> <classpathentry kind="lib" path="lib/jxinput.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/> <classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/>
<classpathentry kind="lib" path="wiiusej.jar"/> <classpathentry kind="lib" path="wiiusej.jar"/>
<classpathentry kind="lib" path="lib/commons-collections-3.2.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,8 @@
mimis.application.cmd.windows.gomplayer.GomPlayerApplication
mimis.application.cmd.windows.photoviewer.PhotoViewerApplication
mimis.application.cmd.windows.winamp.WinampApplication
mimis.application.cmd.windows.wmp.WMPApplication
mimis.application.itunes.iTunesApplication
mimis.application.lirc.ipod.iPodApplication
mimis.application.mpc.MPCApplication
mimis.application.vlc.VLCApplication

View File

@@ -0,0 +1,7 @@
mimis.device.javainput.extreme3d.Extreme3DDevice
mimis.device.javainput.rumblepad.RumblepadDevice
mimis.device.jintellitype.JIntellitypeDevice
mimis.device.lirc.LircDevice
mimis.device.network.NetworkDevice
mimis.device.panel.PanelDevice
mimis.device.wiimote.WiimoteDevice

View File

@@ -1,100 +1,104 @@
package mimis; package mimis;
import javax.swing.UIManager; import java.util.ArrayList;
import java.util.ServiceLoader;
import mimis.application.cmd.windows.gomplayer.GomPlayerApplication;
import mimis.application.cmd.windows.photoviewer.PhotoViewerApplication; import javax.swing.UIManager;
import mimis.application.cmd.windows.winamp.WinampApplication;
import mimis.application.cmd.windows.wmp.WMPApplication; import mimis.application.Application;
import mimis.application.itunes.iTunesApplication; import mimis.device.Device;
import mimis.application.lirc.ipod.iPodApplication; import mimis.exception.worker.ActivateException;
import mimis.application.mpc.MPCApplication; import mimis.exception.worker.DeactivateException;
import mimis.application.vlc.VLCApplication; import mimis.input.Task;
import mimis.device.javainput.extreme3d.Extreme3DDevice; import mimis.manager.ButtonManager;
import mimis.device.javainput.rumblepad.RumblepadDevice; import mimis.manager.CurrentButtonManager;
import mimis.device.jintellitype.JIntellitypeDevice; import mimis.value.Action;
import mimis.device.lirc.LircDevice; import mimis.worker.Component;
import mimis.device.network.NetworkDevice;
import mimis.device.panel.PanelDevice; public class Main extends Mimis {
import mimis.device.wiimote.WiimoteDevice; protected CurrentButtonManager applicationManager;
import mimis.exception.worker.ActivateException; protected ButtonManager deviceManager;
import mimis.exception.worker.DeactivateException; protected Gui gui;
import mimis.input.Task;
import mimis.manager.ButtonManager; static {
import mimis.manager.CurrentButtonManager; try {
import mimis.value.Action; UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {}
public class Main extends Mimis {
protected CurrentButtonManager applicationManager; }
protected ButtonManager deviceManager;
protected Gui gui; public static Component[] getApplications() {
ArrayList<Component> componentList = new ArrayList<Component>();
static { for (Application application : ServiceLoader.load(mimis.application.Application.class)) {
try { if (application instanceof Component) {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); componentList.add((Component) application);
} catch (Exception e) {} }
}
} return componentList.toArray(new Component[]{});
}
public Main() {
super( public static Component[] getDevices() {
new WinampApplication(), new GomPlayerApplication(), new WMPApplication(), new MPCApplication(), // WindowsApplication ArrayList<Component> componentList = new ArrayList<Component>();
new VLCApplication(), // CMDApplication for (Device device : ServiceLoader.load(mimis.device.Device.class)) {
new iPodApplication(), // LircApplication if (device instanceof Component) {
new PhotoViewerApplication(), // RobotApplication componentList.add((Component) device);
new iTunesApplication()); // Component }
}
/* Create gui from application and device managers */ return componentList.toArray(new Component[]{});
applicationManager = new CurrentButtonManager(router, componentCycle, "Applications", currentArray); }
deviceManager = new ButtonManager("Devices", initialize(false,
new Extreme3DDevice(), new RumblepadDevice(), // JavaInputDevice public Main() {
new JIntellitypeDevice(), new PanelDevice(), new LircDevice(), new WiimoteDevice(), new NetworkDevice())); // Component super(getApplications());
gui = new Gui(this, applicationManager, deviceManager);
manager.add(initialize(false, gui)); /* Create gui from application and device managers */
} applicationManager = new CurrentButtonManager(router, componentCycle, "Applications", currentArray);
deviceManager = new ButtonManager("Devices", initialize(false, getDevices()));
public void activate() throws ActivateException { gui = new Gui(this, applicationManager, deviceManager);
super.activate(); manager.add(initialize(false, gui));
listen(Task.class); }
/* Start managers */ public void activate() throws ActivateException {
applicationManager.start(); super.activate();
deviceManager.start(); listen(Task.class);
/* Force display of currenct component when gui started */ /* Start managers */
gui.start(); applicationManager.start();
while (!gui.active()); deviceManager.start();
end(Action.CURRENT);
} /* Force display of current component when gui started */
gui.start();
protected void deactivate() throws DeactivateException { while (!gui.active());
super.deactivate(); end(Action.CURRENT);
}
log.debug("Stop managers");
applicationManager.stop(); protected void deactivate() throws DeactivateException {
deviceManager.stop(); super.deactivate();
}
log.debug("Stop managers");
public void exit() { applicationManager.stop();
super.exit(); deviceManager.stop();
}
log.debug("Exit managers");
applicationManager.exit(); public void exit() {
deviceManager.exit(); super.exit();
}
log.debug("Exit managers");
public void end(Action action) { applicationManager.exit();
super.end(action); deviceManager.exit();
switch (action) { }
case CURRENT:
case NEXT: public void end(Action action) {
case PREVIOUS: super.end(action);
applicationManager.currentChanged(); switch (action) {
break; case CURRENT:
} case NEXT:
} case PREVIOUS:
applicationManager.currentChanged();
public static void main(String[] args) { break;
new Main().start(false); }
} }
}
public static void main(String[] args) {
new Main().start(false);
}
}

View File

@@ -1,6 +1,6 @@
package mimis.application; package mimis.application;
public interface Application { public interface Application {
} }

View File

@@ -1,79 +1,80 @@
package mimis.application.cmd; package mimis.application.cmd;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
import mimis.exception.worker.ActivateException; import mimis.application.Application;
import mimis.exception.worker.DeactivateException; import mimis.exception.worker.ActivateException;
import mimis.util.Native; import mimis.exception.worker.DeactivateException;
import mimis.value.Registry; import mimis.util.Native;
import mimis.worker.Component; import mimis.value.Registry;
import mimis.worker.Component;
public abstract class CMDApplication extends Component {
protected final static Registry REGISTRY = Registry.LOCAL_MACHINE; public abstract class CMDApplication extends Component implements Application {
protected final static String KEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths"; protected final static Registry REGISTRY = Registry.LOCAL_MACHINE;
protected final static String KEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths";
protected String program;
protected String title; protected String program;
protected Process process; protected String title;
protected boolean detect, running; protected Process process;
protected boolean detect, running;
public CMDApplication(String program, String title) {
super(title); public CMDApplication(String program, String title) {
this.program = program; super(title);
this.title = title; this.program = program;
detect = true; this.title = title;
} detect = true;
}
protected void activate() throws ActivateException {
detect = true; protected void activate() throws ActivateException {
if (!running) { detect = true;
String path = getPath(); if (!running) {
if (path == null) { String path = getPath();
throw new ActivateException(); if (path == null) {
} throw new ActivateException();
try { }
String command = path.startsWith("\"") ? path : String.format("\"%s\"", path); try {
command = replaceVariables(command); String command = path.startsWith("\"") ? path : String.format("\"%s\"", path);
process = Runtime.getRuntime().exec(command); command = replaceVariables(command);
} catch (IOException e) { process = Runtime.getRuntime().exec(command);
log.error(e); } catch (IOException e) {
throw new ActivateException(); log.error(e);
} throw new ActivateException();
} }
super.activate(); }
} super.activate();
}
public boolean active() {
if (detect) { public boolean active() {
running = Native.isRunning(program); if (detect) {
if (!active && running) { running = Native.isRunning(program);
active = true; if (!active && running) {
start(); active = true;
} start();
} }
return active; }
} return active;
}
protected synchronized void deactivate() throws DeactivateException {
detect = false; protected synchronized void deactivate() throws DeactivateException {
super.deactivate(); detect = false;
if (process != null) { super.deactivate();
process.destroy(); if (process != null) {
} process.destroy();
} }
}
public String getPath() {
String key = String.format("%s\\%s", KEY, program); public String getPath() {
System.out.println(Native.getValue(REGISTRY, key)); String key = String.format("%s\\%s", KEY, program);
return Native.getValue(REGISTRY, key); System.out.println(Native.getValue(REGISTRY, key));
} return Native.getValue(REGISTRY, key);
}
public static String replaceVariables(String string) {
Map<String, String> env = System.getenv(); public static String replaceVariables(String string) {
for (String key : env.keySet()) { Map<String, String> env = System.getenv();
string = string.replace(String.format("%%%s%%", key), env.get(key)); for (String key : env.keySet()) {
} string = string.replace(String.format("%%%s%%", key), env.get(key));
return string; }
} return string;
} }
}

View File

@@ -1,181 +1,181 @@
package mimis.application.cmd.windows.winamp; package mimis.application.cmd.windows.winamp;
import mimis.application.cmd.windows.WindowsApplication; import mimis.application.cmd.windows.WindowsApplication;
import mimis.exception.worker.DeactivateException; import mimis.exception.worker.DeactivateException;
import mimis.value.Action; import mimis.value.Action;
import mimis.value.Command; import mimis.value.Command;
import mimis.worker.Worker; import mimis.worker.Worker;
public class WinampApplication extends WindowsApplication { public class WinampApplication extends WindowsApplication {
protected final static String PROGRAM = "winamp.exe"; protected final static String PROGRAM = "winamp.exe";
protected final static String TITLE = "Winamp"; protected final static String TITLE = "Winamp";
protected final static String WINDOW = "Winamp v1.x"; protected final static String WINDOW = "Winamp v1.x";
protected final static int STATUS_PLAYING = 1; protected final static int STATUS_PLAYING = 1;
protected final static int STATUS_PAUSED = 3; protected final static int STATUS_PAUSED = 3;
protected final static int STATUS_STOPPED = 0; protected final static int STATUS_STOPPED = 0;
protected final static int IPC_ISPLAYING = 104; protected final static int IPC_ISPLAYING = 104;
protected final static int IPC_GETOUTPUTTIME = 105; protected final static int IPC_GETOUTPUTTIME = 105;
protected final static int IPC_SETVOLUME = 122; protected final static int IPC_SETVOLUME = 122;
protected final static int WINAMP_FILE_QUIT = 40001; protected final static int WINAMP_FILE_QUIT = 40001;
protected final static int WINAMP_FILE_REPEAT = 40022; protected final static int WINAMP_FILE_REPEAT = 40022;
protected final static int WINAMP_FILE_SHUFFLE = 40023; protected final static int WINAMP_FILE_SHUFFLE = 40023;
protected final static int WINAMP_BUTTON1 = 40044; protected final static int WINAMP_BUTTON1 = 40044;
protected final static int WINAMP_BUTTON2 = 40045; protected final static int WINAMP_BUTTON2 = 40045;
protected final static int WINAMP_BUTTON3 = 40046; protected final static int WINAMP_BUTTON3 = 40046;
protected final static int WINAMP_BUTTON5 = 40048; protected final static int WINAMP_BUTTON5 = 40048;
protected final static int WINAMP_VOLUMEUP = 40058; protected final static int WINAMP_VOLUMEUP = 40058;
protected final static int WINAMP_VOLUMEDOWN = 40059; protected final static int WINAMP_VOLUMEDOWN = 40059;
protected final static int WINAMP_FFWD5S = 40060; protected final static int WINAMP_FFWD5S = 40060;
protected final static int WINAMP_REW5S = 40061; protected final static int WINAMP_REW5S = 40061;
protected final static int WINAMP_BUTTON4_SHIFT = 40147; protected final static int WINAMP_BUTTON4_SHIFT = 40147;
protected final static int WINAMP_VISPLUGIN = 40192; protected final static int WINAMP_VISPLUGIN = 40192;
protected static final int VOLUME_SLEEP = 50; protected static final int VOLUME_SLEEP = 50;
protected static final int SEEK_SLEEP = 100; protected static final int SEEK_SLEEP = 100;
protected VolumeWorker volumeWorker; protected VolumeWorker volumeWorker;
protected SeekWorker seekWorker; protected SeekWorker seekWorker;
protected double volume; protected double volume;
protected boolean muted; protected boolean muted;
public WinampApplication() { public WinampApplication() {
super(PROGRAM, TITLE, WINDOW); super(PROGRAM, TITLE, WINDOW);
volume = getVolume(); volume = getVolume();
muted = volume == 0; muted = volume == 0;
volumeWorker = new VolumeWorker(); volumeWorker = new VolumeWorker();
seekWorker = new SeekWorker(); seekWorker = new SeekWorker();
} }
public void deactivate() throws DeactivateException { public void deactivate() throws DeactivateException {
super.deactivate(); super.deactivate();
volumeWorker.stop(); volumeWorker.stop();
seekWorker.stop(); seekWorker.stop();
} }
public void exit() { public void exit() {
super.exit(); super.exit();
volumeWorker.exit(); volumeWorker.exit();
seekWorker.exit(); seekWorker.exit();
} }
public void begin(Action action) { public void begin(Action action) {
log.trace("WinampApplication begin: " + action); log.trace("WinampApplication begin: " + action);
switch (action) { switch (action) {
case VOLUME_UP: case VOLUME_UP:
volumeWorker.start(1); volumeWorker.start(1);
break; break;
case VOLUME_DOWN: case VOLUME_DOWN:
volumeWorker.start(-1); volumeWorker.start(-1);
break; break;
case FORWARD: case FORWARD:
seekWorker.start(1); seekWorker.start(1);
break; break;
case REWIND: case REWIND:
seekWorker.start(-1); seekWorker.start(-1);
break; break;
} }
} }
public void end(Action action) { public void end(Action action) {
log.trace("WinampApplication end: " + action); log.trace("WinampApplication end: " + action);
switch (action) { switch (action) {
case PLAY: case PLAY:
log.debug("play"); log.debug("play");
switch (user(0, IPC_ISPLAYING)) { switch (user(0, IPC_ISPLAYING)) {
case STATUS_STOPPED: case STATUS_STOPPED:
command(WINAMP_BUTTON2); command(WINAMP_BUTTON2);
break; break;
default: default:
command(WINAMP_BUTTON3); command(WINAMP_BUTTON3);
break; break;
} }
break; break;
case NEXT: case NEXT:
command(WINAMP_BUTTON5); command(WINAMP_BUTTON5);
break; break;
case PREVIOUS: case PREVIOUS:
command(WINAMP_BUTTON1); command(WINAMP_BUTTON1);
break; break;
case FORWARD: case FORWARD:
case REWIND: case REWIND:
seekWorker.stop(); seekWorker.stop();
break; break;
case MUTE: case MUTE:
if (muted) { if (muted) {
setVolume(volume); setVolume(volume);
} else { } else {
volume = getVolume(); volume = getVolume();
setVolume(0); setVolume(0);
} }
muted = !muted; muted = !muted;
break; break;
case VOLUME_UP: case VOLUME_UP:
case VOLUME_DOWN: case VOLUME_DOWN:
volumeWorker.stop(); volumeWorker.stop();
break; break;
case SHUFFLE: case SHUFFLE:
command(WINAMP_FILE_SHUFFLE); command(WINAMP_FILE_SHUFFLE);
break; break;
case REPEAT: case REPEAT:
command(WINAMP_FILE_REPEAT); command(WINAMP_FILE_REPEAT);
break; break;
case FADEOUT: case FADEOUT:
command(WINAMP_BUTTON4_SHIFT); command(WINAMP_BUTTON4_SHIFT);
break; break;
case QUIT: case QUIT:
command(WINAMP_FILE_QUIT); command(WINAMP_FILE_QUIT);
break; break;
case VISUALISER: case VISUALISER:
system(Command.System.MAXIMIZE); system(Command.System.MAXIMIZE);
command(WINAMP_VISPLUGIN); command(WINAMP_VISPLUGIN);
break; break;
} }
} }
public double getVolume() { public double getVolume() {
return user(-666, IPC_SETVOLUME) / 255f; return user(-666, IPC_SETVOLUME) / 255f;
} }
public void setVolume(double volume) { public void setVolume(double volume) {
user((int) Math.ceil(volume * 255), IPC_SETVOLUME); user((int) Math.ceil(volume * 255), IPC_SETVOLUME);
} }
public int getDuration() { public int getDuration() {
return user(1, IPC_GETOUTPUTTIME); return user(1, IPC_GETOUTPUTTIME);
} }
public int getElapsed() { public int getElapsed() {
return user(0, IPC_GETOUTPUTTIME) / 1000; return user(0, IPC_GETOUTPUTTIME) / 1000;
} }
protected class VolumeWorker extends Worker { protected class VolumeWorker extends Worker {
protected int volumeChangeSign; protected int volumeChangeSign;
public void start(int volumeChangeSign) { public void start(int volumeChangeSign) {
super.start(); super.start();
this.volumeChangeSign = volumeChangeSign; this.volumeChangeSign = volumeChangeSign;
} }
public void work() { public void work() {
command(volumeChangeSign > 0 ? WINAMP_VOLUMEUP : WINAMP_VOLUMEDOWN); command(volumeChangeSign > 0 ? WINAMP_VOLUMEUP : WINAMP_VOLUMEDOWN);
sleep(VOLUME_SLEEP); sleep(VOLUME_SLEEP);
} }
}; };
protected class SeekWorker extends Worker { protected class SeekWorker extends Worker {
protected int seekDirection; protected int seekDirection;
public void start(int seekDirection) { public void start(int seekDirection) {
super.start(); super.start();
this.seekDirection = seekDirection; this.seekDirection = seekDirection;
} }
public void work() { public void work() {
command(seekDirection > 0 ? WINAMP_FFWD5S : WINAMP_REW5S); command(seekDirection > 0 ? WINAMP_FFWD5S : WINAMP_REW5S);
sleep(SEEK_SLEEP); sleep(SEEK_SLEEP);
} }
}; };
} }

View File

@@ -1,41 +1,42 @@
package mimis.application.lirc; package mimis.application.lirc;
import mimis.device.lirc.LircButton; import mimis.application.Application;
import mimis.device.lirc.LircService; import mimis.device.lirc.LircButton;
import mimis.device.lirc.remote.WC02IPOButton; import mimis.device.lirc.LircService;
import mimis.exception.worker.ActivateException; import mimis.device.lirc.remote.WC02IPOButton;
import mimis.exception.worker.DeactivateException; import mimis.exception.worker.ActivateException;
import mimis.worker.Component; import mimis.exception.worker.DeactivateException;
import mimis.worker.Component;
public class LircApplication extends Component {
protected LircService lircService; public class LircApplication extends Component implements Application {
protected LircService lircService;
public LircApplication(String title) {
super(title); public LircApplication(String title) {
lircService = new LircService(); super(title);
lircService.put(WC02IPOButton.NAME, WC02IPOButton.values()); lircService = new LircService();
} lircService.put(WC02IPOButton.NAME, WC02IPOButton.values());
}
public void activate() throws ActivateException {
lircService.activate(); public void activate() throws ActivateException {
super.activate(); lircService.activate();
} super.activate();
}
public boolean active() {
return active = lircService.active(); public boolean active() {
} return active = lircService.active();
}
protected void deactivate() throws DeactivateException {
super.deactivate(); protected void deactivate() throws DeactivateException {
lircService.stop(); super.deactivate();
} lircService.stop();
}
public void exit() {
super.exit(); public void exit() {
lircService.exit(); super.exit();
} lircService.exit();
}
public void send(LircButton button) {
lircService.send(button); public void send(LircButton button) {
} lircService.send(button);
} }
}

View File

@@ -1,5 +1,5 @@
package mimis.device; package mimis.device;
public interface Device { public interface Device {
} }

View File

@@ -1,5 +1,7 @@
package mimis.device.wiimote; package mimis.device.wiimote;
import java.io.IOException;
import mimis.device.Device; import mimis.device.Device;
import mimis.device.wiimote.gesture.GestureDevice; import mimis.device.wiimote.gesture.GestureDevice;
import mimis.device.wiimote.motion.MotionDevice; import mimis.device.wiimote.motion.MotionDevice;
@@ -184,8 +186,8 @@ public class WiimoteDevice extends Component implements Device, GestureListener
/* Connectivity */ /* Connectivity */
public synchronized void connect() throws DeviceNotFoundException { public synchronized void connect() throws DeviceNotFoundException {
wiimote = wiimoteService.getDevice(this); wiimote = wiimoteService.getDevice(this);
wiimote.activateContinuous(); //wiimote.activateContinuous();
wiimote.activateMotionSensing(); //wiimote.activateMotionSensing();
ledWorker.start(); ledWorker.start();
} }

Binary file not shown.

Binary file not shown.