From: <hor...@us...> - 2012-12-21 15:59:27
|
Revision: 4518 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4518&view=rev Author: horned-reaper Date: 2012-12-21 15:59:10 +0000 (Fri, 21 Dec 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/FritzBox/Build/Build.log trunk/plugins/FritzBox/Docs/Changes.txt trunk/plugins/FritzBox/Docs/Documentation/Call strings.xls trunk/plugins/FritzBox/Docs/Vorgehensweise beim Update.txt trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBox.csproj trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/Caller.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs trunk/plugins/FritzBox/FritzBox/FritzManager/BackGroundWorker.cs trunk/plugins/FritzBox/FritzBox/FritzManager/CallItem.cs trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs trunk/plugins/FritzBox/FritzBox/FritzManager/Task.cs trunk/plugins/FritzBox/FritzBox/Languages/strings_de.xml trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.csproj.FileListAbsolute.txt trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb trunk/plugins/FritzBox/FritzBox/obj/Debug/GenerateResource-ResGen.read.1.tlog trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.csproj.FileListAbsolute.txt trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/FritzBoxConfigTester.csproj trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.csproj.FileListAbsolute.txt trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/ResolveAssemblyReference.cache trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.csproj.FileListAbsolute.txt trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/ResolveAssemblyReference.cache trunk/plugins/FritzBox/Tools/FritzBoxDebugger/FritzBoxDebugger.csproj trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.csproj.FileListAbsolute.txt trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/GenerateResource.read.1.tlog trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/GenerateResource.write.1.tlog trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.csproj.FileListAbsolute.txt trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.pdb trunk/plugins/FritzBox/releases/update.xml Added Paths: ----------- trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.read.7.tlog trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.write.7.tlog trunk/plugins/FritzBox/releases/FritzBox_v1.0.0.4517.mpe1 Removed Paths: ------------- trunk/plugins/FritzBox/FritzBox/bin/Release/AxInterop.WMPLib.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Bass.Net.dll trunk/plugins/FritzBox/FritzBox/bin/Release/BassRegistration.dll trunk/plugins/FritzBox/FritzBox/bin/Release/BassVisAPI.Net.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Common.Utils.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Core.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Dialogs.dll trunk/plugins/FritzBox/FritzBox/bin/Release/DirectShowLib.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Interop.SHDocVw.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Interop.WMPLib.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Ionic.Zip.dll trunk/plugins/FritzBox/FritzBox/bin/Release/MediaPortal.Support.dll trunk/plugins/FritzBox/FritzBox/bin/Release/Utils.dll trunk/plugins/FritzBox/FritzBox/bin/Release/edtftpnet-1.2.2.dll trunk/plugins/FritzBox/FritzBox/bin/Release/log4net.dll trunk/plugins/FritzBox/FritzBox/bin/Release/taglib-sharp.dll trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/Dialogs.dll trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/Dialogs.dll trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.read.6.tlog trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.write.6.tlog Modified: trunk/plugins/FritzBox/Build/Build.log =================================================================== --- trunk/plugins/FritzBox/Build/Build.log 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/Build/Build.log 2012-12-21 15:59:10 UTC (rev 4518) @@ -1,6 +1,6 @@ Running : C:\Program Files\TortoiseSVN\bin\SubWCRev.exe -SVN Version: 4463 +SVN Version: 4517 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Properties\AssemblyInfo.cs @@ -10,7 +10,7 @@ [Microsoft .NET Framework, Version 4.0.30319.239] Copyright (C) Microsoft Corporation 2007. All rights reserved. -Build started 05.03.2012 21:32:52. +Build started 21.12.2012 16:42:28. Project "D:\FritzBox\FritzBox.sln" on node 1 (Rebuild target(s)). ValidateSolutionConfiguration: Building solution configuration "Release|Mixed Platforms". @@ -47,23 +47,6 @@ C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\ResGen.exe /useSourcePath /r:"C:\Program Files\Team MediaPortal\MediaPortal\Common.Utils.dll" /r:"C:\Program Files\Team MediaPortal\MediaPortal\Core.dll" /r:"C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows\Dialogs.dll" /r:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /r:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /r:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /r:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /r:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /r:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /r:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /r:"C:\Program Files\Team MediaPortal\MediaPortal\Utils.dll" /compile EditPhoneBook.resx,obj\Release\FritzBox.EditPhoneBook.resources Properties\Resources.resx,obj\Release\FritzBox.Properties.Resources.resources FritzBoxConfig.resx,obj\Release\FritzBox.FritzBoxConfig.resources CoreCompile: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /unsafe+ /nowarn:1701,1702 /nostdlib+ /platform:AnyCPU /errorreport:prompt /warn:4 /baseaddress:4194304 /define:TRACE /reference:"C:\Program Files\Team MediaPortal\MediaPortal\Common.Utils.dll" /reference:"C:\Program Files\Team MediaPortal\MediaPortal\Core.dll" /reference:"C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows\Dialogs.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Team MediaPortal\MediaPortal\Utils.dll" /debug:pdbonly /filealign:4096 /optimize+ /out:obj\Release\FritzBox.dll /resource:obj\Release\FritzBox.EditPhoneBook.resources /resource:obj\Release\FritzBox.Properties.Resources.resources /resource:obj\Release\FritzBox.FritzBoxConfig.resources /resource:FritzBox.png,FritzBox.FritzBox.png /resource:FritzBoxDisabled.png,FritzBox.FritzBoxDisabled.png /target:library /warnaserror- EditPhoneBook.cs EditPhoneBook.Designer.cs FritzCallMonitor\FritzBoxClient.cs FritzManager\LocalizeStrings.cs FritzManager\StringEncryption.cs FritzManager\VBReader.cs FritzManager\BackGroundWorker.cs FritzManager\BlockingQueue.cs FritzManager\CallItem.cs FritzManager\Fritz.cs FritzManager\FritzboxPhoneBook.cs FritzManager\Logger.cs FritzManager\LoggerFactory.cs FritzManager\MyBinaryReader.cs FritzManager\PhoneBookItem.cs FritzManager\Task.cs FritzManager\VoiceBoxItem.cs Properties\AssemblyInfo.cs FritzCallMonitor\Caller.cs FritzCallMonitor\CallAction.cs FritzBoxConfig.cs FritzBoxConfig.Designer.cs FritzBox.cs FritzManager\PhoneBook.cs Properties\Resources.Designer.cs Settings.cs -_CopyFilesMarkedCopyLocal: - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Common.Utils.dll" to "bin\Release\Common.Utils.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Core.dll" to "bin\Release\Core.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows\Dialogs.dll" to "bin\Release\Dialogs.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Utils.dll" to "bin\Release\Utils.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Bass.Net.dll" to "bin\Release\Bass.Net.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\DirectShowLib.dll" to "bin\Release\DirectShowLib.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\BassVisAPI.Net.dll" to "bin\Release\BassVisAPI.Net.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\taglib-sharp.dll" to "bin\Release\taglib-sharp.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\AxInterop.WMPLib.dll" to "bin\Release\AxInterop.WMPLib.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\edtftpnet-1.2.2.dll" to "bin\Release\edtftpnet-1.2.2.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\BassRegistration.dll" to "bin\Release\BassRegistration.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.Support.dll" to "bin\Release\MediaPortal.Support.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Interop.WMPLib.dll" to "bin\Release\Interop.WMPLib.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Interop.SHDocVw.dll" to "bin\Release\Interop.SHDocVw.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\log4net.dll" to "bin\Release\log4net.dll". - Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Ionic.Zip.dll" to "bin\Release\Ionic.Zip.dll". CopyFilesToOutputDirectory: Copying file from "obj\Release\FritzBox.dll" to "bin\Release\FritzBox.dll". FritzBox -> D:\FritzBox\FritzBox\bin\Release\FritzBox.dll @@ -102,9 +85,8 @@ _CopyFilesMarkedCopyLocal: Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Core.dll" to ".\bin\Release\Core.dll". Copying file from "D:\FritzBox\FritzBox\bin\Release\FritzBox.dll" to ".\bin\Release\FritzBox.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Utils.dll" to ".\bin\Release\Utils.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Dialogs.dll" to ".\bin\Release\Dialogs.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Common.Utils.dll" to ".\bin\Release\Common.Utils.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Utils.dll" to ".\bin\Release\Utils.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Common.Utils.dll" to ".\bin\Release\Common.Utils.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Bass.Net.dll" to ".\bin\Release\Bass.Net.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\DirectShowLib.dll" to ".\bin\Release\DirectShowLib.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\BassVisAPI.Net.dll" to ".\bin\Release\BassVisAPI.Net.dll". @@ -114,8 +96,8 @@ Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\BassRegistration.dll" to ".\bin\Release\BassRegistration.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.Support.dll" to ".\bin\Release\MediaPortal.Support.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Interop.WMPLib.dll" to ".\bin\Release\Interop.WMPLib.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Interop.SHDocVw.dll" to ".\bin\Release\Interop.SHDocVw.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\log4net.dll" to ".\bin\Release\log4net.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Interop.SHDocVw.dll" to ".\bin\Release\Interop.SHDocVw.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\log4net.dll" to ".\bin\Release\log4net.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Ionic.Zip.dll" to ".\bin\Release\Ionic.Zip.dll". Copying file from "D:\FritzBox\FritzBox\bin\Release\FritzBox.pdb" to ".\bin\Release\FritzBox.pdb". _CopyAppConfigFile: @@ -153,8 +135,6 @@ Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\FritzBoxDebugger.pdb". Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource.read.6.tlog". Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource.write.6.tlog". - Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource-ResGen.read.1.tlog". - Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource-ResGen.write.1.tlog". CoreResGen: "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\resgen.exe" /useSourcePath /r:"C:\Program Files\Team MediaPortal\MediaPortal\Core.dll" /r:D:\FritzBox\FritzBox\bin\Release\FritzBox.dll /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll" /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll" /r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /compile DebugForm.resx,obj\Release\FritzBoxDebugger.DebugForm.resources Processing resource file "DebugForm.resx" into "obj\Release\FritzBoxDebugger.DebugForm.resources". @@ -165,9 +145,8 @@ _CopyFilesMarkedCopyLocal: Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Core.dll" to ".\bin\Release\Core.dll". Copying file from "D:\FritzBox\FritzBox\bin\Release\FritzBox.dll" to ".\bin\Release\FritzBox.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Utils.dll" to ".\bin\Release\Utils.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Dialogs.dll" to ".\bin\Release\Dialogs.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Common.Utils.dll" to ".\bin\Release\Common.Utils.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Utils.dll" to ".\bin\Release\Utils.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Common.Utils.dll" to ".\bin\Release\Common.Utils.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Bass.Net.dll" to ".\bin\Release\Bass.Net.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\DirectShowLib.dll" to ".\bin\Release\DirectShowLib.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\BassVisAPI.Net.dll" to ".\bin\Release\BassVisAPI.Net.dll". @@ -177,8 +156,8 @@ Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\BassRegistration.dll" to ".\bin\Release\BassRegistration.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.Support.dll" to ".\bin\Release\MediaPortal.Support.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Interop.WMPLib.dll" to ".\bin\Release\Interop.WMPLib.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\Interop.SHDocVw.dll" to ".\bin\Release\Interop.SHDocVw.dll". - Copying file from "D:\FritzBox\FritzBox\bin\Release\log4net.dll" to ".\bin\Release\log4net.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Interop.SHDocVw.dll" to ".\bin\Release\Interop.SHDocVw.dll". + Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\log4net.dll" to ".\bin\Release\log4net.dll". Copying file from "C:\Program Files\Team MediaPortal\MediaPortal\Ionic.Zip.dll" to ".\bin\Release\Ionic.Zip.dll". Copying file from "D:\FritzBox\FritzBox\bin\Release\FritzBox.pdb" to ".\bin\Release\FritzBox.pdb". _CopyAppConfigFile: @@ -194,7 +173,7 @@ 0 Warning(s) 0 Error(s) -Time Elapsed 00:00:03.53 +Time Elapsed 00:00:05.44 Reverting to build 0 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs @@ -297,7 +276,7 @@ ..\FritzBox\Languages\Unsupported\strings_zh-CN.xml 36 File(s) copied MpeMaker version: 1.2.1.0 -Build started at 21:32:59 +Build started at 16:42:39 Building "D:\FritzBox\MpeRelease\FritzBox.xmp2" Output: "..\MpeRelease\FritzBox.mpe1" Writing UpdateXML to "update.xml" Modified: trunk/plugins/FritzBox/Docs/Changes.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Changes.txt 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/Docs/Changes.txt 2012-12-21 15:59:10 UTC (rev 4518) @@ -1,8 +1,16 @@ -New release 1.0.0.44xx: +New release 1.0.0.4517: New feature: +- if a phone number is entered to multiple contacts all names are shown on call notifications -Optimization: +Optimizations: +- improved connection monitoring & restoring +- corrections in Dutch language file +- cleanup function for remote contact images folder +- call list is updated after phone call -Fixed bug: +Fixed bugs: +- settings are not saved when config dialog is directly opened (e. g. with PluginConfigLoader.exe) +- call monitor connection is reported as error instead of info +- on multiple simultaneous calls (ISDN) call notification can be handled wrongly \ No newline at end of file Modified: trunk/plugins/FritzBox/Docs/Documentation/Call strings.xls =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Docs/Vorgehensweise beim Update.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Vorgehensweise beim Update.txt 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/Docs/Vorgehensweise beim Update.txt 2012-12-21 15:59:10 UTC (rev 4518) @@ -1,12 +1,13 @@ 1. \xC4nderungen in Visual Studio vornehmen 2. Build.bat ausf\xFChren -3. Pr\xFCfen, ob Installer-Datei mit der korrekten Versionsnummer angelegt wurde. Beispiel: +3. Pr\xFCfen, ob Installer-Datei mit der korrekten Versionsnummer unter "D:\FritzBox\releases" angelegt wurde. Beispiel: - OK: FritzBox_v0.3.5.4364.mpe1 - Falsch: FritzBox_v0.3.5.0.mpe1 4. Wenn falsch, dann Installer-Datei l\xF6schen, SVN update ausf\xFChren und Build.bat erneut ausf\xFChren. Falls das auch nicht helfen sollte, Installer-Datei l\xF6schen, Commit ausf\xFChren und bei Punkt 2 fortfahren 5. \xC4nderungen auf MediaPortal-Webseite hochladen - Versionsnummer - - Change-Log-Eintrag - neue Installer-Datei - neue update.xml-Datei -6. SVN Commit ausf\xFChren \ No newline at end of file +6. Change-Log-Eintrag in Wiki +7. SVN Commit ausf\xFChren +8. Update in beiden Foren ank\xFCndigen \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -27,7 +27,6 @@ using System.IO; using System.Reflection; using System.Threading; -using System.Xml.Serialization; using FritzManager; using MediaPortal.Configuration; using MediaPortal.Dialogs; @@ -68,6 +67,7 @@ private GUIDialogNotify _tempNotification; private int notificationCount = 0; private CallAction.CallType lastCallActionType; // necessary to avoid that notification window isn't closed on quick sequent call actions + private string currentConnectionID; #endregion Variables @@ -87,11 +87,17 @@ private void OnCallAction(CallAction callAction) { - lastCallActionType = callAction.Type; + callAction.WriteToLog(); - Log.Debug("OnCallAction()"); + // verify that the call action is the same as the current handled call (if there is one) + if (currentConnectionID == null) currentConnectionID = callAction.ConnectionID; + else if (currentConnectionID != callAction.ConnectionID) + { + Log.Debug("Another call action is running (connection ID " + currentConnectionID + " is running. Call action is beeing ignored"); + return; + } - callAction.WriteToLog(); + lastCallActionType = callAction.Type; if (!_showNotification) { @@ -151,10 +157,21 @@ private void OnConnectedAction() { - fritz.Login(); + // enable timers + sessionTimer.Start(); + updateTimer.Start(); + } + private void OnDisconnectedAction() + { + // disable timers + updateTimer.Stop(); + sessionTimer.Stop(); + } + + private void OnLoggedInAction() + { Log.Debug("Forcing data load after login"); - loadDataInBackground(); } @@ -175,15 +192,15 @@ if (isMSNEnabled(callAction.MSN)) // check if MSN is enabled { // find contact in phone book - if (Settings.PhoneBookEnabled) callAction.Caller = phoneBook.FindContactEntry(callAction.Caller); - PhoneBookItem phoneBookItem = callAction.Caller.PhoneBookItem; + if (Settings.PhoneBookEnabled) callAction.Caller = phoneBook.FindContactEntries(callAction.Caller); + PhoneBookItem[] phoneBookItems = callAction.Caller.MatchedPhoneBookItems; // play sound string incomingSoundPath = null; if (callAction.Type == CallAction.CallType.Incoming) { - if (phoneBookItem != null && !String.IsNullOrEmpty(phoneBookItem.RingTonePath)) incomingSoundPath = phoneBookItem.RingTonePath; + if (phoneBookItems != null && phoneBookItems[0] != null && !String.IsNullOrEmpty(phoneBookItems[0].RingTonePath)) incomingSoundPath = phoneBookItems[0].RingTonePath; else if (!String.IsNullOrEmpty(Settings.IncomingSoundPath)) incomingSoundPath = Settings.IncomingSoundPath; if (!String.IsNullOrEmpty(incomingSoundPath) && File.Exists(incomingSoundPath)) @@ -215,11 +232,11 @@ } else { - if (phoneBookItem != null) + if (phoneBookItems != null) { - if (Settings.ExtensiveLogging) Log.Info("Caller is identified by phone book as {0}", phoneBookItem.Name); + if (Settings.ExtensiveLogging) Log.Info("Caller is identified by phone book as {0}", callAction.Caller.MatchedPhoneBookEntryNamesAndPhoneTypes); - if (phoneBookItem.ShowCallNotification) showNotification = true; + if (phoneBookItems[0] != null && phoneBookItems[0].ShowCallNotification) showNotification = true; } else if (Settings.ShowUnknownCaller) showNotification = true; // unknown caller } @@ -227,6 +244,7 @@ // configure call notificaton if (showNotification) { + string strHeading = string.Empty; string strImage = string.Empty; string strText = string.Empty; @@ -250,10 +268,10 @@ if (callAction.Caller.PhoneNumber != String.Empty) { - if (phoneBookItem != null) + if (phoneBookItems != null) { - strText += phoneBookItem.Name + Environment.NewLine; - if (Settings.ShowPhoneTypeOnNotification) strText += phoneBook.GetPhoneNumberTypeLabel(callAction.Caller.PhoneType) + Environment.NewLine; + strText += callAction.Caller.MatchedPhoneBookEntryNames + Environment.NewLine; + if (Settings.ShowPhoneTypeOnNotification) strText += callAction.Caller.MatchedPhoneBookEntryPhoneTypes + Environment.NewLine; } if (Settings.ShowPhoneNumberOnNotification) strText += callAction.Caller.PhoneNumber + Environment.NewLine; @@ -262,6 +280,9 @@ // show call notification showNotificationWindow(callAction.Type, strHeading, strImage, strText); + + // update call list + worker.EnqueueTask(new Task(Task.TaskAction.LoadCallListItems, null)); } } } @@ -451,7 +472,9 @@ notificationWindowCloseTimer.AutoReset = false; notificationWindowCloseTimer.Elapsed += OnCloseNotificationWindowTimerEvent; notificationWindowCloseTimer.Start(); - } + } + + currentConnectionID = null; } else Log.Debug("Notification window wasn't opened"); } @@ -480,10 +503,13 @@ // register events Utils.OnStartExternal += OnStartExternal; Utils.OnStopExternal += OnStopExternal; + FritzBoxClient.LogEvent += OnLogAction; + FritzBoxClient.ConnectedEvent += OnConnectedAction; + FritzBoxClient.DisconnectedEvent += OnDisconnectedAction; FritzBoxClient.CallEvent += OnCallAction; - FritzBoxClient.ConnectedEvent += OnConnectedAction; - SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); // power mode changes (Standby & Hibernate) + + Fritz.LoggedInEvent += OnLoggedInAction; FritzBoxClient.StartClient(); @@ -496,10 +522,9 @@ phoneBook = new PhoneBook(fritz); phoneBook.LoadPhoneBookFromXMLFile(); - // set session timer interval and start the timer + // set session timer interval sessionTimer.Interval = 30000; sessionTimer.Elapsed += OnSessionTimerEvent; - sessionTimer.Start(); // set update timer interval and start the timer int updateInterval = Settings.UpdateInterval; @@ -524,15 +549,14 @@ FritzBoxClient.StopClient(); // unregister events - FritzBoxClient.CallEvent -= OnCallAction; FritzBoxClient.LogEvent -= OnLogAction; - FritzBoxClient.ConnectedEvent -= OnConnectedAction; + FritzBoxClient.CallEvent -= OnCallAction; Utils.OnStartExternal -= OnStartExternal; Utils.OnStopExternal -= OnStopExternal; - SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); // power changes + Fritz.LoggedInEvent += OnLoggedInAction; } #endregion IPlugin Interface @@ -779,15 +803,13 @@ if (!Settings.ManualContactImagePathEntry && !String.IsNullOrEmpty(Settings.NASShareName)) worker.EnqueueTask(new Task(Task.TaskAction.SynchronizeContactImages, null)); worker.EnqueueTask(new Task(Task.TaskAction.UpdateGUIProperties, null)); - // reset update timer to get the countdown timer reset + // reset update timer to get the timer countdown reset updateTimer.Stop(); updateTimer.Start(); } private static void OnSessionTimerEvent(object source, System.Timers.ElapsedEventArgs e) { - Log.Debug("Processing session timer event"); - if (fritz.LoggedIn) { fritz.KeepAlive(); @@ -836,7 +858,7 @@ public void LoadVoiceBoxItems() { - if (fritz.LoggedIn) + if (FritzBoxClient.Connected) { List<VoiceBoxItem> newVoiceBoxItemList = VBReader.loadVoiceBoxDir(Settings.VBPath); @@ -895,10 +917,13 @@ { if (Settings.CurrentMode == gUIMode && windowIsDisplayed) { + Log.Debug("Refreshing view"); + // remember selected list item position int selectedListItemIndex = facadeView.SelectedListItemIndex; if (Settings.CurrentMode == GUIMode.CallList) populateCallListItems(); + else if (Settings.CurrentMode == GUIMode.VoiceBox) populateVoiceBoxItems(); else if (Settings.CurrentMode == GUIMode.PhoneBook) { @@ -978,7 +1003,7 @@ { System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false; - proc.StartInfo.FileName = "speexdec"; + proc.StartInfo.FileName = "speexdec.exe"; string target = Path.GetTempPath() + item.seq + ".wav"; proc.StartInfo.Arguments = "\"" + Settings.VBPath + "\\rec\\" + item.filename + "\" \"" + target + "\""; proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; @@ -1074,7 +1099,7 @@ if (voiceBoxItem.type == 3) { GUIListItem elem = new GUIListItem(); - caller = phoneBook.FindContactEntry(voiceBoxItem.callerId); + caller = phoneBook.FindContactEntries(voiceBoxItem.callerId); string mSNName = voiceBoxItem.mynumber; @@ -1083,7 +1108,7 @@ elem.Label = (voiceBoxItem.isNew == 1 ? "* " : " ") + voiceBoxItem.time.ToString(format, ci); // add caller name/phone number and MSN - if (caller.PhoneBookItem != null) callerName = caller.PhoneBookItem.Name + " (" + phoneBook.GetPhoneNumberTypeLabel(caller.PhoneType).ToLower() + ")"; + if (caller.MatchedPhoneBookItems != null) callerName = caller.MatchedPhoneBookEntryNamesAndPhoneTypes; else { if (caller.PhoneNumber != String.Empty) callerName = caller.PhoneNumber; @@ -1126,11 +1151,11 @@ { if (voiceBoxItem.type == 3) { - caller = phoneBook.FindContactEntry(voiceBoxItem.callerId); + caller = phoneBook.FindContactEntries(voiceBoxItem.callerId); if (voiceBoxItem.isNew > 0) { - if (lastNewCallerName == String.Empty && caller.PhoneBookItem != null) lastNewCallerName = caller.PhoneBookItem.Name; + if (lastNewCallerName == String.Empty && caller.MatchedPhoneBookItems != null) lastNewCallerName = caller.MatchedPhoneBookEntryNamesAndPhoneTypes; newVoiceBoxItemsCount++; } @@ -1189,7 +1214,7 @@ foreach (CallItem item in callItemList) { GUIListItem elem = new GUIListItem(); - Caller caller = phoneBook.FindContactEntry(item.number); ; + Caller caller = phoneBook.FindContactEntries(item.number); ; i++; @@ -1200,7 +1225,7 @@ elem.Label = item.timestamp.ToString(format, ci) + " - " + item.duration.ToString("HH:mm", ci); // add caller name/phone number - if (caller.PhoneBookItem != null) elem.Label2 = caller.PhoneBookItem.Name + " (" + phoneBook.GetPhoneNumberTypeLabel(caller.PhoneType).ToLower() + ")"; + if (caller.MatchedPhoneBookItems != null) elem.Label2 = caller.MatchedPhoneBookEntryNamesAndPhoneTypes; else { if (caller.PhoneNumber != String.Empty) elem.Label2 = caller.PhoneNumber; @@ -1578,31 +1603,6 @@ dlg.DoModal(GUIWindowManager.ActiveWindow); } - private void SystemEvents_PowerModeChanged(object sender, Microsoft.Win32.PowerModeChangedEventArgs e) - { - switch (e.Mode) - { - case PowerModes.Suspend: - // disable timers - updateTimer.Stop(); - sessionTimer.Stop(); - - Log.Debug("Stopping client on Windows suspend to standby/hibernate"); - FritzBoxClient.StopClient(); - break; - - case PowerModes.Resume: - Log.Debug("Windows has been resumed from standby/hibernate. Starting client"); - FritzBoxClient.StartClient(); - - // enable timers - sessionTimer.Start(); - updateTimer.Stop(); - - break; - } - } - #endregion FritzManager } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.csproj =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.csproj 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.csproj 2012-12-21 15:59:10 UTC (rev 4518) @@ -83,12 +83,15 @@ <ItemGroup> <Reference Include="Common.Utils"> <HintPath>C:\Program Files\Team MediaPortal\MediaPortal\Common.Utils.dll</HintPath> + <Private>False</Private> </Reference> <Reference Include="Core"> <HintPath>C:\Program Files\Team MediaPortal\MediaPortal\Core.dll</HintPath> + <Private>False</Private> </Reference> <Reference Include="Dialogs"> <HintPath>C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows\Dialogs.dll</HintPath> + <Private>False</Private> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> @@ -97,6 +100,7 @@ <Reference Include="System.Xml" /> <Reference Include="Utils"> <HintPath>C:\Program Files\Team MediaPortal\MediaPortal\Utils.dll</HintPath> + <Private>False</Private> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -182,6 +182,8 @@ Settings.UpdateInterval = Convert.ToInt16(updateInterval.Text); Settings.Save(); + + MediaPortal.Profile.Settings.SaveCache(); // this avoids that settings are not saved when config dialog is directly opened (e. g. with FritzBoxConfigTester or PluginConfigLoader.exe) } #endregion Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -52,16 +52,18 @@ public Caller Caller { get; set; } public string MSN { get; set; } public string Extension { get; set; } + public string ConnectionID { get; set; } public void WriteToLog() { - Log.Info("Call action info:"); + Log.Info("Call action:"); Log.Info(" Call type: {0}", Type.ToString()); Log.Info(" Date: {0}", Time.ToShortDateString()); Log.Info(" Time: {0}", Time.ToLongTimeString()); if (Settings.ExtensiveLogging && (Type == CallType.Incoming || Type == CallType.Outgoing)) Log.Info(" Caller: {0}", Caller.PhoneNumber); if (Settings.ExtensiveLogging && (Type == CallType.Incoming || Type == CallType.Outgoing)) Log.Info(" MSN: {0}", MSN); if (Type == CallType.Outgoing || Type == CallType.ConnectionStarted) Log.Info(" Extension: {0}", Extension.ToString()); + if (Settings.ExtensiveLogging) Log.Info(" Connection ID: {0}", ConnectionID); } } } Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/Caller.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/Caller.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/Caller.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -34,7 +34,10 @@ } public string PhoneNumber { get; set; } - public FritzManager.PhoneBookItem PhoneBookItem { get; set; } - public string PhoneType { get; set; } + public FritzManager.PhoneBookItem[] MatchedPhoneBookItems { get; set; } + public string[] PhoneTypes { get; set; } + public string MatchedPhoneBookEntryNames { get; set; } + public string MatchedPhoneBookEntryPhoneTypes { get; set; } + public string MatchedPhoneBookEntryNamesAndPhoneTypes { get; set; } } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -26,6 +26,7 @@ using System.Net.Sockets; using System.Text; using System.Threading; +using Microsoft.Win32; namespace FritzBox { @@ -48,7 +49,7 @@ private class StateObject { /// <summary> - /// Size of receive buffer. + /// Size of receive buffer /// </summary> public const int BufferSize = 256; @@ -58,12 +59,12 @@ public readonly byte[] buffer = new byte[BufferSize]; /// <summary> - /// Received data string. + /// Received data string /// </summary> public StringBuilder sb = new StringBuilder(); /// <summary> - /// Client socket. + /// Client socket /// </summary> public Socket workSocket; } @@ -75,22 +76,25 @@ public delegate void CallEventHandler(CallAction callAction); public delegate void LogEventHandler(LogLevel logLevel, string logMessage); public delegate void ConnectedEventHandler(); + public delegate void DisconnectedEventHandler(); #endregion Delegates private static readonly TimeSpan minConnectWaitTime = new TimeSpan(0, 0, 30); private static Socket _client; private static DateTime _connectionFailed; - private static bool _stopIsRequested; + private static bool _disconnectIsInProgress; private static Thread thread; private static ManualResetEvent connectDone = new ManualResetEvent(false); // ensures that the thread doesn't end before the socket is connected (avoids error message "A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied") + private static System.Timers.Timer connectionCheckTimer = new System.Timers.Timer(); + private static IPEndPoint remoteEP; #region Properties static FritzBoxClient() { - Address = "fritz.box"; - Port = 1012; + connectionCheckTimer.Interval = 30000; + connectionCheckTimer.Elapsed += OnConnectionCheckTimerEvent; } public static string Address { get; set; } @@ -102,55 +106,42 @@ public static event CallEventHandler CallEvent; public static event LogEventHandler LogEvent; public static event ConnectedEventHandler ConnectedEvent; + public static event DisconnectedEventHandler DisconnectedEvent; #region Public methods public static void StartClient() { - _stopIsRequested = false; - Log(LogLevel.Debug, "Starting call monitor"); - - try + if (_client == null) { - _connectionFailed = DateTime.MinValue; - thread = new Thread(Connect); - thread.Start(); - } - catch (Exception ex) - { - Log(LogLevel.Debug, "Thread could not be started: {0}", ex.Message); - } - } + // start monitoring Windows power mode changes (Standby & Hibernate) + SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(OnPowerModeChanged); - public static void StopClient() - { - if (_client != null || thread != null) - { - _stopIsRequested = true; + Log(LogLevel.Debug, "Starting call monitor"); - Log(LogLevel.Debug, "Stopping call monitor"); - - if (thread != null && thread.ThreadState == ThreadState.WaitSleepJoin) thread.Interrupt(); - try { - if (_client != null) - { - // release the socket - _client.Shutdown(SocketShutdown.Both); - _client.Close(); - } + _connectionFailed = DateTime.MinValue; + thread = new Thread(Connect); + thread.Start(); } catch (Exception ex) { - Log(LogLevel.Error, "Error on stopping client: {0}", ex.Message); + Log(LogLevel.Debug, "Thread could not be started: {0}", ex.Message); } - - Connected = false; - connectDone.Reset(); } } + public static void StopClient() + { + Disconnect(); + + // stop monitoring Windows power mode changes (Standby & Hibernate) + SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(OnPowerModeChanged); + + _client = null; // necessary to check if call monitor is already started + } + public static bool TestConnection() { try @@ -193,43 +184,42 @@ private static void ReConnect() { - if (!_stopIsRequested) + Disconnect(); + + try { - connectDone.Reset(); + _connectionFailed = DateTime.Now; - try - { - _connectionFailed = DateTime.Now; - - thread = new Thread(Connect); - thread.Start(); - } - catch (Exception ex) - { - Log(LogLevel.Debug, "Thread could not be started: {0}", ex.Message); - } + thread = new Thread(Connect); + thread.Start(); } + catch (Exception ex) + { + Log(LogLevel.Debug, "Thread could not be started: {0}", ex.Message); + } } private static void Connect() { - // enforce a minimum wait time between connects - DateTime nextConnect = _connectionFailed.Add(minConnectWaitTime); + _disconnectIsInProgress = false; - if (DateTime.Now < nextConnect) + if (!Connected) { - TimeSpan waitTime = nextConnect - DateTime.Now; - Log(LogLevel.Info, "Waiting {0} seconds before reconnecting", waitTime.Seconds); + // enforce a minimum wait time between connects + DateTime nextConnect = _connectionFailed.Add(minConnectWaitTime); - try + if (DateTime.Now < nextConnect) { - Thread.Sleep(waitTime); + TimeSpan waitTime = nextConnect - DateTime.Now; + Log(LogLevel.Info, "Waiting {0} seconds before reconnecting", waitTime.Seconds); + + try + { + Thread.Sleep(waitTime); + } + catch (ThreadInterruptedException) { } // allow sleep interruption through stop method } - catch (ThreadInterruptedException) { } // allow sleep interruption through stop method - } - if (!_stopIsRequested) - { Log(LogLevel.Info, "Connecting"); // establish the remote endpoint for the socket @@ -247,13 +237,13 @@ } IPAddress ipAddress = ipHostInfo.AddressList[0]; - IPEndPoint remoteEP = new IPEndPoint(ipAddress, Port); + remoteEP = new IPEndPoint(ipAddress, Port); // create a TCP/IP socket _client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // connect to the remote endpoint - if (!_stopIsRequested) + if (!_disconnectIsInProgress) { _client.BeginConnect(Address, Port, ConnectCallback, _client); connectDone.WaitOne(); @@ -261,6 +251,42 @@ } } + private static void Disconnect() + { + if (Connected) + { + Log(LogLevel.Debug, "Disconnecting call monitor"); + + _disconnectIsInProgress = true; + + connectionCheckTimer.Stop(); // avoids reconnecting through connection check timer + + if (_client != null || thread != null) + { + if (thread != null && thread.ThreadState == ThreadState.WaitSleepJoin) thread.Interrupt(); + + try + { + // release the socket + _client.Shutdown(SocketShutdown.Both); + _client.Close(); + } + catch (Exception ex) + { + Log(LogLevel.Error, "Error on disconnecting call monitor: {0}", ex.Message); + } + } + + Log(LogLevel.Info, "Call monitor is disconnected"); + + Connected = false; + connectDone.Reset(); + + // raise event + if (DisconnectedEvent != null) DisconnectedEvent(); // the Configuration tool doesn't use this event + } + } + private static void ConnectCallback(IAsyncResult ar) { try @@ -274,18 +300,20 @@ // signal that the connection has been made connectDone.Set(); - Log(LogLevel.Error, "Call monitor is connected with {0}", client.RemoteEndPoint.ToString()); + Log(LogLevel.Info, "Call monitor is connected with {0}", client.RemoteEndPoint.ToString()); Receive(client); Connected = true; // raise event - if (ConnectedEvent != null) ConnectedEvent(); // the Configuration tool doesn't use the ConnectedEvent + if (ConnectedEvent != null) ConnectedEvent(); // the Configuration tool doesn't use this event + + // start connection monitoring. Since the socket does not detect connection interruptions it's necessary to monitor it by another thread + connectionCheckTimer.Start(); } catch (SocketException) { - Connected = false; Log(LogLevel.Error, "Connecting failed: Socket Exception"); ReConnect(); } @@ -308,8 +336,6 @@ } catch (SocketException ex) { - Connected = false; - Log(LogLevel.HeavyDebug, "{0}", ex.NativeErrorCode); Log(LogLevel.HeavyDebug, "{0}", ex.SocketErrorCode); Log(LogLevel.HeavyDebug, "{0}", ex.Data); @@ -324,8 +350,8 @@ } catch (Exception ex) { - Connected = false; Log(LogLevel.Debug, "Receiving failed: {0}", ex.Message); + ReConnect(); } } @@ -339,7 +365,8 @@ // read data from the remote device int bytesRead = 0; - if (!_stopIsRequested) bytesRead = client.EndReceive(ar); + + if (!_disconnectIsInProgress) bytesRead = client.EndReceive(ar); else return; if (bytesRead > 0) @@ -375,22 +402,26 @@ { case "RING": callAction.Type = CallAction.CallType.Incoming; + callAction.ConnectionID = propertiesList[2]; callAction.Caller.PhoneNumber = propertiesList[3]; callAction.MSN = propertiesList[4]; break; case "CALL": callAction.Type = CallAction.CallType.Outgoing; + callAction.ConnectionID = propertiesList[2]; callAction.Caller.PhoneNumber = propertiesList[5]; callAction.MSN = propertiesList[4]; callAction.Extension = propertiesList[3]; // Nebenstelle break; case "CONNECT": callAction.Type = CallAction.CallType.ConnectionStarted; + callAction.ConnectionID = propertiesList[2]; callAction.Caller.PhoneNumber = propertiesList[4]; callAction.Extension = propertiesList[3]; // Nebenstelle break; case "DISCONNECT": callAction.Type = CallAction.CallType.ConnectionClosed; + callAction.ConnectionID = propertiesList[2]; break; default: callAction = null; @@ -403,26 +434,24 @@ } else { - Connected = false; Log(LogLevel.Error, "Receiving callback failed: No bytes to read"); ReConnect(); } } catch (ObjectDisposedException) { - Connected = false; Log(LogLevel.Error, "Receiving callback failed: Object Disposed Exeption"); + ReConnect(); } catch (SocketException) { - Connected = false; Log(LogLevel.Error, "Receiving callback failed: Socket Exception"); ReConnect(); } catch (Exception ex) { - Connected = false; Log(LogLevel.Debug, "Receiving failed: {0}", ex.Message); + ReConnect(); } } @@ -436,6 +465,44 @@ if (LogEvent != null) LogEvent(LogLevel.Error, ex.ToString()); } + private static void OnConnectionCheckTimerEvent(object source, System.Timers.ElapsedEventArgs e) + { + Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + + try + { + connectionCheckTimer.Stop(); // avoid that the connection check is run multiple + + // check connection + Log(LogLevel.Debug, "Checking connection"); + socket.Connect(remoteEP); + Log(LogLevel.Debug, "Connection is OK"); + + connectionCheckTimer.Start(); + } + catch + { + Log(LogLevel.Debug, "Connection has been lost"); + ReConnect(); + } + } + + private static void OnPowerModeChanged(object sender, Microsoft.Win32.PowerModeChangedEventArgs e) + { + switch (e.Mode) + { + case PowerModes.Suspend: + Log(LogLevel.Debug, "Windows is suspending to standby/hibernate"); + Disconnect(); + break; + + case PowerModes.Resume: + Log(LogLevel.Debug, "Windows has been resumed from standby/hibernate"); + Connect(); + break; + } + } + #endregion Private methods } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/BackGroundWorker.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/BackGroundWorker.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/BackGroundWorker.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -1,17 +1,18 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Threading; namespace FritzManager { /// <summary> - /// Description of BackGroundWorker. + /// Description of BackGroundWorker /// </summary> public class BackGroundWorker { - static Logger Log = LoggerFactory.getLogger("BackGroundWorker"); + public bool Running { get; private set; } - public bool Running { get; private set; } + private static Logger Log = LoggerFactory.getLogger("BackGroundWorker"); private FritzBox.FritzBox plugin; private BlockingQueue queue = new BlockingQueue(); Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/CallItem.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/CallItem.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/CallItem.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -8,7 +8,7 @@ namespace FritzManager { /// <summary> - /// Model of one call item record. read from fritz csv exports + /// Model of one call item record. read from fritz CSV exports /// </summary> public class CallItem : System.IEquatable<CallItem> { Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs 2012-12-16 14:23:33 UTC (rev 4517) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs 2012-12-21 15:59:10 UTC (rev 4518) @@ -9,10 +9,16 @@ namespace FritzManager { /// <summary> - /// class for communication with FritzBox. + /// class for communication with FritzBox /// </summary> public class Fritz { + #region Delegates + + public delegate void LoggedInEventHandler(); + + #endregion Delegates + private string hostname; private string baseurl; private bool loggedIn; @@ -21,7 +27,6 @@ private string cacheFileName; private string sid; //private bool useSidAuthentication = true; - private DateTime lastCallListUpdate = DateTime.Now.AddMinutes(-20.0); private string dialport; static Logger Log = LoggerFactory.getLogger("Fritz"); @@ -34,11 +39,14 @@ this.cacheDir = cacheDir; this.cacheFileName = cacheDir + "\\FritzBox-CallList.csv"; this.dialport = dialport; - - // start monitoring Windows power mode changes (Standby & Hibernate) - SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); + + // start monitoring connection state changes + FritzBox.FritzBoxClient.ConnectedEvent += new FritzBox.FritzBoxClient.ConnectedEventHandler(OnConnectedEvent); + FritzBox.FritzBoxClient.DisconnectedEvent += new FritzBox.FritzBoxClient.DisconnectedEventHandler(OnDisconnectedEvent); } + public static event LoggedInEventHandler LoggedInEvent; + public bool LoggedIn { get @@ -73,6 +81,8 @@ loggedIn = sid != null; Log.Info("Successfully logged in to FRITZ!Box"); + + LoggedInEvent(); // raise event } else { @@ -95,7 +105,7 @@ } catch (WebException) { - Log.Debug("No connection to FRITZ!Box. Keepalive heartbeat could not be sen... [truncated message content] |