You can subscribe to this list here.
2007 |
Jan
(36) |
Feb
(79) |
Mar
(123) |
Apr
(95) |
May
(119) |
Jun
(172) |
Jul
(124) |
Aug
(100) |
Sep
(83) |
Oct
(52) |
Nov
(97) |
Dec
(87) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(131) |
Feb
(80) |
Mar
(163) |
Apr
(178) |
May
(73) |
Jun
(54) |
Jul
(106) |
Aug
(118) |
Sep
(50) |
Oct
(125) |
Nov
(100) |
Dec
(99) |
2009 |
Jan
(104) |
Feb
(99) |
Mar
(68) |
Apr
(81) |
May
(52) |
Jun
(87) |
Jul
(67) |
Aug
(33) |
Sep
(27) |
Oct
(37) |
Nov
(60) |
Dec
(116) |
2010 |
Jan
(82) |
Feb
(79) |
Mar
(38) |
Apr
(50) |
May
(45) |
Jun
(53) |
Jul
(23) |
Aug
(86) |
Sep
(22) |
Oct
(96) |
Nov
(97) |
Dec
(73) |
2011 |
Jan
(24) |
Feb
(45) |
Mar
(28) |
Apr
(31) |
May
(42) |
Jun
(25) |
Jul
|
Aug
(12) |
Sep
(28) |
Oct
(13) |
Nov
(43) |
Dec
(13) |
2012 |
Jan
(62) |
Feb
(28) |
Mar
(6) |
Apr
(16) |
May
(7) |
Jun
|
Jul
(16) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2013 |
Jan
(5) |
Feb
|
Mar
(34) |
Apr
(9) |
May
(6) |
Jun
(10) |
Jul
(32) |
Aug
(8) |
Sep
(11) |
Oct
(35) |
Nov
(24) |
Dec
(22) |
2014 |
Jan
(44) |
Feb
(9) |
Mar
(9) |
Apr
(15) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(11) |
Sep
(7) |
Oct
(6) |
Nov
(1) |
Dec
(12) |
2015 |
Jan
(33) |
Feb
(19) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
From: <mic...@us...> - 2012-02-09 16:41:46
|
Revision: 4439 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4439&view=rev Author: michael-t Date: 2012-02-09 16:41:35 +0000 (Thu, 09 Feb 2012) Log Message: ----------- Added Paths: ----------- trunk/plugins/PowerScheduler++/Test/1.2.5.12/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mic...@us...> - 2012-02-09 16:40:06
|
Revision: 4438 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4438&view=rev Author: michael-t Date: 2012-02-09 16:39:52 +0000 (Thu, 09 Feb 2012) Log Message: ----------- Added Paths: ----------- trunk/plugins/PowerScheduler++/Test/Binaries/ trunk/plugins/PowerScheduler++/Test/Binaries/Common.Utils.dll trunk/plugins/PowerScheduler++/Test/Binaries/Core.dll trunk/plugins/PowerScheduler++/Test/Binaries/Gentle.Common.dll trunk/plugins/PowerScheduler++/Test/Binaries/Gentle.Framework.dll trunk/plugins/PowerScheduler++/Test/Binaries/PluginBase.dll trunk/plugins/PowerScheduler++/Test/Binaries/PowerScheduler.Interfaces.dll trunk/plugins/PowerScheduler++/Test/Binaries/PowerScheduler.dll trunk/plugins/PowerScheduler++/Test/Binaries/PowerSchedulerClientPlugin.dll trunk/plugins/PowerScheduler++/Test/Binaries/SetupControls.dll trunk/plugins/PowerScheduler++/Test/Binaries/TVDatabase.dll trunk/plugins/PowerScheduler++/Test/Binaries/TVLibrary.dll trunk/plugins/PowerScheduler++/Test/Binaries/TvBusinessLayer.dll trunk/plugins/PowerScheduler++/Test/Binaries/TvControl.dll trunk/plugins/PowerScheduler++/Test/Binaries/TvLibrary.Interfaces.dll trunk/plugins/PowerScheduler++/Test/Binaries/TvService.exe trunk/plugins/PowerScheduler++/Test/Binaries/Utils.dll trunk/plugins/PowerScheduler++/Test/CleanupFiles.bat trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/EPGWakeupConfig.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IEpgHandler.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerController.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerScheduler.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerSettings.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/PowerManager.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/PowerScheduler.Interfaces.csproj trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/PowerSchedulerEventArgs.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/PowerSettings.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Properties/ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Properties/AssemblyInfo.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/RemotePowerControl.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/TimerException.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/WaitableTimer.cs trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/WakeOnLanManager.cs trunk/plugins/PowerScheduler++/Test/CopyFiles.bat trunk/plugins/PowerScheduler++/Test/MPEI/ trunk/plugins/PowerScheduler++/Test/MPEI/PowerScheduler++ 1.2.5.12.mpe1 trunk/plugins/PowerScheduler++/Test/MPEI/PowerScheduler++.xmp2 trunk/plugins/PowerScheduler++/Test/MPEI/PowerScheduler_high.png trunk/plugins/PowerScheduler++/Test/MPEI/update.xml trunk/plugins/PowerScheduler++/Test/PowerScheduler++.sln trunk/plugins/PowerScheduler++/Test/RestoreFiles.bat trunk/plugins/PowerScheduler++/Test/TvEngine3/ trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/ trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/ trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/ trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ActiveNetworkStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ActiveSharesStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ActiveStreamsStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ControllerActiveStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/EpgGrabbingStandbyWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/LocalClientStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/LocalClientWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/PowerControllerStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/PowerControllerWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ProcessActiveStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/RebootWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/RemoteClientStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/ScheduledRecordingsWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Handlers/XmlTvImportWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/PowerScheduler.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/PowerScheduler.csproj trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/PowerSchedulerFactory.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/PowerSchedulerPlugin.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Properties/ trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Properties/AssemblyInfo.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/ trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/PowerSchedulerSetup.Designer.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/PowerSchedulerSetup.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/PowerSchedulerSetup.resx trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/PowerSettingsForm.Designer.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/PowerSettingsForm.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/SelectProcessForm.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/SelectProcessForm.designer.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/SelectShareForm.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/Setup/SelectShareForm.designer.cs trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/TheAlgorithm.txt trunk/plugins/PowerScheduler++/Test/TvEngine3/TVLibrary/Plugins/PowerScheduler/WindowsController.cs trunk/plugins/PowerScheduler++/Test/VersionInfo.cs trunk/plugins/PowerScheduler++/Test/mediaportal/ trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/ trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Handlers/ trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Handlers/ActiveNetworkStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Handlers/ActiveSharesStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Handlers/ProcessActiveStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Handlers/RebootWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Handlers/WakeableStandbyHandler.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Handlers/WakeableWakeupHandler.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/MasterVolume.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/PowerScheduler.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/PowerScheduler.gif trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/PowerSchedulerClientPlugin.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/PowerSchedulerClientPlugin.csproj trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/PowerSchedulerFactory.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/PowerScheduler_disabled.gif trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Properties/ trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Properties/AssemblyInfo.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/ trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/PowerSchedulerSetup.Designer.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/PowerSchedulerSetup.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/PowerSchedulerSetup.resx trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/PowerSettingsForm.Designer.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/PowerSettingsForm.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/SelectProcessForm.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/SelectProcessForm.designer.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/SelectShareForm.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/Setup/SelectShareForm.designer.cs trunk/plugins/PowerScheduler++/Test/mediaportal/PowerSchedulerClientPlugin/UnattendedWindow.cs Added: trunk/plugins/PowerScheduler++/Test/Binaries/Common.Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/Common.Utils.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/Core.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/Gentle.Common.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/Gentle.Common.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/Gentle.Framework.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/Gentle.Framework.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/PluginBase.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/PluginBase.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/PowerScheduler.Interfaces.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/PowerScheduler.Interfaces.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/PowerScheduler.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/PowerScheduler.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/PowerSchedulerClientPlugin.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/PowerSchedulerClientPlugin.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/SetupControls.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/SetupControls.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/TVDatabase.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/TVDatabase.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/TVLibrary.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/TVLibrary.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/TvBusinessLayer.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/TvBusinessLayer.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/TvControl.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/TvControl.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/TvLibrary.Interfaces.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/TvLibrary.Interfaces.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/TvService.exe =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/TvService.exe ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/Binaries/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/PowerScheduler++/Test/Binaries/Utils.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/PowerScheduler++/Test/CleanupFiles.bat =================================================================== --- trunk/plugins/PowerScheduler++/Test/CleanupFiles.bat (rev 0) +++ trunk/plugins/PowerScheduler++/Test/CleanupFiles.bat 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,75 @@ +@echo off +set PROJECTPATH=%~dp0 +if "%ProgramFiles(x86)%" == "" goto 32bit +set SERVERPATH=%ProgramFiles(x86)%\Team MediaPortal\MediaPortal TV Server +set CLIENTPATH=%ProgramFiles(x86)%\Team MediaPortal\MediaPortal +goto data +:32bit +set SERVERPATH=%ProgramFiles%\Team MediaPortal\MediaPortal TV Server +set CLIENTPATH=%ProgramFiles%\Team MediaPortal\MediaPortal +:data +if "%ProgramData%" == "" goto winXP +set SERVERLOGPATH=%ProgramData%\Team MediaPortal\MediaPortal TV Server\log +goto count +:winXP +set SERVERLOGPATH=%ALLUSERSPROFILE%\Application Data\Team MediaPortal\MediaPortal TV Server\log + +:count +set COUNT=1 + +echo Stopping TV Server +echo --------------------- +:stop +echo trying... +net stop tvservice > nul 2>nul +tasklist | find /i "tvservice" >nul 2>nul +if not %ERRORLEVEL% == 1 ( + ping localhost >nul 2>nul + set /a COUNT=%COUNT%+1 + if %COUNT% GTR 5 goto end + goto stop +) +echo. + +echo MediaPortal TV Server +echo --------------------- +for %%f in (Plugins\PowerScheduler.dll) do ( + echo %%f + if exist "%SERVERPATH%\%%f.org" ( + del "%SERVERPATH%\%%f" + move /Y "%SERVERPATH%\%%f.org" "%SERVERPATH%\%%f" + ) 2>nul +) +echo. +echo MediaPortal Common Library +echo ---------------------------------- +for %%f in (PowerScheduler.Interfaces.dll) do ( + echo %%f + if exist "%SERVERPATH%\%%f.org" ( + del "%SERVERPATH%\%%f" + move /Y "%SERVERPATH%\%%f.org" "%SERVERPATH%\%%f" + ) 2>nul + if exist "%CLIENTPATH%\%%f.org" ( + del "%CLIENTPATH%\%%f" + move /Y "%CLIENTPATH%\%%f.org" "%CLIENTPATH%\%%f" + ) 2>nul +) +echo. +echo MediaPortal Client +echo ------------------ +for %%f in (plugins\process\PowerSchedulerClientPlugin.dll) do ( + echo %%f + if exist "%CLIENTPATH%\%%f.org" ( + del "%CLIENTPATH%\%%f" + move /Y "%CLIENTPATH%\%%f.org" "%CLIENTPATH%\%%f" + ) 2>nul +) +echo. +echo Cleanup +echo ------------------ +move /Y "%SERVERLOGPATH%\tv.log" "%SERVERLOGPATH%\tv_old.log" +net start tvservice +echo. +:end +pause +exit \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/EPGWakeupConfig.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/EPGWakeupConfig.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/EPGWakeupConfig.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,125 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; + +#endregion + +namespace TvEngine.PowerScheduler +{ + + #region Enums + + public enum EPGGrabDays + { + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday, + Sunday + } + + #endregion + + [Serializable] + public class EPGWakeupConfig + { + public DateTime LastRun = DateTime.MinValue; + public List<EPGGrabDays> Days = new List<EPGGrabDays>(); + public int Hour; + public int Minutes; + + public EPGWakeupConfig() {} + + public EPGWakeupConfig(string serializedConfig) + { + EPGWakeupConfig cfg = new EPGWakeupConfig(); + try + { + BinaryFormatter formatter = new BinaryFormatter(); + byte[] buffer = Convert.FromBase64String(serializedConfig); + using (MemoryStream stream = new MemoryStream(buffer, 0, buffer.Length)) + { + cfg = (EPGWakeupConfig)formatter.Deserialize(stream); + } + } + catch (Exception) {} + Hour = cfg.Hour; + Minutes = cfg.Minutes; + Days = cfg.Days; + LastRun = cfg.LastRun; + } + + public string SerializeAsString() + { + BinaryFormatter formatter = new BinaryFormatter(); + string result; + using (MemoryStream stream = new MemoryStream()) + { + formatter.Serialize(stream, this); + stream.Flush(); + stream.Seek(0, SeekOrigin.Begin); + byte[] buffer = new byte[stream.Length]; + int bytesRead = stream.Read(buffer, 0, buffer.Length); + result = Convert.ToBase64String(buffer, 0, bytesRead); + } + return result; + } + + public override bool Equals(object obj) + { + if (obj is EPGWakeupConfig) + { + EPGWakeupConfig cfg = (EPGWakeupConfig)obj; + if (cfg.Hour == Hour && cfg.Minutes == Minutes) + { + foreach (EPGGrabDays day in cfg.Days) + { + if (!Days.Contains(day)) + { + return false; + } + } + foreach (EPGGrabDays day in Days) + { + if (!cfg.Days.Contains(day)) + { + return false; + } + } + return true; + } + } + return false; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +} \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IEpgHandler.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IEpgHandler.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IEpgHandler.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,65 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +using System; + +#endregion + +namespace TvEngine.PowerScheduler.Interfaces +{ + public delegate void EPGScheduleHandler(); + + /// <summary> + /// Provides access to PowerScheduler's EPG interface for + /// EPG plugins. + /// </summary> + public interface IEpgHandler + { + /// <summary> + /// Allows an external EPG source to prevent standby when it's + /// grabbing EPG + /// </summary> + /// <param name="source">the source preventing standby</param> + /// <param name="allowed">is standby allowed?</param> + void SetStandbyAllowed(object source, bool allowed, int timeout); + + /// <summary> + /// Allows an external EPG source to set a preferred next wakeup time + /// </summary> + /// <param name="source">the source that wants to wakeup the system for EPG grabbing</param> + /// <param name="time">the desired time to wakeup the system</param> + void SetNextEPGWakeupTime(object source, DateTime time); + + /// <summary> + /// Allows an external EPG source to retrieve the next wakeup time + /// for EPG grabbing. This time can be used to start an actual EPG + /// grabbing process. + /// </summary> + /// <returns>next EPG grab wakeup time</returns> + DateTime GetNextEPGWakeupTime(); + + /// <summary> + /// Event which gets fired when the configured EPG wakeup schedule is due. + /// </summary> + event EPGScheduleHandler EPGScheduleDue; + } +} \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerController.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerController.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerController.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,108 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +using System; + +#endregion + +namespace TvEngine.PowerScheduler.Interfaces +{ + /// <summary> + /// Public interface to PowerScheduler power control + /// Intented to be used by singleseat setups + /// </summary> + public interface IPowerController + { + /// <summary> + /// Requests suspension of the system. Uses default action. + /// </summary> + /// <param name="source">description of who wants to suspend the system</param> + /// <param name="force">force the system to suspend (not recommended)</param> + void SuspendSystem(string source, bool force); + + /// <summary> + /// Requests suspension of the system. + /// </summary> + /// <param name="source"></param> + /// <param name="how">How to suspend, see MediaPortal.Util.RestartOptions</param> + /// <param name="force"></param> + void SuspendSystem(string source, int how, bool force); + + /// <summary> + /// Enables clients on singleseat setups to indicate whether or not the system + /// is allowed to enter standby + /// </summary> + /// <param name="standbyAllowed">is standby allowed?</param> + /// <param name="handlerName">client handlername which prevents standby</param> + void SetStandbyAllowed(bool standbyAllowed, string handlerName); + + /// <summary> + /// Enables clients on singleseat setups to indicate when the next + /// earliest wakeup time is due + /// </summary> + /// <param name="nextWakeupTime">DateTime when to wakeup the system</param> + /// <param name="handlerName">client handlername which is responsible for this wakeup time</param> + void SetNextWakeupTime(DateTime nextWakeupTime, string handlerName); + + /// <summary> + /// Resets the idle timer of the PowerScheduler. When enough time has passed (IdleTimeout), the system + /// is suspended as soon as possible (no handler disallows shutdown). + /// Note that the idle timer is automatically reset to now when the user moves the mouse or touchs the keyboard. + /// </summary> + void UserActivityDetected(DateTime when); + + /// <summary> + /// Register remote handlers. If an empty string or null is passed, no handler is registered for + /// that type. It returns a tag used to unregister the later. The returned tag is always not 0. + /// </summary> + /// <param name="standbyHandlerURI"></param> + /// <param name="wakeupHandlerURI"></param> + int RegisterRemote(String standbyHandlerURI, String wakeupHandlerURI); + + /// <summary> + /// Unregister remote handlers. + /// </summary> + void UnregisterRemote(int tag); + + /// <summary> + /// Indicates whether or not we're connected to the PowerScheduler power control interfaces + /// </summary> + bool IsConnected { get; } + + /// <summary> + /// Get the current state. If refresh is true, the state is the most current state, otherwise the state could be some seconds old. + /// Special case: If shutdown is not allowed because an event is almost due, the handler name is "EVENT-DUE". + /// </summary> + /// <param name="refresh"></param> + /// <param name="disAllowShutdown"></param> + /// <param name="disAllowShutdownHandler"></param> + /// <param name="nextWakeupTime"></param> + /// <param name="nextWakeupHandler"></param> + void GetCurrentState(bool refresh, out bool unattended, out bool disAllowShutdown, + out String disAllowShutdownHandler, out DateTime nextWakeupTime, out String nextWakeupHandler); + + /// <summary> + /// Provides access to PowerScheduler's settings + /// </summary> + IPowerSettings PowerSettings { get; } + } +} \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerScheduler.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerScheduler.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerScheduler.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,129 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +using System; + +#endregion + +namespace TvEngine.PowerScheduler.Interfaces +{ + /// <summary> + /// EvenHandler delegate for PowerScheduler events + /// </summary> + /// <param name="args"></param> + public delegate void PowerSchedulerEventHandler(PowerSchedulerEventArgs args); + + /// <summary> + /// Interface to PowerScheduler + /// </summary> + public interface IPowerScheduler + { + /// <summary> + /// Register to this event to receive status changes from the PowerScheduler + /// </summary> + event PowerSchedulerEventHandler OnPowerSchedulerEvent; + + /// <summary> + /// Registers an IStandbyHandler implementation + /// </summary> + /// <param name="handler">implementation to register for handling standby requests</param> + void Register(IStandbyHandler handler); + + /// <summary> + /// Registers an IWakeupHandler implementation + /// </summary> + /// <param name="handler">implementation to register for handling system resume time</param> + void Register(IWakeupHandler handler); + + /// <summary> + /// Unregisters an IStandbyHandler implementation + /// </summary> + /// <param name="handler">implementation to unregister for handling standby requests</param> + void Unregister(IStandbyHandler handler); + + /// <summary> + /// Registers an IWakeupHandler implementation + /// </summary> + /// <param name="handler">implementation to register for handling system resume time</param> + void Unregister(IWakeupHandler handler); + + /// <summary> + /// Checks if the given IStandbyHandler is registered + /// </summary> + /// <param name="handler">IStandbyHandler to check</param> + /// <returns>is the given handler registered?</returns> + bool IsRegistered(IStandbyHandler handler); + + /// <summary> + /// Checks if the given IWakeupHandler is registered + /// </summary> + /// <param name="handler">IWakeupHandler to check</param> + /// <returns>is the given handler registered?</returns> + bool IsRegistered(IWakeupHandler handler); + + /// <summary> + /// Requests suspension of the system + /// </summary> + /// <param name="source">description of who wants to suspend the system</param> + /// <param name="force">force the system to suspend (not recommended)</param> + void SuspendSystem(string source, bool force); + + /// <summary> + /// Requests suspension of the system. + /// </summary> + /// <param name="source"></param> + /// <param name="how">How to suspend, see MediaPortal.Util.RestartOptions</param> + /// <param name="force"></param> + void SuspendSystem(string source, int how, bool force); + + /// <summary> + /// Resets the idle timer of the PowerScheduler. When enough time has passed (IdleTimeout), the system + /// is suspended as soon as possible (no handler disallows shutdown). + /// Note that the idle timer is automatically reset to now when the user moves the mouse or touchs the keyboard. + /// </summary> + void UserActivityDetected(DateTime when); + + /// <summary> + /// Get the current state. If refresh is true, the state is the most current state, otherwise the state could be some seconds old. + /// Special case: If shutdown is not allowed because an event is almost due, the handler name is "EVENT-DUE". + /// </summary> + /// <param name="refresh"></param> + /// <param name="disAllowShutdown"></param> + /// <param name="disAllowShutdownHandler"></param> + /// <param name="nextWakeupTime"></param> + /// <param name="nextWakeupHandler"></param> + void GetCurrentState(bool refresh, out bool unattended, out bool disAllowShutdown, + out String disAllowShutdownHandler, out DateTime nextWakeupTime, out String nextWakeupHandler); + + + /// <summary> + /// Checks if a suspend request is in progress + /// </summary> + /// <returns>is the system currently trying to suspend?</returns> + bool IsSuspendInProgress(); + + /// <summary> + /// Provides access to PowerScheduler's settings + /// </summary> + PowerSettings Settings { get; } + } +} \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerSettings.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerSettings.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IPowerSettings.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,76 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +#endregion + +namespace TvEngine.PowerScheduler.Interfaces +{ + /// <summary> + /// Provides access to PowerScheduler's settings + /// </summary> + public interface IPowerSettings + { + /// <summary> + /// Should PowerScheduler actively try to put the system into standby? + /// </summary> + bool ShutdownEnabled { get; } + + /// <summary> + /// Should PowerScheduler check when any plugin wants to wakeup the system? + /// </summary> + bool WakeupEnabled { get; } + + /// <summary> + /// Should the shutdown attemps be forced? + /// </summary> + bool ForceShutdown { get; } + + /// <summary> + /// Should PowerScheduler be verbose when logging? + /// </summary> + bool ExtensiveLogging { get; } + + /// <summary> + /// If ShutdownEnabled, how long (in minutes) to wait before putting the + /// system into standby + /// </summary> + int IdleTimeout { get; } + + /// <summary> + /// if WakeupEnabled, the time (in seconds) to wakeup the system earlier than + /// the actual wakeup time + /// </summary> + int PreWakeupTime { get; } + + /// <summary> + /// Controls the granularity of the standby/wakeup checks in seconds + /// </summary> + int CheckInterval { get; } + + /// <summary> + /// How should put the system into standby? suspend/hibernate/stayon + /// suspend uses S3, hibernate uses S4, stayon is for debugging purposes and + /// doesn't put the system into standby at all + /// </summary> + ShutdownMode ShutdownMode { get; } + } +} \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IStandbyHandler.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IStandbyHandler.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IStandbyHandler.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,68 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +#endregion + +namespace TvEngine.PowerScheduler.Interfaces +{ + /// <summary> + /// StandbyHandler interface for PowerScheduler + /// </summary> + public interface IStandbyHandler + { + /// <summary> + /// Indicator whether or not to allow suspension/hibernation of the system + /// </summary> + bool DisAllowShutdown { get; } + + /// <summary> + /// Called when the user turns away from the system. + /// </summary> + void UserShutdownNow(); + + /// <summary> + /// Description of the source that allows / disallows shutdown + /// </summary> + string HandlerName { get; } + } + + /// <summary> + /// PowerScheduler++ standby mode enumeration + /// </summary> + public enum StandbyMode + { + StandbyAllowed, + StandbyPrevented, + AwayModeRequested + } + + /// <summary> + /// Extension to the IStandbyHandler interface for PowerScheduler++ + /// </summary> + public interface IStandbyHandlerEx : IStandbyHandler + { + /// <summary> + /// Indicator which standby mode is requested by the handler + /// </summary> + StandbyMode StandbyMode { get; } + } +} \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IWakeupHandler.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IWakeupHandler.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/Interfaces/IWakeupHandler.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,46 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +using System; + +#endregion + +namespace TvEngine.PowerScheduler.Interfaces +{ + /// <summary> + /// To be implemented by classes who want to control system resume + /// </summary> + public interface IWakeupHandler + { + /// <summary> + /// Should return the earliest time the implementation desires to wake up the system. + /// </summary> + /// <param name="earliestWakeupTime">indicates the earliest valid wake up time that is considered valid by the PowerScheduler</param> + /// <returns>earliest time the implementation wants to wake up the system</returns> + DateTime GetNextWakeupTime(DateTime earliestWakeupTime); + + /// <summary> + /// Description of the source that want to wake up the system at the given time + /// </summary> + string HandlerName { get; } + } +} \ No newline at end of file Added: trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/PowerManager.cs =================================================================== --- trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/PowerManager.cs (rev 0) +++ trunk/plugins/PowerScheduler++/Test/Common-MP-TVE3/PowerScheduler.Interfaces/PowerManager.cs 2012-02-09 16:39:52 UTC (rev 4438) @@ -0,0 +1,1268 @@ +#region Copyright (C) 2005-2011 Team MediaPortal + +// Copyright (C) 2005-2011 Team MediaPortal +// http://www.team-mediaportal.com +// +// MediaPortal is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// MediaPortal is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>. + +#endregion + +#region Usings + +using System; +using System.Net; +using System.Runtime.InteropServices; + +#endregion + +namespace TvEngine.PowerScheduler.Interfaces +{ + /// <summary> + /// Provides static methods for managing system power states, events and settings + /// </summary> + public static class PowerManager + { + #region Variables + + /// <summary> + /// Handle to unregister for power setting change notification + /// </summary> + private static IntPtr _hAwayMode = (IntPtr)null; + + #endregion + + #region System power structures and enumerations + + /// <summary> + /// The thread's execution requirements + /// </summary> + [Flags] + enum ExecutionState : uint + { + /// <summary> + /// Some error. + /// </summary> + Error = 0, + + /// <summary> + /// System is required, do not hibernate. + /// </summary> + ES_SYSTEM_REQUIRED = 0x00000001, + + /// <summary> + /// Display is required, do not hibernate. + /// </summary> + ES_DISPLAY_REQUIRED = 0x00000002, + + /// <summary> + /// User is active, do not hibernate. + /// </summary> + ES_USER_PRESENT = 0x00000004, + + /// <summary> + /// Enables away mode. + /// </summary> + ES_AWAYMODE_REQUIRED = 0x00000040, + + /// <summary> + /// Use together with the above options to report a + /// state until explicitly changed. + /// </summary> + ES_CONTINUOUS = 0x80000000 + } + + /// <summary> + /// Flags to register for power setting change notification + /// </summary> + const int DEVICE_NOTIFY_WINDOW_HANDLE = 0x00000000; + const int DEVICE_NOTIFY_SERVICE_HANDLE = 0x00000001; + + /// <summary> + /// Constants for power notifications + /// </summary> + public const int WM_POWERBROADCAST = 0x0218; + public const int PBT_APMQUERYSUSPEND = 0x0000; + public const int PBT_APMQUERYSUSPENDFAILED = 0x0002; + public const int PBT_APMSUSPEND = 0x0004; + public const int PBT_APMRESUMECRITICAL = 0x0006; + public const int PBT_APMRESUMESUSPEND = 0x0007; + public const int PBT_APMRESUMEAUTOMATIC = 0x0012; + public const int PBT_POWERSETTINGCHANGE = 0x8013; + public const int BROADCAST_QUERY_DENY = 0x424D5144; + + /// <summary> + /// This structure is sent when the PBT_POWERSETTINGSCHANGE message is sent. + /// It describes the power setting that has changed and contains data about the change + /// </summary> + [StructLayout(LayoutKind.Sequential, Pack = 4)] + public struct POWERBROADCAST_SETTING + { + public Guid PowerSetting; + public uint DataLength; + public byte Data; + } + + /// <summary> + /// Guid to register for power setting change notification + /// </summary> + public static Guid GUID_SYSTEM_AWAYMODE = new Guid("98a7f580-01f7-48aa-9c0f-44352c29e5C0"); + + /// <summary> + /// System power setting guids + /// </summary> + static Guid NO_SUBGROUP_GUID = new Guid("fea3413e-7e05-4911-9a71-700331f1c294"); + static Guid GUID_LOCK_CONSOLE_ON_WAKE = new Guid("0e796bdb-100d-47d6-a2d5-f7d2daa51f51"); + static Guid GUID_SUB_SLEEP = new Guid("238c9fa8-0aad-41ed-83f4-97be242c8f20"); + static Guid GUID_ALLOW_AWAY_MODE = new Guid("25dfa149-5dd1-4736-b5ab-e8a37b5b8187"); + static Guid GUID_SLEEP_AFTER = new Guid("29f6c1db-86da-48c5-9fdb-f2b67b1f44da"); + static Guid GUID_ALLOW_HYBRID_SLEEP = new Guid("94ac6d29-73ce-41a6-809f-6363ba21b47e"); + static Guid GUID_HIBERNATE_AFTER = new Guid("9d7815a6-7ee4-497e-8888-515a05f02364"); + static Guid GUID_ALLOW_RTC_WAKE = new Guid("bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d"); + static Guid GUID_SUB_POWER_BUTTONS_AND_LID = new Guid("4f971e89-eebd-4455-a8de-9e59040e7347"); + static Guid GUID_LID_CLOSE_ACTION = new Guid("5ca83367-6e45-459f-a27b-476b1d01c936"); + static Guid GUID_POWER_BUTTON_ACTION = new Guid("7648efa3-dd9c-4e3e-b566-50f929386280"); + static Guid GUID_SLEEP_BUTTON_ACTION = new Guid("96996bc0-ad50-47ec-923b-6f41874dd9eb"); + static Guid GUID_SUB_MULTIMEDIA = new Guid("9596fb26-9850-41fd-ac3e-f7c3c00afd4b"); + static Guid GUID_WHEN_SHARING_MEDIA = new Guid("03680956-93bc-4294-bba6-4e0f09bb717f"); + + /// <summary> + /// Contains information about the power capabilities of the system. + /// </summary> + [StructLayout(LayoutKind.Sequential)] + struct SYSTEM_POWER_CAPABILITIES + { + [MarshalAs(UnmanagedType.I1)] + public bool PowerButtonPresent; + [MarshalAs(UnmanagedType.I1)] + public bool SleepButtonPresent; + [MarshalAs(UnmanagedType.I1)] + public bool LidPresent; + [MarshalAs(UnmanagedType.I1)] + public bool SystemS1; + [MarshalAs(UnmanagedType.I1)] + public bool SystemS2; + [MarshalAs(UnmanagedType.I1)] + public bool SystemS3; + [MarshalAs(UnmanagedType.I1)] + public bool SystemS4; + [MarshalAs(UnmanagedType.I1)] + public bool SystemS5; + [MarshalAs(UnmanagedType.I1)] + public bool HiberFilePresent; + [MarshalAs(UnmanagedType.I1)] + public bool FullWake; + [MarshalAs(UnmanagedType.I1)] + public bool VideoDimPresent; + [MarshalAs(UnmanagedType.I1)] + public bool ApmPresent; + [MarshalAs(UnmanagedType.I1)] + public bool UpsPresent; + [MarshalAs(UnmanagedType.I1)] + public bool ThermalControl; + [MarshalAs(UnmanagedType.I1)] + public bool ProcessorThrottle; + public byte ProcessorMinimumThrottle; + public byte ProcessorMaximumThrottle; + [MarshalAs(UnmanagedType.I1)] + public bool FastSystemS4; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public byte[] spare2; + [MarshalAs(UnmanagedType.I1)] + public bool DiskSpinDown; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public byte[] spare3; + [MarshalAs(UnmanagedType.I1)] + public bool SystemBatteriesPresent; + [MarshalAs(UnmanagedType.I1)] + public bool BatteriesAreShortTerm; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public BATTERY_REPORTING_SCALE[] BatteryScale; + public SYSTEM_POWER_STATE AcOnlineWake; + public SYSTEM_POWER_STATE SoftLidWake; + public SYSTEM_POWER_STATE RtcWake; + public SYSTEM_POWER_STATE MinimumDeviceWakeState; + public SYSTEM_POWER_STATE DefaultLowLatencyWake; + } + + /// <summary> + /// Contains the granularity of the battery capacity that is reported by IOCTL_BATTERY_QUERY_STATUS. + /// </summary> + [StructLayout(LayoutKind.Sequential)] + struct BATTERY_REPORTING_SCALE + { + public UInt32 Granularity; + public UInt32 Capacity; + } + + /// <summary> + /// Contains information about the power status of the system. + /// </summary> + struct SYSTEM_POWER_STATUS + { + public ACLineStatus ACLineStatus; + public BatteryFlag BatteryFlag; + public Byte BatteryLifePercent; + public Byte Reserved1; + public Int32 BatteryLifeTime; + public Int32 BatteryFullLifeTime; + } + + /// <summary> + /// The AC power status. + /// </summary> + enum ACLineStatus : byte + { + Offline = 0, + Online = 1, + Unknown = 255 + } + + /// <summary> + /// The battery charge status. + /// </summary> + enum BatteryFlag : byte + { + High = 1, + Low = 2, + Critical = 4, + Charging = 8, + NoSystemBattery = 128, + Unknown = 255 + } + + /// <summary> + /// Contains information used to set the system power state. + /// </summary> + [StructLayout(LayoutKind.Sequential, Pack=1)] + struct POWER_ACTION_POLICY + { + public POWER_ACTION Action; + public PowerActionFlags Flags; + public PowerActionEventCode EventCode; + } + + /// <summary> + /// Defines values that are used to specify system power action types. + /// </summary> + enum POWER_ACTION : uint + { + PowerActionNone = 0, // No system power action. + PowerActionReserved, // Reserved; do not use. + PowerActionSleep, // Sleep. + PowerActionHibernate, // Hibernate. + PowerActionShutdown, // Shutdown. + PowerActionShutdownReset, // Shutdown and reset. + PowerActionShutdownOff, // Shutdown and power off. + PowerActionWarmEject, // Warm eject. + } + + /// <summary> + /// + /// </summary> + [Flags] + enum PowerActionFlags : uint + { + POWER_ACTION_QUERY_ALLOWED = 0x00000001, // Broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation. + POWER_ACTION_UI_ALLOWED = 0x00000002, // Applications can prompt the user for directions on how to prepare for suspension. Sets bit 0 in the Flags parameter passed in the lParam parameter of WM_POWERBROADCAST. + POWER_ACTION_OVERRIDE_APPS = 0x00000004, // Ignores applications that do not respond to the PBT_APMQUERYSUSPEND event broadcast in the WM_POWERBROADCAST message. + POWER_ACTION_LIGHTEST_FIRST = 0x10000000, // Uses the first lightest available sleep state. + POWER_ACTION_LOCK_CONSOLE = 0x20000000, // Requires entry of the system password upon resume from one of the system standby states. + POWER_ACTION_DISABLE_WAKES = 0x40000000, // Disables all wake events. + POWER_ACTION_CRITICAL = 0x80000000, // Forces a critical suspension. + } + + [Flags] + enum PowerActionEventCode : uint + { + POWER_LEVEL_USER_NOTIFY_TEXT = 0x00000001, // User notified using the UI. + POWER_LEVEL_USER_NOTIFY_SOUND = 0x00000002, // User notified using sound. + POWER_LEVEL_USER_NOTIFY_EXEC = 0x00000004, // Specifies a program to be executed. + POWER_USER_NOTIFY_BUTTON = 0x00000008, // Indicates that the power action is in response to a user power button press. + POWER_USER_NOTIFY_SHUTDOWN = 0x00000010, // Indicates a power action of shutdown/off. + POWER_FORCE_TRIGGER_RESET = 0x80000000, // Clears a user power button press. + } + + /// <summary> + /// The global flags constants are used to enable or disable user power policy options + /// </summary> + [Flags] + enum GlobalFlags : uint + { + EnableMultiBatteryDisplay = 0x02, // Enables or disables multiple battery display in the system Power Meter. + EnablePasswordLogon = 0x04, // Enables or disables requiring password logon when the system resumes from standby or hibernate. + EnableSysTrayBatteryMeter = 0x01, // Enables or disables the battery meter icon in the system tray. When this flag is cleared, the battery meter icon is not displayed. + EnableVideoDimDisplay = 0x10, // Enables or disables support for dimming the video display when the system changes from running on AC power to running on battery power. + EnableWakeOnRing = 0x08, // Enables or disables wake on ring support. + } + + /// <summary> + /// Contains power policy settings that are unique to each power scheme. + /// </summary> + struct POWER_POLICY + { + public USER_POWER_POLICY user; + public MACHINE_POWER_POLICY mach; + } + + /// <summary> + /// Contains power policy settings that are unique to each power scheme for a user. + /// </summary> + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] + struct USER_POWER_POLICY { + public uint Revision; + public POWER_ACTION_POLICY IdleAc; + public POWER_ACTION_POLICY IdleDc; + public uint IdleTimeoutAc; + public uint IdleTimeoutDc; + public byte IdleSensitivityAc; + public byte IdleSensitivityDc; + public byte ThrottlePolicyAc; + public byte ThrottlePolicyDc; + public SYSTEM_POWER_STATE MaxSleepAc; + public SYSTEM_POWER_STATE MaxSleepDc; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public uint[] Reserved; + public uint VideoTimeoutAc; + public uint VideoTimeoutDc; + public uint SpindownTimeoutAc; + public uint SpindownTimeoutDc; + [MarshalAs(UnmanagedType.I1)] + public bool OptimizeForPowerAc; + [MarshalAs(UnmanagedType.I1)] + public bool OptimizeForPowerDc; + public byte FanThrottleToleranceAc; + public byte FanThrottleToleranceDc; + public byte ForcedThrottleAc; + public byte ForcedThrottleDc; + } + + /// <summary> + /// Contains computer power policy settings that are unique to each power scheme on the computer. + /// </summary> + struct MACHINE_POWER_POLICY { + public uint Revision; + public SYSTEM_POWER_STATE MinSleepAc; + public SYSTEM_POWER_STATE MinSleepDc; + public SYSTEM_POWER_STATE ReducedLatencySleepAc; + public SYSTEM_POWER_STATE ReducedLatencySleepDc; + public uint DozeTimeoutAc; + public uint DozeTimeoutDc; + public uint DozeS4TimeoutAc; + public uint DozeS4TimeoutDc; + public byte MinThrottleAc; + public byte MinThrottleDc; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public byte[] pad1; + public POWER_ACTION_POLICY OverThrottledAc; + public POWER_ACTION_POLICY OverThrottledDc; + } + + /// <summary> + /// Contains global power policy settings that apply to all power schemes. + /// </summary> + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct GLOBAL_POWER_POLICY + { + public GLOBAL_USER_POWER_POLICY user; + public GLOBAL_MACHINE_POWER_POLICY mach; + } + + /// <summary> + /// Contains global user power policy settings that apply to all power schemes for a user. + /// </summary> + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct GLOBAL_USER_POWER_POLICY + { + public const int NUM_DISCHARGE_POLICIES = 4; + + public uint Revision; + public POWER_ACTION_POLICY PowerButtonAc; + public POWER_ACTION_POLICY PowerButtonDc; + public POWER_ACTION_POLICY SleepButtonAc; + public POWER_ACTION_POLICY SleepButtonDc; + public POWER_ACTION_POLICY LidCloseAc; + public POWER_ACTION_POLICY LidCloseDc; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = NUM_DISCHARGE_POLICIES)] + public SYSTEM_POWER_LEVEL[] DischargePolicy; + public GlobalFlags GlobalFlags; + } + + /// <summary> + /// Contains information about system battery drain policy settings. + /// </summary> + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct SYSTEM_POWER_LEVEL + { + public bool Enable; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public byte[] Spare; + public uint BatteryLevel; + public POWER_ACTION_POLICY PowerPolicy; + public SYSTEM_POWER_STATE MinSystemState; + } + + /// <summary> + /// Contains global computer power policy settings that apply to all power schemes for all users. + /// </summary> + [StructLayout(LayoutKind.Sequential, Pack = 1)] + struct GLOBAL_MACHINE_POWER_POLICY + { + public uint Revision; + public SYSTEM_POWER_STATE LidOpenWakeAc; + public SYSTEM_POWER_STATE LidOpenWakeDc; + public uint BroadcastCapacityResolution; + } + + /// <summary> + /// Defines values that are used to specify system power states. + /// </summary> + enum SYSTEM_POWER_STATE + { + PowerSystemUnspecified = 0, + PowerSystemWorking = 1, + PowerSystemSleeping1 = 2, + PowerSystemSleeping2 = 3, + PowerSystemSleeping3 = 4, + PowerSystemHibernate = 5, + PowerSystemShutdown = 6, + PowerSys... [truncated message content] |
From: <Ba...@us...> - 2012-02-06 20:51:12
|
Revision: 4437 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4437&view=rev Author: BartEv Date: 2012-02-06 20:51:06 +0000 (Mon, 06 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/VeraControl.xmp2 Modified: trunk/plugins/VeraControl/releases/VeraControl.xmp2 =================================================================== --- trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-02-02 20:07:07 UTC (rev 4436) +++ trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-02-06 20:51:06 UTC (rev 4437) @@ -867,71 +867,24 @@ <Build>0</Build> <Revision>3</Revision> </Version> - <ExtensionDescription>Control your Vera controller from MediaPortal. - - - -Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - - -Vera is a Z-wave home automation controller from MicasaVerde. - - - -This version is tested with: - - - Vera 1 v1.1.1338 - - - Vera 2 v1.1.1267 - - - Vera 2 v1.1.1362 - - - Vera 2 v1.5.255 - + <ExtensionDescription>Control your Vera controller from MediaPortal. + +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + +Vera is a Z-wave home automation controller from MicasaVerde. + +This version is tested with: + - Vera 1 v1.1.1338 + - Vera 2 v1.1.1267 + - Vera 2 v1.1.1362 + - Vera 2 v1.5.255 </ExtensionDescription> - <VersionDescription>[9.0.0.1] - -- Real time Vera status update - --Threated communication (no-screen-lockups) - -- IP Cam support - -- Improved error handling - -- Improved Cam image updater - -- Clean up code (coding standard complience) - -- Supports remote connection (via fwd1.mios.com) - -- New image set - -- Improved config screen (Vera-box look) - -- first: stable release - - - -[0.9.0.2] - -- Added a help screen (! button = context menu) - -- Added RC commands to control devices/scenes without the need of opening the dialog - - - -[0.9.0.3] - - - Show device status of selected item also on main screen, - - - Added the ability to show devices automatically when selecting a new room (= extra config option) - + <VersionDescription> - Show device status of selected item also on main screen, + - Added the ability to show devices automatically when selecting a new room (= extra config option) - bug fix: wrong scene dialog was shown in DefautWide skin</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.3.mpe1</OnlineLocation> - <ReleaseDate>2012-01-30T22:51:05</ReleaseDate> + <ReleaseDate>2012-02-02T22:51:05</ReleaseDate> <Tags>home automation, z-wave, micasaverde, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-02-02 20:07:18
|
Revision: 4436 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4436&view=rev Author: BartEv Date: 2012-02-02 20:07:07 +0000 (Thu, 02 Feb 2012) Log Message: ----------- version 0.9.0.3 - Show device status of selected item also on main screen, - Added the ability to show devices automatically when selecting a new room (= extra config option) - bug fix: wrong scene dialog was shown in DefautWide skin Modified Paths: -------------- trunk/plugins/VeraControl/DeviceSystem.cs trunk/plugins/VeraControl/DialogDeviceControl.cs trunk/plugins/VeraControl/DialogSceneControl.cs trunk/plugins/VeraControl/VeraCommunication.cs trunk/plugins/VeraControl/VeraControl.cs trunk/plugins/VeraControl/VeraSetupForm.Designer.cs trunk/plugins/VeraControl/VeraSetupForm.cs trunk/plugins/VeraControl/releases/VeraControl.xmp2 trunk/plugins/VeraControl/releases/update.xml trunk/plugins/VeraControl/skin/Default/VeraControl.xml trunk/plugins/VeraControl/skin/DefaultWide/VeraControl.xml Added Paths: ----------- trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.3.mpe1 Modified: trunk/plugins/VeraControl/DeviceSystem.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSystem.cs 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/DeviceSystem.cs 2012-02-02 20:07:07 UTC (rev 4436) @@ -80,6 +80,14 @@ { _fullReload = true; } + + public bool FullReloadWaitingAndClearFlag() + { + // Invoking this method will clear the update ready flag -> so caller need to handle the update + bool b = fullReload; + ClearFullReloadFlag(); + return b; + } public bool fullReload { get { return _fullReload; } Modified: trunk/plugins/VeraControl/DialogDeviceControl.cs =================================================================== --- trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-02-02 20:07:07 UTC (rev 4436) @@ -77,14 +77,16 @@ return Load(GUIGraphicsContext.Skin + @"\VeraDialogDeviceControl.xml"); } - public void InitDialog(string headerText, DeviceGeneric dev) + public void ShowDialog(string headerText, DeviceGeneric dev) { + Reset(); //LoadSkin(); AllocResources(); InitControls(); _lblHeading.Label = headerText; _myDev = dev; + //Clean up the old camUpdateThread (if not finished yet) if (_camUpdater != null) { @@ -121,6 +123,7 @@ _imgLogo.Visibility = System.Windows.Visibility.Hidden; StartCamImageUpdater(((DeviceCam)dev).imgUrl); } + DoModal(GUIWindowManager.ActiveWindow); } public void UpdateStatus() Modified: trunk/plugins/VeraControl/DialogSceneControl.cs =================================================================== --- trunk/plugins/VeraControl/DialogSceneControl.cs 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/DialogSceneControl.cs 2012-02-02 20:07:07 UTC (rev 4436) @@ -51,8 +51,9 @@ return Load(GUIGraphicsContext.Skin + @"\VeraDialogSceneControl.xml"); } - public void InitDialog(string headerText, Scene scene) + public void ShowDialog(string headerText, Scene scene) { + Reset(); //LoadSkin(); AllocResources(); InitControls(); @@ -61,6 +62,7 @@ _myScene = scene; UpdateStatus(); + DoModal(GUIWindowManager.ActiveWindow); } public void UpdateStatus() Modified: trunk/plugins/VeraControl/VeraCommunication.cs =================================================================== --- trunk/plugins/VeraControl/VeraCommunication.cs 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/VeraCommunication.cs 2012-02-02 20:07:07 UTC (rev 4436) @@ -360,11 +360,11 @@ else { ParseUpdateInfo(e.Result); - // WebClient wc = new WebClient(); - // if (_status.system.dataversion == "0") - // { - //ParseUpdateInfo( wc.DownloadString(@"C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\testdata\text.xml")); - // } +// WebClient wc = new WebClient(); +// if (_status.system.dataversion == "0") +// { +// ParseUpdateInfo( wc.DownloadString(@"C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\testdata\text.xml")); +// } } } @@ -407,6 +407,7 @@ { // We have a full refresh -> Clear all lists (to get clear of removed devices/scenes/catgories/rooms/etc...) _status.ClearAllLists(); + } // Process Sections @@ -568,7 +569,6 @@ _status.devices.Add(new DeviceSprinkler(xn)); break; } - /* Falltrough */ _status.devices.Add(new DeviceGeneric(xn)); break; } Modified: trunk/plugins/VeraControl/VeraControl.cs =================================================================== --- trunk/plugins/VeraControl/VeraControl.cs 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/VeraControl.cs 2012-02-02 20:07:07 UTC (rev 4436) @@ -81,30 +81,34 @@ /// </summary> public class VeraControl : GUIInternalWindow, ISetupForm { - [SkinControlAttribute(10)] protected GUILabelControl _title = null; - [SkinControl(20)] protected GUISpinButton _catList = null; - [SkinControl(40)] protected GUIListControl _leftList = null; - [SkinControl(50)] protected GUIListControl _rightList = null; - [SkinControl(60)] protected GUIButtonControl _actionButton = null; - [SkinControl(70)] protected GUIToggleButtonControl _actionTriggerButton = null; + [SkinControlAttribute(10)] protected GUILabelControl _title = null; + [SkinControl(20)] protected GUISpinButton _catList = null; + [SkinControl(40)] protected GUIListControl _leftList = null; + [SkinControl(50)] protected GUIListControl _rightList = null; + [SkinControl(60)] protected GUIButtonControl _actionButton = null; + [SkinControl(70)] protected GUIToggleButtonControl _actionTriggerButton = null; - [SkinControl(30)] protected GUIImage _cmtImage = null; - [SkinControlAttribute(31)] protected GUILabelControl _comment = null; + [SkinControl(30)] protected GUIImage _systemStatusImage = null; + [SkinControlAttribute(31)] protected GUILabelControl _systemStatusText = null; + [SkinControl(32)] protected GUIImage _deviceStatusImage = null; + [SkinControlAttribute(33)] protected GUILabelControl _deviceStatusText = null; - const int ALL = Int16.MaxValue; - const int NO_SCENE_SELECTED = Int16.MaxValue; + const int ALL = Int16.MaxValue; + const int NO_SCENE_SELECTED = Int16.MaxValue; + private int _pluginID = 1972; + private VeraCommunication _vera = VeraCommunication.Instance; - private int _pluginID = 1972; - private VeraCommunication _vera = VeraCommunication.Instance; - private int _selectedRoom = ALL; - private int _selectedCategory = ALL; - public Actiontrigger _lastAction = Actiontrigger.LAST_ACTIONTRIGGER; - private VeraHelper _helper = new VeraHelper(); + private int _selectedRoom = ALL; + private int _selectedCategory = ALL; + public Actiontrigger _lastAction = Actiontrigger.LAST_ACTIONTRIGGER; + private VeraHelper _helper = new VeraHelper(); + private int _lastSelectedItemId = 0; - public bool _enableSceneTrigger = false; - private bool _lastUpdateFailed = false; - private string _titleTxt = "Micasa Verde - Vera control"; + public bool _enableSceneTrigger = false; + private bool _autoSelectRoom = true; + private bool _lastUpdateFailed = false; + private string _titleTxt = "Micasa Verde - Vera control"; public VeraControl() { @@ -201,7 +205,8 @@ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { - _enableSceneTrigger = xmlreader.GetValueAsBool("veracontroller", "enableSceneTrigger", false); + _enableSceneTrigger = xmlreader.GetValueAsBool("veracontroller", "enableSceneTrigger", false); + _autoSelectRoom = xmlreader.GetValueAsBool("veracontroller", "AutoSelectRoom", true); } GUIWindowManager.OnNewAction += new OnActionHandler(OnNewAction); @@ -223,6 +228,7 @@ handleActionTriggers(Actiontrigger.MP_START_UP); } }).Start(); + return Load(GUIGraphicsContext.Skin+@"\VeraControl.xml"); } @@ -305,10 +311,16 @@ { switch(action.wID) { + case Action.ActionType.ACTION_MOUSE_MOVE: + break; + case Action.ActionType.ACTION_CONTEXT_MENU: case Action.ActionType.ACTION_SHOW_INFO: showInfoDialog(); break; + + default: + break; } } } @@ -510,13 +522,32 @@ _vera.UpdateCurrentStatus(); refreshNow(); + // Auto update right side list + if (_autoSelectRoom && (_selectedRoom != _leftList.SelectedListItem.ItemId)) + { + OnLeftlistCrtl(_leftList); + } + base.Render(timePassed); } public void refreshNow() { - if (_vera.NewScreenUpdateWaitingAndClearFlag()) + int selectedItem = 0; + if (_rightList.SelectedListItem != null) + { // Prevent Eception in case we have an empty room + selectedItem = _rightList.SelectedListItem.ItemId; + } + else if (_lastSelectedItemId != 0) { + // Clear message if we have an empty list for the first time + setDeviceStatus(DevState.NONE, ""); + } + bool newSelectedItem = (selectedItem != _lastSelectedItemId) && (selectedItem != 0); + _lastSelectedItemId = selectedItem; + + if (_vera.NewScreenUpdateWaitingAndClearFlag() || newSelectedItem) + { // update system status if (_vera.status.system.NewScreenUpdateWaitingAndClearFlag()) { @@ -524,7 +555,7 @@ } // if full reload has been found rebuild lists - if (_vera.status.system.fullReload ) { + if (_vera.status.system.FullReloadWaitingAndClearFlag() ) { listRooms(_selectedCategory, _selectedRoom); if (_selectedRoom == ALL) { listScenes(ALL); @@ -540,7 +571,7 @@ if (item.ItemId > 0) { // ItemId > 0 so we have a device DeviceGeneric dev = _vera.status.GetDeviceById(item.ItemId); - if (dev.NewScreenUpdateWaitingAndClearFlag()) + if (dev.NewScreenUpdateWaitingAndClearFlag() || (newSelectedItem && _lastSelectedItemId == item.ItemId)) { fillinDeviceInfo(item, dev); } @@ -548,7 +579,7 @@ else { // ItemId < 0 so we have a scene Scene scene = _vera.status.GetSceneById((item.ItemId * -1)); - if (scene.NewScreenUpdateWaitingAndClearFlag()) + if (scene.NewScreenUpdateWaitingAndClearFlag() || (newSelectedItem && _lastSelectedItemId == item.ItemId)) { fillinSceneInfo(item, scene); } @@ -583,17 +614,31 @@ private void setSystemStatus() { if (_vera.status.system.state != DevState.NONE) { - _cmtImage.Dispose(); - _cmtImage.SetFileName(_helper.GetStateImage(_vera.status.system.state)); - _cmtImage.KeepAspectRatio = true; - _cmtImage.Visibility = System.Windows.Visibility.Visible; - _cmtImage.AllocResources(); + _systemStatusImage.Dispose(); + _systemStatusImage.SetFileName(_helper.GetStateImage(_vera.status.system.state)); + _systemStatusImage.KeepAspectRatio = true; + _systemStatusImage.Visibility = System.Windows.Visibility.Visible; + _systemStatusImage.AllocResources(); } else{ - _cmtImage.Visibility = System.Windows.Visibility.Hidden; + _systemStatusImage.Visibility = System.Windows.Visibility.Hidden; } - _comment.Label = _vera.status.system.comment; - + _systemStatusText.Label = _vera.status.system.comment; } + + private void setDeviceStatus(DevState state, string text) + { + if (state != DevState.NONE) { + _deviceStatusImage.Dispose(); + _deviceStatusImage.SetFileName(_helper.GetStateImage(state)); + _deviceStatusImage.KeepAspectRatio = true; + _deviceStatusImage.Visibility = System.Windows.Visibility.Visible; + _deviceStatusImage.AllocResources(); + } else{ + _deviceStatusImage.Visibility = System.Windows.Visibility.Hidden; + } + _deviceStatusText.Label = text; + } + private void listCategories() { @@ -689,6 +734,11 @@ item.ThumbnailImage = "Vera\\" + scene.GetIconName() + ".png"; Utils.SetDefaultIcons(item); + + if (_lastSelectedItemId == (scene.id * -1)) + { + setDeviceStatus(scene.commstate, scene.comment); + } } private void listDevices(int selectedRoom) @@ -720,6 +770,11 @@ item.ThumbnailImage = "Vera\\" + dev.GetIconName() + ".png"; Utils.SetDefaultIcons(item); + + if (_lastSelectedItemId == dev.id) + { + setDeviceStatus(dev.commstate, dev.comment); + } } private void OnLeftlistCrtl(GUIListControl control) @@ -775,16 +830,15 @@ break; case Action.ActionType.ACTION_SELECT_ITEM: - DialogSceneControl dlg = (DialogSceneControl)GUIWindowManager.GetWindow((int)1975); - dlg.InitDialog("Scene control", scene); - dlg.DoModal(GUIWindowManager.ActiveWindow); + DialogSceneControl sceneDlg = (DialogSceneControl)GUIWindowManager.GetWindow((int)1975); + sceneDlg.ShowDialog("Scene control", scene); break; } } } else { // We have a device as selected item - DeviceGeneric dev = _vera.status.GetDeviceById(control.SelectedListItem.ItemId); + DeviceGeneric dev = _vera.status.GetDeviceById(control.SelectedListItem.ItemId); switch (actionType) { @@ -807,9 +861,8 @@ break; case Action.ActionType.ACTION_SELECT_ITEM: - DialogDeviceControl dlg = (DialogDeviceControl)GUIWindowManager.GetWindow((int)1973); - dlg.InitDialog(_vera.status.GetRoomById(dev.room).name, dev); - dlg.DoModal(GUIWindowManager.ActiveWindow); + DialogDeviceControl deviceDlg = (DialogDeviceControl)GUIWindowManager.GetWindow((int)1973); + deviceDlg.ShowDialog(_vera.status.GetRoomById(dev.room).name, dev); break; } } @@ -875,7 +928,7 @@ "When navigating through the right side menu the following RC keys are available:\n" + " [Play] will run the selected scene\n" + " [Next]/[Prev] will switch off/on the selected device\n" + - " [Fwd] / [Rew] will decrease/increase the level of the selected devive\n" + + " [Fwd] / [Rwd] will decrease/increase the level of the selected devive\n" + " [i] show this info panel"); dlg.DoModal(GUIWindowManager.ActiveWindow); } Modified: trunk/plugins/VeraControl/VeraSetupForm.Designer.cs =================================================================== --- trunk/plugins/VeraControl/VeraSetupForm.Designer.cs 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/VeraSetupForm.Designer.cs 2012-02-02 20:07:07 UTC (rev 4436) @@ -48,6 +48,7 @@ this.portnumber = new System.Windows.Forms.TextBox(); this.refreshdelay = new System.Windows.Forms.TextBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.autoSelectRoom = new System.Windows.Forms.CheckBox(); this.enableSceneTrigger = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); @@ -57,7 +58,7 @@ // btnOK // this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnOK.Location = new System.Drawing.Point(31, 297); + this.btnOK.Location = new System.Drawing.Point(31, 345); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(75, 23); this.btnOK.TabIndex = 12; @@ -69,7 +70,7 @@ // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(231, 297); + this.btnCancel.Location = new System.Drawing.Point(231, 345); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 13; @@ -273,16 +274,28 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.autoSelectRoom); this.groupBox2.Controls.Add(this.enableSceneTrigger); this.groupBox2.Controls.Add(this.refreshdelay); this.groupBox2.Controls.Add(this.label1); this.groupBox2.Location = new System.Drawing.Point(12, 203); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(309, 82); + this.groupBox2.Size = new System.Drawing.Size(309, 110); this.groupBox2.TabIndex = 8; this.groupBox2.TabStop = false; this.groupBox2.Text = "Plug in settings"; // + // autoSelectRoom + // + this.autoSelectRoom.Checked = true; + this.autoSelectRoom.CheckState = System.Windows.Forms.CheckState.Checked; + this.autoSelectRoom.Location = new System.Drawing.Point(20, 77); + this.autoSelectRoom.Name = "autoSelectRoom"; + this.autoSelectRoom.Size = new System.Drawing.Size(270, 24); + this.autoSelectRoom.TabIndex = 12; + this.autoSelectRoom.Text = "Show devices in selected room immediately"; + this.autoSelectRoom.UseVisualStyleBackColor = true; + // // enableSceneTrigger // this.enableSceneTrigger.Location = new System.Drawing.Point(20, 47); @@ -307,7 +320,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(332, 332); + this.ClientSize = new System.Drawing.Size(332, 380); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.btnCancel); @@ -322,6 +335,7 @@ this.groupBox2.PerformLayout(); this.ResumeLayout(false); } + private System.Windows.Forms.CheckBox autoSelectRoom; private System.Windows.Forms.Button buttonFind; private System.Windows.Forms.RadioButton radioLocal; private System.Windows.Forms.RadioButton radioRemote; Modified: trunk/plugins/VeraControl/VeraSetupForm.cs =================================================================== --- trunk/plugins/VeraControl/VeraSetupForm.cs 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/VeraSetupForm.cs 2012-02-02 20:07:07 UTC (rev 4436) @@ -47,10 +47,11 @@ { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) { - IPaddress.Text = xmlreader.GetValueAsString("veracontroller", "ipaddress", "127.0.0.1"); - portnumber.Text = xmlreader.GetValueAsString("veracontroller", "portnumber", " 3480"); - refreshdelay.Text = xmlreader.GetValueAsString("veracontroller", "maxrefreshdelay", "60"); - enableSceneTrigger.Checked = xmlreader.GetValueAsBool("veracontroller", "enableSceneTrigger", false); + IPaddress.Text = xmlreader.GetValueAsString("veracontroller", "ipaddress", "127.0.0.1"); + portnumber.Text = xmlreader.GetValueAsString("veracontroller", "portnumber", "3480"); + refreshdelay.Text = xmlreader.GetValueAsString("veracontroller", "maxrefreshdelay", "60"); + enableSceneTrigger.Checked = xmlreader.GetValueAsBool("veracontroller", "enableSceneTrigger", false); + autoSelectRoom.Checked = xmlreader.GetValueAsBool("veracontroller", "AutoSelectRoom", true); radioRemote.Checked = xmlreader.GetValueAsBool("veracontroller", "remoteConnected", false); radioLocal.Checked = !radioRemote.Checked; @@ -67,16 +68,17 @@ { using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.MPSettings()) { - xmlWriter.SetValue("veracontroller", "ipaddress", IPaddress.Text); - xmlWriter.SetValue("veracontroller", "portnumber", portnumber.Text); - xmlWriter.SetValue("veracontroller", "maxrefreshdelay", refreshdelay.Text); + xmlWriter.SetValue("veracontroller", "ipaddress", IPaddress.Text); + xmlWriter.SetValue("veracontroller", "portnumber", portnumber.Text); + xmlWriter.SetValue("veracontroller", "maxrefreshdelay", refreshdelay.Text); xmlWriter.SetValueAsBool("veracontroller", "enableSceneTrigger", enableSceneTrigger.Checked); + xmlWriter.SetValueAsBool("veracontroller", "AutoSelectRoom", autoSelectRoom.Checked); xmlWriter.SetValueAsBool("veracontroller", "remoteConnected", radioRemote.Checked); - xmlWriter.SetValue("veracontroller", "miosusername", Username.Text); - xmlWriter.SetValue("veracontroller", "miospassword", Password.Text); - xmlWriter.SetValue("veracontroller", "serialnumber", SerialNumber.Text); + xmlWriter.SetValue("veracontroller", "miosusername", Username.Text); + xmlWriter.SetValue("veracontroller", "miospassword", Password.Text); + xmlWriter.SetValue("veracontroller", "serialnumber", SerialNumber.Text); } } Modified: trunk/plugins/VeraControl/releases/VeraControl.xmp2 =================================================================== --- trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-02-02 20:07:07 UTC (rev 4436) @@ -62,7 +62,7 @@ <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> <Param1 /> <UpdateOption>OverwriteIfOlder</UpdateOption> - <LocalFileName>..\skin\Default\VeraDialogSceneControl.xml</LocalFileName> + <LocalFileName>..\skin\DefaultWide\VeraDialogSceneControl.xml</LocalFileName> <ZipFileName>Installer{CopyFile}\{cced0cd3-b45e-4cf1-af86-d268fa728b06}-VeraDialogSceneControl.xml</ZipFileName> <DestinationFilename>%Skin%\DefaultWide\VeraDialogSceneControl.xml</DestinationFilename> </FileItem> @@ -865,7 +865,7 @@ <Major>0</Major> <Minor>9</Minor> <Build>0</Build> - <Revision>2</Revision> + <Revision>3</Revision> </Version> <ExtensionDescription>Control your Vera controller from MediaPortal. @@ -885,37 +885,53 @@ - Vera 2 v1.1.1267 + - Vera 2 v1.1.1362 + - Vera 2 v1.5.255 - - - - - - - - - - </ExtensionDescription> <VersionDescription>[9.0.0.1] + - Real time Vera status update + -Threated communication (no-screen-lockups) + - IP Cam support + - Improved error handling + - Improved Cam image updater + - Clean up code (coding standard complience) + - Supports remote connection (via fwd1.mios.com) + - New image set + - Improved config screen (Vera-box look) + - first: stable release -[9.0.0.2] + + +[0.9.0.2] + - Added a help screen (! button = context menu) -- Added RC commands to control devices/scenes without the need of opening the dialog</VersionDescription> + +- Added RC commands to control devices/scenes without the need of opening the dialog + + + +[0.9.0.3] + + - Show device status of selected item also on main screen, + + - Added the ability to show devices automatically when selecting a new room (= extra config option) + + - bug fix: wrong scene dialog was shown in DefautWide skin</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1</OnlineLocation> - <ReleaseDate>2012-01-28T22:51:05</ReleaseDate> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.3.mpe1</OnlineLocation> + <ReleaseDate>2012-01-30T22:51:05</ReleaseDate> <Tags>home automation, z-wave, micasaverde, @@ -1007,10 +1023,17 @@ <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> <Param1 /> <UpdateOption>OverwriteIfOlder</UpdateOption> - <LocalFileName>..\skin\Default\VeraDialogSceneControl.xml</LocalFileName> + <LocalFileName>..\skin\DefaultWide\VeraDialogSceneControl.xml</LocalFileName> <ZipFileName>Installer{CopyFile}\{cced0cd3-b45e-4cf1-af86-d268fa728b06}-VeraDialogSceneControl.xml</ZipFileName> <DestinationFilename>%Skin%\DefaultWide\VeraDialogSceneControl.xml</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="true"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\skin\Default\VeraDialogSceneControl.xml</LocalFileName> + <ZipFileName>Installer{CopyFile}\{77a408e1-11da-4375-83bb-6b197c362f88}-VeraDialogSceneControl.xml</ZipFileName> + <DestinationFilename>%Skin%\Default\VeraDialogSceneControl.xml</DestinationFilename> + </FileItem> <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> <Param1 /> <UpdateOption>OverwriteIfOlder</UpdateOption> Added: trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.3.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.3.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/releases/update.xml 2012-02-02 20:07:07 UTC (rev 4436) @@ -1177,5 +1177,152 @@ </ProjectSettings> <IsSkin>false</IsSkin> </PackageClass> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + <GroupItem Name="IconsDefault"> + <DisplayName>IconsDefault</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>IconsDefault</Description> + <Files> + <Items /> + </Files> + </GroupItem> + <GroupItem Name="IconsDefaultWide"> + <DisplayName>IconsDefaultWide</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>IconsDefaultWide</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="VeraControl.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.1.6.27644</MinRequiredVersion> + <DesignedForVersion>1.1.6.27644</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items> + <SubSystemItem Name="MP.SkinEngine" /> + <SubSystemItem Name="MP.Config" /> + </Items> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>Vera Controller</Name> + <Id>ebb6b1af-6fb9-44e5-a859-9d32ffe20a9e</Id> + <Author>Bart Eversdijk</Author> + <HomePage>http://www.team-mediaportal.com/extensions/micasaverde-vera-controller</HomePage> + <ForumPage>http://forum.team-mediaportal.com/mediaportal-plugins-47/plugin-micasaverde-vera-controller-104337/</ForumPage> + <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/update.xml</UpdateUrl> + <Version> + <Major>0</Major> + <Minor>9</Minor> + <Build>0</Build> + <Revision>3</Revision> + </Version> + <ExtensionDescription>Control your Vera controller from MediaPortal. + +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + +Vera is a Z-wave home automation controller from MicasaVerde. + +This version is tested with: + - Vera 1 v1.1.1338 + - Vera 2 v1.1.1267 + - Vera 2 v1.1.1362 + - Vera 2 v1.5.255 +</ExtensionDescription> + <VersionDescription> - Show device status of selected item also on main screen, + - Added the ability to show devices automatically when selecting a new room (= extra config option) + - bug fix: wrong scene dialog was shown in DefautWide skin</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.3.mpe1</OnlineLocation> + <ReleaseDate>2012-02-02T22:51:05</ReleaseDate> + <Tags>home automation, +z-wave, +micasaverde, +vera</Tags> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v0.9.0.3.mpe1</Location> + <Params> + <Items> + <SectionParam Name="Online Icon"> + <Value /> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value /> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + <IsSkin>false</IsSkin> + </PackageClass> </Items> </ExtensionCollection> Modified: trunk/plugins/VeraControl/skin/Default/VeraControl.xml =================================================================== --- trunk/plugins/VeraControl/skin/Default/VeraControl.xml 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/skin/Default/VeraControl.xml 2012-02-02 20:07:07 UTC (rev 4436) @@ -47,6 +47,27 @@ <textcolor>90FFFFFF</textcolor> </control> + <control> + <type>image</type> + <id>32</id> + <posX>300</posX> + <posY>500</posY> + <width>20</width> + <height>20</height> + <texture></texture> + <visible>no</visible> + </control> + + <control> + <description>commment label</description> + <type>label</type> + <id>33</id> + <posX>320</posX> + <posY>500</posY> + <label>comment</label> + <font>font13</font> + <textcolor>90FFFFFF</textcolor> + </control> <control> Modified: trunk/plugins/VeraControl/skin/DefaultWide/VeraControl.xml =================================================================== --- trunk/plugins/VeraControl/skin/DefaultWide/VeraControl.xml 2012-02-02 11:43:11 UTC (rev 4435) +++ trunk/plugins/VeraControl/skin/DefaultWide/VeraControl.xml 2012-02-02 20:07:07 UTC (rev 4436) @@ -46,6 +46,28 @@ <font>font11</font> <textcolor>90FFFFFF</textcolor> </control> + + <control> + <type>image</type> + <id>32</id> + <posX>600</posX> + <posY>610</posY> + <width>30</width> + <height>30</height> + <texture></texture> + <visible>no</visible> + </control> + + <control> + <description>commment label</description> + <type>label</type> + <id>33</id> + <posX>640</posX> + <posY>610</posY> + <label>comment</label> + <font>font11</font> + <textcolor>90FFFFFF</textcolor> + </control> <control> <type>button</type> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hor...@us...> - 2012-02-02 11:43:23
|
Revision: 4435 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4435&view=rev Author: horned-reaper Date: 2012-02-02 11:43:11 +0000 (Thu, 02 Feb 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/FritzBox/Build/Build.log trunk/plugins/FritzBox/Docs/Ausstehend.txt trunk/plugins/FritzBox/Docs/Changes.txt trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs trunk/plugins/FritzBox/FritzBox/Languages/strings_de.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_el.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_en-US.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_en.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_es.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_fr.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_it.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_nl.xml trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml trunk/plugins/FritzBox/FritzBox/Settings.cs trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb 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/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.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.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/ResolveAssemblyReference.cache 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.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.pdb 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/releases/FritzBox_v0.4.1.4434.mpe1 Modified: trunk/plugins/FritzBox/Build/Build.log =================================================================== --- trunk/plugins/FritzBox/Build/Build.log 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/Build/Build.log 2012-02-02 11:43:11 UTC (rev 4435) @@ -1,6 +1,6 @@ Running : C:\Program Files\TortoiseSVN\bin\SubWCRev.exe -SVN Version: 4426 +SVN Version: 4434 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 28.01.2012 10:49:53. +Build started 02.02.2012 12:38:15. Project "D:\FritzBox\FritzBox.sln" on node 1 (Rebuild target(s)). ValidateSolutionConfiguration: Building solution configuration "Release|Mixed Platforms". @@ -154,8 +154,8 @@ Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\FritzBoxDebugger.DebugForm.resources". Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\FritzBoxDebugger.exe". 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.read.7.tlog". + Deleting file "D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource.write.7.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". @@ -195,7 +195,7 @@ 0 Warning(s) 0 Error(s) -Time Elapsed 00:00:03.29 +Time Elapsed 00:00:03.25 Reverting to build 0 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs @@ -280,7 +280,7 @@ ..\FritzBox\Languages\Unsupported\strings_zh-CN.xml 36 File(s) copied MpeMaker version: 1.2.1.0 -Build started at 10:50:00 +Build started at 12:38:22 Building "D:\FritzBox\MpeRelease\FritzBox.xmp2" Output: "..\MpeRelease\FritzBox.mpe1" Writing UpdateXML to "update.xml" Modified: trunk/plugins/FritzBox/Docs/Ausstehend.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-02-02 11:43:11 UTC (rev 4435) @@ -1,8 +1,6 @@ Fehler beheben: -- ein kleiner schwarzer Balken \xFCberdeckt das erste Zeichen oder die erste Ziffer zur H\xE4lfte - auch bei einem "Unbekannten Anrufer" (unterdr\xFCckte bzw. nicht \xFCbertragene Rufnummer) \xF6ffnet sich \xFCber das Kontextrufen "zur\xFCckrufen". Sollte man deaktivieren - ObjectDisposed-Exception bei Client-Stop -- Localization fehlt noch im StreamedMP-Skin Optimierungen: - btnModus umbenennen? @@ -15,6 +13,10 @@ - GUI-Adressbuch - Anruf-Benachrichtigungen - Telefonbuch editierbar machen (f\xFCr FRITZ!Box-Versionen ohne Telefonbuch), ImageURL-Feld hinzuf\xFCgen und nur synchronisieren, wenn im FRITZ!Box-Telefonbuch vorhanden +- Nachrichtenl\xE4nge zur Anzeige hinzuf\xFCgen +- "Nachricht l\xF6schen"-Funktion +- "Nachricht als geh\xF6rt markieren"-Funktion +- "Anrufen"-Funktion zur Anrufliste hinzuf\xFCgen - R\xFCckw\xE4rtssuche wieder integrieren - Kontextmen\xFC f\xFCr Telefonbuch - Wiki-Eintrag @@ -29,10 +31,6 @@ Anwenderw\xFCnsche --------------- - -IchBinsShort, 05.01.2012, 18:02: -Noch eine andere Frage ist es auch m\xF6glich das bei ausgehenden Anrufen nur bei bestimmten Handger\xE4ten der Pause Befehl gesendet wird. Ich benutze drei Funktelefone \xFCber die Dect Funktion der Fritzbox 7020, Garten, Eltern und bei mir. W\xE4re also sch\xF6n wenn nur auf Pause gestellt wird wenn von meinem Telefon eine Anruf get\xE4tigt wird. - Scrounger, 05.12.2011: Was ich wirklich verdammt gerne noch h\xE4tte, w\xE4re die M\xF6glichkeit, sich auf dem Basic Home Screen die verpassten anrufe anzeigen zu lassen oder die letzten 3 Anrufe. K\xF6nntet ihr das evtl. in eine kommende Version integrieren? Was ich damit meine ist, dass du evtl. 3 globale Variablen (AnruferName bzw. Nr. und Bild) zur Verf\xFCgung stellen k\xF6nntest, die dann jeder Skindesigner in seinem BasicHome integrieren k\xF6nnte. Z.B. wie das beim DriveFreeSpace Plugin geht oder bei den Plugins von Micropolis. Modified: trunk/plugins/FritzBox/Docs/Changes.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Changes.txt 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/Docs/Changes.txt 2012-02-02 11:43:11 UTC (rev 4435) @@ -1,5 +1,12 @@ +0.4.1.4434: +New features: +- added call action to voice box context menu and phone book + +Optimizations: +- added checks for context menu actions + Fixed bugs: -- error in Russian localization -- FRITZ!Box 7390 specific - - contact images are not synchronized with FRITZ!Box - - voice box access doesn't work \ No newline at end of file +- the first digit of call notification gets cropped +- call notification is not shown when dialling from plugin if MSN filter is enabled +- FRITZ!Box 7390 specific: + - contact images are not synchronized with FRITZ!Box (second issue) \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -66,7 +66,6 @@ private readonly List<CallAction> _notificationQueue = new List<CallAction>(); private bool _showNotification = true; private object _tempNotification; - //private static bool windowIsDisplayed = false; private int notificationCount = 0; #endregion Variables @@ -111,7 +110,7 @@ case CallAction.CallType.ConnectionClosed: if (Settings.CloseNotificationOnConnectionClosed) { - Log.Info("\"Close On Connection Close\" setting is enabled. Try to close active notification"); + Log.Info("\"Close On Connection Close\" setting is enabled. Trying to close active notification"); if (_tempNotification != null) { @@ -254,6 +253,8 @@ } else strText += GUILocalizeStrings.Get(3); // 3 = Unknown + strText += Environment.NewLine; // avoids that the first number of the message box text gets cropped + // show call notification showNotificationWindow(callAction.Type, strHeading, strImage, strText); } @@ -277,16 +278,26 @@ Log.Info("MSN filter is disabled"); return true; } - - if (Settings.MSNList.Contains(mSN)) - { - Log.Info("MSN is on the filter list"); - return true; - } else { - Log.Info("MSN is not on the list. Notification won't be shown"); - return false; + if (mSN != "") + { + if (Settings.MSNList.Contains(mSN)) + { + Log.Info("MSN is on the filter list"); + return true; + } + else + { + Log.Info("MSN is not on the list. Notification won't be shown"); + return false; + } + } + else + { + Log.Info("Unknown MSN. Filtering is disabled"); + return true; + } } } @@ -691,7 +702,7 @@ worker.queue.Enqueue(new Task(Task.TaskAction.LoadCallListItems, null)); if (!String.IsNullOrEmpty(Settings.VBPath)) worker.queue.Enqueue(new Task(Task.TaskAction.LoadVoiceBoxItems, null)); worker.queue.Enqueue(new Task(Task.TaskAction.SynchronizePhoneBook, null)); - worker.queue.Enqueue(new Task(Task.TaskAction.SynchronizeContactImages, null)); + if (!String.IsNullOrEmpty(Settings.NASShareName)) worker.queue.Enqueue(new Task(Task.TaskAction.SynchronizeContactImages, null)); worker.queue.Enqueue(new Task(Task.TaskAction.UpdateGUIProperties, null)); } @@ -704,7 +715,7 @@ { fritz.KeepAlive(); - fritz.refresh(); + fritz.Refresh(); } } @@ -825,7 +836,7 @@ public void LoadCallListData() { - byte[] data = fritz.loadCallListData(true); + byte[] data = fritz.LoadCallListData(true); refreshCallListData(data); } @@ -1114,34 +1125,51 @@ protected override void OnShowContextMenu() { + string phoneNumber; + base.OnShowContextMenu(); if (Settings.CurrentMode == GUIMode.VoiceBox) { - int r = ShowVoiceboxContextMenu(); + int r = showVoiceboxContextMenu(); + phoneNumber = voiceBoxItemList[Convert.ToInt16(facadeView.SelectedListItem.Path)].callerId; switch (r) { case 0: // play g_Player.Play(decode(voiceBoxItemList[Convert.ToInt16(facadeView.SelectedListItem.Path)])); break; - case 1: + case 1: // call + fritz.Dial(phoneNumber); break; } } else if (Settings.CurrentMode == GUIMode.CallList) { - int r = ShowCallListContextMenu(); + int r = showCallListContextMenu(); int idx = Convert.ToInt16(facadeView.SelectedListItem.Path); - CallItem item = callItemList[idx]; + phoneNumber = callItemList[idx].number; switch (r) { - case 0: // call back - fritz.dial(item.number); + case 0: // call + fritz.Dial(phoneNumber); break; } } + else if (Settings.CurrentMode == GUIMode.PhoneBook) + { + int r = showPhoneBookContextMenu(); + int idx = Convert.ToInt16(facadeView.SelectedListItem.Path); + phoneNumber = facadeView.SelectedListItem.Label2; + + switch (r) + { + case 0: // call + fritz.Dial(phoneNumber); + break; + } + } } protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) @@ -1272,15 +1300,19 @@ if (control == btnUpdate) updateGUI(true); } - private int ShowCallListContextMenu() + private int showCallListContextMenu() { + bool callActionEnabled = false; + + if (callItemList[Convert.ToInt16(facadeView.SelectedListItem.Path)].number != "") callActionEnabled = true; + GUIDialogMenu dlgMenu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); - + if (dlgMenu != null) { dlgMenu.Reset(); - dlgMenu.SetHeading(GUILocalizeStrings.Get(4)); // 4 = Calls - dlgMenu.Add(GUILocalizeStrings.Get(5)); // 5 = Call back + dlgMenu.SetHeading(GUILocalizeStrings.Get(4)); // 4 = Caller + if (fritz.LoggedIn && callActionEnabled) dlgMenu.Add(GUILocalizeStrings.Get(5)); // 5 = Call dlgMenu.DoModal(GetID); if (dlgMenu.SelectedLabel == -1) return -1; // nothing was selected @@ -1291,20 +1323,25 @@ return -1; } - private int ShowVoiceboxContextMenu() + private int showVoiceboxContextMenu() { + bool callActionEnabled = false; + + if (voiceBoxItemList[Convert.ToInt16(facadeView.SelectedListItem.Path)].callerId != "") callActionEnabled = true; + GUIDialogMenu dlgMenu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); if (dlgMenu != null) { dlgMenu.Reset(); - dlgMenu.SetHeading(GUILocalizeStrings.Get(7)); // 7 = Messages + dlgMenu.SetHeading(GUILocalizeStrings.Get(7)); // 7 = Message dlgMenu.Add(GUILocalizeStrings.Get(8)); // 8 = Play message - dlgMenu.Add(GUILocalizeStrings.Get(9)); // 9 = Mark message as heard - dlgMenu.Add(GUILocalizeStrings.Get(10)); // 10 = Delete message + //dlgMenu.Add(GUILocalizeStrings.Get(9)); // 9 = Mark message as heard + //dlgMenu.Add(GUILocalizeStrings.Get(10)); // 10 = Delete message + if (fritz.LoggedIn && callActionEnabled) dlgMenu.Add(GUILocalizeStrings.Get(5)); // 8 = Call dlgMenu.DoModal(GetID); - if (dlgMenu.SelectedLabel == -1) return -1; // Nothing was selected + if (dlgMenu.SelectedLabel == -1) return -1; // nothing was selected return dlgMenu.SelectedLabel; } @@ -1312,6 +1349,25 @@ return -1; } + private int showPhoneBookContextMenu() + { + GUIDialogMenu dlgMenu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); + + if (dlgMenu != null) + { + dlgMenu.Reset(); + dlgMenu.SetHeading(GUILocalizeStrings.Get(6)); // 4 = Contact + if (fritz.LoggedIn) dlgMenu.Add(GUILocalizeStrings.Get(5)); // 5 = Call + dlgMenu.DoModal(GetID); + + if (dlgMenu.SelectedLabel == -1) return -1; // nothing was selected + + return dlgMenu.SelectedLabel; + } + + return -1; + } + private void updateButtonStates() { facadeView.IsVisible = false; Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -75,12 +75,12 @@ this.tabPageMiscellaneous = new System.Windows.Forms.TabPage(); this.checkBoxExtensiveLogging = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.label4 = new System.Windows.Forms.Label(); - this.dialPortNumericUpDown = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); this.updateInterval = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); this.checkBoxShowNotificationOnOutgoingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxShowNotificationOnIncomingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.label6 = new System.Windows.Forms.Label(); this.textBoxNASShareName = new System.Windows.Forms.TextBox(); + this.numericUpDownDialPort = new System.Windows.Forms.NumericUpDown(); this.tabPageDiagnostics.SuspendLayout(); this.tabPagePhoneBook.SuspendLayout(); this.tabPageCallNotification.SuspendLayout(); @@ -94,8 +94,8 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.tabControlConfiguration.SuspendLayout(); this.tabPageMiscellaneous.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dialPortNumericUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.updateInterval)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownDialPort)).BeginInit(); this.SuspendLayout(); // // labelVersion @@ -488,9 +488,9 @@ // // tabPageConnection // + this.tabPageConnection.Controls.Add(this.numericUpDownDialPort); this.tabPageConnection.Controls.Add(this.label6); this.tabPageConnection.Controls.Add(this.textBoxNASShareName); - this.tabPageConnection.Controls.Add(this.dialPortNumericUpDown); this.tabPageConnection.Controls.Add(this.label2); this.tabPageConnection.Controls.Add(this.vBPath); this.tabPageConnection.Controls.Add(this.passwd); @@ -657,24 +657,6 @@ this.label4.TabIndex = 20; this.label4.Text = "Auto update frequency (seconds)"; // - // dialPortNumericUpDown - // - this.dialPortNumericUpDown.Location = new System.Drawing.Point(129, 149); - this.dialPortNumericUpDown.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.dialPortNumericUpDown.Name = "dialPortNumericUpDown"; - this.dialPortNumericUpDown.Size = new System.Drawing.Size(53, 20); - this.dialPortNumericUpDown.TabIndex = 33; - this.dialPortNumericUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.dialPortNumericUpDown.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // updateInterval // this.updateInterval.Location = new System.Drawing.Point(33, 45); @@ -731,11 +713,23 @@ // // textBoxNASShareName // - this.textBoxNASShareName.Location = new System.Drawing.Point(108, 257); + this.textBoxNASShareName.Location = new System.Drawing.Point(110, 257); this.textBoxNASShareName.Name = "textBoxNASShareName"; this.textBoxNASShareName.Size = new System.Drawing.Size(119, 20); this.textBoxNASShareName.TabIndex = 34; // + // numericUpDownDialPort + // + this.numericUpDownDialPort.Location = new System.Drawing.Point(129, 152); + this.numericUpDownDialPort.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.numericUpDownDialPort.Name = "numericUpDownDialPort"; + this.numericUpDownDialPort.Size = new System.Drawing.Size(44, 20); + this.numericUpDownDialPort.TabIndex = 36; + // // FritzBoxConfig // this.AcceptButton = this.okButton; @@ -774,8 +768,8 @@ this.tabControlConfiguration.ResumeLayout(false); this.tabPageMiscellaneous.ResumeLayout(false); this.tabPageMiscellaneous.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dialPortNumericUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.updateInterval)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownDialPort)).EndInit(); this.ResumeLayout(false); } @@ -828,11 +822,11 @@ private MediaPortal.UserInterface.Controls.MPLabel labelPort; private MediaPortal.UserInterface.Controls.MPLabel labelAddress; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxExtensiveLogging; - private MediaPortal.UserInterface.Controls.MPNumericUpDown dialPortNumericUpDown; private MediaPortal.UserInterface.Controls.MPNumericUpDown updateInterval; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnOutgoingCall; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnIncomingCall; private System.Windows.Forms.Label label6; private System.Windows.Forms.TextBox textBoxNASShareName; + private System.Windows.Forms.NumericUpDown numericUpDownDialPort; } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -56,9 +56,9 @@ textBoxAddress.Text = FritzBoxClient.Address; numericUpDownPort.Value = FritzBoxClient.Port; passwd.Text = Settings.Password; - - dialPortNumericUpDown.Text = Settings.DialPort; + numericUpDownDialPort.Text = Settings.DialPort; + vBPath.Text = Settings.VBPath; textBoxNASShareName.Text = Settings.NASShareName; @@ -109,7 +109,7 @@ FritzBoxClient.Port = (int)numericUpDownPort.Value; Settings.Password = passwd.Text; - Settings.DialPort = dialPortNumericUpDown.Text; + Settings.DialPort = numericUpDownDialPort.Text; Settings.VBPath = vBPath.Text; Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -25,40 +25,40 @@ namespace FritzBox { - public class CallAction - { - #region CallType enum - - public enum CallType + public class CallAction { - Incoming, - Outgoing, - ConnectionStarted, - ConnectionClosed - } + #region CallType enum - #endregion + public enum CallType + { + Incoming, + Outgoing, + ConnectionStarted, + ConnectionClosed + } - public CallAction() - { - Time = DateTime.MinValue; - Caller = new Caller(); - MSN = string.Empty; - } + #endregion - public CallType Type { get; set; } - public DateTime Time { get; set; } - public Caller Caller { get; set; } - public string MSN { get; set; } + public CallAction() + { + Time = DateTime.MinValue; + Caller = new Caller(); + MSN = string.Empty; + } - public void WriteToLog() - { - Log.Info("CallAction Info:"); - Log.Info(" CallType: {0}", Type.ToString()); - Log.Info(" Date: {0}", Time.ToShortDateString()); - Log.Info(" Time: {0}", Time.ToShortTimeString()); - if (Settings.ExtensiveLogging) Log.Info(" Caller: {0}", Caller.PhoneNumber); - if (Settings.ExtensiveLogging) Log.Info(" MSN: {0}", MSN); + public CallType Type { get; set; } + public DateTime Time { get; set; } + public Caller Caller { get; set; } + public string MSN { get; set; } + + public void WriteToLog() + { + Log.Info("CallAction Info:"); + Log.Info(" CallType: {0}", Type.ToString()); + Log.Info(" Date: {0}", Time.ToShortDateString()); + Log.Info(" Time: {0}", Time.ToShortTimeString()); + if (Settings.ExtensiveLogging) Log.Info(" Caller: {0}", Caller.PhoneNumber); + if (Settings.ExtensiveLogging) Log.Info(" MSN: {0}", MSN); + } } - } -} \ No newline at end of file +} Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/Fritz.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -101,7 +101,7 @@ } } - public void refresh() + public void Refresh() { TimeSpan ts = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0)); long unixTime = Convert.ToInt32(ts.TotalSeconds); @@ -122,7 +122,7 @@ } } - public byte[] loadCallListData(bool forceReload) + public byte[] LoadCallListData(bool forceReload) { byte[] result = { 0 }; @@ -192,8 +192,7 @@ /// dial a number on fritz /// </summary> /// <param name="number">number to dial</param> - /// <param name="dialport">port to use</param> - public void dial(string number) + public void Dial(string number) { if (loggedIn) { Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -29,10 +29,7 @@ public override int ReadInt32() { - if (!BigEndianFormat) - { - return base.ReadInt32(); - } + if (!BigEndianFormat) return base.ReadInt32(); else { byte[] bytes = base.ReadBytes(4); Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -360,7 +360,7 @@ if (fritz != null && fritz.LoggedIn) { // search contact images folder on the FRITZ!Box - if (contactImagesPathRemote == null && !String.IsNullOrEmpty(Settings.NASShareName)) + if (contactImagesPathRemote == null) { Log.Debug("Searching contact images folder on the FRITZ!Box"); @@ -371,11 +371,20 @@ if (!String.IsNullOrEmpty(phoneBookItem.ImageURL)) { contactImagePathRemote = phoneBookItem.ImageURL; - + // convert to UNC format - if (contactImagePathRemote.Contains("InternerSpeicher")) contactImagePathRemote = contactImagePathRemote.Replace("file:///var/InternerSpeicher", @"\\" + FritzBoxClient.Address + "\\" + Settings.NASShareName); // FRITZ!Boxe models with internal storage e. g. FRITZ!Box 7390 - else contactImagePathRemote = contactImagePathRemote.Replace("file:///var/media/ftp", @"\\" + FritzBoxClient.Address + "\\" + Settings.NASShareName); - + if (Directory.Exists(@"\\" + FritzBoxClient.Address + "\\" + Settings.NASShareName)) + { + if (contactImagePathRemote.Contains("InternerSpeicher")) contactImagePathRemote = contactImagePathRemote.Replace("file:///var/InternerSpeicher", @"\\" + FritzBoxClient.Address + "\\" + Settings.NASShareName); // FRITZ!Boxe models with internal storage e. g. FRITZ!Box 7390 + else contactImagePathRemote = contactImagePathRemote.Replace("file:///var/media/ftp", @"\\" + FritzBoxClient.Address + "\\" + Settings.NASShareName); + } + else + { + // some FRITZ!Box models e. g. 7390 don't have no common share under "Settings.NASShareName". They directly share their data under the FRITZ!Box host name + if (contactImagePathRemote.Contains("InternerSpeicher")) contactImagePathRemote = contactImagePathRemote.Replace("file:///var/InternerSpeicher", @"\\" + FritzBoxClient.Address); // FRITZ!Boxe models with internal storage e. g. FRITZ!Box 7390 + else contactImagePathRemote = contactImagePathRemote.Replace("file:///var/media/ftp", @"\\" + FritzBoxClient.Address); + } + contactImagePathRemote = contactImagePathRemote.Replace("/", "\\"); // check if folder exists and put it to the variable Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_de.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_de.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_de.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Eingehender Anruf</String> <String id="2">Ausgehender Anruf</String> <String id="3">Unbekannt</String> - <String id="4">Anrufe</String> - <String id="5">Zurückrufen</String> - <String id="7">Nachrichten</String> + <String id="4">Anrufer</String> + <String id="5">Anrufen</String> + <String id="6">Kontakt</String> + <String id="7">Nachricht</String> <String id="8">Nachricht abspielen</String> <String id="9">Nachricht als gehört markieren</String> <String id="10">Nachricht löschen</String> @@ -20,11 +21,11 @@ <String id="18">Anrufliste</String> <String id="19">FritzBox Nachrichten</String> <String id="20">Telefonbuch</String> - <String id="21">FritzBox Anrufliste</String> - <String id="22">FritzBox Telefonbuch</String> + <String id="21">FRITZ!Box Anrufliste</String> + <String id="22">FRITZ!Box Telefonbuch</String> <String id="23">Fehler</String> <String id="24">Bitte FRITZ!Box-Passwort und Anrufbeantworter-Pfad unter Configuration eintragen!</String> - <String id="25">Update</String> + <String id="25">Aktualisieren</String> <String id="26">an</String> <String id="27">Nachricht</String> <String id="28">Telefon</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_el.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_el.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_el.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Λήψη κλήσης</String> <String id="2">Εξερχόμενη κλήση</String> <String id="3">Άγνωστη</String> - <String id="4">Προσκλήσεις</String> + <String id="4">καλούντος</String> <String id="5">Επιστροφή κλήσης</String> - <String id="7">Ειδήσεις</String> + <String id="6">επαφή</String> + <String id="7">Μήνυμα</String> <String id="8">Παίξτε το μήνυμα</String> <String id="9">Σήμανση μηνύματος ως μέρος της</String> <String id="10">Διαγραφή του μηνύματος</String> @@ -20,9 +21,9 @@ <String id="18">Λίστα κλήσεων</String> <String id="19">FritzBox ειδήσεις</String> <String id="20">Τηλεφωνικός κατάλογος</String> - <String id="21">FritzBox λίστα κλήσεων</String> - <String id="22">FritzBox Telefonbuch</String> - <String id="23">Fehler</String> + <String id="21">FRITZ!Box λίστα κλήσεων</String> + <String id="22">FRITZ!Box Telefonbuch</String> + <String id="23">Errore</String> <String id="24">FRITZ!Box κωδικό και φωνή μονοπάτι κουτί λείπουν στις ρυθμίσεις!</String> <String id="25">Ενημέρωση</String> <String id="26">στο</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_en-US.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_en-US.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_en-US.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Incoming call</String> <String id="2">Outgoing call</String> <String id="3">Unknown</String> - <String id="4">Calls</String> - <String id="5">Call back</String> - <String id="7">Messages</String> + <String id="4">Caller</String> + <String id="5">Call</String> + <String id="6">Contact</String> + <String id="7">Message</String> <String id="8">Play message</String> <String id="9">Mark message as heard</String> <String id="10">Delete message</String> @@ -20,8 +21,8 @@ <String id="18">Call list</String> <String id="19">FritzBox messages</String> <String id="20">Phone book</String> - <String id="21">FritzBox call list</String> - <String id="22">FritzBox phone book</String> + <String id="21">FRITZ!Box call list</String> + <String id="22">FRITZ!Box phone book</String> <String id="23">Error</String> <String id="24">FRITZ!Box password and voice box path are missing in settings!</String> <String id="25">Update</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_en.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_en.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_en.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Incoming call</String> <String id="2">Outgoing call</String> <String id="3">Unknown</String> - <String id="4">Calls</String> - <String id="5">Call back</String> - <String id="7">Messages</String> + <String id="4">Caller</String> + <String id="5">Call</String> + <String id="6">Contact</String> + <String id="7">Message</String> <String id="8">Play message</String> <String id="9">Mark message as heard</String> <String id="10">Delete message</String> @@ -20,8 +21,8 @@ <String id="18">Call list</String> <String id="19">FritzBox messages</String> <String id="20">Phone book</String> - <String id="21">FritzBox call list</String> - <String id="22">FritzBox phone book</String> + <String id="21">FRITZ!Box call list</String> + <String id="22">FRITZ!Box phone book</String> <String id="23">Error</String> <String id="24">FRITZ!Box password and voice box path are missing in settings!</String> <String id="25">Update</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_es.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_es.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_es.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Llamada entrante</String> <String id="2">Llamada saliente</String> <String id="3">Desconocido</String> - <String id="4">Llamadas</String> + <String id="4">Llama</String> <String id="5">Llamar</String> - <String id="7">Noticias</String> + <String id="6">Contacto</String> + <String id="7">Mensaje</String> <String id="8">Mensaje jugar</String> <String id="9">Marcar mensaje pertenece</String> <String id="10">Mensaje borrar</String> @@ -20,8 +21,8 @@ <String id="18">Lista de llamadas</String> <String id="19">FritzBox noticias</String> <String id="20">Guía telefónica</String> - <String id="21">FritzBox lista de llamadas</String> - <String id="22">FritzBox guía telefónica</String> + <String id="21">FRITZ!Box lista de llamadas</String> + <String id="22">FRITZ!Box guía telefónica</String> <String id="23">Error</String> <String id="24">FRITZ!Box y la ruta de caja de la voz no se encuentran en la configuración!</String> <String id="25">Actualización</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_fr.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_fr.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_fr.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -1,12 +1,14 @@ -<?xml version="1.0" encoding="UTF-8"?> + +<?xml version="1.0" encoding="UTF-8"?> <Language name="French" characters="255"> <Section name="unmapped"> <String id="1">Appel entrant</String> <String id="2">Appels sortants</String> <String id="3">Inconnue</String> - <String id="4">Appels</String> - <String id="5">Appelez-retour</String> - <String id="7">Nouvelles</String> + <String id="4">L'appelant</String> + <String id="5">Appel</String> + <String id="6">Contactez</String> + <String id="7">Message</String> <String id="8">Lire le message</String> <String id="9">Message de Mark appartient</String> <String id="10">Message supprimer</String> @@ -18,7 +20,7 @@ <String id="16">Basé</String> <String id="17">Rejetée</String> <String id="18">Liste des appels</String> - <String id="19">FritzBox nouvelles</String> + <String id="19">FRITZ!Box nouvelles</String> <String id="20">Annuaire téléphonique</String> <String id="21">Liste des appels FritzBox</String> <String id="22">Annuaire FritzBox</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_it.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_it.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_it.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Chiamata in arrivo</String> <String id="2">Chiamata in uscita</String> <String id="3">Sconosciuto</String> - <String id="4">Chiamate</String> - <String id="5">Richiamare</String> - <String id="7">Notizie</String> + <String id="4">Chiamante</String> + <String id="5">Chiamata</String> + <String id="6">Contatto</String> + <String id="7">Messaggio</String> <String id="8">Messaggio giocare</String> <String id="9">Segna il messaggio appartiene</String> <String id="10">Notizie cancellare</String> @@ -18,7 +19,7 @@ <String id="16">Basato</String> <String id="17">Rifiutato</String> <String id="18">Lista chiamate</String> - <String id="19">FritzBox notizie</String> + <String id="19">FRITZ!Box notizie</String> <String id="20">Elenco telefonico</String> <String id="21">FritzBox chiamata lista</String> <String id="22">FritzBox rubrica</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_nl.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_nl.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_nl.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Inkomende oproep</String> <String id="2">Uitgaand gesprek</String> <String id="3">Onbekende</String> - <String id="4">Gesprekken</String> - <String id="5">Terugbellen</String> - <String id="7">Nieuws</String> + <String id="4">Beller</String> + <String id="5">Noemen</String> + <String id="6">Contact</String> + <String id="7">Bericht</String> <String id="8">Bericht af te spelen</String> <String id="9">Bericht behoort Mark</String> <String id="10">Nieuws verwijderen</String> @@ -20,8 +21,8 @@ <String id="18">Bellijst</String> <String id="19">FritzBox nieuws</String> <String id="20">Telefoonboek</String> - <String id="21">FritzBox oproeplijst</String> - <String id="22">FritzBox telefoonboek</String> + <String id="21">FRITZ!Box oproeplijst</String> + <String id="22">FRITZ!Box telefoonboek</String> <String id="23">Fout</String> <String id="24">FRITZ!Box wachtwoord en strottenhoofd het pad ontbreken in instellingen!</String> <String id="25">Update</String> Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -4,9 +4,10 @@ <String id="1">Входящий вызов</String> <String id="2">Исходящий звонок</String> <String id="3">неизвестный</String> - <String id="4">Звонки</String> - <String id="5">обратный звонок</String> - <String id="7">новости</String> + <String id="4">вызывающая</String> + <String id="5">вызов</String> + <String id="6">контакт</String> + <String id="7">сообщение</String> <String id="8">Cообщение играть</String> <String id="9">Cообщение принадлежит Марк</String> <String id="10">сообщение удалять</String> @@ -20,8 +21,8 @@ <String id="18">список вызова</String> <String id="19">FritzBox новости</String> <String id="20">телефонная книга</String> - <String id="21">FritzBox списка вызовов</String> - <String id="22">FritzBox телефонной книге</String> + <String id="21">FRITZ!Box списка вызовов</String> + <String id="22">FRITZ!Box телефонной книге</String> <String id="23">ошибка</String> <String id="24">FRITZ!Box пароль и путь к нему голосовой ящик не хватает в настройках!</String> <String id="25">Обновление</String> Modified: trunk/plugins/FritzBox/FritzBox/Settings.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-02-02 11:43:11 UTC (rev 4435) @@ -165,7 +165,7 @@ if (decryptedPassword != null) Password = decryptedPassword; else Password = xmlreader.GetValue("FritzManager", "passwd"); // if the password was not encrypted read it in clear text (for older FritzBox Manager versions) - DialPort = xmlreader.GetValueAsString("FritzManager", "dialport", "1"); + DialPort = xmlreader.GetValueAsString("FritzManager", "dialport", "50"); VBPath = xmlreader.GetValue("FritzManager", "vBPath"); NASShareName = xmlreader.GetValueAsString("FritzManager", "nASShareName", "FRITZ.NAS"); @@ -187,7 +187,6 @@ string strMSN = xmlreader.GetValueAsString("fritzbox", "MSN", ""); char[] charSeparators = new[] { ';' }; MSNList.Clear(); // necessary to avoid multiple entries when FRITZ!Box Manager configuration window is closed and re-opened without closing the MediaPortal Configuration window - //MSNList.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); foreach (string mSN in strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)) { Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 =================================================================== --- trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-02-02 11:43:11 UTC (rev 4435) @@ -559,7 +559,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4426</DesignedForVersion> + <DesignedForVersion>1.1.7.4434</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -582,7 +582,7 @@ <Major>0</Major> <Minor>4</Minor> <Build>1</Build> - <Revision>4426</Revision> + <Revision>4434</Revision> </Version> <ExtensionDescription>With FRITZ!Box Manager you can access several AVM FRITZ!Box informations from MediaPortal. @@ -596,7 +596,7 @@ <VersionDescription /> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>http://www.team-mediaportal.com/index.php?option=com_mtree&task=att_download&link_id=118&cf_id=24</OnlineLocation> - <ReleaseDate>2012-01-28T10:50:00.643857+01:00</ReleaseDate> + <ReleaseDate>2012-02-02T12:38:22.0365065+01:00</ReleaseDate> <Tags>fritzbox, fritzbox manager, callmonitor</Tags> <Location>..\MpeRelease\FritzBox.mpe1</Location> <Params> Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/ResolveAssemblyReference.cache =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/ResolveAssemblyReference.cache =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Added: trunk/plugins/FritzBox/releases/FritzBox_v0.4.1.4434.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/FritzBox/releases/FritzBox_v0.4.1.4434.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/FritzBox/releases/update.xml =================================================================== --- trunk/plugins/FritzBox/releases/update.xml 2012-01-29 16:54:34 UTC (rev 4434) +++ trunk/plugins/FritzBox/releases/update.xml 2012-02-02 11:43:11 UTC (rev 4435) @@ -88,7 +88,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4426</DesignedForVersion> + <DesignedForVersion>1.1.7.4434</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -111,7 +111,7 @@ <Major>0</Major> <Minor>4</Minor> <Build>1</Build> - <Revision>4426</Revision> + <Revision>4434</Revision> </Version> <ExtensionDescription>With FRITZ!Box Manager you can access several AVM FRITZ!Box informations from MediaPortal. @@ -125,7 +125,7 @@ <VersionDescription /> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>http://www.team-mediaportal.com/index.php?option=com_mtree&task=att_download&link_id=118&cf_id=24</OnlineLocation> - <ReleaseDate>2012-01-28T10:50:00.643857+01:00</ReleaseDate> + <ReleaseDate>2012-02-02T12:38:22.0365065+01:00</ReleaseDate> <Tags>fritzbox, fritzbox manager, callmonitor</Tags> <Location>..\MpeRelease\FritzBox.mpe1</Location> <Params> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-29 16:54:40
|
Revision: 4434 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4434&view=rev Author: BartEv Date: 2012-01-29 16:54:34 +0000 (Sun, 29 Jan 2012) Log Message: ----------- Bug fix unable to navigate in cam-dialog Modified Paths: -------------- trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1 Modified: trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1 =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-29 16:53:41
|
Revision: 4433 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4433&view=rev Author: BartEv Date: 2012-01-29 16:53:35 +0000 (Sun, 29 Jan 2012) Log Message: ----------- Bug fix unable to navigate in cam-dialog Modified Paths: -------------- trunk/plugins/VeraControl/DialogDeviceControl.cs Modified: trunk/plugins/VeraControl/DialogDeviceControl.cs =================================================================== --- trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-01-28 20:38:05 UTC (rev 4432) +++ trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-01-29 16:53:35 UTC (rev 4433) @@ -111,12 +111,13 @@ _btnCamZmMin.Visibility = System.Windows.Visibility.Visible; _btnCamZmPlus.Visibility = System.Windows.Visibility.Visible; + _btnClose.NavigateLeft = _btnCamLeft.GetID; + _btnClose.NavigateRight = _btnCamRight.GetID; _btnClose.NavigateDown = _btnCamUp.GetID; _btnClose.NavigateUp = _btnCamZmPlus.GetID; _camUpdateDelay = ((DeviceCam)dev).refreshRate; - _btnClose.SetNavigation(_btnClose.GetID, _btnClose.GetID, _btnClose.GetID, _btnClose.GetID); _imgLogo.Visibility = System.Windows.Visibility.Hidden; StartCamImageUpdater(((DeviceCam)dev).imgUrl); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-28 20:38:11
|
Revision: 4432 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4432&view=rev Author: BartEv Date: 2012-01-28 20:38:05 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/update.xml Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-28 20:31:20 UTC (rev 4431) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-28 20:38:05 UTC (rev 4432) @@ -232,9 +232,6 @@ Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtain autmatically when MediaPortal starts a movie... Vera is a Z-wave home automation controller from MicasaVerde. This version is tested with Vera 2 UI4 v.1.1.1267 - - - </ExtensionDescription> <VersionDescription>First version - for beta testing only Minor updates</VersionDescription> @@ -379,7 +376,6 @@ - Vera 2 v1.1.1267 - Vera 2 v1.5.255 - </ExtensionDescription> <VersionDescription>Improved Vera response handling</VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> @@ -518,27 +514,16 @@ Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - Vera is a Z-wave home automation controller from MicasaVerde. This version is tested with: - - Vera 1 v1.1.1338 - - Vera 2 v1.1.1267 - - Vera 2 v1.5.255 - - - - </ExtensionDescription> <VersionDescription>- Real time Vera status update - -Threated communication (no-screen-lockups) - - IP Cam support </VersionDescription> @@ -685,10 +670,6 @@ - Vera 2 v1.1.1267 - Vera 2 v1.5.255 - - - - </ExtensionDescription> <VersionDescription>- Real time Vera status update -Threated communication (no-screen-lockups) @@ -828,46 +809,20 @@ <Revision>1</Revision> </Version> <ExtensionDescription>Control your Vera controller from MediaPortal. - - - Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - - Vera is a Z-wave home automation controller from MicasaVerde. - - This version is tested with: - - Vera 1 v1.1.1338 - - Vera 2 v1.1.1267 - - Vera 2 v1.5.255 - - - - - - - - - - </ExtensionDescription> <VersionDescription>- Real time Vera status update - -Threated communication (no-screen-lockups) - - IP Cam support - - Improved error handling - - Improved Cam image updater - - Clean up code (coding standard complience)</VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1</OnlineLocation> @@ -1002,35 +957,14 @@ <Revision>1</Revision> </Version> <ExtensionDescription>Control your Vera controller from MediaPortal. - - - Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - - Vera is a Z-wave home automation controller from MicasaVerde. - - This version is tested with: - - Vera 1 v1.1.1338 - - Vera 2 v1.1.1267 - - Vera 2 v1.5.255 - - - - - - - - - - </ExtensionDescription> <VersionDescription>- Real time Vera status update - Threated communication (no-screen-lockups) @@ -1175,35 +1109,15 @@ <Revision>2</Revision> </Version> <ExtensionDescription>Control your Vera controller from MediaPortal. - - - Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - Vera is a Z-wave home automation controller from MicasaVerde. - - This version is tested with: - - Vera 1 v1.1.1338 - - Vera 2 v1.1.1267 - - Vera 2 v1.5.255 - - - - - - - - - - </ExtensionDescription> <VersionDescription>[9.0.0.1] - Real time Vera status update @@ -1227,7 +1141,7 @@ z-wave, micasaverde, vera</Tags> - <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v0.9.0.2.mpe1</Location> <Params> <Items> <SectionParam Name="Online Icon"> @@ -1264,4 +1178,4 @@ <IsSkin>false</IsSkin> </PackageClass> </Items> -</ExtensionCollection> \ No newline at end of file +</ExtensionCollection> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-28 20:31:26
|
Revision: 4431 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4431&view=rev Author: BartEv Date: 2012-01-28 20:31:20 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/VeraControl.xmp2 trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1 trunk/plugins/VeraControl/releases/update.xml Modified: trunk/plugins/VeraControl/releases/VeraControl.xmp2 =================================================================== --- trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-28 20:24:00 UTC (rev 4430) +++ trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-28 20:31:20 UTC (rev 4431) @@ -383,13 +383,6 @@ <ZipFileName>Installer{CopyFile}\{c37da331-8478-4be6-8eed-4fec1dea3fd8}-state_success.png</ZipFileName> <DestinationFilename>%Skin%\Default\media\Vera\state_success.png</DestinationFilename> </FileItem> - <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> - <Param1 /> - <UpdateOption>OverwriteIfOlder</UpdateOption> - <LocalFileName>..\skin\Media\Vera\bulb-dimmer--icon2.psd</LocalFileName> - <ZipFileName>Installer{CopyFile}\{42a783ae-3979-4c13-8566-b1a8961ee87d}-bulb-dimmer--icon2.psd</ZipFileName> - <DestinationFilename>%Skin%\Default\media\Vera\bulb-dimmer--icon2.psd</DestinationFilename> - </FileItem> </Items> </Files> </GroupItem> @@ -700,13 +693,6 @@ <ZipFileName>Installer{CopyFile}\{c0a2ca25-4cb3-4bd9-9131-b8010f4cf64a}-state_success.png</ZipFileName> <DestinationFilename>%Skin%\DefaultWide\media\Vera\state_success.png</DestinationFilename> </FileItem> - <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> - <Param1 /> - <UpdateOption>OverwriteIfOlder</UpdateOption> - <LocalFileName>..\skin\Media\Vera\bulb-dimmer--icon2.psd</LocalFileName> - <ZipFileName>Installer{CopyFile}\{7c470d56-4590-4245-bb47-976bbc7df8b7}-bulb-dimmer--icon2.psd</ZipFileName> - <DestinationFilename>%Skin%\DefaultWide\media\Vera\bulb-dimmer--icon2.psd</DestinationFilename> - </FileItem> </Items> </Files> </GroupItem> @@ -795,7 +781,7 @@ Do not forget to configure the Vera Control plug in. - See help screen under context menu [!]</Value> + </Value> <ValueType>String</ValueType> <Description /> </SectionParam> @@ -881,51 +867,51 @@ <Build>0</Build> <Revision>2</Revision> </Version> - <ExtensionDescription>Control your Vera controller from MediaPortal. - - - -Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - - -Vera is a Z-wave home automation controller from MicasaVerde. - - - -This version is tested with: - - - Vera 1 v1.1.1338 - - - Vera 2 v1.1.1267 - - - Vera 2 v1.5.255 - - - - - - - - - - - + <ExtensionDescription>Control your Vera controller from MediaPortal. + + + +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + + + +Vera is a Z-wave home automation controller from MicasaVerde. + + + +This version is tested with: + + - Vera 1 v1.1.1338 + + - Vera 2 v1.1.1267 + + - Vera 2 v1.5.255 + + + + + + + + + + + </ExtensionDescription> - <VersionDescription>[9.0.0.1] -- Real time Vera status update --Threated communication (no-screen-lockups) -- IP Cam support -- Improved error handling -- Improved Cam image updater -- Clean up code (coding standard complience) -- Supports remote connection (via fwd1.mios.com) -- New image set -- Improved config screen (Vera-box look) -- first: stable release - -[9.0.0.2] -- Added a help screen (! button = context menu) + <VersionDescription>[9.0.0.1] +- Real time Vera status update +-Threated communication (no-screen-lockups) +- IP Cam support +- Improved error handling +- Improved Cam image updater +- Clean up code (coding standard complience) +- Supports remote connection (via fwd1.mios.com) +- New image set +- Improved config screen (Vera-box look) +- first: stable release + +[9.0.0.2] +- Added a help screen (! button = context menu) - Added RC commands to control devices/scenes without the need of opening the dialog</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1</OnlineLocation> @@ -1312,13 +1298,6 @@ <ZipFileName>Installer{CopyFile}\{c37da331-8478-4be6-8eed-4fec1dea3fd8}-state_success.png</ZipFileName> <DestinationFilename>%Skin%\Default\media\Vera\state_success.png</DestinationFilename> </FileItem> - <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> - <Param1 /> - <UpdateOption>OverwriteIfOlder</UpdateOption> - <LocalFileName>..\skin\Media\Vera\bulb-dimmer--icon2.psd</LocalFileName> - <ZipFileName>Installer{CopyFile}\{42a783ae-3979-4c13-8566-b1a8961ee87d}-bulb-dimmer--icon2.psd</ZipFileName> - <DestinationFilename>%Skin%\Default\media\Vera\bulb-dimmer--icon2.psd</DestinationFilename> - </FileItem> </Items> </UniqueFileList> <ProjectSettings> Modified: trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-28 20:24:00 UTC (rev 4430) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-28 20:31:20 UTC (rev 4431) @@ -1174,51 +1174,51 @@ <Build>0</Build> <Revision>2</Revision> </Version> - <ExtensionDescription>Control your Vera controller from MediaPortal. - - - -Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - - -Vera is a Z-wave home automation controller from MicasaVerde. - - - -This version is tested with: - - - Vera 1 v1.1.1338 - - - Vera 2 v1.1.1267 - - - Vera 2 v1.5.255 - - - - - - - - - - - + <ExtensionDescription>Control your Vera controller from MediaPortal. + + + +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + + + +Vera is a Z-wave home automation controller from MicasaVerde. + + + +This version is tested with: + + - Vera 1 v1.1.1338 + + - Vera 2 v1.1.1267 + + - Vera 2 v1.5.255 + + + + + + + + + + + </ExtensionDescription> - <VersionDescription>[9.0.0.1] -- Real time Vera status update --Threated communication (no-screen-lockups) -- IP Cam support -- Improved error handling -- Improved Cam image updater -- Clean up code (coding standard complience) -- Supports remote connection (via fwd1.mios.com) -- New image set -- Improved config screen (Vera-box look) -- first: stable release - -[9.0.0.2] -- Added a help screen (! button = context menu) + <VersionDescription>[9.0.0.1] +- Real time Vera status update +-Threated communication (no-screen-lockups) +- IP Cam support +- Improved error handling +- Improved Cam image updater +- Clean up code (coding standard complience) +- Supports remote connection (via fwd1.mios.com) +- New image set +- Improved config screen (Vera-box look) +- first: stable release + +[9.0.0.2] +- Added a help screen (! button = context menu) - Added RC commands to control devices/scenes without the need of opening the dialog</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1</OnlineLocation> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-28 20:24:07
|
Revision: 4430 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4430&view=rev Author: BartEv Date: 2012-01-28 20:24:00 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Version 9.0.0.2 Modified Paths: -------------- trunk/plugins/VeraControl/releases/VeraControl.xmp2 trunk/plugins/VeraControl/releases/update.xml Modified: trunk/plugins/VeraControl/releases/VeraControl.xmp2 =================================================================== --- trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-28 20:23:20 UTC (rev 4429) +++ trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-28 20:24:00 UTC (rev 4430) @@ -383,6 +383,13 @@ <ZipFileName>Installer{CopyFile}\{c37da331-8478-4be6-8eed-4fec1dea3fd8}-state_success.png</ZipFileName> <DestinationFilename>%Skin%\Default\media\Vera\state_success.png</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\skin\Media\Vera\bulb-dimmer--icon2.psd</LocalFileName> + <ZipFileName>Installer{CopyFile}\{42a783ae-3979-4c13-8566-b1a8961ee87d}-bulb-dimmer--icon2.psd</ZipFileName> + <DestinationFilename>%Skin%\Default\media\Vera\bulb-dimmer--icon2.psd</DestinationFilename> + </FileItem> </Items> </Files> </GroupItem> @@ -693,6 +700,13 @@ <ZipFileName>Installer{CopyFile}\{c0a2ca25-4cb3-4bd9-9131-b8010f4cf64a}-state_success.png</ZipFileName> <DestinationFilename>%Skin%\DefaultWide\media\Vera\state_success.png</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\skin\Media\Vera\bulb-dimmer--icon2.psd</LocalFileName> + <ZipFileName>Installer{CopyFile}\{7c470d56-4590-4245-bb47-976bbc7df8b7}-bulb-dimmer--icon2.psd</ZipFileName> + <DestinationFilename>%Skin%\DefaultWide\media\Vera\bulb-dimmer--icon2.psd</DestinationFilename> + </FileItem> </Items> </Files> </GroupItem> @@ -781,7 +795,7 @@ Do not forget to configure the Vera Control plug in. -</Value> + See help screen under context menu [!]</Value> <ValueType>String</ValueType> <Description /> </SectionParam> @@ -865,52 +879,57 @@ <Major>0</Major> <Minor>9</Minor> <Build>0</Build> - <Revision>1</Revision> + <Revision>2</Revision> </Version> - <ExtensionDescription>Control your Vera controller from MediaPortal. - - - -Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... - - - -Vera is a Z-wave home automation controller from MicasaVerde. - - - -This version is tested with: - - - Vera 1 v1.1.1338 - - - Vera 2 v1.1.1267 - - - Vera 2 v1.5.255 - - - - - - - - - - - + <ExtensionDescription>Control your Vera controller from MediaPortal. + + + +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + + + +Vera is a Z-wave home automation controller from MicasaVerde. + + + +This version is tested with: + + - Vera 1 v1.1.1338 + + - Vera 2 v1.1.1267 + + - Vera 2 v1.5.255 + + + + + + + + + + + </ExtensionDescription> - <VersionDescription>- Real time Vera status update --Threated communication (no-screen-lockups) -- IP Cam support -- Improved error handling -- Improved Cam image updater -- Clean up code (coding standard complience) -- Supports remote connection (via fwd1.mios.com) -- New image set -- Improved config screen (Vera-box look) -- first: stable release</VersionDescription> + <VersionDescription>[9.0.0.1] +- Real time Vera status update +-Threated communication (no-screen-lockups) +- IP Cam support +- Improved error handling +- Improved Cam image updater +- Clean up code (coding standard complience) +- Supports remote connection (via fwd1.mios.com) +- New image set +- Improved config screen (Vera-box look) +- first: stable release + +[9.0.0.2] +- Added a help screen (! button = context menu) +- Added RC commands to control devices/scenes without the need of opening the dialog</VersionDescription> <DevelopmentStatus>Stable</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.1.mpe1</OnlineLocation> - <ReleaseDate>2012-01-25T22:51:05</ReleaseDate> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1</OnlineLocation> + <ReleaseDate>2012-01-28T22:51:05</ReleaseDate> <Tags>home automation, z-wave, micasaverde, @@ -1293,6 +1312,13 @@ <ZipFileName>Installer{CopyFile}\{c37da331-8478-4be6-8eed-4fec1dea3fd8}-state_success.png</ZipFileName> <DestinationFilename>%Skin%\Default\media\Vera\state_success.png</DestinationFilename> </FileItem> + <FileItem InstallType="CopyFile" SystemFile="false" Modified="false"> + <Param1 /> + <UpdateOption>OverwriteIfOlder</UpdateOption> + <LocalFileName>..\skin\Media\Vera\bulb-dimmer--icon2.psd</LocalFileName> + <ZipFileName>Installer{CopyFile}\{42a783ae-3979-4c13-8566-b1a8961ee87d}-bulb-dimmer--icon2.psd</ZipFileName> + <DestinationFilename>%Skin%\Default\media\Vera\bulb-dimmer--icon2.psd</DestinationFilename> + </FileItem> </Items> </UniqueFileList> <ProjectSettings> Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-28 20:23:20 UTC (rev 4429) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-28 20:24:00 UTC (rev 4430) @@ -1085,5 +1085,183 @@ </ProjectSettings> <IsSkin>false</IsSkin> </PackageClass> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + <GroupItem Name="IconsDefault"> + <DisplayName>IconsDefault</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>IconsDefault</Description> + <Files> + <Items /> + </Files> + </GroupItem> + <GroupItem Name="IconsDefaultWide"> + <DisplayName>IconsDefaultWide</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>IconsDefaultWide</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="VeraControl.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.1.6.27644</MinRequiredVersion> + <DesignedForVersion>1.1.6.27644</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items> + <SubSystemItem Name="MP.SkinEngine" /> + <SubSystemItem Name="MP.Config" /> + </Items> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>Vera Controller</Name> + <Id>ebb6b1af-6fb9-44e5-a859-9d32ffe20a9e</Id> + <Author>Bart Eversdijk</Author> + <HomePage>http://www.team-mediaportal.com/extensions/micasaverde-vera-controller</HomePage> + <ForumPage>http://forum.team-mediaportal.com/mediaportal-plugins-47/plugin-micasaverde-vera-controller-104337/</ForumPage> + <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/update.xml</UpdateUrl> + <Version> + <Major>0</Major> + <Minor>9</Minor> + <Build>0</Build> + <Revision>2</Revision> + </Version> + <ExtensionDescription>Control your Vera controller from MediaPortal. + + + +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + + + +Vera is a Z-wave home automation controller from MicasaVerde. + + + +This version is tested with: + + - Vera 1 v1.1.1338 + + - Vera 2 v1.1.1267 + + - Vera 2 v1.5.255 + + + + + + + + + + + +</ExtensionDescription> + <VersionDescription>[9.0.0.1] +- Real time Vera status update +-Threated communication (no-screen-lockups) +- IP Cam support +- Improved error handling +- Improved Cam image updater +- Clean up code (coding standard complience) +- Supports remote connection (via fwd1.mios.com) +- New image set +- Improved config screen (Vera-box look) +- first: stable release + +[9.0.0.2] +- Added a help screen (! button = context menu) +- Added RC commands to control devices/scenes without the need of opening the dialog</VersionDescription> + <DevelopmentStatus>Stable</DevelopmentStatus> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1</OnlineLocation> + <ReleaseDate>2012-01-28T22:51:05</ReleaseDate> + <Tags>home automation, +z-wave, +micasaverde, +vera</Tags> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Params> + <Items> + <SectionParam Name="Online Icon"> + <Value /> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value /> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + <IsSkin>false</IsSkin> + </PackageClass> </Items> -</ExtensionCollection> +</ExtensionCollection> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-28 20:23:26
|
Revision: 4429 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4429&view=rev Author: BartEv Date: 2012-01-28 20:23:20 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Added Paths: ----------- trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1 Added: trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.2.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-28 20:18:52
|
Revision: 4428 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4428&view=rev Author: BartEv Date: 2012-01-28 20:18:43 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Added RC command controls and help screen Got clear of all the TAB's Modified Paths: -------------- trunk/plugins/VeraControl/BaseDevice.cs trunk/plugins/VeraControl/DevCategories.cs trunk/plugins/VeraControl/DeviceCam.cs trunk/plugins/VeraControl/DeviceDimmer.cs trunk/plugins/VeraControl/DeviceDoorlock.cs trunk/plugins/VeraControl/DeviceGWeather.cs trunk/plugins/VeraControl/DeviceGeneric.cs trunk/plugins/VeraControl/DeviceHumidity.cs trunk/plugins/VeraControl/DeviceLightSensor.cs trunk/plugins/VeraControl/DevicePowerMeter.cs trunk/plugins/VeraControl/DeviceSceneController.cs trunk/plugins/VeraControl/DeviceSecurity.cs trunk/plugins/VeraControl/DeviceSprinkler.cs trunk/plugins/VeraControl/DeviceSwitch.cs trunk/plugins/VeraControl/DeviceSystem.cs trunk/plugins/VeraControl/DeviceTemperature.cs trunk/plugins/VeraControl/DeviceThermostat.cs trunk/plugins/VeraControl/DeviceWindowCovering.cs trunk/plugins/VeraControl/DialogActionTrigger.cs trunk/plugins/VeraControl/DialogDeviceControl.cs trunk/plugins/VeraControl/DialogSceneControl.cs trunk/plugins/VeraControl/JSON.cs trunk/plugins/VeraControl/Room.cs trunk/plugins/VeraControl/Scene.cs trunk/plugins/VeraControl/Section.cs trunk/plugins/VeraControl/VeraCommunication.cs trunk/plugins/VeraControl/VeraControl.cs trunk/plugins/VeraControl/VeraHelper.cs Modified: trunk/plugins/VeraControl/BaseDevice.cs =================================================================== --- trunk/plugins/VeraControl/BaseDevice.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/BaseDevice.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -18,19 +18,19 @@ /// </summary> public class BaseDevice { - private long _lastUpdate = 0; - private long _lastPendingUpdate = 0; + private long _lastUpdate = 0; + private long _lastPendingUpdate = 0; private bool _screenUpdateRequired = false; - private string _name = "unknown device"; - private int _id = 0; - private int _room = 0; + private string _name = "unknown device"; + private int _id = 0; + private int _room = 0; // not connected (-2), none (-1), pending (0,1,5,6), success(4), error (2,3) private DevState _dsState = DevState.NONE; - private string _comment = ""; // red(error), green(success) or blue(pending) - icon/text + private string _comment = ""; // red(error), green(success) or blue(pending) - icon/text - public VeraHelper _helper = VeraHelper.Instance; - public VeraCommunication _vera = VeraCommunication.Instance; + public VeraHelper _helper = VeraHelper.Instance; + public VeraCommunication _vera = VeraCommunication.Instance; public BaseDevice(XmlNode xn) { @@ -40,7 +40,7 @@ } } - /// <summary> + /// <summary> /// Process Vera update information /// </summary> public virtual bool Update(XmlNode xn) @@ -58,8 +58,8 @@ } // Set update flag - screenUpdateRequired = true; - lastUpdate = DateTime.Now.Ticks; + screenUpdateRequired = true; + lastUpdate = DateTime.Now.Ticks; return true; } @@ -75,14 +75,14 @@ public int id { - get { return _id; } - set { } + get { return _id; } + set { } } public string name { - get { return _name; } - set { } + get { return _name; } + set { } } public bool InRoom(int id) @@ -93,19 +93,19 @@ public int room { get { return _room; } - set { _room = value; } + set { _room = value; } } public DevState commstate { get { return _dsState; } - set { } + set { } } public string comment { get { return (commstate != DevState.NONE ? _comment : ""); } - set { } + set { } } public bool screenUpdateRequired @@ -128,11 +128,11 @@ public void ReportPendingRequest() { - _dsState = DevState.PENDING; - _comment = "Sending command..."; + _dsState = DevState.PENDING; + _comment = "Sending command..."; screenUpdateRequired = true; lastUpdate = DateTime.Now.Ticks; - _lastPendingUpdate = lastUpdate; + _lastPendingUpdate = lastUpdate; } /// <summary> @@ -140,19 +140,19 @@ /// </summary> public void ReportRequestError(string message) { - _dsState = DevState.COMMAND_ERROR; - _comment = message; + _dsState = DevState.COMMAND_ERROR; + _comment = message; screenUpdateRequired = true; - lastUpdate = DateTime.Now.Ticks; + lastUpdate = DateTime.Now.Ticks; } public void ClearCommState() { if (_dsState != DevState.NONE) { - _dsState = DevState.NONE; - screenUpdateRequired = true; - lastUpdate = DateTime.Now.Ticks; + _dsState = DevState.NONE; + screenUpdateRequired = true; + lastUpdate = DateTime.Now.Ticks; } } Modified: trunk/plugins/VeraControl/DevCategories.cs =================================================================== --- trunk/plugins/VeraControl/DevCategories.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DevCategories.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,45 +13,45 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DevCategories. - /// </summary> - public class DevCategories - { - public DevCategories(XmlNode xn) - { - if (xn != null) - { - Update(xn); - } - } - - private string _name = "unknown category"; - private int _id = 0; - public VeraHelper _helper = VeraHelper.Instance; - - public bool Update(XmlNode xn) - { - _name = _helper.GetAttrAsString(xn, "name", _name); - _id = _helper.GetAttrAsInt (xn, "id", _id); - return true; - } - - public int id - { - get { return _id; } - set { } - } - - public string name - { - get { return _name; } - set { } - } + /// <summary> + /// Description of DevCategories. + /// </summary> + public class DevCategories + { + public DevCategories(XmlNode xn) + { + if (xn != null) + { + Update(xn); + } + } + + private string _name = "unknown category"; + private int _id = 0; + public VeraHelper _helper = VeraHelper.Instance; + + public bool Update(XmlNode xn) + { + _name = _helper.GetAttrAsString(xn, "name", _name); + _id = _helper.GetAttrAsInt (xn, "id", _id); + return true; + } + + public int id + { + get { return _id; } + set { } + } + + public string name + { + get { return _name; } + set { } + } - public override string ToString() - { - return name; - } - } + public override string ToString() + { + return name; + } + } } Modified: trunk/plugins/VeraControl/DeviceCam.cs =================================================================== --- trunk/plugins/VeraControl/DeviceCam.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceCam.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -11,139 +11,145 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceCam. - /// </summary> - public class DeviceCam : DeviceGeneric - { - private string _ip = "127.0.0.1"; - private string _url = "/"; - private string _stream = ""; - private string _videoUrl = ""; - private int _refreshRate = 2; - private string _user = ""; - private string _pass = ""; - - public DeviceCam(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _ip = _helper.GetAttrAsString(xn, "ip", _ip); - _url = _helper.GetAttrAsString(xn, "url", _url); - _stream = _helper.GetAttrAsString(xn, "streaming", _stream); - _videoUrl = _helper.GetAttrAsString(xn, "videourls", _videoUrl); - _user = _helper.GetAttrAsString(xn, "username", ""); - _pass = _helper.GetAttrAsString(xn, "password", ""); - - return base.Update(xn); - } - - private string passString - { - get { - if (_user == "") - { - return ""; - } - return _user + ":" + _pass + "@"; - } - set { } - } - - public string imgUrl - { - get { return _vera.veraAddress + "/data_request?id=cam_image¶meters=get_video_frame&Device_Num=" + id + "&rand=" + DateTime.Now.Ticks; - // return "http://" + passString + m_sIp + "/" + m_sUrl.Replace("%2F", "/"); - } - set { } - } - - public string streamUrl - { - get { return "http://" + passString + _ip + "/" + _stream.Replace("%2F", "/"); } - set { } - } - - public int refreshRate - { - get { return _refreshRate; } - set { _refreshRate = value; } - } - - private bool HasRefreshDelayPassed(long lastcheck) - { - return ((_helper.GetSecondsSince1970() - refreshRate) > (lastcheck / TimeSpan.TicksPerSecond)); - } - - public override string GetIconName() - { - return "Ip_Camera"; - } - - public override bool NewScreenUpdateWaitingAndClearFlag( ) - { - // Invoking this method will clear the update ready flag -> so caller need to handle the update - // A cam device requires an update every refreshRate seconds - bool b = screenUpdateRequired || HasRefreshDelayPassed(DateTime.Now.Ticks); - screenUpdateRequired = false; - if (b) - { - lastUpdate = DateTime.Now.Ticks; - } - return b; - } - - public override bool NewUpdateSince(long lTimePreviousCheck) - { - bool b = (lTimePreviousCheck <= lastUpdate) || HasRefreshDelayPassed(lastUpdate); - if (b) - { - lastUpdate = DateTime.Now.Ticks; - } - return b; - } - - private void Move(string direction) - { - if (id == 0) - { - _vera.status.system.ReportCommandError("Unknown device"); - screenUpdateRequired = true; - return; - } - string cmd = "?id=lu_action&DeviceNum=" + id + "&serviceId=urn:micasaverde-com:serviceId:PanTiltZoom1&action=" + direction; - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - - public override void MoveUp() - { - Move("MoveUp"); - } - public override void MoveLeft() - { - Move("MoveLeft"); - } - public override void MoveRight() - { - Move("MoveRight"); - } - public override void MoveDown() - { - Move("MoveDown"); - } - public override void ZoomIn() - { - Move("ZoomIn"); - } - public override void ZoomOut() - { - Move("ZoomOut"); - } - } + /// <summary> + /// Description of DeviceCam. + /// </summary> + public class DeviceCam : DeviceGeneric + { + private string _ip = "127.0.0.1"; + private string _url = "/"; + private string _stream = ""; + private string _videoUrl = ""; + private int _refreshRate = 2; + private string _user = ""; + private string _pass = ""; + + public DeviceCam(XmlNode xn): base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _ip = _helper.GetAttrAsString(xn, "ip", _ip); + _url = _helper.GetAttrAsString(xn, "url", _url); + _stream = _helper.GetAttrAsString(xn, "streaming", _stream); + _videoUrl = _helper.GetAttrAsString(xn, "videourls", _videoUrl); + _user = _helper.GetAttrAsString(xn, "username", ""); + _pass = _helper.GetAttrAsString(xn, "password", ""); + + return base.Update(xn); + } + + private string passString + { + get { + if (_user == "") + { + return ""; + } + return _user + ":" + _pass + "@"; + } + set { } + } + + public string imgUrl + { + get { return _vera.veraAddress + "/data_request?id=cam_image¶meters=get_video_frame&Device_Num=" + id + "&rand=" + DateTime.Now.Ticks; + // return "http://" + passString + m_sIp + "/" + m_sUrl.Replace("%2F", "/"); + } + set { } + } + + public string streamUrl + { + get { return "http://" + passString + _ip + "/" + _stream.Replace("%2F", "/"); } + set { } + } + + public int refreshRate + { + get { return _refreshRate; } + set { _refreshRate = value; } + } + + private bool HasRefreshDelayPassed(long lastcheck) + { + return ((_helper.GetSecondsSince1970() - refreshRate) > (lastcheck / TimeSpan.TicksPerSecond)); + } + + public override bool isControllable + { + get { return true; } + set { } + } + + public override string GetIconName() + { + return "Ip_Camera"; + } + + public override bool NewScreenUpdateWaitingAndClearFlag( ) + { + // Invoking this method will clear the update ready flag -> so caller need to handle the update + // A cam device requires an update every refreshRate seconds + bool b = screenUpdateRequired || HasRefreshDelayPassed(DateTime.Now.Ticks); + screenUpdateRequired = false; + if (b) + { + lastUpdate = DateTime.Now.Ticks; + } + return b; + } + + public override bool NewUpdateSince(long lTimePreviousCheck) + { + bool b = (lTimePreviousCheck <= lastUpdate) || HasRefreshDelayPassed(lastUpdate); + if (b) + { + lastUpdate = DateTime.Now.Ticks; + } + return b; + } + + private void Move(string direction) + { + if (id == 0) + { + _vera.status.system.ReportCommandError("Unknown device"); + screenUpdateRequired = true; + return; + } + string cmd = "?id=lu_action&DeviceNum=" + id + "&serviceId=urn:micasaverde-com:serviceId:PanTiltZoom1&action=" + direction; + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + + public override void MoveUp() + { + Move("MoveUp"); + } + public override void MoveLeft() + { + Move("MoveLeft"); + } + public override void MoveRight() + { + Move("MoveRight"); + } + public override void MoveDown() + { + Move("MoveDown"); + } + public override void ZoomIn() + { + Move("ZoomIn"); + } + public override void ZoomOut() + { + Move("ZoomOut"); + } + } } Modified: trunk/plugins/VeraControl/DeviceDimmer.cs =================================================================== --- trunk/plugins/VeraControl/DeviceDimmer.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceDimmer.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,107 +13,104 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceDimmer. - /// </summary> - public class DeviceDimmer : DeviceGeneric - { - private int _level = 0; - private string _watt = "-"; - private string _kwh = "-"; - - public DeviceDimmer(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _level = _helper.GetAttrAsInt (xn, "level", _level); - _watt = _helper.GetAttrAsString(xn, "watts", _watt); - _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); - - return base.Update(xn); - } - - public string watts - { - get { return _watt; } - set { } - } - - public override bool status - { - get { return (_level > 0); } - set { - - } - } - - public override int level - { - get { return _level; } - set - { - int newValue = value; - if (newValue > 100) { - newValue = 100; - } else { - if (newValue < 0) { newValue = 0; } - } - if (id > 0) // Only send when a valid ID is found - { - ReportPendingRequest(); - // Do something with vera - string cmd = "?id=lu_action&DeviceNum="+id.ToString() + - "&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget" + - "&newLoadlevelTarget=" + value; - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - _level = newValue; - } - } - - public override int maxLevel - { - get { return 100; } - set { } - } - - public override string ToString() - { - return name + " [" + GetStatusText() + "]"; - } - - public override bool isControllable - { - get { return true; } - set { } - } - - public override string GetIconName() - { - string leveltxt = "0"; - if (level > 0) { leveltxt = "25"; } - if (level > 25) { leveltxt = "50"; } - if (level > 50) { leveltxt = "75"; } - if (level > 75) { leveltxt = "100"; } - - return "Dimmable_Light_" + leveltxt; - } - - - public override string GetExtraText() - { - return (_kwh != "" ? _kwh + "kWh" : ""); - } - - public override string GetStatusText() - { - return (status ? level.ToString() + "%" : "Off"); - } - } + /// <summary> + /// Description of DeviceDimmer. + /// </summary> + public class DeviceDimmer : DeviceGeneric + { + private int _level = 0; + private string _watt = "-"; + private string _kwh = "-"; + + public DeviceDimmer(XmlNode xn): base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _level = _helper.GetAttrAsInt (xn, "level", _level); + _watt = _helper.GetAttrAsString(xn, "watts", _watt); + _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); + + return base.Update(xn); + } + + public string watts + { + get { return _watt; } + set { } + } + + public override bool status + { + get { return (_level > 0); } + set { level = (value ? maxLevel : minLevel); } + } + + public override int level + { + get { return _level; } + set + { + int newValue = value; + if (newValue > maxLevel) { + newValue = maxLevel; + } else { + if (newValue < minLevel) { newValue = minLevel; } + } + if (id > 0) // Only send when a valid ID is found + { + ReportPendingRequest(); + // Do something with vera + string cmd = "?id=lu_action&DeviceNum="+id.ToString() + + "&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget" + + "&newLoadlevelTarget=" + value; + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + _level = newValue; + } + } + + public override int maxLevel + { + get { return 100; } + set { } + } + + public override string ToString() + { + return name + " [" + GetStatusText() + "]"; + } + + public override bool isControllable + { + get { return true; } + set { } + } + + public override string GetIconName() + { + string leveltxt = "0"; + if (level > 0) { leveltxt = "25"; } + if (level > 25) { leveltxt = "50"; } + if (level > 50) { leveltxt = "75"; } + if (level > 75) { leveltxt = "100"; } + + return "Dimmable_Light_" + leveltxt; + } + + public override string GetExtraText() + { + return (_kwh != "" ? _kwh + "kWh" : ""); + } + + public override string GetStatusText() + { + return (status ? level.ToString() + "%" : "Off"); + } + } } Modified: trunk/plugins/VeraControl/DeviceDoorlock.cs =================================================================== --- trunk/plugins/VeraControl/DeviceDoorlock.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceDoorlock.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,79 +13,78 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceDoorlock. - /// </summary> - public class DeviceDoorlock : DeviceGeneric - { - private bool _status = false; - - public DeviceDoorlock( XmlNode xn ): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _status = _helper.GetAttrAsBool(xn, "status", _status); - - return base.Update(xn); - } - - public override bool status - { - get { return _status; } - set { - if (id > 0) // Only send when a valid ID is found - { - ReportPendingRequest(); - // Do something with vera - string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ - "&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget" + - "&newTargetValue="+(value ? "1" : "0"); - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - } - } - - public override int level - { - get { return (_status ? 1 : 0); } - set - { - status = (value > 0); - } - } - - public override int maxLevel - { - get { return 1; } - set { } - } - - public override string ToString() - { - return name + " [" + GetStatusText() + "]"; - } - - public override bool isControllable - { - get { return true; } - set { } - } - - public override string GetIconName() - { - return "Door_" + (_status ? "LOCKED" : "UNLOCKED"); - } - - public override string GetStatusText() - { - return (status ? "Locked" : "Unlocked"); - } - - } + /// <summary> + /// Description of DeviceDoorlock. + /// </summary> + public class DeviceDoorlock : DeviceGeneric + { + private bool _status = false; + + public DeviceDoorlock( XmlNode xn ): base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _status = _helper.GetAttrAsBool(xn, "status", _status); + + return base.Update(xn); + } + + public override bool status + { + get { return _status; } + set { + if (id > 0) // Only send when a valid ID is found + { + ReportPendingRequest(); + // Do something with vera + string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ + "&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget" + + "&newTargetValue="+(value ? "1" : "0"); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + } + } + + public override int level + { + get { return (_status ? 1 : 0); } + set + { + status = (value > 0); + } + } + + public override int maxLevel + { + get { return 1; } + set { } + } + + public override string ToString() + { + return name + " [" + GetStatusText() + "]"; + } + + public override bool isControllable + { + get { return true; } + set { } + } + + public override string GetIconName() + { + return "Door_" + (_status ? "LOCKED" : "UNLOCKED"); + } + + public override string GetStatusText() + { + return (status ? "Locked" : "Unlocked"); + } + } } Modified: trunk/plugins/VeraControl/DeviceGWeather.cs =================================================================== --- trunk/plugins/VeraControl/DeviceGWeather.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceGWeather.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,49 +13,50 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceGWeather. - /// </summary> - public class DeviceGWeather : DeviceGeneric - { - private string _condition = "-"; - private string _windCondition = "-"; - - public DeviceGWeather(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _condition = _helper.GetAttrAsString(xn, "Condition", _condition); // Google Weather Plugin - _condition = _helper.GetAttrAsString(xn, "condition", _condition); // World Weather plugin - _windCondition = _helper.GetAttrAsString(xn, "WindCondition", _windCondition); - _windCondition = _helper.GetAttrAsString(xn, "windcondition", _windCondition); - - return base.Update(xn); - } - - public override string ToString() - { - return name + " [" + GetStatusText() + "]"; - } - - public override string GetStatusText() - { - return _condition.Replace("_", " "); - } - public override string GetExtraText() - { - return _windCondition; - } - - public override string GetIconName() - { - return "location"; - } - } + /// <summary> + /// Description of DeviceGWeather. + /// </summary> + public class DeviceGWeather : DeviceGeneric + { + private string _condition = "-"; + private string _windCondition = "-"; + + public DeviceGWeather(XmlNode xn): base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _condition = _helper.GetAttrAsString(xn, "Condition", _condition); // Google Weather Plugin + _condition = _helper.GetAttrAsString(xn, "condition", _condition); // World Weather plugin + _windCondition = _helper.GetAttrAsString(xn, "WindCondition", _windCondition); + _windCondition = _helper.GetAttrAsString(xn, "windcondition", _windCondition); + + return base.Update(xn); + } + + public override string ToString() + { + return name + " [" + GetStatusText() + "]"; + } + + public override string GetStatusText() + { + return _condition.Replace("_", " "); + } + + public override string GetExtraText() + { + return _windCondition; + } + + public override string GetIconName() + { + return "location"; + } + } } Modified: trunk/plugins/VeraControl/DeviceGeneric.cs =================================================================== --- trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -14,132 +14,157 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceGeneric. - /// </summary> - public class DeviceGeneric : BaseDevice - { - private string _altId = ""; - private int _category = 0; - - public DeviceGeneric(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _altId = _helper.GetAttrAsString(xn, "altid", _altId); - _category = _helper.GetAttrAsInt (xn, "category", _category); - - bool b = base.Update(xn); - // Make sure the room exists - if (room == 0 || !_vera.status.IsRoomFound(room)) - { - if (!_vera.status.IsRoomFound(0)) - { // create dummy room to attach to - _vera.rooms.Add(new Room(null)); - } - room = 0; - } + /// <summary> + /// Description of DeviceGeneric. + /// </summary> + public class DeviceGeneric : BaseDevice + { + private string _altId = ""; + private int _category = 0; + private int _stepsize = 0; + + public DeviceGeneric(XmlNode xn): base (xn) + { + if (xn != null) + { + Update(xn); + if (maxLevel > 0 && minLevel >= 0) + { + _stepsize = (int)Math.Max(1, Math.Round((decimal)((maxLevel - minLevel) / 10))); + } + } + } + + public override bool Update(XmlNode xn) + { + _altId = _helper.GetAttrAsString(xn, "altid", _altId); + _category = _helper.GetAttrAsInt (xn, "category", _category); + + bool b = base.Update(xn); + // Make sure the room exists + if (room == 0 || !_vera.status.IsRoomFound(room)) + { + if (!_vera.status.IsRoomFound(0)) + { // create dummy room to attach to + _vera.rooms.Add(new Room(null)); + } + room = 0; + } + return b; + } + + public string altid + { + get { return _altId; } + } + + public int category + { + get { return _category; } + } + + public virtual bool isControllable + { + get { return false; } + set { } + } + + public virtual bool status + { + get { return false; } + set { } + } + + public virtual int level + { + get { return 0; } + set { } + } - return b; - } - - public string altid - { - get { return _altId; } - set { } - } - - public int category - { - get { return _category; } - set { } - } - - public virtual bool isControllable - { - get { return false; } - set { } - } - - public virtual bool status - { - get { return false; } - set { } - } - - public virtual int level - { - get { return 0; } - set { } - } - - public virtual string mode - { - get { return ""; } - set { } - } - - public virtual int maxLevel - { - get { return -1; } - set { } - } - public virtual int minLevel - { - get { return 0; } - set { } - } - - public override string GetIconName() - { - return "generic_sensor"; - } - - public override string GetStatusText() - { - return ""; - } - - public virtual string GetExtraText() - { - return ""; - } + public virtual int stepSize + { + get { return _stepsize; } + set { _stepsize = value; } + } - public virtual string [] GetCommands() - { - return new string [] {"Off", "On"}; - } - - // Overridables for Cam Device - public virtual void MoveUp() - { - // do nothing - } - public virtual void MoveLeft() - { - // do nothing - } - public virtual void MoveRight() - { - // do nothing - } - public virtual void MoveDown() - { - // do nothing - } - public virtual void ZoomIn() - { - // do nothing - } - public virtual void ZoomOut() - { - // do nothing - } - } + public virtual void IncreaseLevel() + { + if (stepSize > 0) + { + level += stepSize; + } + } + + public virtual void DecreaseLevel() + { + if (stepSize > 0) + { + level -= stepSize; + } + } + + public virtual string mode + { + get { return ""; } + set { } + } + + public virtual int maxLevel + { + get { return -1; } + set { } + } + + public virtual int minLevel + { + get { return 0; } + set { } + } + + public override string GetIconName() + { + return "generic_sensor"; + } + + public override string GetStatusText() + { + return ""; + } + + public virtual string GetExtraText() + { + return ""; + } + + public virtual string [] GetCommands() + { + return new string [] {"Off", "On"}; + } + + // Overridables for Cam Device + public virtual void MoveUp() + { + // do nothing + } + public virtual void MoveLeft() + { + // do nothing + } + public virtual void MoveRight() + { + // do nothing + } + public virtual void MoveDown() + { + // do nothing + } + public virtual void ZoomIn() + { + // do nothing + } + public virtual void ZoomOut() + { + // do nothing + } + } } Modified: trunk/plugins/VeraControl/DeviceHumidity.cs =================================================================== --- trunk/plugins/VeraControl/DeviceHumidity.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceHumidity.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,52 +13,52 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceHumidity. - /// </summary> - public class DeviceHumidity : DeviceGeneric - { - private int _level = 0; - - public DeviceHumidity(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _level = _helper.GetAttrAsInt(xn, "humidity", _level); - return base.Update(xn); - } - - public override int level - { - get { return _level; } - set {} - } - - public override int maxLevel - { - get { return 100; } - set { } - } - - public override string ToString() - { - return name + " [" + level.ToString() + "%]"; - } - - public override string GetIconName() - { - return "Humidity_Sensor"; - } - - public override string GetStatusText() - { - return level + "%"; - } - } + /// <summary> + /// Description of DeviceHumidity. + /// </summary> + public class DeviceHumidity : DeviceGeneric + { + private int _level = 0; + + public DeviceHumidity(XmlNode xn) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _level = _helper.GetAttrAsInt(xn, "humidity", _level); + return base.Update(xn); + } + + public override int level + { + get { return _level; } + set {} + } + + public override int maxLevel + { + get { return 100; } + set { } + } + + public override string ToString() + { + return name + " [" + level.ToString() + "%]"; + } + + public override string GetIconName() + { + return "Humidity_Sensor"; + } + + public override string GetStatusText() + { + return level + "%"; + } + } } Modified: trunk/plugins/VeraControl/DeviceLightSensor.cs =================================================================== --- trunk/plugins/VeraControl/DeviceLightSensor.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceLightSensor.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,59 +13,59 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceLightSensor. - /// </summary> - public class DeviceLightSensor : DeviceGeneric - { - private int _level = 0; - - public DeviceLightSensor(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _level = _helper.GetAttrAsInt(xn, "level", _level); - _level = _helper.GetAttrAsInt(xn, "light", _level); - return base.Update(xn); - } - - public override bool status - { - get { return (_level > 0); } - set { } - } - - public override int level - { - get { return _level; } - set { } - } - - public override int maxLevel - { - get { return 100; } - set { } - } + /// <summary> + /// Description of DeviceLightSensor. + /// </summary> + public class DeviceLightSensor : DeviceGeneric + { + private int _level = 0; + + public DeviceLightSensor(XmlNode xn) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _level = _helper.GetAttrAsInt(xn, "level", _level); + _level = _helper.GetAttrAsInt(xn, "light", _level); + return base.Update(xn); + } + + public override bool status + { + get { return (_level > 0); } + set { } + } + + public override int level + { + get { return _level; } + set { } + } + + public override int maxLevel + { + get { return 100; } + set { } + } - public override string ToString() - { - return name + " [" + GetStatusText() + "]"; - } - - public override string GetIconName() - { - return "Light_Sensor"; - } - - public override string GetStatusText() - { - return level.ToString() + "%"; - } - } + public override string ToString() + { + return name + " [" + GetStatusText() + "]"; + } + + public override string GetIconName() + { + return "Light_Sensor"; + } + + public override string GetStatusText() + { + return level.ToString() + "%"; + } + } } Modified: trunk/plugins/VeraControl/DevicePowerMeter.cs =================================================================== --- trunk/plugins/VeraControl/DevicePowerMeter.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DevicePowerMeter.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,71 +13,71 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DevicePowerMeter. - /// </summary> - public class DevicePowerMeter : DeviceGeneric - { - private int _level = 0; - private string _kwh = ""; - - public DevicePowerMeter(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _level = _helper.GetAttrAsInt (xn, "watts", _level); - _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); - return base.Update(xn); - } - - public string watts - { - get { return _level.ToString(); } - set { } - } - - public override bool status - { - get { return (_level > 0); } - set { } - } - - public override int level - { - get { return _level; } - set { } - } - - public override int maxLevel - { - get { return 1000; } - set { } - } - - public override string ToString() - { - return name + " [" + GetStatusText() + "]"; - } - - public override string GetIconName() - { - return "Power_Meter"; - } - - public override string GetExtraText() - { - return (_kwh != "" ? _kwh + "kWh" : ""); - } - - public override string GetStatusText() - { - return level.ToString() + "W"; - } - } + /// <summary> + /// Description of DevicePowerMeter. + /// </summary> + public class DevicePowerMeter : DeviceGeneric + { + private int _level = 0; + private string _kwh = ""; + + public DevicePowerMeter(XmlNode xn) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _level = _helper.GetAttrAsInt (xn, "watts", _level); + _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); + return base.Update(xn); + } + + public string watts + { + get { return _level.ToString(); } + set { } + } + + public override bool status + { + get { return (_level > 0); } + set { } + } + + public override int level + { + get { return _level; } + set { } + } + + public override int maxLevel + { + get { return 1000; } + set { } + } + + public override string ToString() + { + return name + " [" + GetStatusText() + "]"; + } + + public override string GetIconName() + { + return "Power_Meter"; + } + + public override string GetExtraText() + { + return (_kwh != "" ? _kwh + "kWh" : ""); + } + + public override string GetStatusText() + { + return level.ToString() + "W"; + } + } } Modified: trunk/plugins/VeraControl/DeviceSceneController.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSceneController.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceSceneController.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -11,60 +11,60 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceSceneController. - /// </summary> - public class DeviceSceneController: DeviceGeneric - { - private bool _isTripped = false; - - public DeviceSceneController( XmlNode xn ): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _isTripped = _helper.GetAttrAsBool(xn, "status", _isTripped); - _isTripped = _helper.GetAttrAsBool(xn, "tripped", _isTripped); - return base.Update(xn); - } - - public override bool status - { - get { return _isTripped; } - set { } - } - - public bool isTripped - { - get { return _isTripped; } - set { } - } - - public override int level - { - get { return (_isTripped ? 1 : 0); } - set { } - } - - public override string ToString() - { - return name + " [" + GetStatusText() + "]"; - } - - public override string GetIconName() - { - return "Motion_Sensor_" + (_isTripped ? "100" : "0"); - } - - public override string GetStatusText() - { - return (status ? "ACTIVE" : "standby"); - } + /// <summary> + /// Description of DeviceSceneController. + /// </summary> + public class DeviceSceneController: DeviceGeneric + { + private bool _isTripped = false; + + public DeviceSceneController( XmlNode xn ) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _isTripped = _helper.GetAttrAsBool(xn, "status", _isTripped); + _isTripped = _helper.GetAttrAsBool(xn, "tripped", _isTripped); + return base.Update(xn); + } + + public override bool status + { + get { return _isTripped; } + set { } + } + + public bool isTripped + { + get { return _isTripped; } + set { } + } + + public override int level + { + get { return (_isTripped ? 1 : 0); } + set { } + } + + public override string ToString() + { + return name + " [" + GetStatusText() + "]"; + } + + public override string GetIconName() + { + return "Motion_Sensor_" + (_isTripped ? "100" : "0"); + } + + public override string GetStatusText() + { + return (status ? "ACTIVE" : "standby"); + } - } + } } Modified: trunk/plugins/VeraControl/DeviceSecurity.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSecurity.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceSecurity.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -14,85 +14,87 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceSecurity. - /// </summary> - public class DeviceSecurity : DeviceGeneric - { - private bool _isTripped = false; - private bool _isArmed = true; - - public DeviceSecurity(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _isTripped = _helper.GetAttrAsBool(xn, "tripped", _isTripped); - _isArmed = _helper.GetAttrAsBool(xn, "armed", _isArmed); - return base.Update(xn); - } - - public override bool status - { - get { return _isArmed; } - set { - if (id > 0) // Only send when a valid ID is found - { - ReportPendingRequest(); - // Do something with vera - string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ - "&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&action=SetArmed" + - "&newArmedValue=" + (value ? "1" : "0"); - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - } - } - - public bool isTripped - { - get { return _isTripped; } - set { } - } - - public override int level - { - get { return (_isArmed ? 1 : 0); } - set { status = (value > 0); } - } - - public override int maxLevel - { - get { return 1; } - set { } - } - public override bool isControllable - { - get { return true; } - set { } - } - public override string ToString() - { - return name + " [" + GetStatusText() + "]"; - } - - public override string GetIconName() - { - return "Motion_Sensor_" + (_isTripped ? "100" : "0"); - } - - public override string GetStatusText() - { - return (status ? ( isTripped ? "TRIPPED" : "standby") : "bypass"); - } + /// <summary> + /// Description of DeviceSecurity. + /// </summary> + public class DeviceSecurity : DeviceGeneric + { + private bool _isTripped = false; + private bool _isArmed = true; + + public DeviceSecurity(XmlNode xn) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _isTripped = _helper.GetAttrAsBool(xn, "tripped", _isTripped); + _isArmed = _helper.GetAttrAsBool(xn, "armed", _isArmed); + return base.Update(xn); + } + + public override bool status + { + get { return _isArmed; } + set { + if (id > 0) // Only send when a valid ID is found + { + ReportPendingRequest(); + // Do something with vera + string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ + "&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&action=SetArmed" + + "&newArmedValue=" + (value ? "1" : "0"); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + } + } + + public bool isTripped + { + get { return _isTripped; } + set { } + } + + public override int level + { + get { return (_isArmed ? 1 : 0); } + set { status = (value > 0); } + } + + public override int maxLevel + { + get { return 1; } + set { } + } - public override string [] GetCommands() - { - return new string [] {"Bypass", "Arm"}; - } - } + public override bool isControllable + { + get { return true; } + set { } + } + + public override string ToString() + { + return name + " [" + GetStatusText() + "]"; + } + + public override string GetIconName() + { + return "Motion_Sensor_" + (_isTripped ? "100" : "0"); + } + + public override string GetStatusText() + { + return (status ? ( isTripped ? "TRIPPED" : "standby") : "bypass"); + } + + public override string [] GetCommands() + { + return new string [] {"Bypass", "Arm"}; + } + } } Modified: trunk/plugins/VeraControl/DeviceSprinkler.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSprinkler.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceSprinkler.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -14,108 +14,108 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceSprinkler. - /// </summary> - public class DeviceSprinkler : DeviceGeneric - { - private bool _status = false; - private string _mode = "-"; - private string _shortMode = "-"; - private string _operationMode = "-"; - private string _condition = "-"; - - public DeviceSprinkler(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _status = _helper.GetAttrAsBool (xn, "status", _status); - _mode = _helper.GetAttrAsString(xn, "Mode", _mode); - _shortMode = _helper.GetAttrAsString(xn, "ShortMode", _shortMode); - _operationMode = _helper.GetAttrAsString(xn, "OperationMode", _operationMode); - _condition = _helper.GetAttrAsString(xn, "Condition", _condition); - return base.Update(xn); - } - - public override bool status - { - get { return _status; } - set { - if (id > 0) // Only send when a valid ID is found - { - ReportPendingRequest(); - // Do something with vera - string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ - "&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget" + - "&newTargetValue="+(value ? "1" : "0"); - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - } - } - - public override int level - { - get { return (_status ? 1 : 0); } - set { status = (value > 0); } - } + /// <summary> + /// Description of DeviceSprinkler. + /// </summary> + public class DeviceSprinkler : DeviceGeneric + { + private bool _status = false; + private string _mode = "-"; + private string _shortMode = "-"; + private string _operationMode = "-"; + private string _condition = "-"; + + public DeviceSprinkler(XmlNode xn) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _status = _helper.GetAttrAsBool (xn, "status", _status); + _mode = _helper.GetAttrAsString(xn, "Mode", _mode); + _shortMode = _helper.GetAttrAsString(xn, "ShortMode", _shortMode); + _operationMode = _helper.GetAttrAsString(xn, "OperationMode", _operationMode); + _condition = _helper.GetAttrAsString(xn, "Condition", _condition); + return base.Update(xn); + } + + public override bool status + { + get { return _status; } + set { + if (id > 0) // Only send when a valid ID is found + { + ReportPendingRequest(); + // Do something with vera + string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ + "&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget" + + "&newTargetValue="+(value ? "1" : "0"); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + } + } + + public override int level + { + get { return (_status ? 1 : 0); } + set { status = (value > 0); } + } - public override string mode - { - get { return _mode; } - set { - if (id > 0) // Only send when a valid ID is found - { - ReportPendingRequest(); - // Do something with vera - string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ - "&serviceId=urn:upnp-micasaverde-com:serviceId:Sprinkler1&action=" + - (value == "Auto" ? "SetModeAuto" : (value == "Block" ? "SetModeBlock" : "SetModeManual")); - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - } - } - - public override string ToString() - { - return name + " [" + _shortMode + "]"; - } - - public override bool isControllable - { - get { return true; } - set { } - } - - public override int maxLevel - { - get { return 1; } - set { } - } - - public override string GetIconName() - { - return "Sprinkler"; - } - - public override string GetStatusText() - { - return _operationMode.Replace("_", " "); - } - - public override string GetExtraText() - { - return _condition; - } + public override string mode + { + get { return _mode; } + set { + if (id > 0) // Only send when a valid ID is found + { + ReportPendingRequest(); + // Do something with vera + string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ + "&serviceId=urn:upnp-micasaverde-com:serviceId:Sprinkler1&action=" + + (value == "Auto" ? "SetModeAuto" : (value == "Block" ? "SetModeBlock" : "SetModeManual")); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + } + } + + public override string ToString() + { + return name + " [" + _shortMode + "]"; + } + + public override bool isControllable + { + get { return true; } + set { } + } + + public override int maxLevel + { + get { return 1; } + set { } + } + + public override string GetIconName() + { + return "Sprinkler"; + } + + public override string GetStatusText() + { + return _operationMode.Replace("_", " "); + } + + public override string GetExtraText() + { + return _condition; + } - public override string [] GetCommands() - { - return new string [] {"Off", "On", "Auto", "Block", "Manual"}; - } - } + public override string [] GetCommands() + { + return new string [] {"Off", "On", "Auto", "Block", "Manual"}; + } + } } Modified: trunk/plugins/VeraControl/DeviceSwitch.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSwitch.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceSwitch.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -13,90 +13,90 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceSwitch. - /// </summary> - public class DeviceSwitch : DeviceGeneric - { - private bool _status = false; - private string _watt = "-"; - private string _kwh = "-"; - - public DeviceSwitch(XmlNode xn): base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - public override bool Update(XmlNode xn) - { - _status = _helper.GetAttrAsBool (xn, "status", _status); - _watt = _helper.GetAttrAsString(xn, "watts", _watt); - _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); - - return base.Update(xn); - } - - public string watts - { - get { return _watt; } - set { } - } - - public override bool status - { - get { return _status; } - set { - if (id > 0) // Only send when a valid ID is found - { - ReportPendingRequest(); - // Do something with vera - string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ - "&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget" + - "&newTargetValue="+(value ? "1" : "0"); - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - } - } - - public override int level - { - get { return (_status ? 1 : 0); } - set { status = (value > 0); } - } - - public override int maxLevel - { - get { return 1; } - set { } - } - - public override string ToString() - { - return name + " [" + GetStatusText()+ "]"; - } - - public override bool isControllable - { - get { return true; } - set { } - } - - public override string GetIconName() - { - return "Binary_Light_" + (_status ? "100" : "0"); - } - - public override string GetExtraText() - { - return (_kwh != "" ? _kwh + "kWh" : ""); - } - - public override string GetStatusText() - { - return (status ? "On" : "Off"); - } - } + /// <summary> + /// Description of DeviceSwitch. + /// </summary> + public class DeviceSwitch : DeviceGeneric + { + private bool _status = false; + private string _watt = "-"; + private string _kwh = "-"; + + public DeviceSwitch(XmlNode xn) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + public override bool Update(XmlNode xn) + { + _status = _helper.GetAttrAsBool (xn, "status", _status); + _watt = _helper.GetAttrAsString(xn, "watts", _watt); + _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); + + return base.Update(xn); + } + + public string watts + { + get { return _watt; } + set { } + } + + public override bool status + { + get { return _status; } + set { + if (id > 0) // Only send when a valid ID is found + { + ReportPendingRequest(); + // Do something with vera + string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ + "&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget" + + "&newTargetValue="+(value ? "1" : "0"); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + } + } + + public override int level + { + get { return (_status ? 1 : 0); } + set { status = (value > 0); } + } + + public override int maxLevel + { + get { return 1; } + set { } + } + + public override string ToString() + { + return name + " [" + GetStatusText()+ "]"; + } + + public override bool isControllable + { + get { return true; } + set { } + } + + public override string GetIconName() + { + return "Binary_Light_" + (_status ? "100" : "0"); + } + + public override string GetExtraText() + { + return (_kwh != "" ? _kwh + "kWh" : ""); + } + + public override string GetStatusText() + { + return (status ? "On" : "Off"); + } + } } Modified: trunk/plugins/VeraControl/DeviceSystem.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSystem.cs 2012-01-28 09:50:54 UTC (rev 4427) +++ trunk/plugins/VeraControl/DeviceSystem.cs 2012-01-28 20:18:43 UTC (rev 4428) @@ -12,174 +12,174 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of DeviceSystem. - /// </summary> - public class DeviceSystem - { - public DeviceSystem() - { - } - - public VeraHelper _helper = VeraHelper.Instance; - - public long _lastUpdate = 0; - public bool _screenUpdateRequired = false; - private bool _fullReload = true; - private string _version = ""; - private string _model = ""; - private bool _zWaveHeal = false; - private bool _metric = true; - private string _serial = ""; - private string _fwd1Server = ""; - private string _fwd2Server = ""; - private string _loadTime = "0"; - private string _dataVersion = "0"; - private string _comment = ""; - private DevState _dsVeraState = DevState.NONE; - - - public bool update(XmlNode xn) - { - _fullReload = _helper.GetAttrAsBool (xn, "full", _fullReload); - _version = _helper.GetAttrAsString (xn, "version", _version); - _model = _helper.GetAttrAsString (xn, "model", _model); - _zWaveHeal = _helper.GetAttrAsBool (xn, "zwave_heal", _zWaveHeal); - _serial = _helper.GetAttrAsString (xn, "serial_number", _serial); - _fwd1Server = _helper.GetAttrAsString (xn, "fwd1", _fwd1Server); - _fwd2Server = _helper.GetAttrAsString (xn, "fwd2", _fwd2Server); - _loadTime = _helper.GetAttrAsString (xn, "loadtime", _loadTime); - - // Set update flag - string tempDataversion = _helper.GetAttrAsString (xn, "dataversion", _dataVersion); - DevState tempVeraState = _helper.ToDevState(_helper.GetAttrAsInt(xn, "state", -1)); - string tempComment = _helper.GetAttrAsString (xn, "comment", ""); - - if ((_dataVersion != tempDataversion) || _comment != tempComment || _dsVeraState != tempVeraState) - { - _screenUpdateRequired = true; - _lastUpdate = DateTime.Now.Ticks; - } - _dataVersion = tempDataversion; - _dsVeraState = tempVeraState; - _comment = tempComment; - - _dsVeraState = _helper.ToDevState(_helper.GetAttrAsInt(xn, "state", -1)); - _comment = _helper.GetAttrAsString (xn, "comment", ""); - _metric = (_helper.GetAttrAsString(xn, "temperature", "C") == "C"); - - return true; - } - - public void ClearFullReloadFlag() - { - _fullReload = false; - } - - public void SetFullReloadFlag() - { - _fullReload = true; - } - public bool fullReload - { - get { return _fullReload; } - set { } - } - - public string versionInfo - { - get { return _model + " " + _version; } - set { } - } - - public bool zWaveHeal - { - get { return _zWaveHeal; } - set { } - } - - public string serialno - { - get { return _serial; } - set { } - } + /// <summary> + /// Description of DeviceSystem. + /// </summary> + public class DeviceSystem + { + public DeviceSystem() + { + } + + public VeraHelper _helper = VeraHelper.Instance; + + public long _lastUpdate = 0; + public bool _screenUpdateRequired = false; + private bool _fullReload = true; + private string _version = ""; + private string _model = ""; + private bool _zWaveHeal = false; + private bool _metric = true; + private string _serial = ""; + private string _fwd1Server = ""; + private string _fwd2Server = ""; + private string _loadTime = "0"; + ... [truncated message content] |
From: <hor...@us...> - 2012-01-28 09:51:02
|
Revision: 4427 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4427&view=rev Author: horned-reaper Date: 2012-01-28 09:50:54 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat trunk/plugins/FritzBox/Build/Build.log trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb 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/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/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/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/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/Build/Commit FritzBoxManager.bat 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_v0.4.1.4426.mpe1 Removed Paths: ------------- 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 FritzBoxManager.bat =================================================================== --- trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat 2012-01-28 08:48:41 UTC (rev 4426) +++ trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat 2012-01-28 09:50:54 UTC (rev 4427) @@ -3,5 +3,65 @@ D: cd \FritzBox\Build +REM Set program path based on current machine environment +set ProgramDir=%ProgramFiles% +if not "%ProgramFiles(x86)%".=="". set ProgramDir=%ProgramFiles(x86)% + +REM Set build path +set BuildPath=..\FritzBox\bin\Release + +REM Set plugin DLL path +set PluginDLL=%BuildPath%\FritzBox.dll + +REM Set log file where the infos are written to, and clear that file +set LOG=Build.log +echo. > %LOG% + +echo. +echo -= Build FRITZ!Box Manager =- +echo -===========================- +echo. + +echo. echo Updating SVN path... -TortoiseProc.exe /path:".." /command:commit /closeonend:1 +TortoiseProc.exe /path:".." /command:update /closeonend:1 + +echo. +echo Writing SVN revision assemblies... +DeployVersionSVN.exe /svn=".." >> %LOG% + +echo. +echo Building FRITZ!Box Manager... +"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;AllowUnsafeBlocks=true "..\FritzBox.sln" >> %LOG% + +echo. +echo Reverting assemblies... +DeployVersionSVN.exe /svn=".." /revert >> %LOG% + +rmdir /S /Q ..\_release +xcopy "%PluginDLL%" ..\_release\plugins\windows\ >> %LOG% +xcopy ..\FritzBox\Resources\speexdec.exe ..\_release\base\ >> %LOG% +xcopy ..\FritzBox\Skin ..\_release\skin /S /I >> %LOG% +xcopy ..\FritzBox\Languages ..\_release\language /S /I >> %LOG% + +echo. +echo Reading the version number... +if not exist "%PluginDLL%" goto version_error +for /f "Tokens=5" %%a in ('filever "%PluginDLL%"') do set version=%%a +goto :version_done +:version_error +echo FritzBox.dll not found. version could not be read >> %LOG% +echo FritzBox.dll not found. version could not be read. Build is cancelled +pause +goto :EOF +:version_done + +echo. +echo Building MpeExtension package including update.xml... +del "..\MpeRelease\update.xml" /Q +"%ProgramDir%\Team MediaPortal\MediaPortal\MpeMaker.exe" "..\MpeRelease\FritzBox.xmp2" /V=%version% /B /UpdateXML >> %LOG% + +echo. +echo Move installer and update.xml files to the releases folder +move /Y "..\MpeRelease\FritzBox.mpe1" "..\releases\FritzBox_v%Version%.mpe1" +move /Y "..\MpeRelease\update.xml" "..\releases\update.xml" Modified: trunk/plugins/FritzBox/Build/Build.log =================================================================== --- trunk/plugins/FritzBox/Build/Build.log 2012-01-28 08:48:41 UTC (rev 4426) +++ trunk/plugins/FritzBox/Build/Build.log 2012-01-28 09:50:54 UTC (rev 4427) @@ -1,6 +1,6 @@ Running : C:\Program Files\TortoiseSVN\bin\SubWCRev.exe -SVN Version: 4415 +SVN Version: 4426 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 21.01.2012 11:32:07. +Build started 28.01.2012 10:49:53. Project "D:\FritzBox\FritzBox.sln" on node 1 (Rebuild target(s)). ValidateSolutionConfiguration: Building solution configuration "Release|Mixed Platforms". @@ -195,7 +195,7 @@ 0 Warning(s) 0 Error(s) -Time Elapsed 00:00:02.53 +Time Elapsed 00:00:03.29 Reverting to build 0 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs @@ -280,7 +280,7 @@ ..\FritzBox\Languages\Unsupported\strings_zh-CN.xml 36 File(s) copied MpeMaker version: 1.2.1.0 -Build started at 11:32:12 +Build started at 10:50:00 Building "D:\FritzBox\MpeRelease\FritzBox.xmp2" Output: "..\MpeRelease\FritzBox.mpe1" Writing UpdateXML to "update.xml" Added: trunk/plugins/FritzBox/Build/Commit FritzBoxManager.bat =================================================================== --- trunk/plugins/FritzBox/Build/Commit FritzBoxManager.bat (rev 0) +++ trunk/plugins/FritzBox/Build/Commit FritzBoxManager.bat 2012-01-28 09:50:54 UTC (rev 4427) @@ -0,0 +1,12 @@ +@echo off + +D: +cd \FritzBox\Build + +echo. +echo -= Commit FRITZ!Box Manager =- +echo -============================- +echo. + +echo Committing SVN path... +TortoiseProc.exe /path:".." /command:commit /closeonend:1 Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 =================================================================== --- trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-28 08:48:41 UTC (rev 4426) +++ trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-28 09:50:54 UTC (rev 4427) @@ -559,7 +559,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4415</DesignedForVersion> + <DesignedForVersion>1.1.7.4426</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -582,7 +582,7 @@ <Major>0</Major> <Minor>4</Minor> <Build>1</Build> - <Revision>4415</Revision> + <Revision>4426</Revision> </Version> <ExtensionDescription>With FRITZ!Box Manager you can access several AVM FRITZ!Box informations from MediaPortal. @@ -596,7 +596,7 @@ <VersionDescription /> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>http://www.team-mediaportal.com/index.php?option=com_mtree&task=att_download&link_id=118&cf_id=24</OnlineLocation> - <ReleaseDate>2012-01-21T11:32:12.5286188+01:00</ReleaseDate> + <ReleaseDate>2012-01-28T10:50:00.643857+01:00</ReleaseDate> <Tags>fritzbox, fritzbox manager, callmonitor</Tags> <Location>..\MpeRelease\FritzBox.mpe1</Location> <Params> Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/ResolveAssemblyReference.cache =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.csproj.FileListAbsolute.txt =================================================================== --- trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.csproj.FileListAbsolute.txt 2012-01-28 08:48:41 UTC (rev 4426) +++ trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.csproj.FileListAbsolute.txt 2012-01-28 09:50:54 UTC (rev 4427) @@ -23,5 +23,5 @@ D:\FritzBox\Tools\FritzBoxDebugger\bin\Release\log4net.dll D:\FritzBox\Tools\FritzBoxDebugger\bin\Release\Ionic.Zip.dll D:\FritzBox\Tools\FritzBoxDebugger\bin\Release\FritzBox.pdb -D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource.read.6.tlog -D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource.write.6.tlog +D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource.read.7.tlog +D:\FritzBox\Tools\FritzBoxDebugger\obj\Release\GenerateResource.write.7.tlog Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Deleted: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.read.6.tlog =================================================================== (Binary files differ) Added: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.read.7.tlog =================================================================== (Binary files differ) Property changes on: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.read.7.tlog ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.write.6.tlog =================================================================== (Binary files differ) Added: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.write.7.tlog =================================================================== (Binary files differ) Property changes on: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/GenerateResource.write.7.tlog ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/FritzBox/releases/FritzBox_v0.4.1.4426.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/FritzBox/releases/FritzBox_v0.4.1.4426.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/FritzBox/releases/update.xml =================================================================== --- trunk/plugins/FritzBox/releases/update.xml 2012-01-28 08:48:41 UTC (rev 4426) +++ trunk/plugins/FritzBox/releases/update.xml 2012-01-28 09:50:54 UTC (rev 4427) @@ -88,7 +88,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4415</DesignedForVersion> + <DesignedForVersion>1.1.7.4426</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -111,7 +111,7 @@ <Major>0</Major> <Minor>4</Minor> <Build>1</Build> - <Revision>4415</Revision> + <Revision>4426</Revision> </Version> <ExtensionDescription>With FRITZ!Box Manager you can access several AVM FRITZ!Box informations from MediaPortal. @@ -125,7 +125,7 @@ <VersionDescription /> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>http://www.team-mediaportal.com/index.php?option=com_mtree&task=att_download&link_id=118&cf_id=24</OnlineLocation> - <ReleaseDate>2012-01-21T11:32:12.5286188+01:00</ReleaseDate> + <ReleaseDate>2012-01-28T10:50:00.643857+01:00</ReleaseDate> <Tags>fritzbox, fritzbox manager, callmonitor</Tags> <Location>..\MpeRelease\FritzBox.mpe1</Location> <Params> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hor...@us...> - 2012-01-28 08:48:48
|
Revision: 4426 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4426&view=rev Author: horned-reaper Date: 2012-01-28 08:48:41 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/FritzBox/Docs/Ausstehend.txt trunk/plugins/FritzBox/Docs/Changes.txt trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs trunk/plugins/FritzBox/FritzBox/FritzManager/VBReader.cs trunk/plugins/FritzBox/FritzBox/FritzManager/VoiceboxItem.cs trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml trunk/plugins/FritzBox/FritzBox/Settings.cs trunk/plugins/FritzBox/FritzBox/Skin/Black & White/FritzManager.xml trunk/plugins/FritzBox/FritzBox/Skin/Blue3/FritzManager.xml trunk/plugins/FritzBox/FritzBox/Skin/Default/FritzManager.xml trunk/plugins/FritzBox/FritzBox/Skin/DefaultWide/FritzManager.xml trunk/plugins/FritzBox/FritzBox/Skin/Maya/FritzManager.xml trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb 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/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/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/obj/Debug/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.pdb Modified: trunk/plugins/FritzBox/Docs/Ausstehend.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-01-28 08:48:41 UTC (rev 4426) @@ -1,17 +1,14 @@ -Testen: -Einen kleinen Bug habe ich auch gefunden: Ich wollte gerade unter MyTVSeries die Sendung einer Serie weiterschauen - es wurde der Dialog angezeigt ob man die Folge bei Stelle X fortsetzen m\xF6chte - in diesem Moment kam ein Anruf - nach Beendigung des Anrufs wurde die Sendung dann automatisch gestartet/fortgesetzt - Fehler beheben: +- ein kleiner schwarzer Balken \xFCberdeckt das erste Zeichen oder die erste Ziffer zur H\xE4lfte - auch bei einem "Unbekannten Anrufer" (unterdr\xFCckte bzw. nicht \xFCbertragene Rufnummer) \xF6ffnet sich \xFCber das Kontextrufen "zur\xFCckrufen". Sollte man deaktivieren - ObjectDisposed-Exception bei Client-Stop -- ein kleiner schwarzer Balken \xFCberdeckt das erste Zeichen oder die erste Ziffer zur H\xE4lfte -- Problem beim Laden gro\xDFer meta0-Dateien, siehe "Problembeschreibung 1.txt" +- Localization fehlt noch im StreamedMP-Skin Optimierungen: - btnModus umbenennen? - blauer Hintergrund f\xFCr Default und DefaultWide Skins - GUI-Properties \xFCberpr\xFCfen und Dokumentation vervollst\xE4ndigen -- vertrauliche Daten im Log trotz "Extensive Logging"-Einstellung +- Einstellungen-Eintr\xE4ge in XML-Datei in Kategorie "FRITZ"Box Manager" zusammenfassen Neue Funktionen/Erweiterungen: - Rufnummer-Typ hinzuf\xFCgen @@ -27,9 +24,12 @@ - wenn m\xF6glich GUI-Telefonbuch (und edit Phonebook) nach Kontakt gruppieren - Bei Anrufbenachrichtigungen: Auflistung von Kontaktnamen wenn eine Rufnummer mehrmals im Telefonbuch vorkommt - Verbindungstest um Login, Anruflisten- und Telefonbuch-Download erweitern +- Klingelton solange wiederholen bis H\xF6rer abgenommen wird -Anwenderw\xFCnsche: +Anwenderw\xFCnsche +--------------- + IchBinsShort, 05.01.2012, 18:02: Noch eine andere Frage ist es auch m\xF6glich das bei ausgehenden Anrufen nur bei bestimmten Handger\xE4ten der Pause Befehl gesendet wird. Ich benutze drei Funktelefone \xFCber die Dect Funktion der Fritzbox 7020, Garten, Eltern und bei mir. W\xE4re also sch\xF6n wenn nur auf Pause gestellt wird wenn von meinem Telefon eine Anruf get\xE4tigt wird. Modified: trunk/plugins/FritzBox/Docs/Changes.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Changes.txt 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/Docs/Changes.txt 2012-01-28 08:48:41 UTC (rev 4426) @@ -0,0 +1,5 @@ +Fixed bugs: +- error in Russian localization +- FRITZ!Box 7390 specific + - contact images are not synchronized with FRITZ!Box + - voice box access doesn't work \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -66,16 +66,11 @@ private readonly List<CallAction> _notificationQueue = new List<CallAction>(); private bool _showNotification = true; private object _tempNotification; - private static bool windowIsDisplayed = false; - + //private static bool windowIsDisplayed = false; private int notificationCount = 0; #endregion Variables - #region Properties - - #endregion Variables - #region Private Functions/Methods private void OnStartExternal(Process proc, bool waitForExit) @@ -170,7 +165,7 @@ { Log.Info("Yet another dialog is active. Action is sent to queue"); - if (_actionList.Count < Settings.MaxNotifies - 1) _actionList.Add(callAction); + if (_actionList.Count < Settings.MaximumNotifications - 1) _actionList.Add(callAction); return; } @@ -253,9 +248,9 @@ if (callAction.Caller.PhoneNumber != "") { - if (phoneBookItem != null) strText += phoneBookItem.Name; + if (phoneBookItem != null) strText += phoneBookItem.Name + Environment.NewLine; - if (Settings.ShowPhoneNumberOnNotification) strText += Environment.NewLine + callAction.Caller.PhoneNumber; + if (Settings.ShowPhoneNumberOnNotification) strText += callAction.Caller.PhoneNumber; } else strText += GUILocalizeStrings.Get(3); // 3 = Unknown @@ -271,7 +266,7 @@ } } - #endregion + #endregion Private Functions/Methods #region Helper Methods @@ -298,9 +293,9 @@ private void showNotificationWindow(CallAction.CallType callType, string strHeading, string strImage, string strText) { bool resumePlayer = false; - - if (notificationCount >= Settings.MaxNotifies) return; + if (notificationCount >= Settings.MaximumNotifications) return; + if (!isMovingPicturesOrMPTVSeriesDialogOpened()) // this check avoids that the current movie starts when dialog asking if the movie shall be continued on the last position is opened { // pause player @@ -459,7 +454,7 @@ SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); // power changes } - #endregion + #endregion IPlugin Interface #region ISetupForm Member @@ -531,9 +526,9 @@ return true; } - #endregion + #endregion ISetupForm Member - #endregion + #endregion IPlugin Interface #region FritzManager @@ -541,8 +536,6 @@ #region Nested type: Filter - #endregion Nested type: Filter - #region Nested type: View private enum View @@ -552,10 +545,12 @@ LargeIcons = 2, } + #endregion Nested type: View + + #endregion Nested type: Filter + #endregion enums - #endregion FritzManager - #region skin [SkinControl(3)] @@ -581,7 +576,7 @@ private static System.Timers.Timer sessionTimer = new System.Timers.Timer(); // list of call items (callers) private List<CallItem> callItemList; - // state of facede view + // state of facade view private View currentView = View.List; // list of temporary files to delete private List<string> filesToDelete = new List<string>(); @@ -610,10 +605,22 @@ Log.Debug("Init called"); Start(); - //loadConfig(); return Load(GUIGraphicsContext.Skin + @"\FritzManager.xml"); } + + #region properties + + private static bool windowIsDisplayed + { + get + { + if (GUIWindowManager.ActiveWindow == thePlugin.GetWindowId()) return true; + else return false; + } + } + + #endregion properties private void startBackGroundWorker() { @@ -665,12 +672,12 @@ protected override void OnPageLoad() { - windowIsDisplayed = true; - showThumbPanel(); // display error on missing FRITZ!Box settings if (String.IsNullOrEmpty(Settings.Password) && String.IsNullOrEmpty(Settings.VBPath)) showError(GUILocalizeStrings.Get(24)); // 24 = FRITZ!Box password and voice box path are missing in settings! + + btnUpdate.Label = GUILocalizeStrings.Get(25); // 25 = Update RefreshView(Settings.CurrentMode); @@ -710,8 +717,6 @@ protected override void OnPageDestroy(int new_windowId) { - windowIsDisplayed = false; - CleanupTempFiles(); base.OnPageDestroy(new_windowId); } @@ -1030,10 +1035,6 @@ GUIPropertyManager.SetProperty("#FritzManager.TotalMessageCount", voiceBoxItemsCount.ToString()); } - - // set properties for skin file labels - GUIPropertyManager.SetProperty("#FritzManager.LabelCallList", GUILocalizeStrings.Get(18)); // 18 = Call list - GUIPropertyManager.SetProperty("#FritzManager.LabelUpdate", GUILocalizeStrings.Get(25)); // 25 = Update } catch (Exception e) { Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -79,6 +79,8 @@ this.updateInterval = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); this.checkBoxShowNotificationOnOutgoingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxShowNotificationOnIncomingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.label6 = new System.Windows.Forms.Label(); + this.textBoxNASShareName = new System.Windows.Forms.TextBox(); this.tabPageDiagnostics.SuspendLayout(); this.tabPagePhoneBook.SuspendLayout(); this.tabPageCallNotification.SuspendLayout(); @@ -326,7 +328,7 @@ // buttonMSNsRemove // this.buttonMSNsRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsRemove.Location = new System.Drawing.Point(387, 86); + this.buttonMSNsRemove.Location = new System.Drawing.Point(387, 91); this.buttonMSNsRemove.Name = "buttonMSNsRemove"; this.buttonMSNsRemove.Size = new System.Drawing.Size(63, 21); this.buttonMSNsRemove.TabIndex = 5; @@ -349,7 +351,7 @@ // buttonMSNsAdd // this.buttonMSNsAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsAdd.Location = new System.Drawing.Point(303, 89); + this.buttonMSNsAdd.Location = new System.Drawing.Point(303, 91); this.buttonMSNsAdd.Name = "buttonMSNsAdd"; this.buttonMSNsAdd.Size = new System.Drawing.Size(63, 21); this.buttonMSNsAdd.TabIndex = 4; @@ -486,6 +488,8 @@ // // tabPageConnection // + this.tabPageConnection.Controls.Add(this.label6); + this.tabPageConnection.Controls.Add(this.textBoxNASShareName); this.tabPageConnection.Controls.Add(this.dialPortNumericUpDown); this.tabPageConnection.Controls.Add(this.label2); this.tabPageConnection.Controls.Add(this.vBPath); @@ -716,6 +720,22 @@ this.checkBoxShowNotificationOnIncomingCall.Text = "Show notification on incoming call"; this.checkBoxShowNotificationOnIncomingCall.UseVisualStyleBackColor = true; // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(15, 260); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(87, 13); + this.label6.TabIndex = 35; + this.label6.Text = "NAS share name"; + // + // textBoxNASShareName + // + this.textBoxNASShareName.Location = new System.Drawing.Point(108, 257); + this.textBoxNASShareName.Name = "textBoxNASShareName"; + this.textBoxNASShareName.Size = new System.Drawing.Size(119, 20); + this.textBoxNASShareName.TabIndex = 34; + // // FritzBoxConfig // this.AcceptButton = this.okButton; @@ -812,5 +832,7 @@ private MediaPortal.UserInterface.Controls.MPNumericUpDown updateInterval; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnOutgoingCall; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnIncomingCall; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBoxNASShareName; } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -56,16 +56,18 @@ textBoxAddress.Text = FritzBoxClient.Address; numericUpDownPort.Value = FritzBoxClient.Port; passwd.Text = Settings.Password; - + dialPortNumericUpDown.Text = Settings.DialPort; vBPath.Text = Settings.VBPath; + textBoxNASShareName.Text = Settings.NASShareName; + // call notification settings checkBoxShowNotificationOnIncomingCall.Checked = Settings.ShowNotficationOnIncomingCall; checkBoxShowNotificationOnOutgoingCall.Checked = Settings.ShowNotficationOnOutgoingCall; - numericUpDownMaxNotifies.Value = Settings.MaxNotifies; + numericUpDownMaxNotifies.Value = Settings.MaximumNotifications; checkBoxCloseOnTimout.Checked = Settings.CloseNotificationOnTimeout; numericUpDownTimeout.Value = Settings.NotificationTimeout; checkBoxCloseOnConnectionClosed.Checked = Settings.CloseNotificationOnConnectionClosed; @@ -111,11 +113,13 @@ Settings.VBPath = vBPath.Text; + Settings.NASShareName = textBoxNASShareName.Text; + // call notification settings Settings.ShowNotficationOnIncomingCall = checkBoxShowNotificationOnIncomingCall.Checked; Settings.ShowNotficationOnOutgoingCall = checkBoxShowNotificationOnOutgoingCall.Checked; - Settings.MaxNotifies = (int)numericUpDownMaxNotifies.Value; + Settings.MaximumNotifications = (int)numericUpDownMaxNotifies.Value; Settings.CloseNotificationOnTimeout = checkBoxCloseOnTimout.Checked; Settings.NotificationTimeout = (int)numericUpDownTimeout.Value; Settings.CloseNotificationOnConnectionClosed = checkBoxCloseOnConnectionClosed.Checked; Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/CallAction.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -57,8 +57,8 @@ Log.Info(" CallType: {0}", Type.ToString()); Log.Info(" Date: {0}", Time.ToShortDateString()); Log.Info(" Time: {0}", Time.ToShortTimeString()); - Log.Info(" Caller: {0}", Caller.PhoneNumber); - Log.Info(" MSN: {0}", MSN); + if (Settings.ExtensiveLogging) Log.Info(" Caller: {0}", Caller.PhoneNumber); + if (Settings.ExtensiveLogging) Log.Info(" MSN: {0}", MSN); } } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -128,7 +128,7 @@ { if (_client != null) { - // Release the socket + // release the socket _client.Shutdown(SocketShutdown.Both); _client.Close(); } @@ -201,7 +201,7 @@ private static void Connect() { - // Enforce a minimum wait time between connects. + // enforce a minimum wait time between connects DateTime nextconnect = _connectionFailed.Add(minConnectWaitTime); if (DateTime.Now < nextconnect) @@ -215,20 +215,20 @@ { Log(LogLevel.Debug, "Connecting"); - // Establish the remote endpoint for the socket. + // establish the remote endpoint for the socket IPHostEntry ipHostInfo = Dns.GetHostEntry(Address); IPAddress ipAddress = ipHostInfo.AddressList[0]; IPEndPoint remoteEP = new IPEndPoint(ipAddress, Port); - // Create a TCP/IP socket. + // create a TCP/IP socket _client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); - // Connect to the remote endpoint. + // connect to the remote endpoint _client.BeginConnect(Address, Port, ConnectCallback, _client); Connected = true; - // Raise event + // raise event ConnectedEvent(); } catch (SocketException) @@ -251,10 +251,10 @@ { try { - // Retrieve the socket from the state object. + // retrieve the socket from the state object Socket client = (Socket)ar.AsyncState; - // Complete the connection. + // complete the connection client.EndConnect(ar); Log(LogLevel.Debug, "Socket connected to {0}", client.RemoteEndPoint.ToString()); @@ -276,11 +276,11 @@ { try { - // Create the state object. + // create the state object StateObject state = new StateObject(); state.workSocket = client; - // Begin receiving the data from the remote device. + // begin receiving the data from the remote device client.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReceiveCallback), state); } catch (SocketException ex) @@ -312,17 +312,16 @@ { try { - // Retrieve the state object and the client socket - // from the asynchronous state object. + // retrieve the state object and the client socket from the asynchronous state object StateObject state = (StateObject)ar.AsyncState; Socket client = state.workSocket; - // Read data from the remote device. + // read data from the remote device int bytesRead = client.EndReceive(ar); if (bytesRead > 0) { - // There might be more data, so store the data received so far. + // there might be more data, so store the data received so far string data = Encoding.ASCII.GetString(state.buffer, 0, bytesRead); Log(LogLevel.HeavyDebug, "ReceiveCallback : received data: {0}", data); Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/MyBinaryReader.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -1,32 +1,44 @@ -/* - * Erstellt mit SharpDevelop. - * Benutzer: sr - * Datum: 27.11.2009 - * Zeit: 11:54 - */ -using System.IO; +using System.IO; namespace FritzManager { - /// <summary> - /// Description of MyBinaryReader. - /// </summary> - public class MyBinaryReader : BinaryReader - { - public MyBinaryReader(Stream s) : base(s) + /// <summary> + /// Description of MyBinaryReader. + /// </summary> + public class MyBinaryReader : BinaryReader { - } + public MyBinaryReader(Stream s) : base(s) + { + } - public string ReadCString() - { - string res = ""; - while (true) - { - char ch = this.ReadChar(); - if (ch == '\0') break; - res += ch; - } - return res; + public bool BigEndianFormat; + + public string ReadCString() + { + string res = ""; + + while (true) + { + char ch = this.ReadChar(); + if (ch == '\0') break; + res += ch; + } + + return res; + } + + public override int ReadInt32() + { + if (!BigEndianFormat) + { + return base.ReadInt32(); + } + else + { + byte[] bytes = base.ReadBytes(4); + + return (int)(((bytes[3] | (bytes[2] << 8)) | (bytes[1] << 0x10)) | (bytes[0] << 0x18)); + } + } } - } -} \ No newline at end of file +} Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/PhoneBook.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -107,7 +107,14 @@ { lock (sync) { - phoneBook = InternalPhoneBook.loadPhoneBook(Settings.PhoneBookFilePath); + try + { + phoneBook = InternalPhoneBook.loadPhoneBook(Settings.PhoneBookFilePath); + } + catch (Exception e) + { + Log.Error("An error occured during phone book load: {0}", e.Message); + } } if (phoneBook.Count != 0) Log.Info("Loaded " + phoneBook.Count + " contacts from " + Settings.PhoneBookFilePath); @@ -353,7 +360,7 @@ if (fritz != null && fritz.LoggedIn) { // search contact images folder on the FRITZ!Box - if (contactImagesPathRemote == null) + if (contactImagesPathRemote == null && !String.IsNullOrEmpty(Settings.NASShareName)) { Log.Debug("Searching contact images folder on the FRITZ!Box"); @@ -364,10 +371,14 @@ if (!String.IsNullOrEmpty(phoneBookItem.ImageURL)) { contactImagePathRemote = phoneBookItem.ImageURL; - contactImagePathRemote = contactImagePathRemote.Replace("/var/media/ftp", FritzBoxClient.Address + "/FRITZ.NAS"); // URL format - contactImagePathRemote = contactImagePathRemote.Replace("file://", @"\\"); - contactImagePathRemote = contactImagePathRemote.Replace("/", "\\"); // UNC format + + // convert to UNC format + if (contactImagePathRemote.Contains("InternerSpeicher")) contactImagePathRemote = contactImagePathRemote.Replace("file:///var/InternerSpeicher", @"\\" + FritzBoxClient.Address + "\\" + Settings.NASShareName); // FRITZ!Boxe models with internal storage e. g. FRITZ!Box 7390 + else contactImagePathRemote = contactImagePathRemote.Replace("file:///var/media/ftp", @"\\" + FritzBoxClient.Address + "\\" + Settings.NASShareName); + + contactImagePathRemote = contactImagePathRemote.Replace("/", "\\"); + // check if folder exists and put it to the variable if (File.Exists(contactImagePathRemote)) { FileInfo contactImage = new FileInfo(contactImagePathRemote); @@ -377,7 +388,7 @@ break; } - else Log.Debug("Contact images folder could not be found"); + else Log.Debug("Contact images folder could not be found: \"{0}\"", contactImagesPathRemote); } } } Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/VBReader.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/VBReader.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/VBReader.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -36,17 +36,33 @@ stream.Position = p * 348; int len = r.ReadInt32(); + // check if meta file is encoded in BigEndian format + if (len == 1543569408) // 348 = LittleEndian format, 1543569408 = BigEndian format (FRITZ!Box 7390) + { + r.BigEndianFormat = true; + stream.Position = p * 348; // reset stream read position + len = r.ReadInt32(); + } + if (len == 348) { VoiceBoxItem item = new VoiceBoxItem(); item.voicebox = i; // which voice box - item.seq = r.ReadInt32(); + + if (r.BigEndianFormat) // the sequence value is always encoded in LittleEndian format + { + r.BigEndianFormat = false; + item.seq = r.ReadInt32(); + r.BigEndianFormat = true; + } + else item.seq = r.ReadInt32(); + item.type = r.ReadInt32(); r.ReadInt32(); item.filelen = r.ReadInt32(); item.lenInSec = r.ReadInt32(); item.isNew = r.ReadInt32(); - // 24 Bytes + // 24 bytes stream.Position += 24; long pos = stream.Position + 18 * 4; item.callerId = r.ReadCString(); Modified: trunk/plugins/FritzBox/FritzBox/FritzManager/VoiceboxItem.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzManager/VoiceboxItem.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/FritzManager/VoiceboxItem.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -2,37 +2,37 @@ namespace FritzManager { - /// <summary> - /// Description of VoiceBoxItem. - /// </summary> + /// <summary> + /// Description of VoiceBoxItem. + /// </summary> public class VoiceBoxItem : System.IEquatable<VoiceBoxItem> - { - public string callerId; - public int filelen; - public string filename; - public int isNew; - public int lenInSec; - public string mynumber; - public string pathname; - public int seq; - public DateTime time; - public int type; - public int voicebox; - - public static int CompareByDate(VoiceBoxItem i1, VoiceBoxItem i2) { - return i2.time.CompareTo(i1.time); - } + public string callerId; + public int filelen; + public string filename; + public int isNew; + public int lenInSec; + public string mynumber; + public string pathname; + public int seq; + public DateTime time; + public int type; + public int voicebox; - public override string ToString() - { - return String.Format("voice box item: {0} type: {1}, new: {2}, caller: {3}, mynumber {4}, sec: {5}, time: {6}", seq, type, isNew, callerId, mynumber, lenInSec, time); - } + public static int CompareByDate(VoiceBoxItem i1, VoiceBoxItem i2) + { + return i2.time.CompareTo(i1.time); + } - public bool Equals(VoiceBoxItem voiceBoxItem) - { - if (time == voiceBoxItem.time) return true; - else return false; + public override string ToString() + { + return String.Format("voice box item: {0} type: {1}, new: {2}, caller: {3}, mynumber {4}, sec: {5}, time: {6}", seq, type, isNew, callerId, mynumber, lenInSec, time); + } + + public bool Equals(VoiceBoxItem voiceBoxItem) + { + if (time == voiceBoxItem.time) return true; + else return false; + } } - } -} \ No newline at end of file +} Modified: trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/Languages/strings_ru.xml 2012-01-28 08:48:41 UTC (rev 4426) @@ -15,7 +15,7 @@ <String id="13">Вид: Крупные значки</String> <String id="14">все</String> <String id="15">подробный</String> - <String id="16">основанный/String> + <String id="16">основанный</String> <String id="17">Отклонен</String> <String id="18">список вызова</String> <String id="19">FritzBox новости</String> Modified: trunk/plugins/FritzBox/FritzBox/Settings.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-01-28 08:48:41 UTC (rev 4426) @@ -81,7 +81,7 @@ /// public static bool ResumeMediaOnOutgoingCall { get; set; } - public static int MaxNotifies { get; set; } + public static int MaximumNotifications { get; set; } /// <summary> /// autoclose the dialog after the timeout expired @@ -112,6 +112,7 @@ } public static string VBPath { get; set; } + public static string NASShareName { get; set; } public static string Password { get; set; } public static string DialPort { get; set; } public static GUIMode CurrentMode { get; set; } @@ -144,7 +145,7 @@ ResumeMediaOnIncomingCall = true; PauseMediaOnOutgoingCall = true; ResumeMediaOnOutgoingCall = true; - MaxNotifies = 20; + MaximumNotifications = 20; NotificationTimeout = 10; } @@ -167,6 +168,8 @@ DialPort = xmlreader.GetValueAsString("FritzManager", "dialport", "1"); VBPath = xmlreader.GetValue("FritzManager", "vBPath"); + NASShareName = xmlreader.GetValueAsString("FritzManager", "nASShareName", "FRITZ.NAS"); + // phone book settings PhoneBookFilePath = Config.GetFolder(Config.Dir.Config) + "\\FRITZ!Box Manager Phone Book.xml"; @@ -174,7 +177,7 @@ ShowNotficationOnIncomingCall = xmlreader.GetValueAsBool("fritzbox", "showNotificationOnIncomingCall", true); ShowNotficationOnOutgoingCall = xmlreader.GetValueAsBool("fritzbox", "showNotificationOnOutgoingCall", true); - MaxNotifies = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); + MaximumNotifications = xmlreader.GetValueAsInt("fritzbox", "maximumNotifications", 20); CloseNotificationOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); NotificationTimeout = xmlreader.GetValueAsInt("fritzbox", "notificationTimeout", 10); CloseNotificationOnConnectionClosed = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); @@ -255,6 +258,8 @@ xmlreader.RemoveEntry("fritzbox", "showPhoneNumberOnNotify"); xmlreader.RemoveEntry("fritzbox", "showPhoneNumberOnNotify"); + + xmlreader.RemoveEntry("fritzbox", "maxNotifies"); } } @@ -272,11 +277,13 @@ xmlwriter.SetValue("fritzbox", "address", FritzBoxClient.Address); xmlwriter.SetValue("fritzbox", "port", FritzBoxClient.Port); + xmlwriter.SetValue("FritzManager", "nASShareName", NASShareName); + // call notification settings xmlwriter.SetValueAsBool("fritzbox", "showNotificationOnIncomingCall", ShowNotficationOnIncomingCall); xmlwriter.SetValueAsBool("fritzbox", "showNotificationOnOutgoingCall", ShowNotficationOnOutgoingCall); - xmlwriter.SetValue("fritzbox", "maxNotifies", MaxNotifies); + xmlwriter.SetValue("fritzbox", "maximumNotifications", MaximumNotifications); xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", CloseNotificationOnTimeout); xmlwriter.SetValue("fritzbox", "notificationTimeout", NotificationTimeout); xmlwriter.SetValueAsBool("fritzbox", "closeOnConnectionClosed", CloseNotificationOnConnectionClosed); Modified: trunk/plugins/FritzBox/FritzBox/Skin/Black & White/FritzManager.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Skin/Black & White/FritzManager.xml 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/Skin/Black & White/FritzManager.xml 2012-01-28 08:48:41 UTC (rev 4426) @@ -79,12 +79,12 @@ <texture>menu_divider.png</texture> </control> <control> - <description>Modus</description> + <description>Mode</description> <type>button</type> <id>4</id> <posX>40</posX> <posY>420</posY> - <label>Anrufliste</label> + <label>Mode</label> <onright>50</onright> <onup>3</onup> <ondown>9</ondown> Modified: trunk/plugins/FritzBox/FritzBox/Skin/Blue3/FritzManager.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Skin/Blue3/FritzManager.xml 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/Skin/Blue3/FritzManager.xml 2012-01-28 08:48:41 UTC (rev 4426) @@ -60,11 +60,11 @@ </control> <control> <id>4</id> - <description>Modus</description> + <description>Mode</description> <type>button</type> <onright>50</onright> <ondown>9</ondown> - <label>Anrufliste</label> + <label>Mode</label> </control> <control> <id>9</id> Modified: trunk/plugins/FritzBox/FritzBox/Skin/Default/FritzManager.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Skin/Default/FritzManager.xml 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/Skin/Default/FritzManager.xml 2012-01-28 08:48:41 UTC (rev 4426) @@ -64,7 +64,7 @@ <type>button</type> <onright>50</onright> <ondown>9</ondown> - <label>#FritzManager.LabelCallList</label> + <label>Mode</label> </control> <control> <id>9</id> @@ -72,7 +72,7 @@ <type>button</type> <onright>50</onright> <ondown>2</ondown> - <label>#FritzManager.LabelUpdate</label> + <label>Update</label> </control> </control> </control> Modified: trunk/plugins/FritzBox/FritzBox/Skin/DefaultWide/FritzManager.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Skin/DefaultWide/FritzManager.xml 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/Skin/DefaultWide/FritzManager.xml 2012-01-28 08:48:41 UTC (rev 4426) @@ -64,7 +64,7 @@ <type>button</type> <onright>50</onright> <ondown>9</ondown> - <label>#FritzManager.LabelCallList</label> + <label>Mode</label> </control> <control> <id>9</id> @@ -72,7 +72,7 @@ <type>button</type> <onright>50</onright> <ondown>2</ondown> - <label>#FritzManager.LabelUpdate</label> + <label>Update</label> </control> </control> </control> Modified: trunk/plugins/FritzBox/FritzBox/Skin/Maya/FritzManager.xml =================================================================== --- trunk/plugins/FritzBox/FritzBox/Skin/Maya/FritzManager.xml 2012-01-25 23:00:16 UTC (rev 4425) +++ trunk/plugins/FritzBox/FritzBox/Skin/Maya/FritzManager.xml 2012-01-28 08:48:41 UTC (rev 4426) @@ -94,7 +94,7 @@ </control> <control> <type>button</type> - <description>Modus</description> + <description>Mode</description> <id>4</id> <textureFocus>hiddenmenu_item_selected.png</textureFocus> <textureNoFocus>hiddenmenu_item.png</textureNoFocus> @@ -102,7 +102,7 @@ <height>49</height> <textXOff>25</textXOff> <textYOff>12</textYOff> - <label>Anrufliste</label> + <label>Mode</label> <onup>3</onup> <ondown>9</ondown> </control> Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/ResolveAssemblyReference.cache =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-25 23:00:25
|
Revision: 4425 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4425&view=rev Author: BartEv Date: 2012-01-25 23:00:16 +0000 (Wed, 25 Jan 2012) Log Message: ----------- First stable release Modified Paths: -------------- trunk/plugins/VeraControl/DeviceCam.cs trunk/plugins/VeraControl/DeviceSprinkler.cs trunk/plugins/VeraControl/DeviceSystem.cs trunk/plugins/VeraControl/DialogDeviceControl.cs trunk/plugins/VeraControl/DialogSceneControl.cs trunk/plugins/VeraControl/Scene.cs trunk/plugins/VeraControl/VeraCommunication.cs trunk/plugins/VeraControl/VeraControl.cs trunk/plugins/VeraControl/VeraControl.csproj trunk/plugins/VeraControl/VeraHelper.cs trunk/plugins/VeraControl/VeraSetupForm.Designer.cs trunk/plugins/VeraControl/VeraSetupForm.cs trunk/plugins/VeraControl/releases/VeraControl.xmp2 trunk/plugins/VeraControl/releases/update.xml trunk/plugins/VeraControl/skin/Default/VeraControl.xml trunk/plugins/VeraControl/skin/Default/VeraDialogDeviceControl.xml trunk/plugins/VeraControl/skin/Default/VeraDialogSceneControl.xml trunk/plugins/VeraControl/skin/DefaultWide/VeraControl.xml trunk/plugins/VeraControl/skin/DefaultWide/VeraDialogDeviceControl.xml trunk/plugins/VeraControl/skin/DefaultWide/VeraDialogSceneControl.xml trunk/plugins/VeraControl/skin/Media/Vera/Binary_Light_0.png trunk/plugins/VeraControl/skin/Media/Vera/Binary_Light_100.png trunk/plugins/VeraControl/skin/Media/Vera/Dimmable_Light_0.png trunk/plugins/VeraControl/skin/Media/Vera/Dimmable_Light_100.png trunk/plugins/VeraControl/skin/Media/Vera/Dimmable_Light_25.png trunk/plugins/VeraControl/skin/Media/Vera/Dimmable_Light_50.png trunk/plugins/VeraControl/skin/Media/Vera/Dimmable_Light_75.png trunk/plugins/VeraControl/skin/Media/Vera/Door_Lock.png trunk/plugins/VeraControl/skin/Media/Vera/Door_Lock_0.png trunk/plugins/VeraControl/skin/Media/Vera/Door_Lock_100.png trunk/plugins/VeraControl/skin/Media/Vera/Generic_IO.png trunk/plugins/VeraControl/skin/Media/Vera/Humidity_Sensor.png trunk/plugins/VeraControl/skin/Media/Vera/IR_Transmitter.png trunk/plugins/VeraControl/skin/Media/Vera/Ip_Camera.png trunk/plugins/VeraControl/skin/Media/Vera/Light_Sensor.png trunk/plugins/VeraControl/skin/Media/Vera/Motion_Sensor_0.png trunk/plugins/VeraControl/skin/Media/Vera/Motion_Sensor_100.png trunk/plugins/VeraControl/skin/Media/Vera/Power_Meter.png trunk/plugins/VeraControl/skin/Media/Vera/Scenes.png trunk/plugins/VeraControl/skin/Media/Vera/Temperature_Sensor.png trunk/plugins/VeraControl/skin/Media/Vera/Thermostat.png trunk/plugins/VeraControl/skin/Media/Vera/USB_UIRT.png trunk/plugins/VeraControl/skin/Media/Vera/default_panel.png trunk/plugins/VeraControl/skin/Media/Vera/energy.png trunk/plugins/VeraControl/skin/Media/Vera/findvera.png trunk/plugins/VeraControl/skin/Media/Vera/generic_sensor.png trunk/plugins/VeraControl/skin/Media/Vera/location.png trunk/plugins/VeraControl/skin/Media/Vera/music_audio.png trunk/plugins/VeraControl/skin/Media/Vera/plugins.png trunk/plugins/VeraControl/skin/Media/Vera/users.png Added Paths: ----------- trunk/plugins/VeraControl/JSON.cs trunk/plugins/VeraControl/releases/VeraControl_v0.9.0.1.mpe1 trunk/plugins/VeraControl/skin/Media/Vera/OpenList.png trunk/plugins/VeraControl/skin/Media/Vera/Scenes_active.png trunk/plugins/VeraControl/skin/Media/Vera/Sprinkler.png trunk/plugins/VeraControl/skin/Media/Vera/state_command_error.png trunk/plugins/VeraControl/skin/Media/Vera/state_connection_error.png trunk/plugins/VeraControl/skin/Media/Vera/state_error.png trunk/plugins/VeraControl/skin/Media/Vera/state_pending.png trunk/plugins/VeraControl/skin/Media/Vera/state_success.png Modified: trunk/plugins/VeraControl/DeviceCam.cs =================================================================== --- trunk/plugins/VeraControl/DeviceCam.cs 2012-01-23 23:04:46 UTC (rev 4424) +++ trunk/plugins/VeraControl/DeviceCam.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -58,7 +58,7 @@ public string imgUrl { - get { return "http://" + passString + _vera.veraAddress + "/data_request?id=cam_image¶meters=get_video_frame&Device_Num=" + id + "&rand=" + DateTime.Now.Ticks; + get { return _vera.veraAddress + "/data_request?id=cam_image¶meters=get_video_frame&Device_Num=" + id + "&rand=" + DateTime.Now.Ticks; // return "http://" + passString + m_sIp + "/" + m_sUrl.Replace("%2F", "/"); } set { } Modified: trunk/plugins/VeraControl/DeviceSprinkler.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSprinkler.cs 2012-01-23 23:04:46 UTC (rev 4424) +++ trunk/plugins/VeraControl/DeviceSprinkler.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -100,7 +100,7 @@ public override string GetIconName() { - return "Humidity_Sensor"; + return "Sprinkler"; } public override string GetStatusText() Modified: trunk/plugins/VeraControl/DeviceSystem.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSystem.cs 2012-01-23 23:04:46 UTC (rev 4424) +++ trunk/plugins/VeraControl/DeviceSystem.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -21,30 +21,30 @@ { } - public VeraHelper _helper = VeraHelper.Instance; + public VeraHelper _helper = VeraHelper.Instance; - public long _lastUpdate = 0; + public long _lastUpdate = 0; public bool _screenUpdateRequired = false; - private bool _fullReload = true; - private string _version = ""; - private string _model = ""; - private bool _zWaveHeal = false; - private bool _metric = true; - private string _serial = ""; - private string _fwd1Server = ""; - private string _fwd2Server = ""; - private string _loadTime = "0"; - private string _dataVersion = "0"; - private string _comment = ""; - private DevState _dsVeraState = DevState.NONE; + private bool _fullReload = true; + private string _version = ""; + private string _model = ""; + private bool _zWaveHeal = false; + private bool _metric = true; + private string _serial = ""; + private string _fwd1Server = ""; + private string _fwd2Server = ""; + private string _loadTime = "0"; + private string _dataVersion = "0"; + private string _comment = ""; + private DevState _dsVeraState = DevState.NONE; public bool update(XmlNode xn) { _fullReload = _helper.GetAttrAsBool (xn, "full", _fullReload); _version = _helper.GetAttrAsString (xn, "version", _version); - _model = _helper.GetAttrAsString (xn, "model", _model); - _zWaveHeal = _helper.GetAttrAsBool (xn, "zwave_heal", _zWaveHeal); + _model = _helper.GetAttrAsString (xn, "model", _model); + _zWaveHeal = _helper.GetAttrAsBool (xn, "zwave_heal", _zWaveHeal); _serial = _helper.GetAttrAsString (xn, "serial_number", _serial); _fwd1Server = _helper.GetAttrAsString (xn, "fwd1", _fwd1Server); _fwd2Server = _helper.GetAttrAsString (xn, "fwd2", _fwd2Server); Modified: trunk/plugins/VeraControl/DialogDeviceControl.cs =================================================================== --- trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-01-23 23:04:46 UTC (rev 4424) +++ trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -254,7 +254,7 @@ { _myDev.level = _desiredLevel; _slider.IntValue = _desiredLevel; - _lastLevelUpdate = DateTime.Now.Ticks + (TimeSpan.TicksPerSecond * 2); + _lastLevelUpdate = DateTime.Now.Ticks + (TimeSpan.TicksPerSecond * 2); } _levelUpdatePending = false; } Modified: trunk/plugins/VeraControl/DialogSceneControl.cs =================================================================== --- trunk/plugins/VeraControl/DialogSceneControl.cs 2012-01-23 23:04:46 UTC (rev 4424) +++ trunk/plugins/VeraControl/DialogSceneControl.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -69,6 +69,11 @@ _label1.Label = _myScene.name; + _imgLogo.Dispose(); + _imgLogo.SetFileName(@"Vera\" + _myScene.GetIconName() + ".png"); + _imgLogo.AllocResources(); + _imgLogo.KeepAspectRatio = true; + // save last update ticks _lastUpdate = DateTime.Now.Ticks; } Added: trunk/plugins/VeraControl/JSON.cs =================================================================== --- trunk/plugins/VeraControl/JSON.cs (rev 0) +++ trunk/plugins/VeraControl/JSON.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -0,0 +1,497 @@ +using System; +using System.Collections; +using System.Globalization; +using System.Text; + +namespace VeraControl.Properties +{ + /// <summary> + /// This class encodes and decodes JSON strings. + /// Spec. details, see http://www.json.org/ + /// + /// JSON uses Arrays and Objects. These correspond here to the datatypes ArrayList and Hashtable. + /// All numbers are parsed to doubles. + /// </summary> + public class JSON + { + public const int TOKEN_NONE = 0; + public const int TOKEN_CURLY_OPEN = 1; + public const int TOKEN_CURLY_CLOSE = 2; + public const int TOKEN_SQUARED_OPEN = 3; + public const int TOKEN_SQUARED_CLOSE = 4; + public const int TOKEN_COLON = 5; + public const int TOKEN_COMMA = 6; + public const int TOKEN_STRING = 7; + public const int TOKEN_NUMBER = 8; + public const int TOKEN_TRUE = 9; + public const int TOKEN_FALSE = 10; + public const int TOKEN_NULL = 11; + + private const int BUILDER_CAPACITY = 2000; + + /// <summary> + /// Parses the string json into a value + /// </summary> + /// <param name="json">A JSON string.</param> + /// <returns>An ArrayList, a Hashtable, a double, a string, null, true, or false</returns> + public static object JsonDecode(string json) + { + bool success = true; + + return JsonDecode(json, ref success); + } + + /// <summary> + /// Parses the string json into a value; and fills 'success' with the successfullness of the parse. + /// </summary> + /// <param name="json">A JSON string.</param> + /// <param name="success">Successful parse?</param> + /// <returns>An ArrayList, a Hashtable, a double, a string, null, true, or false</returns> + public static object JsonDecode(string json, ref bool success) + { + success = true; + if (json != null) { + char[] charArray = json.ToCharArray(); + int index = 0; + object value = ParseValue(charArray, ref index, ref success); + return value; + } else { + return null; + } + } + + /// <summary> + /// Converts a Hashtable / ArrayList object into a JSON string + /// </summary> + /// <param name="json">A Hashtable / ArrayList</param> + /// <returns>A JSON encoded string, or null if object 'json' is not serializable</returns> + public static string JsonEncode(object json) + { + StringBuilder builder = new StringBuilder(BUILDER_CAPACITY); + bool success = SerializeValue(json, builder); + return (success ? builder.ToString() : null); + } + + protected static Hashtable ParseObject(char[] json, ref int index, ref bool success) + { + Hashtable table = new Hashtable(); + int token; + + // { + NextToken(json, ref index); + + bool done = false; + while (!done) { + token = LookAhead(json, index); + if (token == JSON.TOKEN_NONE) { + success = false; + return null; + } else if (token == JSON.TOKEN_COMMA) { + NextToken(json, ref index); + } else if (token == JSON.TOKEN_CURLY_CLOSE) { + NextToken(json, ref index); + return table; + } else { + + // name + string name = ParseString(json, ref index, ref success); + if (!success) { + success = false; + return null; + } + + // : + token = NextToken(json, ref index); + if (token != JSON.TOKEN_COLON) { + success = false; + return null; + } + + // value + object value = ParseValue(json, ref index, ref success); + if (!success) { + success = false; + return null; + } + + table[name] = value; + } + } + + return table; + } + + protected static ArrayList ParseArray(char[] json, ref int index, ref bool success) + { + ArrayList array = new ArrayList(); + + // [ + NextToken(json, ref index); + + bool done = false; + while (!done) { + int token = LookAhead(json, index); + if (token == JSON.TOKEN_NONE) { + success = false; + return null; + } else if (token == JSON.TOKEN_COMMA) { + NextToken(json, ref index); + } else if (token == JSON.TOKEN_SQUARED_CLOSE) { + NextToken(json, ref index); + break; + } else { + object value = ParseValue(json, ref index, ref success); + if (!success) { + return null; + } + + array.Add(value); + } + } + + return array; + } + + protected static object ParseValue(char[] json, ref int index, ref bool success) + { + switch (LookAhead(json, index)) { + case JSON.TOKEN_STRING: + return ParseString(json, ref index, ref success); + case JSON.TOKEN_NUMBER: + return ParseNumber(json, ref index, ref success); + case JSON.TOKEN_CURLY_OPEN: + return ParseObject(json, ref index, ref success); + case JSON.TOKEN_SQUARED_OPEN: + return ParseArray(json, ref index, ref success); + case JSON.TOKEN_TRUE: + NextToken(json, ref index); + return true; + case JSON.TOKEN_FALSE: + NextToken(json, ref index); + return false; + case JSON.TOKEN_NULL: + NextToken(json, ref index); + return null; + case JSON.TOKEN_NONE: + break; + } + + success = false; + return null; + } + + protected static string ParseString(char[] json, ref int index, ref bool success) + { + StringBuilder s = new StringBuilder(BUILDER_CAPACITY); + char c; + + EatWhitespace(json, ref index); + + // " + c = json[index++]; + + bool complete = false; + while (!complete) { + + if (index == json.Length) { + break; + } + + c = json[index++]; + if (c == '"') { + complete = true; + break; + } else if (c == '\\') { + + if (index == json.Length) { + break; + } + c = json[index++]; + if (c == '"') { + s.Append('"'); + } else if (c == '\\') { + s.Append('\\'); + } else if (c == '/') { + s.Append('/'); + } else if (c == 'b') { + s.Append('\b'); + } else if (c == 'f') { + s.Append('\f'); + } else if (c == 'n') { + s.Append('\n'); + } else if (c == 'r') { + s.Append('\r'); + } else if (c == 't') { + s.Append('\t'); + } else if (c == 'u') { + int remainingLength = json.Length - index; + if (remainingLength >= 4) { + // parse the 32 bit hex into an integer codepoint + uint codePoint; + if (!(success = UInt32.TryParse(new string(json, index, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codePoint))) { + return ""; + } + // convert the integer codepoint to a unicode char and add to string + s.Append(Char.ConvertFromUtf32((int)codePoint)); + // skip 4 chars + index += 4; + } else { + break; + } + } + + } else { + s.Append(c); + } + + } + + if (!complete) { + success = false; + return null; + } + + return s.ToString(); + } + + protected static double ParseNumber(char[] json, ref int index, ref bool success) + { + EatWhitespace(json, ref index); + + int lastIndex = GetLastIndexOfNumber(json, index); + int charLength = (lastIndex - index) + 1; + + double number; + success = Double.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + + index = lastIndex + 1; + return number; + } + + protected static int GetLastIndexOfNumber(char[] json, int index) + { + int lastIndex; + + for (lastIndex = index; lastIndex < json.Length; lastIndex++) { + if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) { + break; + } + } + return lastIndex - 1; + } + + protected static void EatWhitespace(char[] json, ref int index) + { + for (; index < json.Length; index++) { + if (" \t\n\r".IndexOf(json[index]) == -1) { + break; + } + } + } + + protected static int LookAhead(char[] json, int index) + { + int saveIndex = index; + return NextToken(json, ref saveIndex); + } + + protected static int NextToken(char[] json, ref int index) + { + EatWhitespace(json, ref index); + + if (index == json.Length) { + return JSON.TOKEN_NONE; + } + + char c = json[index]; + index++; + switch (c) { + case '{': + return JSON.TOKEN_CURLY_OPEN; + case '}': + return JSON.TOKEN_CURLY_CLOSE; + case '[': + return JSON.TOKEN_SQUARED_OPEN; + case ']': + return JSON.TOKEN_SQUARED_CLOSE; + case ',': + return JSON.TOKEN_COMMA; + case '"': + return JSON.TOKEN_STRING; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case '-': + return JSON.TOKEN_NUMBER; + case ':': + return JSON.TOKEN_COLON; + } + index--; + + int remainingLength = json.Length - index; + + // false + if (remainingLength >= 5) { + if (json[index] == 'f' && + json[index + 1] == 'a' && + json[index + 2] == 'l' && + json[index + 3] == 's' && + json[index + 4] == 'e') { + index += 5; + return JSON.TOKEN_FALSE; + } + } + + // true + if (remainingLength >= 4) { + if (json[index] == 't' && + json[index + 1] == 'r' && + json[index + 2] == 'u' && + json[index + 3] == 'e') { + index += 4; + return JSON.TOKEN_TRUE; + } + } + + // null + if (remainingLength >= 4) { + if (json[index] == 'n' && + json[index + 1] == 'u' && + json[index + 2] == 'l' && + json[index + 3] == 'l') { + index += 4; + return JSON.TOKEN_NULL; + } + } + + return JSON.TOKEN_NONE; + } + + protected static bool SerializeValue(object value, StringBuilder builder) + { + bool success = true; + + if (value is string) { + success = SerializeString((string)value, builder); + } else if (value is Hashtable) { + success = SerializeObject((Hashtable)value, builder); + } else if (value is ArrayList) { + success = SerializeArray((ArrayList)value, builder); + } else if (IsNumeric(value)) { + success = SerializeNumber(Convert.ToDouble(value), builder); + } else if ((value is Boolean) && ((Boolean)value == true)) { + builder.Append("true"); + } else if ((value is Boolean) && ((Boolean)value == false)) { + builder.Append("false"); + } else if (value == null) { + builder.Append("null"); + } else { + success = false; + } + return success; + } + + protected static bool SerializeObject(Hashtable anObject, StringBuilder builder) + { + builder.Append("{"); + + IDictionaryEnumerator e = anObject.GetEnumerator(); + bool first = true; + while (e.MoveNext()) { + string key = e.Key.ToString(); + object value = e.Value; + + if (!first) { + builder.Append(", "); + } + + SerializeString(key, builder); + builder.Append(":"); + if (!SerializeValue(value, builder)) { + return false; + } + + first = false; + } + + builder.Append("}"); + return true; + } + + protected static bool SerializeArray(ArrayList anArray, StringBuilder builder) + { + builder.Append("["); + + bool first = true; + for (int i = 0; i < anArray.Count; i++) { + object value = anArray[i]; + + if (!first) { + builder.Append(", "); + } + + if (!SerializeValue(value, builder)) { + return false; + } + + first = false; + } + + builder.Append("]"); + return true; + } + + protected static bool SerializeString(string aString, StringBuilder builder) + { + builder.Append("\""); + + char[] charArray = aString.ToCharArray(); + for (int i = 0; i < charArray.Length; i++) { + char c = charArray[i]; + if (c == '"') { + builder.Append("\\\""); + } else if (c == '\\') { + builder.Append("\\\\"); + } else if (c == '\b') { + builder.Append("\\b"); + } else if (c == '\f') { + builder.Append("\\f"); + } else if (c == '\n') { + builder.Append("\\n"); + } else if (c == '\r') { + builder.Append("\\r"); + } else if (c == '\t') { + builder.Append("\\t"); + } else { + int codepoint = Convert.ToInt32(c); + if ((codepoint >= 32) && (codepoint <= 126)) { + builder.Append(c); + } else { + builder.Append("\\u" + Convert.ToString(codepoint, 16).PadLeft(4, '0')); + } + } + } + + builder.Append("\""); + return true; + } + + protected static bool SerializeNumber(double number, StringBuilder builder) + { + builder.Append(Convert.ToString(number, CultureInfo.InvariantCulture)); + return true; + } + + /// <summary> + /// Determines if a given object is numeric in any way + /// (can be integer, double, null, etc). + /// + /// Thanks to mtighe for pointing out Double.TryParse to me. + /// </summary> + protected static bool IsNumeric(object o) + { + double result; + + return (o == null) ? false : Double.TryParse(o.ToString(), out result); + } + } +} Modified: trunk/plugins/VeraControl/Scene.cs =================================================================== --- trunk/plugins/VeraControl/Scene.cs 2012-01-23 23:04:46 UTC (rev 4424) +++ trunk/plugins/VeraControl/Scene.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -44,7 +44,7 @@ public override string GetIconName() { - return "Scenes"; + return "Scenes" + (IsActive() ? "_active":""); } public override string GetStatusText() Modified: trunk/plugins/VeraControl/VeraCommunication.cs =================================================================== --- trunk/plugins/VeraControl/VeraCommunication.cs 2012-01-23 23:04:46 UTC (rev 4424) +++ trunk/plugins/VeraControl/VeraCommunication.cs 2012-01-25 23:00:16 UTC (rev 4425) @@ -17,650 +17,684 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of VeraCommunication. - /// </summary> - - public class VeraStatus - { - public DeviceSystem system = new DeviceSystem(); - public List<DeviceGeneric> devices = new List<DeviceGeneric>(); - public List<Scene> scenes = new List<Scene>(); - public List<Room> rooms = new List<Room>(); - public List<DevCategories> categories = new List<DevCategories>(); - public List<Section> sections = new List<Section>(); - - #region Vers get by id support functions + /// <summary> + /// Description of VeraCommunication. + /// </summary> + + public class VeraStatus + { + public DeviceSystem system = new DeviceSystem(); + public List<DeviceGeneric> devices = new List<DeviceGeneric>(); + public List<Scene> scenes = new List<Scene>(); + public List<Room> rooms = new List<Room>(); + public List<DevCategories> categories = new List<DevCategories>(); + public List<Section> sections = new List<Section>(); + + #region Vers get by id support functions - public void ClearAllLists() - { - devices.Clear(); - scenes.Clear(); - rooms.Clear(); - categories.Clear(); - sections.Clear(); - } - public Room GetRoomById(int id) - { - foreach(Room room in rooms) - { - if (room.id == id) - { - return room; - } - } - return new Room(null); - } - - public Section GetSectionById(int id) - { - foreach(Section section in sections) - { - if (section.id == id) - { - return section; - } - } - return new Section(null); - } - - public DeviceGeneric GetDeviceById(int id) - { - foreach(DeviceGeneric dev in devices) - { - if (dev.id == id) - { - return dev; - } - } - return new DeviceGeneric(null); - } + public void ClearAllLists() + { + devices.Clear(); + scenes.Clear(); + rooms.Clear(); + categories.Clear(); + sections.Clear(); + } + public Room GetRoomById(int id) + { + foreach(Room room in rooms) + { + if (room.id == id) + { + return room; + } + } + return new Room(null); + } + + public Section GetSectionById(int id) + { + foreach(Section section in sections) + { + if (section.id == id) + { + return section; + } + } + return new Section(null); + } + + public DeviceGeneric GetDeviceById(int id) + { + foreach(DeviceGeneric dev in devices) + { + if (dev.id == id) + { + return dev; + } + } + return new DeviceGeneric(null); + } - public Scene GetSceneById(int id) - { - foreach(Scene scene in scenes) - { - if (scene.id == id) - { - return scene; - } - } - return new Scene(null); - } - - public DevCategories GetCategoryById(int id) - { - foreach(DevCategories cat in categories) - { - if (cat.id == id) - { - return cat; - } - } - return new DevCategories(null); - } - - public bool IsSectionFound(int id) - { - foreach(Section section in sections) - { - if (section.id == id) - { - return true; - } - } - return false; - } - - public bool IsRoomFound(int id) - { - foreach(Room room in rooms) - { - if (room.id == id) - { - return true; - } - } - return false; - } - - public bool IsDeviceFound(int id) - { - foreach(DeviceGeneric dev in devices) - { - if (dev.id == id) - { - return true; - } - } - return false; - } + public Scene GetSceneById(int id) + { + foreach(Scene scene in scenes) + { + if (scene.id == id) + { + return scene; + } + } + return new Scene(null); + } + + public DevCategories GetCategoryById(int id) + { + foreach(DevCategories cat in categories) + { + if (cat.id == id) + { + return cat; + } + } + return new DevCategories(null); + } + + public bool IsSectionFound(int id) + { + foreach(Section section in sections) + { + if (section.id == id) + { + return true; + } + } + return false; + } + + public bool IsRoomFound(int id) + { + foreach(Room room in rooms) + { + if (room.id == id) + { + return true; + } + } + return false; + } + + public bool IsDeviceFound(int id) + { + foreach(DeviceGeneric dev in devices) + { + if (dev.id == id) + { + return true; + } + } + return false; + } - public bool IsSceneFound(int id) - { - foreach(Scene scene in scenes) - { - if (scene.id == id) - { - return true; - } - } - return false; - } - - public bool IsCategoryFound(int id) - { - foreach(DevCategories cat in categories) - { - if (cat.id == id) - { - return true; - } - } - return false; - } - #endregion - } - - - public sealed class VeraCommunication - { - private static volatile VeraCommunication _instance; - private static object _syncRoot = new Object(); - private VeraHelper _helper = VeraHelper.Instance; - - // Config data - private string _veraIPAddress; - private string _veraTCPIPPort; - private int _maxRefreshDelay; // Maximun delay between 2 status updates in seconds - private int _minRefreshDelay = 1000; // Minimun delay between 2 status updates in miliseconds - - // Actual device information - private VeraStatus _status = new VeraStatus(); - - // Communication status/control - private long _lastUpdate = 0; - private bool _screenUpdateRequired = false; // Only true when a new update was received AND at least one device(staus) or scene was changed - private bool _lastUpdateFailed = false; - private string _lastUpdateErrorMessage = ""; - private WebClient _webUpdateClient = new WebClient(); - private WebClient _webCommandClient = new WebClient(); - private Action<string> _webCommandClientErrorReporter = null; - - // Action control table - public int [] actionTriggerTable = new int[(int)Actiontrigger.LAST_ACTIONTRIGGER]; - - public static VeraCommunication Instance - { - get - { - if (_instance == null) - { - lock (_syncRoot) - { - if (_instance == null) - { - _instance = new VeraCommunication(); - } - } - } + public bool IsSceneFound(int id) + { + foreach(Scene scene in scenes) + { + if (scene.id == id) + { + return true; + } + } + return false; + } + + public bool IsCategoryFound(int id) + { + foreach(DevCategories cat in categories) + { + if (cat.id == id) + { + return true; + } + } + return false; + } + #endregion + } + + + public sealed class VeraCommunication + { + private static volatile VeraCommunication _instance; + private static object _syncRoot = new Object(); + private VeraHelper _helper = VeraHelper.Instance; + + // Config data + private int _maxRefreshDelay; // Maximun delay between 2 status updates in seconds + private int _minRefreshDelay = 1000; // Minimun delay between 2 status updates in miliseconds + + // Actual device information + private VeraStatus _status = new VeraStatus(); + + // Communication status/control + private long _lastUpdate = 0; + private bool _screenUpdateRequired = false; // Only true when a new update was received AND at least one device(staus) or scene was changed + private bool _lastUpdateFailed = false; + private string _lastUpdateErrorMessage = ""; + private WebClient _webUpdateClient = new WebClient(); + private WebClient _webCommandClient = new WebClient(); + private Action<string> _webCommandClientErrorReporter = null; + + // Action control table + public int [] actionTriggerTable = new int[(int)Actiontrigger.LAST_ACTIONTRIGGER]; + + public static VeraCommunication Instance + { + get + { + if (_instance == null) + { + lock (_syncRoot) + { + if (_instance == null) + { + _instance = new VeraCommunication(); + } + } + } - return _instance; - } - } - - private VeraCommunication() - { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) - { - _veraIPAddress = xmlreader.GetValueAsString("veracontroller", "ipaddress", "127.0.0.1"); - _veraTCPIPPort = xmlreader.GetValueAsString("veracontroller", "portnumber", "3480"); - - // Fill action table (config settings) - for (Actiontrigger i = 0; i < Actiontrigger.LAST_ACTIONTRIGGER; i++) - { - actionTriggerTable[(int)i] = xmlreader.GetValueAsInt("veracontroller", i.ToString(), 0); - } - _maxRefreshDelay = int.Parse(xmlreader.GetValueAsString("veracontroller", "maxrefreshdelay", "60")); - - // Set DownloadStringCompleted handler - _webUpdateClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(OnCompletedUpdateStatusRequest); - _webCommandClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(OnCompletedCommandRequest); - } - } - - public bool IsVeraAlive(string ip, string port) - { - string response = RetrieveURL("http://" + ip + ":" + port + "/data_request?id=lu_alive&time=" + DateTime.Now.Ticks); - return (response == "OK"); - } + return _instance; + } + } + + private VeraCommunication() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) + { + // Fill action table (config settings) + for (Actiontrigger i = 0; i < Actiontrigger.LAST_ACTIONTRIGGER; i++) + { + actionTriggerTable[(int)i] = xmlreader.GetValueAsInt("veracontroller", i.ToString(), 0); + } + _maxRefreshDelay = int.Parse(xmlreader.GetValueAsString("veracontroller", "maxrefreshdelay", "60")); + + // Set DownloadStringCompleted handler + _webUpdateClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(OnCompletedUpdateStatusRequest); + _webCommandClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(OnCompletedCommandRequest); + } + } + + public bool IsVeraAlive(string ip, string port) + { + string response = RetrieveURL("http://" + ip + ":" + port + "/data_request?id=lu_alive&time=" + DateTime.Now.Ticks); + return (response == "OK"); + } - private string RetrieveURL(string url) - { - // No callback thus Synchronised call (wait for response) - try { - WebClient wc = new WebClient(); - wc.CancelAsync(); // Cancel any current pending Async calls... - return wc.DownloadString(url); - } catch( Exception ) - { - return "ERROR"; - } - } - - public void DoVeraCommandRequest(string param, Action<string> errorReporter) - { - if (_webCommandClient.IsBusy) - { - // TODO: What to do ? cancel pending request or queue new request? - for now just cancel the previous request (user is informed about the progress) - } - string url = "http://" + veraAddress + "/data_request" + param + "&time=" + DateTime.Now.Ticks; - - // Callback thus ASynchronised call (do NOT wait for response) - try { - _webCommandClientErrorReporter = errorReporter; - _webCommandClient.CancelAsync(); // Cancel any current pending Async calls... - _webCommandClient.DownloadStringAsync(new Uri(url)); - - } catch( Exception e ) - { - _webCommandClientErrorReporter = null; - status.system.ReportCommandError(e.Message); - setScreenUpdateRequired(); - } - } - - public void OnCompletedCommandRequest(object sender, DownloadStringCompletedEventArgs e) - { - if (e.Cancelled) - { - // Communication cancel for some reason, no valid data to be expected - if (_webCommandClientErrorReporter != null) - { - // Send error to dialog message handler - _webCommandClientErrorReporter("Request was canceled"); - } - else - { - // Show eror in MediaPortal Vera-main window - status.system.ReportCommandError("Request was canceled"); - } - setScreenUpdateRequired(); - } - else if (e.Error != null) - { - // Handle error here - if (_webCommandClientErrorReporter != null) - { - // Send error to dialog message handler - _webCommandClientErrorReporter(e.Error.Message); - } - else - { - // Show eror in MediaPortal Vera-main window - status.system.ReportCommandError(e.Error.Message); - } - setScreenUpdateRequired(); - } - else - { - // Communication succes full -> no parse Vera response... - if (!e.Result.ToUpper().Contains("<OK>OK</OK>") && !e.Result.ToUpper().Contains("<JOBID>")) - { - if (_webCommandClientErrorReporter != null) - { - // Send error to dialog message handler - _webCommandClientErrorReporter(e.Result); - } - else - { - // Show eror in MediaPortal Vera-main window - status.system.ReportCommandError(e.Result); - } - setScreenUpdateRequired(); - } - } - // Communication done clear error report handler - _webCommandClientErrorReporter = null; - } - - public void UpdateCurrentStatus() - { - /* Keep updating with webClient timeout 180 sec, even when last time did fail or connection was lost....*/ - if (!_webUpdateClient.IsBusy) - { - string url = "http://" + veraAddress + "/data_request" + - "?id=lu_sdata&loadtime=" + _status.system.loadtime + - "&dataversion=" + _status.system.dataversion + - "&minimumdelay=" + _minRefreshDelay + - "&timeout=" + _maxRefreshDelay + - "&output_format=xml" + - "&time=" + DateTime.Now.Ticks; - - // Callback thus ASynchronised call (do NOT wait for response) - try { - _webUpdateClient.CancelAsync(); // Cancel any current pending Async calls... - _webUpdateClient.DownloadStringAsync(new Uri(url)); - } catch( Exception e ) - { - _lastUpdateFailed = true; - _lastUpdateErrorMessage = e.Message; - } - _lastUpdate = _helper.GetSecondsSince1970(); - } - } - - public void OnCompletedUpdateStatusRequest(object sender, DownloadStringCompletedEventArgs e) - { - if (!e.Cancelled) - { - // Communication cancel for some reason, no valid data to be expected - if (e.Error != null) - { - // Handle error here - _lastUpdateFailed = true; - _lastUpdateErrorMessage = e.Error.Message; - setScreenUpdateRequired(); - } - else - { - ParseUpdateInfo(e.Result); - // ParseUpdateInfo(m_webClient.DownloadString(@"C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\testdata\text.xml")); - } - } - - // update timer again (took some time to get the data) - _lastUpdate = _helper.GetSecondsSince1970(); - } - - public void ParseUpdateInfo(string veraresponse) - { - var xmlDoc = new XmlDocument(); - try { - xmlDoc.LoadXml(veraresponse); - } catch (Exception) - { - // Parser failed so incorrect data received (could be an interrupted data transfer) - return; - } - // Parse header - XmlNode rootnode = xmlDoc.SelectSingleNode("/root"); - if (rootnode == null) - { - // Not a status update, just return - return; - } - - if (!_screenUpdateRequired) - { - // Clear flag, only when previous update was already handled (might be some new or remove devices/scenes to be displayed) - _status.system.ClearFullReloadFlag(); - } - if (_lastUpdateFailed) - { - _lastUpdateFailed = false; - setScreenUpdateRequired(); - _status.system.ClearConnectionError(); - } - // Process system status first - _status.system.update(rootnode); - if (_status.system.fullReload) - { - // We have a full refresh -> Clear all lists (to get clear of removed devices/scenes/catgories/rooms/etc...) - _status.ClearAllLists(); - } - - // Process Sections - XmlNodeList xnList = xmlDoc.SelectNodes("/root/sections/section"); - foreach (XmlNode xn in xnList) - { - Section sc = _status.GetSectionById( int.Parse(xn.Attributes["id"].Value) ); - if (sc.id != 0) { - sc.Update(xn); - } else { - _status.sections.Add(new Section(xn)); - } - } - - // Process Rooms - xnList = xmlDoc.SelectNodes("/root/rooms/room"); - foreach (XmlNode xn in xnList) - { - Room room = _status.GetRoomById( int.Parse(xn.Attributes["id"].Value) ); - if (room.id != 0) { - room.Update(xn); - } else { - _status.rooms.Add(new Room(xn)); - } - } - - // Process Scenes - xnList = xmlDoc.SelectNodes("/root/scenes/scene"); - // State update of Scenes are not reported done, so they have to be cleaned manualy - // if a message is still valid and/or new message will be reported below - foreach (Scene scene in _status.scenes) - { - scene.ClearCommState(); - } - foreach (XmlNode xn in xnList) - { - Scene sc = _status.GetSceneById( int.Parse(xn.Attributes["id"].Value) ); - if (sc.id != 0) { - sc.Update(xn); - } else { - _status.scenes.Add(new Scene(xn)); - } - } - - // Process Categories - xnList = xmlDoc.SelectNodes("/root/categories/categorie"); - foreach (XmlNode xn in xnList) - { - DevCategories cat = _status.GetCategoryById( int.Parse(xn.Attributes["id"].Value) ); - if (cat.id != 0) { - cat.Update(xn); - } else { - _status.categories.Add(new DevCategories(xn)); - } - } - - // Process Devices - xnList = xmlDoc.SelectNodes("/root/devices/device"); - foreach (XmlNode xn in xnList) - { - DeviceGeneric dev = _status.GetDeviceById( int.Parse(xn.Attributes["id"].Value) ); - if (dev.id != 0) { - // update existing device - dev.Update(xn); - } else { - _status.system.SetFullReloadFlag(); - - // catids: http://wiki.micasaverde.com/index.php/Luup_UPNP_Files - switch (xn.Attributes["category"].Value) - { - //case "1": // TODO: Implement interface device ? - // m_status.devices.Add(new DeviceInterface(xn)); - // break; - - case "2": - _status.devices.Add(new DeviceDimmer(xn)); - break; - - case "3": - case "11": // Generic IO - _status.devices.Add(new DeviceSwitch(xn)); - break; - - case "4": // Generic Sensor - case "12": // Motion Sensor - _status.devices.Add(new DeviceSecurity(xn)); - break; - - case "5": - _status.devices.Add(new DeviceThermostat(xn, _status.system.IsMetric())); - break; - - case "6": - _status.devices.Add(new DeviceCam(xn)); - break; - - case "7": - _status.devices.Add(new DeviceDoorlock(xn)); - break; - - case "8": - _status.devices.Add(new DeviceWindowCovering(xn)); - break; - - //case "9": - // m_status.devices.Add(new DeviceRemoteControl(xn)); - // break; - - //case "10": - // m_status.devices.Add(new DeviceIrTx(xn)); - // break; - - //case "13": - // m_status.devices.Add(new DeviceSerialPort(xn)); - // break - - case "14": - _status.devices.Add(new DeviceSceneController(xn)); - break; - - // case "15": - // m_status.devices.Add(new DeviceAV(xn)); - // break; - - case "16": - _status.devices.Add(new DeviceHumidity(xn)); - break; - - case "17": - _status.devices.Add(new DeviceTemperature(xn, _status.system.IsMetric())); - break; - - case "18": - _status.devices.Add(new DeviceLightSensor(xn)); - break; - - //case "19": - // m_status.devices.Add(new DeviceZwaveInt(xn)); - // break - //case "20": - // m_status.devices.Add(new DeviceInsteonInt(xn)); - // break - - case "21": - _status.devices.Add(new DevicePowerMeter(xn)); - break; - - case "0": - default: - // Check for Google Weather Device - if (xn.Attributes["WindCondition"] != null || xn.Attributes["windcondition"] != null) - { - _status.devices.Add(new DeviceGWeather(xn)); - break; - } - // Check for Bart's sprinkler Device - if (xn.Attributes["OperationMode"] != null) - { - _status.devices.Add(new DeviceSprinkler(xn)); - break; - } - /* Falltrough */ - _status.devices.Add(new DeviceGeneric(xn)); - break; - } - } - } - } - - public long SecondsSinceLastUpdate - { - get { return (_helper.GetSecondsSince1970() - _lastUpdate); } - set { } - } + private string RetrieveURL(string url) + { + // No callback thus Synchronised call (wait for response) + try { + WebClient wc = new WebClient(); + wc.CancelAsync(); // Cancel any current pending Async calls... + return wc.DownloadString(url); + } catch( Exception ) + { + return "ERROR"; + } + } + + public void DoVeraCommandRequest(string param, Action<string> errorReporter) + { + if (_webCommandClient.IsBusy) + { + // TODO: What to do ? cancel pending request or queue new request? - for now just cancel the previous request (user is informed about the progress) + } + string url = veraAddress + "/data_request" + param + "&time=" + DateTime.Now.Ticks; + + // Callback thus ASynchronised call (do NOT wait for response) + try { + _webCommandClientErrorReporter = errorReporter; + _webCommandClient.CancelAsync(); // Cancel any current pending Async calls... + _webCommandClient.DownloadStringAsync(new Uri(url)); + + } catch( Exception e ) + { + _webCommandClientErrorReporter = null; + status.system.ReportCommandError(e.Message); + setScreenUpdateRequired(); + } + } + + public void OnCompletedCommandRequest(object sender, DownloadStringCompletedEventArgs e) + { + if (e.Cancelled) + { + // Communication cancel for some reason, no valid data to be expected + if (_webCommandClientErrorReporter != null) + { + // Send error to dialog message handler + _webCommandClientErrorReporter("Request was canceled"); + } + else + { + // Show eror in MediaPortal Vera-main window + status.system.ReportCommandError("Request was canceled"); + } + setScreenUpdateRequired(); + } + else if (e.Error != null) + { + // Handle error here + if (_webCommandClientErrorReporter != null) + { + // Send error to dialog message handler + _webCommandClientErrorReporter(e.Error.Message); + } + else + { + // Show eror in MediaPortal Vera-main window + status.system.ReportCommandError(e.Error.Message); + } + setScreenUpdateRequired(); + } + else + { + // Communication succes full -> no parse Vera response... + if (!e.Result.ToUpper().Contains("<OK>OK</OK>") && !e.Result.ToUpper().Contains("<JOBID>")) + { + if (_webCommandClientErrorReporter != null) + { + // Send error to dialog message handler + _webCommandClientErrorReporter(e.Result); + } + else + { + // Show eror in MediaPortal Vera-main window + status.system.ReportCommandError(e.Result); + } + setScreenUpdateRequired(); + } + } + // Communication done clear error report handler + _webCommandClientErrorReporter = null; + } + + public void UpdateCurrentStatus() + { + /* Keep updating with webClient timeout 180 sec, even when last time did fail or connection was lost....*/ + if (!_webUpdateClient.IsBusy) + { + string url = veraAddress + "/data_request" + + "?id=lu_sdata&loadtime=" + _status.system.loadtime + + "&dataversion=" + _status.system.dataversion + + "&minimumdelay=" + _minRefreshDelay + + "&timeout=" + _maxRefreshDelay + + "&output_format=xml" + + "&time=" + DateTime.Now.Ticks; + + // Callback thus ASynchronised call (do NOT wait for response) + try { + _webUpdateClient.CancelAsync(); // Cancel any current pending Async calls... + _webUpdateClient.DownloadStringAsync(new Uri(url)); + } catch( Exception e ) + { + _lastUpdateFailed = true; + _lastUpdateErrorMessage = e.Message; + } + _lastUpdate = _helper.GetSecondsSince1970(); + } + } + + public void OnCompletedUpdateStatusRequest(object sender, DownloadStringCompletedEventArgs e) + { + if (!e.Cancelled) + { + // Communication cancel for some reason, no valid data to be expected + if (e.Error != null) + { + // Handle error here + _lastUpdateFailed = true; + _lastUpdateErrorMessage = e.Error.Message; + setScreenUpdateRequired(); + } + else + { + ParseUpdateInfo(e.Result); + // WebClient wc = new WebClient(); + // if (_status.system.dataversion == "0") + // { + //ParseUpdateInfo( wc.DownloadString(@"C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\testdata\text.xml")); + // } + } + } + + // update timer again (took some time to get the data) + _lastUpdate = _helper.GetSecondsSince1970(); + } + + public void ParseUpdateInfo(string veraresponse) + { + var xmlDoc = new XmlDocument(); + try { + xmlDoc.LoadXml(veraresponse); + } catch (Exception) + { + // Parser failed so incorrect data received (could be an interrupted data transfer) + return; + } + // Parse header + XmlNode rootnode = xmlDoc.SelectSingleNode("/root"); + if (rootnode == null) + { + // Not a status update, just return + return; + } + + if (!_screenUpdateRequired) + { + // Clear flag, only when previous update was already handled (might be some new or remove devices/scenes to be displayed) + _status.system.ClearFullReloadFlag(); + } + if (_lastUpdateFailed) + { + _lastUpdateFailed = false; + setScreenUpdateRequired(); + _status.system.ClearConnectionError(); + } + // Process system status first + _status.system.update(rootnode); + if (_status.system.fullReload) + { + // We have a full refresh -> Clear all lists (to get clear of removed devices/scenes/catgories/rooms/etc...) + _status.ClearAllLists(); + } + + // Process Sections + XmlNodeList xnList = xmlDoc.SelectNodes("/root/sections/section"); + foreach (XmlNode xn in xnList) + { + Section sc = _status.GetSectionById( int.Parse(xn.Attributes["id"].Value) ); + if (sc.id != 0) { + sc.Update(xn); + } else { + _status.sections.Add(new Section(xn)); + } + } + + // Process Rooms + xnList = xmlDoc.SelectNodes("/root/rooms/room"); + foreach (XmlNode xn in xnList) + { + Room room = _status.GetRoomById( int.Parse(xn.Attributes["id"].Value) ); + if (room.id != 0) { + room.Update(xn); + } else { + _status.rooms.Add(new Room(xn)); + } + } + + // Process Scenes + xnList = xmlDoc.SelectNodes("/root/scenes/scene"); + // State update of Scenes are not reported done, so they have to be cleaned manualy + // if a message is still valid and/or new message will be reported below + foreach (Scene scene in _status.scenes) + { + scene.ClearCommState(); + } + foreach (XmlNode xn in xnList) + { + Scene sc = _status.GetSceneById( int.Parse(xn.Attributes["id"].Value) ); + if (sc.id != 0) { + sc.Update(xn); + } else { + _status.scenes.Add(new Scene(xn)); + } + } + + // Process Categories + xnList = xmlDoc.SelectNodes("/root/categories/categorie"); + foreach (XmlNode xn in xnList) + { + DevCategories cat = _status.GetCategoryById( int.Parse(xn.Attributes["id"].Value) ); + if (cat.id != 0) { + cat.Update(xn); + } else { + _status.categories.Add(new DevCategories(xn)); + } + } + + // Process Devices + xnList = xmlDoc.SelectNodes("/root/devices/device"); + foreach (XmlNode xn in xnList) + { + DeviceGeneric dev = _status.GetDeviceById( int.Parse(xn.Attributes["id"].Value) ); + if (dev.id != 0) { + // update existing device + dev.Update(xn); + } else { + _status.system.SetFullReloadFlag(); + + // catids: http://wiki.micasaverde.com/index.php/Luup_UPNP_Files + switch (xn.Attributes["category"].Value) + { + //case "1": // TODO: Implement interface device ? + // m_status.devices.Add(new DeviceInterface(xn)); + // break; + + case "2": + _status.devices.Add(new DeviceDimmer(xn)); + break; + + case "3": + case "11": // Generic IO + _status.devices.Add(new DeviceSwitch(xn)); + break; + + case "4": // Generic Sensor + case "12": // Motion Sensor + _status.devices.Add(new DeviceSecurity(xn)); + break; + + case "5": + _status.devices.Add(new DeviceThermostat(xn, _status.system.IsMetric())); + break; + + case "6": + _status.devices.Add(new DeviceCam(xn)); + break; + + case "7": + _status.devices.Add(new DeviceDoorlock(xn)); + break; + + case "8": + _status.devices.Add(new DeviceWindowCovering(xn)); + break; + + //case "9": + // m_status.devices.Add(new DeviceRemoteControl(xn)); + // break; + + //case "10": + // m_status.devices.Add(new DeviceIrTx(xn)); + // break; + + //case "13": + // m_status.devices.Add(new DeviceSerialPort(xn)); + // break + + case "14": + _status.devices.Add(new DeviceSceneController(xn)); + break; + + // case "15": + // m_status.devices.Add(new DeviceAV(xn)); + // break; + + case "16": + _status.devices.Add(new DeviceHumidity(xn)); + break; + + case "17": + _status.devices.Add(new DeviceTemperature(xn, _status.system.IsMetric())); + break; + + case "18": + _status.devices.Add(new DeviceLightSensor(xn)); + break; + + //case "19": + // m_status.devices.Add(new DeviceZwaveInt(xn)); + // break + //case "20": + // m_status.devices.Add(new DeviceInsteonInt(xn)); + // break + + case "21": + _status.devices.Add(new DevicePowerMeter(xn)); + break; + + case "0": + default: + // Check for Google Weather Device + if (xn.Attributes["WindCondition"] != null || xn.Attributes["windcondition"] != null) + { + _status.devices.Add(new DeviceGWeather(xn)); + break; + } + // Check for Bart's sprinkler Device + if (xn.Attributes["OperationMode"] != null) + { + _status.devices.Add(new DeviceSprinkler(xn)); + break; + } + /* Falltrough */ + _status.devices.Add(new DeviceGeneric(xn)); + break; + } + } + } + } + + public long SecondsSinceLastUpdate + { + get { return (_helper.GetSecondsSince1970() - _lastUpdate); } + set { } + } - public List<Scene> scenes - { - get { return _status.scenes; } - set { } - } - - public List<DeviceGeneric> devices - { - get { return _status.devices; } - set { } - } + public List<Scene> scenes + { + get { return _status.scenes; } + set { } + } + + public List<DeviceGeneric> devices + { + get { return _status.devices; } + set { } + } - public List<Room> rooms - { - get { return _status.rooms; } - set { } - } + public List<Room> rooms + { + get { return _status.rooms; } + set { } + } - public List<DevCategories> categories - { - get { return _status.categories; } - set { } - } - - public List<Section> sections - { - get { return _status.sections; } - set { } - } - - public bool lastUpdateFailed - { - get { return _lastUpdateFailed; } - set { _lastUpdateFailed = value; } - } - - public string lastUpdateError - { - get { return _lastUpdateErrorMessage; } - set { } - } - - /// <summary> - /// Invoking this method will clear the update ready flag -> so caller need to handle the screen update - /// </summary> - /// <returns>When true a screen update shall be preformed by the caller</returns> - public bool NewScreenUpdateWaitingAndClearFlag() - { - bool b = _screenUpdateRequired; - _screenUpdateRequired = false; - return b; - } - - public void setScreenUpdateRequired() - { - _screenUpdateRequired = true; - } - /// <summary> - /// A request is currently being handled by Vera, this request takes at least _minRefreshDelay msecs, at most _maxRefreshDelay seconds and will be finished the moment Vera detects a change. - /// As soon as this function returns false a new update request should be invoked (with UpdateCurrentStatus()), Vera will take care of the Refresh delays (by keeping open the http-connection) - /// </summary> - public bool updatePending - { - get { return _webUpdateClient.IsBusy; } - set { } - } - - public VeraStatus status - { - get { return _status; } - set { } - } - - public string veraAddress - { - // TODO: handle FWD server address here, when configured so - get { return _veraIPAddress + ":" +_veraTCPIPPort; } - set { } - } - } + public List<DevCategories> categories + { + get { return _status.categories; } + set { } + } + + public List<Section> sections + { + get { return _status.sections; } + set { } + } + + public bool lastUpdateFailed + { + get { return _lastUpdateFailed; } + set { _lastUpdateFailed = value; } + } + + public string lastUpdateError + { + get { return _lastUpdateErrorMessage; } + set { } + } + + /// <summary> + /// Invoking this method will clear the update ready flag -> so caller need to handle the screen update + /// </summary> + /// <returns>When true a screen update shall be preformed by the caller</returns> + public bool NewScreenUpdateWaitingAndClearFlag() + { + bool b = _screenUpdateRequired; + _screenUpdateRequired = false; + return b; + } + + public void setScreenUpdateRequired() + { + _screenUpdateRequired = true; + } + /// <summary> + /// A request is currently being handled by Vera, this request takes at least _minRefreshDelay msecs, at most _maxRefreshDelay seconds and will be finished the moment Vera detects a change. + /// As soon as this function returns false a new update request should be invoked (with UpdateCurrentStatus()), Vera will take care of the Refresh delays (by keeping open the http-connection) + /// </summary> + public bool updatePending + { + get { return _webUpdateClient.IsBusy; } + set { } + } + + public VeraStatus status + { + get { return _status; } + set { } + } + + public string discreteVeraAddress + { + get { + if (_discreteVeraAddress == null) + { // Accessing this variable will set the discrete value aswell + string dum = veraAddress; + } + return _discreteVeraAddress; + } + } + private string _discreteVeraAddress = null; + + public string veraAddress + { + get { + if (_realVeraAddress == null) + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) + { + if (xmlreader.GetValueAsBool("veracontroller", "remoteConnected", false)) + { + string user = xmlreader.GetValueAsString("veracontroller", "miosusername", ""); + string pass = xmlreader.GetValueAsString("veracontroller", "miospassword", ... [truncated message content] |
From: <Ba...@us...> - 2012-01-23 23:04:54
|
Revision: 4424 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4424&view=rev Author: BartEv Date: 2012-01-23 23:04:46 +0000 (Mon, 23 Jan 2012) Log Message: ----------- Scene and device update improved Modified Paths: -------------- trunk/plugins/VeraControl/BaseDevice.cs trunk/plugins/VeraControl/DeviceCam.cs trunk/plugins/VeraControl/DeviceGeneric.cs trunk/plugins/VeraControl/Scene.cs trunk/plugins/VeraControl/VeraCommunication.cs trunk/plugins/VeraControl/VeraControl.cs Modified: trunk/plugins/VeraControl/BaseDevice.cs =================================================================== --- trunk/plugins/VeraControl/BaseDevice.cs 2012-01-21 23:46:35 UTC (rev 4423) +++ trunk/plugins/VeraControl/BaseDevice.cs 2012-01-23 23:04:46 UTC (rev 4424) @@ -13,142 +13,170 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of BaseDevice. - /// </summary> - public class BaseDevice - { - public long _lastUpdate = 0; - public long _lastPendingUpdate = 0; - public bool _screenUpdateRequired = false; - private string _name = "unknown device"; - private int _id = 0; - private int _room = 0; - - // not connected (-2), none (-1), pending (0,1,5,6), success(4), error (2,3) - private DevState _dsState = DevState.NONE; - private string _comment = ""; // red(error), green(success) or blue(pending) - icon/text - - public VeraHelper _helper = VeraHelper.Instance; - public VeraCommunication _vera = VeraCommunication.Instance; - - public BaseDevice(XmlNode xn) - { - if (xn != null) - { - Update(xn); - } - } - - /// <summary> - /// Process Vera update information - /// </summary> - public virtual bool Update(XmlNode xn) - { - _name = _helper.GetAttrAsString(xn, "name", _name); - _id = _helper.GetAttrAsInt (xn, "id", _id); - _room = _helper.GetAttrAsInt (xn, "room", _room); - - string tempComment = _helper.GetAttrAsString(xn, "comment", _comment ); - DevState tempDsState = _helper.ToDevState(_helper.GetAttrAsInt(xn, "state", -1)); - if (_dsState != DevState.PENDING || tempDsState != DevState.NONE || (tempDsState == DevState.NONE && ((_lastPendingUpdate / TimeSpan.TicksPerSecond ) < (DateTime.Now.Ticks / TimeSpan.TicksPerSecond)))) - { // If state was set to pending next update should contain a new state or still pending - so do not clear pending flag for at least 10 seconds - _comment = tempComment; - _dsState = tempDsState; - } - if (_id == 0) - { - // void device no further processing needed - return false; - } - - // Set update flag - _screenUpdateRequired = true; - _lastUpdate = DateTime.Now.Ticks; - return true; - } - - public int id - { - get { return _id; } - set { } - } - - public string name - { - get { return _name; } - set { } - } + /// <summary> + /// Description of BaseDevice. + /// </summary> + public class BaseDevice + { + private long _lastUpdate = 0; + private long _lastPendingUpdate = 0; + private bool _screenUpdateRequired = false; + private string _name = "unknown device"; + private int _id = 0; + private int _room = 0; + + // not connected (-2), none (-1), pending (0,1,5,6), success(4), error (2,3) + private DevState _dsState = DevState.NONE; + private string _comment = ""; // red(error), green(success) or blue(pending) - icon/text + + public VeraHelper _helper = VeraHelper.Instance; + public VeraCommunication _vera = VeraCommunication.Instance; + + public BaseDevice(XmlNode xn) + { + if (xn != null) + { + Update(xn); + } + } + + /// <summary> + /// Process Vera update information + /// </summary> + public virtual bool Update(XmlNode xn) + { + _name = _helper.GetAttrAsString(xn, "name", _name); + _id = _helper.GetAttrAsInt (xn, "id", _id); + _room = _helper.GetAttrAsInt (xn, "room", _room); + _comment = _helper.GetAttrAsString(xn, "comment", _comment ); + _dsState = _helper.ToDevState(_helper.GetAttrAsInt(xn, "state", -1)); + + if (_id == 0) + { + // void device no further processing needed + return false; + } + + // Set update flag + screenUpdateRequired = true; + lastUpdate = DateTime.Now.Ticks; + return true; + } + + public virtual string GetIconName() + { + return ""; + } + + public virtual string GetStatusText() + { + return ""; + } + + public int id + { + get { return _id; } + set { } + } + + public string name + { + get { return _name; } + set { } + } - public bool InRoom(int id) - { - return (_room == id); - } - - public int room - { - get { return _room; } - set { _room = value; } - } - - public DevState commstate - { - get { return _dsState; } - set { } - } - - public string comment - { - get { return (commstate != DevState.NONE ? _comment : ""); } - set { } - } - - public void ReportPendingRequest() - { - _dsState = DevState.PENDING; - _comment = "Sending command..."; - _screenUpdateRequired = true; - _lastUpdate = DateTime.Now.Ticks; - _lastPendingUpdate = _lastUpdate; - } - - /// <summary> - /// Callback function for Ansync Web Client call on to report errors... - /// </summary> - public void ReportRequestError(string message) - { - _dsState = DevState.COMMAND_ERROR; - _comment = message; - _screenUpdateRequired = true; - _lastUpdate = DateTime.Now.Ticks; - } - - public void ClearCommState() - { - _dsState = DevState.NONE; - } - - /// <summary> - /// True when an update was processed after the give time stamp - /// </summary> - public virtual bool NewUpdateSince(long timePreviousCheck) - { - return (timePreviousCheck <= _lastUpdate); - } - - /// <summary> - /// Invoking this method will clear the update ready flag -> so caller need to handle the screen update - /// </summary> - public virtual bool NewScreenUpdateWaitingAndClearFlag() - { - bool b = _screenUpdateRequired; - _screenUpdateRequired = false; - return b; - } - - public override string ToString() - { - return name; - } - } + public bool InRoom(int id) + { + return (_room == id); + } + + public int room + { + get { return _room; } + set { _room = value; } + } + + public DevState commstate + { + get { return _dsState; } + set { } + } + + public string comment + { + get { return (commstate != DevState.NONE ? _comment : ""); } + set { } + } + + public bool screenUpdateRequired + { + get { return _screenUpdateRequired; } + set { + if (value) + { // If at least one device report screen update required, Vera should take over this report + _vera.setScreenUpdateRequired(); + } + _screenUpdateRequired = value; + } + } + + public long lastUpdate + { + get { return _lastUpdate; } + set { _lastUpdate = value; } + } + + public void ReportPendingRequest() + { + _dsState = DevState.PENDING; + _comment = "Sending command..."; + screenUpdateRequired = true; + lastUpdate = DateTime.Now.Ticks; + _lastPendingUpdate = lastUpdate; + } + + /// <summary> + /// Callback function for Ansync Web Client call on to report errors... + /// </summary> + public void ReportRequestError(string message) + { + _dsState = DevState.COMMAND_ERROR; + _comment = message; + screenUpdateRequired = true; + lastUpdate = DateTime.Now.Ticks; + } + + public void ClearCommState() + { + if (_dsState != DevState.NONE) + { + _dsState = DevState.NONE; + screenUpdateRequired = true; + lastUpdate = DateTime.Now.Ticks; + } + } + + /// <summary> + /// True when an update was processed after the give time stamp + /// </summary> + public virtual bool NewUpdateSince(long timePreviousCheck) + { + return (timePreviousCheck <= lastUpdate); + } + + /// <summary> + /// Invoking this method will clear the update ready flag -> so caller need to handle the screen update + /// </summary> + public virtual bool NewScreenUpdateWaitingAndClearFlag() + { + bool b = screenUpdateRequired; + screenUpdateRequired = false; + return b; + } + + public override string ToString() + { + return name; + } + } } Modified: trunk/plugins/VeraControl/DeviceCam.cs =================================================================== --- trunk/plugins/VeraControl/DeviceCam.cs 2012-01-21 23:46:35 UTC (rev 4423) +++ trunk/plugins/VeraControl/DeviceCam.cs 2012-01-23 23:04:46 UTC (rev 4424) @@ -90,21 +90,21 @@ { // Invoking this method will clear the update ready flag -> so caller need to handle the update // A cam device requires an update every refreshRate seconds - bool b = _screenUpdateRequired || HasRefreshDelayPassed(DateTime.Now.Ticks); - _screenUpdateRequired = false; + bool b = screenUpdateRequired || HasRefreshDelayPassed(DateTime.Now.Ticks); + screenUpdateRequired = false; if (b) { - _lastUpdate = DateTime.Now.Ticks; + lastUpdate = DateTime.Now.Ticks; } return b; } public override bool NewUpdateSince(long lTimePreviousCheck) { - bool b = (lTimePreviousCheck <= _lastUpdate) || HasRefreshDelayPassed(_lastUpdate); + bool b = (lTimePreviousCheck <= lastUpdate) || HasRefreshDelayPassed(lastUpdate); if (b) { - _lastUpdate = DateTime.Now.Ticks; + lastUpdate = DateTime.Now.Ticks; } return b; } @@ -114,7 +114,7 @@ if (id == 0) { _vera.status.system.ReportCommandError("Unknown device"); - _screenUpdateRequired = true; + screenUpdateRequired = true; return; } string cmd = "?id=lu_action&DeviceNum=" + id + "&serviceId=urn:micasaverde-com:serviceId:PanTiltZoom1&action=" + direction; Modified: trunk/plugins/VeraControl/DeviceGeneric.cs =================================================================== --- trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-21 23:46:35 UTC (rev 4423) +++ trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-23 23:04:46 UTC (rev 4424) @@ -96,12 +96,12 @@ set { } } - public virtual string GetIconName() + public override string GetIconName() { return "generic_sensor"; } - public virtual string GetStatusText() + public override string GetStatusText() { return ""; } Modified: trunk/plugins/VeraControl/Scene.cs =================================================================== --- trunk/plugins/VeraControl/Scene.cs 2012-01-21 23:46:35 UTC (rev 4423) +++ trunk/plugins/VeraControl/Scene.cs 2012-01-23 23:04:46 UTC (rev 4424) @@ -14,62 +14,60 @@ namespace VeraControl.Properties { - /// <summary> - /// Description of Scene. - /// </summary> - public class Scene : BaseDevice - { - public Scene(XmlNode xn) : base (xn) - { - if (xn != null) - { - Update(xn); - } - } - - private bool _active = false; - - public override bool Update(XmlNode xn) - { - _active = _helper.GetAttrAsBool(xn, "active", _active); - bool b = base.Update(xn); - - // Make sure the room exists or else make it 0 - if (room != 0 && !_vera.status.IsRoomFound(room)) - { - room = 0; - } - return b; - } - - public bool IsActive() - { - return _active; - } + /// <summary> + /// Description of Scene. + /// </summary> + public class Scene : BaseDevice + { + public Scene(XmlNode xn) : base (xn) + { + if (xn != null) + { + Update(xn); + } + } + + private bool _active = false; + + public override bool Update(XmlNode xn) + { + _active = _helper.GetAttrAsBool(xn, "active", _active); + bool b = base.Update(xn); + + // Make sure the room exists or else make it 0 + if (room != 0 && !_vera.status.IsRoomFound(room)) + { + room = 0; + } + return b; + } + + public override string GetIconName() + { + return "Scenes"; + } + + public override string GetStatusText() + { + return (room == 0 ? "" : _vera.status.GetRoomById(room).name); + } + + public bool IsActive() + { + return _active; + } - public void Run() - { - if (id == 0) - { - _vera.status.system.ReportCommandError("Unknown scene"); - _screenUpdateRequired = true; - return; - } - ReportPendingRequest(); - string cmd = "?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum="+id; - _vera.DoVeraCommandRequest(cmd, ReportRequestError); - } - - public override bool NewScreenUpdateWaitingAndClearFlag( ) - { - // Scenes are not reported Done by Vera so the will time out... - bool b = base.NewScreenUpdateWaitingAndClearFlag(); - if (commstate != DevState.NONE && (_lastUpdate < (DateTime.Now.Ticks - (10 * 10000000)))) - { - ClearCommState(); - return true; - } - return b; - } - } + public void Run() + { + if (id == 0) + { + _vera.status.system.ReportCommandError("Unknown scene"); + screenUpdateRequired = true; + return; + } + ReportPendingRequest(); + string cmd = "?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum="+id; + _vera.DoVeraCommandRequest(cmd, ReportRequestError); + } + } } Modified: trunk/plugins/VeraControl/VeraCommunication.cs =================================================================== --- trunk/plugins/VeraControl/VeraCommunication.cs 2012-01-21 23:46:35 UTC (rev 4423) +++ trunk/plugins/VeraControl/VeraCommunication.cs 2012-01-23 23:04:46 UTC (rev 4424) @@ -23,12 +23,12 @@ public class VeraStatus { - public DeviceSystem system = new DeviceSystem(); - public List<DeviceGeneric> devices = new List<DeviceGeneric>(); - public List<Scene> scenes = new List<Scene>(); - public List<Room> rooms = new List<Room>(); - public List<DevCategories> categories = new List<DevCategories>(); - public List<Section> sections = new List<Section>(); + public DeviceSystem system = new DeviceSystem(); + public List<DeviceGeneric> devices = new List<DeviceGeneric>(); + public List<Scene> scenes = new List<Scene>(); + public List<Room> rooms = new List<Room>(); + public List<DevCategories> categories = new List<DevCategories>(); + public List<Section> sections = new List<Section>(); #region Vers get by id support functions @@ -165,14 +165,14 @@ public sealed class VeraCommunication { - private static volatile VeraCommunication _instance; + private static volatile VeraCommunication _instance; private static object _syncRoot = new Object(); private VeraHelper _helper = VeraHelper.Instance; // Config data private string _veraIPAddress; private string _veraTCPIPPort; - private int _maxRefreshDelay; // Maximun delay between 2 status updates in seconds + private int _maxRefreshDelay; // Maximun delay between 2 status updates in seconds private int _minRefreshDelay = 1000; // Minimun delay between 2 status updates in miliseconds // Actual device information @@ -266,7 +266,7 @@ { _webCommandClientErrorReporter = null; status.system.ReportCommandError(e.Message); - _screenUpdateRequired = true; + setScreenUpdateRequired(); } } @@ -285,7 +285,7 @@ // Show eror in MediaPortal Vera-main window status.system.ReportCommandError("Request was canceled"); } - _screenUpdateRequired = true; + setScreenUpdateRequired(); } else if (e.Error != null) { @@ -300,7 +300,7 @@ // Show eror in MediaPortal Vera-main window status.system.ReportCommandError(e.Error.Message); } - _screenUpdateRequired = true; + setScreenUpdateRequired(); } else { @@ -317,7 +317,7 @@ // Show eror in MediaPortal Vera-main window status.system.ReportCommandError(e.Result); } - _screenUpdateRequired = true; + setScreenUpdateRequired(); } } // Communication done clear error report handler @@ -358,9 +358,9 @@ if (e.Error != null) { // Handle error here - _lastUpdateFailed = true; + _lastUpdateFailed = true; _lastUpdateErrorMessage = e.Error.Message; - _screenUpdateRequired = true; + setScreenUpdateRequired(); } else { @@ -399,7 +399,7 @@ if (_lastUpdateFailed) { _lastUpdateFailed = false; - _screenUpdateRequired = true; + setScreenUpdateRequired(); _status.system.ClearConnectionError(); } // Process system status first @@ -436,6 +436,12 @@ // Process Scenes xnList = xmlDoc.SelectNodes("/root/scenes/scene"); + // State update of Scenes are not reported done, so they have to be cleaned manualy + // if a message is still valid and/or new message will be reported below + foreach (Scene scene in _status.scenes) + { + scene.ClearCommState(); + } foreach (XmlNode xn in xnList) { Scene sc = _status.GetSceneById( int.Parse(xn.Attributes["id"].Value) ); @@ -444,9 +450,6 @@ } else { _status.scenes.Add(new Scene(xn)); } - - // At least one scene was found and thus screen update required - _screenUpdateRequired = true; } // Process Categories @@ -571,8 +574,6 @@ break; } } - // At least one device update/new was found and thus screen update required - _screenUpdateRequired = true; } } @@ -635,6 +636,10 @@ return b; } + public void setScreenUpdateRequired() + { + _screenUpdateRequired = true; + } /// <summary> /// A request is currently being handled by Vera, this request takes at least _minRefreshDelay msecs, at most _maxRefreshDelay seconds and will be finished the moment Vera detects a change. /// As soon as this function returns false a new update request should be invoked (with UpdateCurrentStatus()), Vera will take care of the Refresh delays (by keeping open the http-connection) Modified: trunk/plugins/VeraControl/VeraControl.cs =================================================================== --- trunk/plugins/VeraControl/VeraControl.cs 2012-01-21 23:46:35 UTC (rev 4423) +++ trunk/plugins/VeraControl/VeraControl.cs 2012-01-23 23:04:46 UTC (rev 4424) @@ -35,212 +35,216 @@ namespace VeraControl { - public enum Actiontrigger - { - MUSIC_START_PLAYING = 0, - MUSIC_PAUSED, - MUSIC_PAUSE_RESUMED, - MUSIC_STOPPED, - - VIDEO_START_PLAYING, - VIDEO_PAUSED, - VIDEO_PAUSE_RESUMED, - VIDEO_STOPPED, - - TV_START_PLAYING, - TV_PAUSED, - TV_PAUSE_RESUMED, - TV_STOPPED, - - RECORDING_START_PLAYING, - RECORDING_PAUSED, - RECORDING_PAUSE_RESUMED, - RECORDING_STOPPED, - - RADIO_START_PLAYING, - RADIO_PAUSED, - RADIO_PAUSE_RESUMED, - RADIO_STOPPED, - - UNKNOWN_START_PLAYING, - UNKNOWN_PAUSED, - UNKNOWN_PAUSE_RESUMED, - UNKNOWN_STOPPED, - - MP_START_UP, - MP_SHUTDOWN, - MP_EXIT, - - LAST_ACTIONTRIGGER - }; - - /// <summary> - /// Description of VeraControl. - /// </summary> - public class VeraControl : GUIInternalWindow, ISetupForm - { - [SkinControlAttribute(10)] protected GUILabelControl _title = null; - [SkinControl(20)] protected GUISpinButton _catList = null; - [SkinControl(40)] protected GUIListControl _leftList = null; - [SkinControl(50)] protected GUIListControl _rightList = null; - [SkinControl(60)] protected GUIButtonControl _actionButton = null; - [SkinControl(70)] protected GUIToggleButtonControl _actionTriggerButton = null; - - [SkinControl(30)] protected GUIImage _cmtImage = null; - [SkinControlAttribute(31)] protected GUILabelControl _comment = null; - - private int _pluginID = 1972; - private VeraCommunication _vera = VeraCommunication.Instance; - private int _selectedRoom = Int16.MaxValue; - private int _selectedCategory = Int16.MaxValue; - public Actiontrigger _lastAction = Actiontrigger.LAST_ACTIONTRIGGER; - private VeraHelper _helper = new VeraHelper(); - - public bool _enableSceneTrigger = false; - private bool _lastUpdateFailed = false; - private string _titleTxt = "Micasa Verde - Vera control"; - - public VeraControl() - { - } + public enum Actiontrigger + { + MUSIC_START_PLAYING = 0, + MUSIC_PAUSED, + MUSIC_PAUSE_RESUMED, + MUSIC_STOPPED, + + VIDEO_START_PLAYING, + VIDEO_PAUSED, + VIDEO_PAUSE_RESUMED, + VIDEO_STOPPED, + + TV_START_PLAYING, + TV_PAUSED, + TV_PAUSE_RESUMED, + TV_STOPPED, + + RECORDING_START_PLAYING, + RECORDING_PAUSED, + RECORDING_PAUSE_RESUMED, + RECORDING_STOPPED, + + RADIO_START_PLAYING, + RADIO_PAUSED, + RADIO_PAUSE_RESUMED, + RADIO_STOPPED, + + UNKNOWN_START_PLAYING, + UNKNOWN_PAUSED, + UNKNOWN_PAUSE_RESUMED, + UNKNOWN_STOPPED, + + MP_START_UP, + MP_SHUTDOWN, + MP_EXIT, + + LAST_ACTIONTRIGGER + }; + + /// <summary> + /// Description of VeraControl. + /// </summary> + public class VeraControl : GUIInternalWindow, ISetupForm + { + [SkinControlAttribute(10)] protected GUILabelControl _title = null; + [SkinControl(20)] protected GUISpinButton _catList = null; + [SkinControl(40)] protected GUIListControl _leftList = null; + [SkinControl(50)] protected GUIListControl _rightList = null; + [SkinControl(60)] protected GUIButtonControl _actionButton = null; + [SkinControl(70)] protected GUIToggleButtonControl _actionTriggerButton = null; + + [SkinControl(30)] protected GUIImage _cmtImage = null; + [SkinControlAttribute(31)] protected GUILabelControl _comment = null; + + const int ALL = Int16.MaxValue; + const int NO_SCENE_SELECTED = Int16.MaxValue; + + + private int _pluginID = 1972; + private VeraCommunication _vera = VeraCommunication.Instance; + private int _selectedRoom = ALL; + private int _selectedCategory = ALL; + public Actiontrigger _lastAction = Actiontrigger.LAST_ACTIONTRIGGER; + private VeraHelper _helper = new VeraHelper(); + + public bool _enableSceneTrigger = false; + private bool _lastUpdateFailed = false; + private string _titleTxt = "Micasa Verde - Vera control"; + + public VeraControl() + { + } - #region ISetupForm Members + #region ISetupForm Members - // Returns the name of the plugin which is shown in the plugin menu - public string PluginName() - { - return "Vera Controller"; - } + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "Vera Controller"; + } - // Returns the description of the plugin is shown in the plugin menu - public string Description() - { - return "Micasa Verde Vera 2 controller, let Media Portal control your Z-wave devices"; - } + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "Micasa Verde Vera 2 controller, let Media Portal control your Z-wave devices"; + } - // Returns the author of the plugin which is shown in the plugin menu - public string Author() - { - return "Bart Eversdijk"; - } + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Bart Eversdijk"; + } - // show the setup dialog - public void ShowPlugin() - { - VeraSetupForm verasetup = new VeraSetupForm(); - verasetup.ShowDialog(); - } + // show the setup dialog + public void ShowPlugin() + { + VeraSetupForm verasetup = new VeraSetupForm(); + verasetup.ShowDialog(); + } - // Indicates whether plugin can be enabled/disabled - public bool CanEnable() - { - return true; - } + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } - // Get Windows-ID - public int GetWindowId() - { - // WindowID of windowplugin belonging to this setup - // enter your own unique code - return _pluginID; - } + // Get Windows-ID + public int GetWindowId() + { + // WindowID of windowplugin belonging to this setup + // enter your own unique code + return _pluginID; + } - // Indicates if plugin is enabled by default; - public bool DefaultEnabled() - { - return true; - } + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } - // indicates if a plugin has it's own setup screen - public bool HasSetup() - { - return true; - } + // indicates if a plugin has it's own setup screen + public bool HasSetup() + { + return true; + } - /// <summary> - /// If the plugin should have it's own button on the main menu of Mediaportal then it - /// should return true to this method, otherwise if it should not be on home - /// it should return false - /// </summary> - /// <param name="strButtonText">text the button should have</param> - /// <param name="strButtonImage">image for the button, or empty for default</param> - /// <param name="strButtonImageFocus">image for the button, or empty for default</param> - /// <param name="strPictureImage">subpicture for the button or empty for none</param> - /// <returns>true : plugin needs it's own button on home - /// false : plugin does not need it's own button on home</returns> + /// <summary> + /// If the plugin should have it's own button on the main menu of Mediaportal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs it's own button on home + /// false : plugin does not need it's own button on home</returns> - public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) - { - strButtonText = PluginName(); - strButtonImage = "hover_remote.png"; - strButtonImageFocus = "hover_remote.png"; - strPictureImage = "hover_remote.png"; - return true; - } + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + strButtonImage = "hover_remote.png"; + strButtonImageFocus = "hover_remote.png"; + strPictureImage = "hover_remote.png"; + return true; + } - // With GetID it will be an window-plugin / otherwise a process-plugin - // Enter the id number here again - public override int GetID - { - get { return _pluginID; } - set { } - } + // With GetID it will be an window-plugin / otherwise a process-plugin + // Enter the id number here again + public override int GetID + { + get { return _pluginID; } + set { } + } - #endregion + #endregion - public override bool Init() - { - _selectedRoom = Int16.MaxValue; - _selectedCategory = Int16.MaxValue; + public override bool Init() + { + _selectedRoom = ALL; + _selectedCategory = ALL; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) - { - _enableSceneTrigger = xmlreader.GetValueAsBool("veracontroller", "enableSceneTrigger", false); - } - - GUIWindowManager.OnNewAction += new OnActionHandler(OnNewAction); - - Player.PlayBackEnded += new Player.EndedHandler(g_Player_PlayBackEnded); - Player.PlayBackStarted += new Player.StartedHandler(g_Player_PlayBackStarted); - Player.PlayBackStopped += new Player.StoppedHandler(g_Player_PlayBackStopped); + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.MPSettings()) + { + _enableSceneTrigger = xmlreader.GetValueAsBool("veracontroller", "enableSceneTrigger", false); + } + + GUIWindowManager.OnNewAction += new OnActionHandler(OnNewAction); + + Player.PlayBackEnded += new Player.EndedHandler(g_Player_PlayBackEnded); + Player.PlayBackStarted += new Player.StartedHandler(g_Player_PlayBackStarted); + Player.PlayBackStopped += new Player.StoppedHandler(g_Player_PlayBackStopped); - // Handle MP start-up trigger - do this is a different Thread to not block MP-start up - new Thread( () => { - _vera.UpdateCurrentStatus(); - // Run startup trigger after first update - if (_enableSceneTrigger) - { - while (_vera.updatePending) - { - Thread.Sleep(1000); - } - handleActionTriggers(Actiontrigger.MP_START_UP); - } - }).Start(); - return Load(GUIGraphicsContext.Skin+@"\VeraControl.xml"); - } + // Handle MP start-up trigger - do this is a different Thread to not block MP-start up + new Thread( () => { + _vera.UpdateCurrentStatus(); + // Run startup trigger after first update + if (_enableSceneTrigger) + { + while (_vera.updatePending) + { + Thread.Sleep(1000); + } + handleActionTriggers(Actiontrigger.MP_START_UP); + } + }).Start(); + return Load(GUIGraphicsContext.Skin+@"\VeraControl.xml"); + } - protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) - { - if (control==_rightList) - OnRightlistCrtl((GUIListControl)control); - - if (control==_leftList) - OnLeftlistCrtl((GUIListControl)control); - - if (control==_catList) - OnCategoryList((GUISpinButton)control); - - if (control==_actionButton) - OnActionButton((GUIButtonControl)control); - - if (control==_actionTriggerButton) - OnActionTrigger((GUIToggleButtonControl)control); - - base.OnClicked (controlId, control, actionType); - } + protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) + { + if (control==_rightList) + OnRightlistCrtl((GUIListControl)control); + + if (control==_leftList) + OnLeftlistCrtl((GUIListControl)control); + + if (control==_catList) + OnCategoryList((GUISpinButton)control); + + if (control==_actionButton) + OnActionButton((GUIButtonControl)control); + + if (control==_actionTriggerButton) + OnActionTrigger((GUIToggleButtonControl)control); + + base.OnClicked (controlId, control, actionType); + } - /* Not valid until MP version 1.3 + /* Not valid until MP version 1.3 protected override void OnFocus(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (control==RightList) @@ -251,601 +255,586 @@ base.OnClicked (controlId, control, actionType); } - */ - - private void OnNewAction(Action action) - { - switch(action.wID) - { - case Action.ActionType.ACTION_PAUSE: - if (Player.Paused || Player.Playing) { - if (Player.IsMusic) { - handleActionTriggers(Player.Paused ? Actiontrigger.MUSIC_PAUSED : Actiontrigger.MUSIC_PAUSE_RESUMED); - } else if (Player.IsRadio) { - handleActionTriggers(Player.Paused ? Actiontrigger.RADIO_PAUSED : Actiontrigger.RADIO_PAUSE_RESUMED); - } else if (Player.IsTVRecording) { - handleActionTriggers(Player.Paused ? Actiontrigger.RECORDING_PAUSED : Actiontrigger.RECORDING_PAUSE_RESUMED); - } else if (Player.IsTV || Player.IsTimeShifting) { - handleActionTriggers(Player.Paused ? Actiontrigger.TV_PAUSED : Actiontrigger.TV_PAUSE_RESUMED); - } else if (Player.IsVideo ) { - handleActionTriggers(Player.Paused ? Actiontrigger.VIDEO_PAUSED : Actiontrigger.VIDEO_PAUSE_RESUMED); - } else { - handleActionTriggers(Player.Paused ? Actiontrigger.UNKNOWN_PAUSED : Actiontrigger.UNKNOWN_PAUSE_RESUMED); - } - } - break; + */ + + private void OnNewAction(Action action) + { + switch(action.wID) + { + case Action.ActionType.ACTION_PAUSE: + if (Player.Paused || Player.Playing) { + if (Player.IsMusic) { + handleActionTriggers(Player.Paused ? Actiontrigger.MUSIC_PAUSED : Actiontrigger.MUSIC_PAUSE_RESUMED); + } else if (Player.IsRadio) { + handleActionTriggers(Player.Paused ? Actiontrigger.RADIO_PAUSED : Actiontrigger.RADIO_PAUSE_RESUMED); + } else if (Player.IsTVRecording) { + handleActionTriggers(Player.Paused ? Actiontrigger.RECORDING_PAUSED : Actiontrigger.RECORDING_PAUSE_RESUMED); + } else if (Player.IsTV || Player.IsTimeShifting) { + handleActionTriggers(Player.Paused ? Actiontrigger.TV_PAUSED : Actiontrigger.TV_PAUSE_RESUMED); + } else if (Player.IsVideo ) { + handleActionTriggers(Player.Paused ? Actiontrigger.VIDEO_PAUSED : Actiontrigger.VIDEO_PAUSE_RESUMED); + } else { + handleActionTriggers(Player.Paused ? Actiontrigger.UNKNOWN_PAUSED : Actiontrigger.UNKNOWN_PAUSE_RESUMED); + } + } + break; - case Action.ActionType.ACTION_CONTEXT_MENU: - if (GUIWindowManager.ActiveWindow == GetWindowId()) - { - showInfoDialog(); - } - break; - - case Action.ActionType.ACTION_EXIT: - handleActionTriggers(Actiontrigger.MP_EXIT); - break; + case Action.ActionType.ACTION_CONTEXT_MENU: + if (GUIWindowManager.ActiveWindow == GetWindowId()) + { + showInfoDialog(); + } + break; + + case Action.ActionType.ACTION_EXIT: + handleActionTriggers(Actiontrigger.MP_EXIT); + break; - case Action.ActionType.ACTION_HIBERNATE: - case Action.ActionType.ACTION_POWER_OFF: - case Action.ActionType.ACTION_REBOOT: - case Action.ActionType.ACTION_SHUTDOWN: - case Action.ActionType.ACTION_SUSPEND: - handleActionTriggers(Actiontrigger.MP_SHUTDOWN); - break; - - // Resume ? how to determine (Plug in init?) - default: - break; - - } - } - - private void g_Player_PlayBackEnded(Player.MediaType media, string filename) - { - g_Player_PlayBackStopped(media, 0, filename); - } - - private void g_Player_PlayBackStopped(Player.MediaType media, int stoptime, string filename) - { - switch(media) - { - case Player.MediaType.Music: - handleActionTriggers(Actiontrigger.MUSIC_STOPPED); - break; - case Player.MediaType.Radio: - handleActionTriggers(Actiontrigger.RADIO_STOPPED); - break; - case Player.MediaType.Recording: - handleActionTriggers(Actiontrigger.RECORDING_STOPPED); - break; - case Player.MediaType.TV: - handleActionTriggers(Actiontrigger.TV_STOPPED); - break; - case Player.MediaType.Video: - handleActionTriggers(Actiontrigger.VIDEO_STOPPED); - break; - case Player.MediaType.Unknown: - default: - handleActionTriggers(Actiontrigger.UNKNOWN_STOPPED); - break; - } - } - - private void g_Player_PlayBackStarted(Player.MediaType media, string filename) - { - switch(media) - { - case Player.MediaType.Music: - if (_lastAction == Actiontrigger.MUSIC_PAUSED) { - handleActionTriggers(Actiontrigger.MUSIC_PAUSE_RESUMED); - } else if (_lastAction != Actiontrigger.MUSIC_PAUSE_RESUMED) { - triggerStopPlayingMedia(Actiontrigger.MUSIC_START_PLAYING); - handleActionTriggers(Actiontrigger.MUSIC_START_PLAYING); - } - break; - case Player.MediaType.Radio: - if (_lastAction == Actiontrigger.RADIO_PAUSED) { - handleActionTriggers(Actiontrigger.RADIO_PAUSE_RESUMED); - } else if (_lastAction != Actiontrigger.RADIO_PAUSE_RESUMED) { - triggerStopPlayingMedia(Actiontrigger.RADIO_START_PLAYING); - handleActionTriggers(Actiontrigger.RADIO_START_PLAYING); - } - break; - case Player.MediaType.Recording: - if (_lastAction == Actiontrigger.RECORDING_PAUSED) { - handleActionTriggers(Actiontrigger.RECORDING_PAUSE_RESUMED); - } else if (_lastAction != Actiontrigger.RECORDING_PAUSE_RESUMED) { - triggerStopPlayingMedia(Actiontrigger.RECORDING_START_PLAYING); - handleActionTriggers(Actiontrigger.RECORDING_START_PLAYING); - } - break; - case Player.MediaType.TV: - if (_lastAction == Actiontrigger.TV_PAUSED) { - handleActionTriggers(Actiontrigger.TV_PAUSE_RESUMED); - } else if (_lastAction != Actiontrigger.TV_PAUSE_RESUMED) { - triggerStopPlayingMedia(Actiontrigger.TV_START_PLAYING); - handleActionTriggers(Actiontrigger.TV_START_PLAYING); - } - break; - case Player.MediaType.Video: - if (_lastAction == Actiontrigger.VIDEO_PAUSED) { - handleActionTriggers(Actiontrigger.VIDEO_PAUSE_RESUMED); - } else if (_lastAction != Actiontrigger.VIDEO_PAUSE_RESUMED) { - triggerStopPlayingMedia(Actiontrigger.TV_START_PLAYING); - handleActionTriggers(Actiontrigger.VIDEO_START_PLAYING); - } - break; - case Player.MediaType.Unknown: - default: - if (_lastAction == Actiontrigger.UNKNOWN_PAUSED) { - handleActionTriggers(Actiontrigger.UNKNOWN_PAUSE_RESUMED); - } else if (_lastAction != Actiontrigger.UNKNOWN_PAUSE_RESUMED) { - triggerStopPlayingMedia(Actiontrigger.UNKNOWN_START_PLAYING); - handleActionTriggers(Actiontrigger.UNKNOWN_START_PLAYING); - } - break; - } - } - - private void triggerStopPlayingMedia(Actiontrigger newAction) - { - switch(_lastAction) - { - case Actiontrigger.MUSIC_START_PLAYING: - case Actiontrigger.MUSIC_PAUSED: - case Actiontrigger.MUSIC_PAUSE_RESUMED: - if (newAction != Actiontrigger.MUSIC_START_PLAYING) { - handleActionTriggers(Actiontrigger.MUSIC_STOPPED); - } - break; - case Actiontrigger.RADIO_START_PLAYING: - case Actiontrigger.RADIO_PAUSED: - case Actiontrigger.RADIO_PAUSE_RESUMED: - if (newAction != Actiontrigger.RADIO_START_PLAYING) { - handleActionTriggers(Actiontrigger.RADIO_STOPPED); - } - break; - case Actiontrigger.RECORDING_START_PLAYING: - case Actiontrigger.RECORDING_PAUSED: - case Actiontrigger.RECORDING_PAUSE_RESUMED: - if (newAction != Actiontrigger.RECORDING_START_PLAYING) { - handleActionTriggers(Actiontrigger.RECORDING_STOPPED); - } - break; - case Actiontrigger.TV_START_PLAYING: - case Actiontrigger.TV_PAUSED: - case Actiontrigger.TV_PAUSE_RESUMED: - if (newAction != Actiontrigger.TV_START_PLAYING) { - handleActionTriggers(Actiontrigger.TV_STOPPED); - } - break; - case Actiontrigger.VIDEO_START_PLAYING: - case Actiontrigger.VIDEO_PAUSED: - case Actiontrigger.VIDEO_PAUSE_RESUMED: - if (newAction != Actiontrigger.VIDEO_START_PLAYING) { - handleActionTriggers(Actiontrigger.VIDEO_STOPPED); - } - break; - case Actiontrigger.UNKNOWN_START_PLAYING: - case Actiontrigger.UNKNOWN_PAUSED: - case Actiontrigger.UNKNOWN_PAUSE_RESUMED: - if (newAction != Actiontrigger.UNKNOWN_START_PLAYING) { - handleActionTriggers(Actiontrigger.UNKNOWN_STOPPED); - } - break; - } - } - - - public void handleActionTriggers(Actiontrigger action) - { - /* - * Action handler: - * - start up --> plugin init - * - shut down/hibernate --> Action: ACTION_SHUTDOWN - * - resume from hibernate ??? - * - quit --> Action: ACTION_EXIT - * - * Music + Video + Radio + Recording + TV + Unknown - * - play --> PLayer_started && media - * - pause --> Action == Action.ActionType.ACTION_PAUSE && g_Player.Paused - * - stop --> PLayer_started && media - */ - - if (_lastAction == action || !_enableSceneTrigger) - { - // Never send the same action twice... || check if scene trigger is enabled - return; - } - //Store last action - never send the same action twice... - _lastAction = action; + case Action.ActionType.ACTION_HIBERNATE: + case Action.ActionType.ACTION_POWER_OFF: + case Action.ActionType.ACTION_REBOOT: + case Action.ActionType.ACTION_SHUTDOWN: + case Action.ActionType.ACTION_SUSPEND: + handleActionTriggers(Actiontrigger.MP_SHUTDOWN); + break; + + // Resume ? how to determine (Plug in init?) + default: + break; + + } + } + + private void g_Player_PlayBackEnded(Player.MediaType media, string filename) + { + g_Player_PlayBackStopped(media, 0, filename); + } + + private void g_Player_PlayBackStopped(Player.MediaType media, int stoptime, string filename) + { + switch(media) + { + case Player.MediaType.Music: + handleActionTriggers(Actiontrigger.MUSIC_STOPPED); + break; + case Player.MediaType.Radio: + handleActionTriggers(Actiontrigger.RADIO_STOPPED); + break; + case Player.MediaType.Recording: + handleActionTriggers(Actiontrigger.RECORDING_STOPPED); + break; + case Player.MediaType.TV: + handleActionTriggers(Actiontrigger.TV_STOPPED); + break; + case Player.MediaType.Video: + handleActionTriggers(Actiontrigger.VIDEO_STOPPED); + break; + case Player.MediaType.Unknown: + default: + handleActionTriggers(Actiontrigger.UNKNOWN_STOPPED); + break; + } + } + + private void g_Player_PlayBackStarted(Player.MediaType media, string filename) + { + switch(media) + { + case Player.MediaType.Music: + if (_lastAction == Actiontrigger.MUSIC_PAUSED) { + handleActionTriggers(Actiontrigger.MUSIC_PAUSE_RESUMED); + } else if (_lastAction != Actiontrigger.MUSIC_PAUSE_RESUMED) { + triggerStopPlayingMedia(Actiontrigger.MUSIC_START_PLAYING); + handleActionTriggers(Actiontrigger.MUSIC_START_PLAYING); + } + break; + case Player.MediaType.Radio: + if (_lastAction == Actiontrigger.RADIO_PAUSED) { + handleActionTriggers(Actiontrigger.RADIO_PAUSE_RESUMED); + } else if (_lastAction != Actiontrigger.RADIO_PAUSE_RESUMED) { + triggerStopPlayingMedia(Actiontrigger.RADIO_START_PLAYING); + handleActionTriggers(Actiontrigger.RADIO_START_PLAYING); + } + break; + case Player.MediaType.Recording: + if (_lastAction == Actiontrigger.RECORDING_PAUSED) { + handleActionTriggers(Actiontrigger.RECORDING_PAUSE_RESUMED); + } else if (_lastAction != Actiontrigger.RECORDING_PAUSE_RESUMED) { + triggerStopPlayingMedia(Actiontrigger.RECORDING_START_PLAYING); + handleActionTriggers(Actiontrigger.RECORDING_START_PLAYING); + } + break; + case Player.MediaType.TV: + if (_lastAction == Actiontrigger.TV_PAUSED) { + handleActionTriggers(Actiontrigger.TV_PAUSE_RESUMED); + } else if (_lastAction != Actiontrigger.TV_PAUSE_RESUMED) { + triggerStopPlayingMedia(Actiontrigger.TV_START_PLAYING); + handleActionTriggers(Actiontrigger.TV_START_PLAYING); + } + break; + case Player.MediaType.Video: + if (_lastAction == Actiontrigger.VIDEO_PAUSED) { + handleActionTriggers(Actiontrigger.VIDEO_PAUSE_RESUMED); + } else if (_lastAction != Actiontrigger.VIDEO_PAUSE_RESUMED) { + triggerStopPlayingMedia(Actiontrigger.TV_START_PLAYING); + handleActionTriggers(Actiontrigger.VIDEO_START_PLAYING); + } + break; + case Player.MediaType.Unknown: + default: + if (_lastAction == Actiontrigger.UNKNOWN_PAUSED) { + handleActionTriggers(Actiontrigger.UNKNOWN_PAUSE_RESUMED); + } else if (_lastAction != Actiontrigger.UNKNOWN_PAUSE_RESUMED) { + triggerStopPlayingMedia(Actiontrigger.UNKNOWN_START_PLAYING); + handleActionTriggers(Actiontrigger.UNKNOWN_START_PLAYING); + } + break; + } + } + + private void triggerStopPlayingMedia(Actiontrigger newAction) + { + switch(_lastAction) + { + case Actiontrigger.MUSIC_START_PLAYING: + case Actiontrigger.MUSIC_PAUSED: + case Actiontrigger.MUSIC_PAUSE_RESUMED: + if (newAction != Actiontrigger.MUSIC_START_PLAYING) { + handleActionTriggers(Actiontrigger.MUSIC_STOPPED); + } + break; + case Actiontrigger.RADIO_START_PLAYING: + case Actiontrigger.RADIO_PAUSED: + case Actiontrigger.RADIO_PAUSE_RESUMED: + if (newAction != Actiontrigger.RADIO_START_PLAYING) { + handleActionTriggers(Actiontrigger.RADIO_STOPPED); + } + break; + case Actiontrigger.RECORDING_START_PLAYING: + case Actiontrigger.RECORDING_PAUSED: + case Actiontrigger.RECORDING_PAUSE_RESUMED: + if (newAction != Actiontrigger.RECORDING_START_PLAYING) { + handleActionTriggers(Actiontrigger.RECORDING_STOPPED); + } + break; + case Actiontrigger.TV_START_PLAYING: + case Actiontrigger.TV_PAUSED: + case Actiontrigger.TV_PAUSE_RESUMED: + if (newAction != Actiontrigger.TV_START_PLAYING) { + handleActionTriggers(Actiontrigger.TV_STOPPED); + } + break; + case Actiontrigger.VIDEO_START_PLAYING: + case Actiontrigger.VIDEO_PAUSED: + case Actiontrigger.VIDEO_PAUSE_RESUMED: + if (newAction != Actiontrigger.VIDEO_START_PLAYING) { + handleActionTriggers(Actiontrigger.VIDEO_STOPPED); + } + break; + case Actiontrigger.UNKNOWN_START_PLAYING: + case Actiontrigger.UNKNOWN_PAUSED: + case Actiontrigger.UNKNOWN_PAUSE_RESUMED: + if (newAction != Actiontrigger.UNKNOWN_START_PLAYING) { + handleActionTriggers(Actiontrigger.UNKNOWN_STOPPED); + } + break; + } + } + + + public void handleActionTriggers(Actiontrigger action) + { + /* + * Action handler: + * - start up --> plugin init + * - shut down/hibernate --> Action: ACTION_SHUTDOWN + * - resume from hibernate ??? + * - quit --> Action: ACTION_EXIT + * + * Music + Video + Radio + Recording + TV + Unknown + * - play --> PLayer_started && media + * - pause --> Action == Action.ActionType.ACTION_PAUSE && g_Player.Paused + * - stop --> PLayer_started && media + */ + + if (_lastAction == action || !_enableSceneTrigger) + { + // Never send the same action twice... || check if scene trigger is enabled + return; + } + //Store last action - never send the same action twice... + _lastAction = action; - if ((_vera.actionTriggerTable[(int)action] > 0) && (_vera.actionTriggerTable[(int)action] < Int16.MaxValue)) - { - Scene scene = _vera.status.GetSceneById(_vera.actionTriggerTable[(int)action]); - if (scene.id > 0) - { - scene.Run(); - } - } - } - - public override void Render(float timePassed) - { - // Give a message to the user a update failed - if (_vera.lastUpdateFailed) - { - // Show message only once! - if (!_lastUpdateFailed) - { - if (_vera.status.system.dataversion == "0") - { // Give message dialog on never connected... - new Thread (() => { NoConnection(_vera.lastUpdateError);}).Start(); - } else { - // Give an error message on screen - _vera.status.system.ReportConnectionError(_vera.lastUpdateError); - } - } - _lastUpdateFailed = true; - } - else - { // Reset failed flag again - _lastUpdateFailed = false; - } - - // vera will only update when realy required - _vera.UpdateCurrentStatus(); - refreshNow(); - - base.Render(timePassed); - } + if ((_vera.actionTriggerTable[(int)action] > 0) && (_vera.actionTriggerTable[(int)action] < NO_SCENE_SELECTED)) + { + Scene scene = _vera.status.GetSceneById(_vera.actionTriggerTable[(int)action]); + if (scene.id > 0) + { + scene.Run(); + } + } + } + + public override void Render(float timePassed) + { + // Give a message to the user a update failed + if (_vera.lastUpdateFailed) + { + // Show message only once! + if (!_lastUpdateFailed) + { + if (_vera.status.system.dataversion == "0") + { // Give message dialog on never connected... + new Thread (() => { NoConnection(_vera.lastUpdateError);}).Start(); + } else { + // Give an error message on screen + _vera.status.system.ReportConnectionError(_vera.lastUpdateError); + } + } + _lastUpdateFailed = true; + } + else + { // Reset failed flag again + _lastUpdateFailed = false; + } + + // vera will only update when realy required + _vera.UpdateCurrentStatus(); + refreshNow(); + + base.Render(timePassed); + } - public void refreshNow() - { - if (_vera.NewScreenUpdateWaitingAndClearFlag()) - { - // update system status - if (_vera.status.system.NewScreenUpdateWaitingAndClearFlag()) - { - setSystemStatus(); - } - - // if full reload has been found rebuild lists - if (_vera.status.system.fullReload ) { - listRooms(_selectedCategory, _selectedRoom); - if (_selectedRoom == Int16.MaxValue) { - listScenes(); - } else { - listDevices(_selectedRoom); - } - } - else - { - // update device status - if (_selectedRoom != Int16.MaxValue) - { - foreach (GUIListItem item in _rightList.ListItems) - { - DeviceGeneric dev = _vera.status.GetDeviceById( item.ItemId ); - if (dev.NewScreenUpdateWaitingAndClearFlag()) - { - item.Label2 = dev.GetStatusText(); - item.PinImage = _helper.GetStateImage(dev.commstate); - - //Adjust color of item when option is turned off - item.IsPlayed = !dev.isControllable; - - item.IconImage = "Vera\\"+dev.GetIconName()+".png"; - item.IconImageBig = "Vera\\"+dev.GetIconName()+".png"; - item.ThumbnailImage = "Vera\\"+dev.GetIconName()+".png"; - - Utils.SetDefaultIcons(item); - } - } - } - else - { - foreach(GUIListItem item in _rightList.ListItems) - { - Scene scene = _vera.status.GetSceneById( item.ItemId ); - if (scene.NewScreenUpdateWaitingAndClearFlag()) - { - item.Label2 = (scene.room == 0 ? "" : _vera.status.GetRoomById(scene.room).name); - item.PinImage = _helper.GetStateImage(scene.commstate); - item.IsPlayed = scene.IsActive(); - Utils.SetDefaultIcons(item); - } - } - } - } - } - } - - protected override void OnPageLoad() - { - if (_selectedCategory == 0) { _selectedCategory = Int16.MaxValue; } - - listCategories(); - listRooms(_selectedCategory, _selectedRoom); - if (_selectedRoom == Int16.MaxValue) { - listScenes(); - } else { - listDevices(_selectedRoom); - } - - // Disable Page control (for left list) - _leftList.SetPageControlVisible( false ); - - setSystemStatus(); - refreshNow(); - updateSceneTrigger(); - - base.OnPageLoad(); - } - - private void setSystemStatus() - { - if (_vera.status.system.state != DevState.NONE) { - _cmtImage.Dispose(); - _cmtImage.SetFileName(_helper.GetStateImage(_vera.status.system.state)); - _cmtImage.KeepAspectRatio = true; - _cmtImage.Visibility = System.Windows.Visibility.Visible; - _cmtImage.AllocResources(); - } else{ - _cmtImage.Visibility = System.Windows.Visibility.Hidden; - } - _comment.Label = _vera.status.system.comment; - - } - - private void listCategories() - { - int iCnt = 1; - int iSelected = 0; - GUIControl.ClearControl(GetID, _catList.GetID); - - _catList.AddSpinLabel("All", Int16.MaxValue); - - foreach( Section sec in _vera.sections ) - { - _catList.AddSpinLabel(sec.name, sec.id); - iCnt++; - if (_selectedCategory == sec.id) - { - iSelected = iCnt; - } - } - _catList.SelectedItem = iSelected; - } - - private void listScenes() - { - GUIControl.ClearControl(GetID, _rightList.GetID); - - foreach( Scene scene in _vera.scenes ) - { - GUIListItem item = new GUIListItem(scene.name); - item.Label2 = (scene.room == 0 ? "" : _vera.status.GetRoomById(scene.room).name); - item.PinImage = _helper.GetStateImage(scene.commstate); - - item.IsPlayed = scene.IsActive(); - item.ItemId = scene.id; - item.IconImage = "Vera\\Scenes.png"; - item.IconImageBig = "Vera\\Scenes.png"; - item.ThumbnailImage = "Vera\\Scenes.png"; - - Utils.SetDefaultIcons(item); - _rightList.Add(item); - } - GUIControl.FocusControl(GetID, _leftList.GetID); + public void refreshNow() + { + if (_vera.NewScreenUpdateWaitingAndClearFlag()) + { + // update system status + if (_vera.status.system.NewScreenUpdateWaitingAndClearFlag()) + { + setSystemStatus(); + } + + // if full reload has been found rebuild lists + if (_vera.status.system.fullReload ) { + listRooms(_selectedCategory, _selectedRoom); + if (_selectedRoom == ALL) { + listScenes(ALL); + } else { + listDevices(_selectedRoom); + } + } + else + { + // update device status + foreach (GUIListItem item in _rightList.ListItems) + { + if (item.ItemId > 0) + { // ItemId > 0 so we have a device + DeviceGeneric dev = _vera.status.GetDeviceById(item.ItemId); + if (dev.NewScreenUpdateWaitingAndClearFlag()) + { + fillinDeviceInfo(item, dev); + } + } + else + { // ItemId < 0 so we have a scene + Scene scene = _vera.status.GetSceneById((item.ItemId * -1)); + if (scene.NewScreenUpdateWaitingAndClearFlag()) + { + fillinSceneInfo(item, scene); + } + } + } + } + } + } + + protected override void OnPageLoad() + { + if (_selectedCategory == 0) { _selectedCategory = ALL; } + + listCategories(); + listRooms(_selectedCategory, _selectedRoom); + if (_selectedRoom == ALL) { + listScenes(ALL); + } else { + listDevices(_selectedRoom); + } + + // Disable Page control (for left list) + _leftList.SetPageControlVisible( false ); + + setSystemStatus(); + refreshNow(); + updateSceneTrigger(); + + base.OnPageLoad(); + } + + private void setSystemStatus() + { + if (_vera.status.system.state != DevState.NONE) { + _cmtImage.Dispose(); + _cmtImage.SetFileName(_helper.GetStateImage(_vera.status.system.state)); + _cmtImage.KeepAspectRatio = true; + _cmtImage.Visibility = System.Windows.Visibility.Visible; + _cmtImage.AllocResources(); + } else{ + _cmtImage.Visibility = System.Windows.Visibility.Hidden; + } + _comment.Label = _vera.status.system.comment; + + } + + private void listCategories() + { + int iCnt = 1; + int iSelected = 0; + GUIControl.ClearControl(GetID, _catList.GetID); + + _catList.AddSpinLabel("All", ALL); + + foreach( Section sec in _vera.sections ) + { + _catList.AddSpinLabel(sec.name, sec.id); + iCnt++; + if (_selectedCategory == sec.id) + { + iSelected = iCnt; + } + } + _catList.SelectedItem = iSelected; + } + + private void listRooms(int showSection, int selectedRoom) + { + int cnt = 0; + int selected = 0; + // --- fill in left lisft with rooms and scene item + GUIControl.ClearControl(GetID, _leftList.GetID); + GUIListItem sceneitem = new GUIListItem("Scenes"); + sceneitem.ItemId = ALL; - // Set Current Selected Item - _rightList.SelectedListItemIndex = 0; + sceneitem.IconImage = "Vera\\Scenes.png"; + sceneitem.IconImageBig = "Vera\\Scenes.png"; + sceneitem.ThumbnailImage = "Vera\\Scenes.png"; + + Utils.SetDefaultIcons(sceneitem); + _leftList.Add(sceneitem); + + foreach(Room room in _vera.rooms) + { + if (showSection == ALL|| room.section == showSection) + { + GUIListItem item = new GUIListItem(room.name); + item.Label2 = _vera.status.GetSectionById(room.section).name; + + item.ItemId = room.id; + item.IconImage = "fastforward_enabled.png"; + item.IconImageBig = "fastforward_enabled.png"; + item.ThumbnailImage = "fastforward_enabled.png"; + + Utils.SetDefaultIcons(item); + _leftList.Add(item); - _title.Label = _titleTxt + " - Scenes"; - } - - private void listRooms(int iShowSection, int iSelectedRoom) - { - int iCnt = 0; - int iSelected = 0; - // --- fill in left lisft with rooms and scene item - GUIControl.ClearControl(GetID, _leftList.GetID); - GUIListItem sceneitem = new GUIListItem("Scenes"); - sceneitem.ItemId = Int16.MaxValue; + cnt++; + if (selectedRoom == room.id) + { + selected = cnt; + } + } + } + // Set Current Selected Item + _leftList.SelectedListItemIndex = selected; + } + + private void listScenes(int selectedRoom) + { + GUIControl.ClearControl(GetID, _rightList.GetID); + + foreach(Scene scene in _vera.scenes) + { + if (selectedRoom == ALL || scene.InRoom(selectedRoom)) + { + GUIListItem item = new GUIListItem(scene.name); + fillinSceneInfo(item, scene); + _rightList.Add(item); + } + } + GUIControl.FocusControl(GetID, _leftList.GetID); - sceneitem.IconImage = "Vera\\Scenes.png"; - sceneitem.IconImageBig = "Vera\\Scenes.png"; - sceneitem.ThumbnailImage = "Vera\\Scenes.png"; - - Utils.SetDefaultIcons(sceneitem); - _leftList.Add(scene... [truncated message content] |
From: <Ba...@us...> - 2012-01-21 23:46:41
|
Revision: 4423 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4423&view=rev Author: BartEv Date: 2012-01-21 23:46:35 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/update.xml Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:43:56 UTC (rev 4422) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:46:35 UTC (rev 4423) @@ -239,13 +239,13 @@ <VersionDescription>First version - for beta testing only Minor updates</VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/</OnlineLocation> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.5.0.1.mpe1</OnlineLocation> <ReleaseDate>2012-01-05T22:51:05</ReleaseDate> <Tags>home automation, z-wave, micasaverde, vera</Tags> - <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v0.5.0.1.mpe1</Location> <Params> <Items> <SectionParam Name="Online Icon"> @@ -389,7 +389,7 @@ z-wave, micasaverde, vera</Tags> - <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v0.5.1.0.mpe1</Location> <Params> <Items> <SectionParam Name="Online Icon"> @@ -549,7 +549,7 @@ z-wave, micasaverde, vera</Tags> - <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v0.6.0.1.mpe1</Location> <Params> <Items> <SectionParam Name="Online Icon"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-21 23:44:02
|
Revision: 4422 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4422&view=rev Author: BartEv Date: 2012-01-21 23:43:56 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/update.xml Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:42:40 UTC (rev 4421) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:43:56 UTC (rev 4422) @@ -876,7 +876,7 @@ z-wave, micasaverde, vera</Tags> - <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v0.7.0.1.mpe1</Location> <Params> <Items> <SectionParam Name="Online Icon"> @@ -913,4 +913,4 @@ <IsSkin>false</IsSkin> </PackageClass> </Items> -</ExtensionCollection> \ No newline at end of file +</ExtensionCollection> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-21 23:42:46
|
Revision: 4421 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4421&view=rev Author: BartEv Date: 2012-01-21 23:42:40 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/VeraControl.xmp2 trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1 trunk/plugins/VeraControl/releases/update.xml Modified: trunk/plugins/VeraControl/releases/VeraControl.xmp2 =================================================================== --- trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-21 23:41:43 UTC (rev 4420) +++ trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-21 23:42:40 UTC (rev 4421) @@ -811,30 +811,50 @@ <Build>0</Build> <Revision>1</Revision> </Version> - <ExtensionDescription>Control your Vera controller from MediaPortal. + <ExtensionDescription>Control your Vera controller from MediaPortal. -Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + -Vera is a Z-wave home automation controller from MicasaVerde. +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... -This version is tested with: - - Vera 1 v1.1.1338 - - Vera 2 v1.1.1267 - - Vera 2 v1.5.255 + +Vera is a Z-wave home automation controller from MicasaVerde. + +This version is tested with: + - Vera 1 v1.1.1338 + - Vera 2 v1.1.1267 + + - Vera 2 v1.5.255 + + + + + + + + + + + </ExtensionDescription> - <VersionDescription>- Real time Vera status update --Threated communication (no-screen-lockups) -- IP Cam support -- Improved error handling -- Improved Cam image updater + <VersionDescription>- Real time Vera status update + +-Threated communication (no-screen-lockups) + +- IP Cam support + +- Improved error handling + +- Improved Cam image updater + - Clean up code (coding standard complience)</VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v[version].mpe1</OnlineLocation> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1</OnlineLocation> <ReleaseDate>2012-01-22T22:51:05</ReleaseDate> <Tags>home automation, z-wave, Modified: trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1 =================================================================== (Binary files differ) Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:41:43 UTC (rev 4420) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:42:40 UTC (rev 4421) @@ -827,30 +827,50 @@ <Build>0</Build> <Revision>1</Revision> </Version> - <ExtensionDescription>Control your Vera controller from MediaPortal. + <ExtensionDescription>Control your Vera controller from MediaPortal. -Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + -Vera is a Z-wave home automation controller from MicasaVerde. +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... -This version is tested with: - - Vera 1 v1.1.1338 - - Vera 2 v1.1.1267 - - Vera 2 v1.5.255 + +Vera is a Z-wave home automation controller from MicasaVerde. + +This version is tested with: + - Vera 1 v1.1.1338 + - Vera 2 v1.1.1267 + + - Vera 2 v1.5.255 + + + + + + + + + + + </ExtensionDescription> - <VersionDescription>- Real time Vera status update --Threated communication (no-screen-lockups) -- IP Cam support -- Improved error handling -- Improved Cam image updater + <VersionDescription>- Real time Vera status update + +-Threated communication (no-screen-lockups) + +- IP Cam support + +- Improved error handling + +- Improved Cam image updater + - Clean up code (coding standard complience)</VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v[version].mpe1</OnlineLocation> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1</OnlineLocation> <ReleaseDate>2012-01-22T22:51:05</ReleaseDate> <Tags>home automation, z-wave, @@ -893,4 +913,4 @@ <IsSkin>false</IsSkin> </PackageClass> </Items> -</ExtensionCollection> +</ExtensionCollection> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-21 23:41:49
|
Revision: 4420 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4420&view=rev Author: BartEv Date: 2012-01-21 23:41:43 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/update.xml Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:35:58 UTC (rev 4419) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:41:43 UTC (rev 4420) @@ -696,13 +696,13 @@ - Improved error handling </VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> - <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v[version].mpe1</OnlineLocation> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1</OnlineLocation> <ReleaseDate>2012-01-18T22:51:05</ReleaseDate> <Tags>home automation, z-wave, micasaverde, vera</Tags> - <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v0.7.0.1.mpe1</Location> <Params> <Items> <SectionParam Name="Online Icon"> @@ -893,4 +893,4 @@ <IsSkin>false</IsSkin> </PackageClass> </Items> -</ExtensionCollection> \ No newline at end of file +</ExtensionCollection> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-21 23:36:04
|
Revision: 4419 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4419&view=rev Author: BartEv Date: 2012-01-21 23:35:58 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/VeraControl/releases/VeraControl.xmp2 trunk/plugins/VeraControl/releases/update.xml Added Paths: ----------- trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1 Modified: trunk/plugins/VeraControl/releases/VeraControl.xmp2 =================================================================== --- trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-21 23:31:37 UTC (rev 4418) +++ trunk/plugins/VeraControl/releases/VeraControl.xmp2 2012-01-21 23:35:58 UTC (rev 4419) @@ -807,9 +807,9 @@ <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/update.xml</UpdateUrl> <Version> <Major>0</Major> - <Minor>6</Minor> - <Build>1</Build> - <Revision>0</Revision> + <Minor>7</Minor> + <Build>0</Build> + <Revision>1</Revision> </Version> <ExtensionDescription>Control your Vera controller from MediaPortal. @@ -831,10 +831,11 @@ -Threated communication (no-screen-lockups) - IP Cam support - Improved error handling -</VersionDescription> +- Improved Cam image updater +- Clean up code (coding standard complience)</VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v[version].mpe1</OnlineLocation> - <ReleaseDate>2012-01-18T22:51:05</ReleaseDate> + <ReleaseDate>2012-01-22T22:51:05</ReleaseDate> <Tags>home automation, z-wave, micasaverde, Added: trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/VeraControl/releases/VeraControl_v0.7.0.1.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/VeraControl/releases/update.xml =================================================================== --- trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:31:37 UTC (rev 4418) +++ trunk/plugins/VeraControl/releases/update.xml 2012-01-21 23:35:58 UTC (rev 4419) @@ -674,6 +674,159 @@ <Build>1</Build> <Revision>0</Revision> </Version> + <ExtensionDescription>Control your Vera controller from MediaPortal. + +Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... + +Vera is a Z-wave home automation controller from MicasaVerde. + +This version is tested with: + - Vera 1 v1.1.1338 + - Vera 2 v1.1.1267 + - Vera 2 v1.5.255 + + + + + +</ExtensionDescription> + <VersionDescription>- Real time Vera status update +-Threated communication (no-screen-lockups) +- IP Cam support +- Improved error handling +</VersionDescription> + <DevelopmentStatus>Beta</DevelopmentStatus> + <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v[version].mpe1</OnlineLocation> + <ReleaseDate>2012-01-18T22:51:05</ReleaseDate> + <Tags>home automation, +z-wave, +micasaverde, +vera</Tags> + <Location>C:\Users\Bart\Documents\SharpDevelop Projects\VeraControl\releases\VeraControl_v[Version].mpe1</Location> + <Params> + <Items> + <SectionParam Name="Online Icon"> + <Value /> + <ValueType>String</ValueType> + <Description>The icon file of the package stored online (jpg,png,bmp)</Description> + </SectionParam> + <SectionParam Name="Configuration file"> + <Value /> + <ValueType>Template</ValueType> + <Description>The file used to configure the extension. + If have .exe extension the will be executed + If have .dll extension used like MP plugin configuration</Description> + </SectionParam> + <SectionParam Name="Online Screenshots"> + <Value /> + <ValueType>String</ValueType> + <Description>Online stored screenshot urls separated by ; </Description> + </SectionParam> + <SectionParam Name="Force to uninstall on update"> + <Value>yes</Value> + <ValueType>Bool</ValueType> + <Description>Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer.</Description> + </SectionParam> + </Items> + </Params> + </GeneralInfo> + <UniqueFileList> + <Items /> + </UniqueFileList> + <ProjectSettings> + <FolderGroups /> + </ProjectSettings> + <IsSkin>false</IsSkin> + </PackageClass> + <PackageClass> + <Version>2.0</Version> + <Groups> + <Items> + <GroupItem Name="Default"> + <DisplayName>Default</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>Default</Description> + <Files> + <Items /> + </Files> + </GroupItem> + <GroupItem Name="IconsDefault"> + <DisplayName>IconsDefault</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>IconsDefault</Description> + <Files> + <Items /> + </Files> + </GroupItem> + <GroupItem Name="IconsDefaultWide"> + <DisplayName>IconsDefaultWide</DisplayName> + <DefaulChecked>true</DefaulChecked> + <Description>IconsDefaultWide</Description> + <Files> + <Items /> + </Files> + </GroupItem> + </Items> + </Groups> + <Sections> + <Items /> + </Sections> + <Dependencies> + <Items> + <DependencyItem> + <Type>MediaPortal</Type> + <Id /> + <MinVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MinVersion> + <MaxVersion> + <Major>1</Major> + <Minor>1</Minor> + <Build>6</Build> + <Revision>27644</Revision> + </MaxVersion> + <WarnOnly>false</WarnOnly> + <Message>requires MediaPortal version 1.1.6.27644 to 1.1.6.27644</Message> + <Name>MediaPortal</Name> + </DependencyItem> + </Items> + </Dependencies> + <PluginDependencies> + <Items> + <PluginDependencyItem AssemblyName="VeraControl.dll"> + <CompatibleVersion> + <Items> + <CompatibleVersionItem> + <MinRequiredVersion>1.1.6.27644</MinRequiredVersion> + <DesignedForVersion>1.1.6.27644</DesignedForVersion> + </CompatibleVersionItem> + </Items> + </CompatibleVersion> + <SubSystemsUsed> + <Items> + <SubSystemItem Name="MP.SkinEngine" /> + <SubSystemItem Name="MP.Config" /> + </Items> + </SubSystemsUsed> + </PluginDependencyItem> + </Items> + </PluginDependencies> + <GeneralInfo> + <Name>Vera Controller</Name> + <Id>ebb6b1af-6fb9-44e5-a859-9d32ffe20a9e</Id> + <Author>Bart Eversdijk</Author> + <HomePage>http://www.team-mediaportal.com/extensions/micasaverde-vera-controller</HomePage> + <ForumPage>http://forum.team-mediaportal.com/mediaportal-plugins-47/plugin-micasaverde-vera-controller-104337/</ForumPage> + <UpdateUrl>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/update.xml</UpdateUrl> + <Version> + <Major>0</Major> + <Minor>7</Minor> + <Build>0</Build> + <Revision>1</Revision> + </Version> <ExtensionDescription>Control your Vera controller from MediaPortal. Supports Scene triggers for starting, hibernating and exiting MediaPortal; Also starting, pausing and stopping media streams. So dim your lights and close the curtains automatically when MediaPortal starts a movie... @@ -694,10 +847,11 @@ -Threated communication (no-screen-lockups) - IP Cam support - Improved error handling -</VersionDescription> +- Improved Cam image updater +- Clean up code (coding standard complience)</VersionDescription> <DevelopmentStatus>Beta</DevelopmentStatus> <OnlineLocation>https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/VeraControl/releases/VeraControl_v[version].mpe1</OnlineLocation> - <ReleaseDate>2012-01-18T22:51:05</ReleaseDate> + <ReleaseDate>2012-01-22T22:51:05</ReleaseDate> <Tags>home automation, z-wave, micasaverde, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2012-01-21 23:31:46
|
Revision: 4418 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4418&view=rev Author: BartEv Date: 2012-01-21 23:31:37 +0000 (Sat, 21 Jan 2012) Log Message: ----------- - complied with coding standards - improved update Cam Images handler - cleaned up messy code Modified Paths: -------------- trunk/plugins/VeraControl/BaseDevice.cs trunk/plugins/VeraControl/DevCategories.cs trunk/plugins/VeraControl/DeviceCam.cs trunk/plugins/VeraControl/DeviceDimmer.cs trunk/plugins/VeraControl/DeviceDoorlock.cs trunk/plugins/VeraControl/DeviceGWeather.cs trunk/plugins/VeraControl/DeviceGeneric.cs trunk/plugins/VeraControl/DeviceHumidity.cs trunk/plugins/VeraControl/DeviceLightSensor.cs trunk/plugins/VeraControl/DevicePowerMeter.cs trunk/plugins/VeraControl/DeviceSceneController.cs trunk/plugins/VeraControl/DeviceSecurity.cs trunk/plugins/VeraControl/DeviceSprinkler.cs trunk/plugins/VeraControl/DeviceSwitch.cs trunk/plugins/VeraControl/DeviceSystem.cs trunk/plugins/VeraControl/DeviceTemperature.cs trunk/plugins/VeraControl/DeviceThermostat.cs trunk/plugins/VeraControl/DeviceWindowCovering.cs trunk/plugins/VeraControl/DialogActionTrigger.cs trunk/plugins/VeraControl/DialogDeviceControl.cs trunk/plugins/VeraControl/DialogSceneControl.cs trunk/plugins/VeraControl/Room.cs trunk/plugins/VeraControl/Scene.cs trunk/plugins/VeraControl/Section.cs trunk/plugins/VeraControl/VeraCommunication.cs trunk/plugins/VeraControl/VeraControl.cs trunk/plugins/VeraControl/VeraHelper.cs trunk/plugins/VeraControl/VeraSetupForm.Designer.cs trunk/plugins/VeraControl/VeraSetupForm.cs Modified: trunk/plugins/VeraControl/BaseDevice.cs =================================================================== --- trunk/plugins/VeraControl/BaseDevice.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/BaseDevice.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,151 +18,131 @@ /// </summary> public class BaseDevice { - public long m_lLastUpdate = 0; - public long m_lLastPendingUpdate = 0; - public bool m_bScreenUpdateRequired = false; - private string m_sName = "unknown device"; - private int m_iId = 0; - private int m_iRoom = 0; + public long _lastUpdate = 0; + public long _lastPendingUpdate = 0; + public bool _screenUpdateRequired = false; + private string _name = "unknown device"; + private int _id = 0; + private int _room = 0; // not connected (-2), none (-1), pending (0,1,5,6), success(4), error (2,3) - private DevState m_dsState = DevState.NONE; - private string m_sComment = ""; // red(error), green(success) or blue(pending) - icon/text + private DevState _dsState = DevState.NONE; + private string _comment = ""; // red(error), green(success) or blue(pending) - icon/text - public VeraHelper helper = VeraHelper.Instance; - public VeraCommunication vera = VeraCommunication.Instance; + public VeraHelper _helper = VeraHelper.Instance; + public VeraCommunication _vera = VeraCommunication.Instance; public BaseDevice(XmlNode xn) { if (xn != null) { - update(xn); + Update(xn); } } /// <summary> /// Process Vera update information /// </summary> - public virtual bool update(XmlNode xn) + public virtual bool Update(XmlNode xn) { - m_sName = helper.getAttrAsString(xn, "name", m_sName); - m_iId = helper.getAttrAsInt (xn, "id", m_iId); - m_iRoom = helper.getAttrAsInt (xn, "room", m_iRoom); + _name = _helper.GetAttrAsString(xn, "name", _name); + _id = _helper.GetAttrAsInt (xn, "id", _id); + _room = _helper.GetAttrAsInt (xn, "room", _room); - string temp_sComment = helper.getAttrAsString(xn, "comment", m_sComment ); - DevState temp_dsState = helper.toDevState(helper.getAttrAsInt(xn, "state", -1)); - if (m_dsState != DevState.PENDING || temp_dsState != DevState.NONE || (temp_dsState == DevState.NONE && ((m_lLastPendingUpdate / TimeSpan.TicksPerSecond ) < (DateTime.Now.Ticks / TimeSpan.TicksPerSecond)))) + string tempComment = _helper.GetAttrAsString(xn, "comment", _comment ); + DevState tempDsState = _helper.ToDevState(_helper.GetAttrAsInt(xn, "state", -1)); + if (_dsState != DevState.PENDING || tempDsState != DevState.NONE || (tempDsState == DevState.NONE && ((_lastPendingUpdate / TimeSpan.TicksPerSecond ) < (DateTime.Now.Ticks / TimeSpan.TicksPerSecond)))) { // If state was set to pending next update should contain a new state or still pending - so do not clear pending flag for at least 10 seconds - m_sComment = temp_sComment; - m_dsState = temp_dsState; + _comment = tempComment; + _dsState = tempDsState; } - if (m_iId == 0) + if (_id == 0) { // void device no further processing needed return false; } // Set update flag - m_bScreenUpdateRequired = true; - m_lLastUpdate = DateTime.Now.Ticks; + _screenUpdateRequired = true; + _lastUpdate = DateTime.Now.Ticks; return true; } - /// <summary> - /// Returns the id of this device - /// </summary> public int id { - get { return m_iId; } + get { return _id; } set { } } - /// <summary> - /// Returns the name of this device - /// </summary> public string name { - get { return m_sName; } + get { return _name; } set { } } - /// <summary> - /// Returns true when this device is associated with the given room - /// </summary> - public bool inRoom(int id) + public bool InRoom(int id) { - return (m_iRoom == id); + return (_room == id); } - /// <summary> - /// Return the room is this device is associated with - /// </summary> public int room { - get { return m_iRoom; } - set { m_iRoom = value; } + get { return _room; } + set { _room = value; } } - /// <summary> - /// Return the communications state for this device - /// </summary> public DevState commstate { - get { return m_dsState; } + get { return _dsState; } set { } } - /// <summary> - /// Return the comment as reported by Vera for this device - /// </summary> public string comment { - get { return (commstate != DevState.NONE ? m_sComment : ""); } + get { return (commstate != DevState.NONE ? _comment : ""); } set { } } - /// <summary> - /// Set virtual device state to pending request - /// </summary> - public void reportPendingRequest() + public void ReportPendingRequest() { - m_dsState = DevState.PENDING; - m_sComment = "Sending command..."; - m_bScreenUpdateRequired = true; - m_lLastUpdate = DateTime.Now.Ticks; - m_lLastPendingUpdate = m_lLastUpdate; + _dsState = DevState.PENDING; + _comment = "Sending command..."; + _screenUpdateRequired = true; + _lastUpdate = DateTime.Now.Ticks; + _lastPendingUpdate = _lastUpdate; } /// <summary> /// Callback function for Ansync Web Client call on to report errors... /// </summary> - public void reportRequestError(string message) + public void ReportRequestError(string message) { - m_dsState = DevState.COMMAND_ERROR; - m_sComment = message; - m_bScreenUpdateRequired = true; - m_lLastUpdate = DateTime.Now.Ticks; + _dsState = DevState.COMMAND_ERROR; + _comment = message; + _screenUpdateRequired = true; + _lastUpdate = DateTime.Now.Ticks; } - public void clearCommState() + public void ClearCommState() { - m_dsState = DevState.NONE; + _dsState = DevState.NONE; } + /// <summary> /// True when an update was processed after the give time stamp /// </summary> - public virtual bool newUpdateSince(long lTimePreviousCheck) + public virtual bool NewUpdateSince(long timePreviousCheck) { - return (lTimePreviousCheck <= m_lLastUpdate); + return (timePreviousCheck <= _lastUpdate); } /// <summary> /// Invoking this method will clear the update ready flag -> so caller need to handle the screen update /// </summary> - public virtual bool newScreenUpdateWaitingAndClearFlag( ) + public virtual bool NewScreenUpdateWaitingAndClearFlag() { - bool b = m_bScreenUpdateRequired; - m_bScreenUpdateRequired = false; + bool b = _screenUpdateRequired; + _screenUpdateRequired = false; return b; } @@ -170,6 +150,5 @@ { return name; } - } } Modified: trunk/plugins/VeraControl/DevCategories.cs =================================================================== --- trunk/plugins/VeraControl/DevCategories.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DevCategories.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -22,30 +22,30 @@ { if (xn != null) { - update(xn); + Update(xn); } } - private string m_sName = "unknown category"; - private int m_iId = 0; - public VeraHelper helper = VeraHelper.Instance; + private string _name = "unknown category"; + private int _id = 0; + public VeraHelper _helper = VeraHelper.Instance; - public bool update(XmlNode xn) + public bool Update(XmlNode xn) { - m_sName = helper.getAttrAsString(xn, "name", m_sName); - m_iId = helper.getAttrAsInt (xn, "id", m_iId); + _name = _helper.GetAttrAsString(xn, "name", _name); + _id = _helper.GetAttrAsInt (xn, "id", _id); return true; } public int id { - get { return m_iId; } + get { return _id; } set { } } public string name { - get { return m_sName; } + get { return _name; } set { } } Modified: trunk/plugins/VeraControl/DeviceCam.cs =================================================================== --- trunk/plugins/VeraControl/DeviceCam.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceCam.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -15,50 +15,50 @@ /// Description of DeviceCam. /// </summary> public class DeviceCam : DeviceGeneric - { // TODO: add IP-cam control buttons - private string m_sIp = "127.0.0.1"; - private string m_sUrl = "/"; - private string m_sStream = ""; - private string m_sVideoUrl = ""; - private int m_refresh = 2; - private string m_sUser = ""; - private string m_sPass = ""; + { + private string _ip = "127.0.0.1"; + private string _url = "/"; + private string _stream = ""; + private string _videoUrl = ""; + private int _refreshRate = 2; + private string _user = ""; + private string _pass = ""; - public DeviceCam( XmlNode xn ): base (xn) + public DeviceCam(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_sIp = helper.getAttrAsString(xn, "ip", m_sIp); - m_sUrl = helper.getAttrAsString(xn, "url", m_sUrl); - m_sStream = helper.getAttrAsString(xn, "streaming", m_sStream); - m_sVideoUrl = helper.getAttrAsString(xn, "videourls", m_sVideoUrl); - m_sUser = helper.getAttrAsString(xn, "username", ""); - m_sPass = helper.getAttrAsString(xn, "password", ""); + _ip = _helper.GetAttrAsString(xn, "ip", _ip); + _url = _helper.GetAttrAsString(xn, "url", _url); + _stream = _helper.GetAttrAsString(xn, "streaming", _stream); + _videoUrl = _helper.GetAttrAsString(xn, "videourls", _videoUrl); + _user = _helper.GetAttrAsString(xn, "username", ""); + _pass = _helper.GetAttrAsString(xn, "password", ""); - return base.update(xn); + return base.Update(xn); } private string passString { get { - if (m_sUser == "") + if (_user == "") { return ""; } - return m_sUser + ":" + m_sPass + "@"; + return _user + ":" + _pass + "@"; } set { } } public string imgUrl { - get { return "http://" + passString + vera.vera_Address + "/data_request?id=cam_image¶meters=get_video_frame&Device_Num=" + id + "&rand=" + DateTime.Now.Ticks; + get { return "http://" + passString + _vera.veraAddress + "/data_request?id=cam_image¶meters=get_video_frame&Device_Num=" + id + "&rand=" + DateTime.Now.Ticks; // return "http://" + passString + m_sIp + "/" + m_sUrl.Replace("%2F", "/"); } set { } @@ -66,84 +66,84 @@ public string streamUrl { - get { return "http://" + passString + m_sIp + "/" + m_sStream.Replace("%2F", "/"); } + get { return "http://" + passString + _ip + "/" + _stream.Replace("%2F", "/"); } set { } } public int refreshRate { - get { return m_refresh; } - set { m_refresh = value; } + get { return _refreshRate; } + set { _refreshRate = value; } } - private bool refreshDelayPassed(long lastcheck) + private bool HasRefreshDelayPassed(long lastcheck) { - return ((helper.getSecondsSince1970() - refreshRate) > (lastcheck / TimeSpan.TicksPerSecond)); + return ((_helper.GetSecondsSince1970() - refreshRate) > (lastcheck / TimeSpan.TicksPerSecond)); } - public override string getIconName() + public override string GetIconName() { return "Ip_Camera"; } - public override bool newScreenUpdateWaitingAndClearFlag( ) + public override bool NewScreenUpdateWaitingAndClearFlag( ) { // Invoking this method will clear the update ready flag -> so caller need to handle the update // A cam device requires an update every refreshRate seconds - bool b = m_bScreenUpdateRequired || refreshDelayPassed(DateTime.Now.Ticks); - m_bScreenUpdateRequired = false; + bool b = _screenUpdateRequired || HasRefreshDelayPassed(DateTime.Now.Ticks); + _screenUpdateRequired = false; if (b) { - m_lLastUpdate = DateTime.Now.Ticks; + _lastUpdate = DateTime.Now.Ticks; } return b; } - public override bool newUpdateSince(long lTimePreviousCheck) + public override bool NewUpdateSince(long lTimePreviousCheck) { - bool b = (lTimePreviousCheck <= m_lLastUpdate) || refreshDelayPassed(m_lLastUpdate); + bool b = (lTimePreviousCheck <= _lastUpdate) || HasRefreshDelayPassed(_lastUpdate); if (b) { - m_lLastUpdate = DateTime.Now.Ticks; + _lastUpdate = DateTime.Now.Ticks; } return b; } - private void move(string direction) + private void Move(string direction) { if (id == 0) { - vera.status.system.reportCommandError("Unknown device"); - m_bScreenUpdateRequired = true; + _vera.status.system.ReportCommandError("Unknown device"); + _screenUpdateRequired = true; return; } string cmd = "?id=lu_action&DeviceNum=" + id + "&serviceId=urn:micasaverde-com:serviceId:PanTiltZoom1&action=" + direction; - vera.doVeraCommandRequest(cmd, reportRequestError); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } - public override void moveUp() + public override void MoveUp() { - move("MoveUp"); + Move("MoveUp"); } - public override void moveLeft() + public override void MoveLeft() { - move("MoveLeft"); + Move("MoveLeft"); } - public override void moveRight() + public override void MoveRight() { - move("MoveRight"); + Move("MoveRight"); } - public override void moveDown() + public override void MoveDown() { - move("MoveDown"); + Move("MoveDown"); } - public override void moveZoomIn() + public override void ZoomIn() { - move("ZoomIn"); + Move("ZoomIn"); } - public override void moveZoomOut() + public override void ZoomOut() { - move("ZoomOut"); + Move("ZoomOut"); } } } Modified: trunk/plugins/VeraControl/DeviceDimmer.cs =================================================================== --- trunk/plugins/VeraControl/DeviceDimmer.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceDimmer.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -4,8 +4,8 @@ * Date: 22-12-2011 * Time: 17:36 * - * Copyright: 2012 GPL - Bart Eversdijk - * MediaPort plugin - MicasaVerde (TM) Vera Controller + * Copyright: 2012 GPL - Bart Eversdijk + * MediaPort plugin - MicasaVerde (TM) Vera Controller * E-mail: ba...@ev... */ using System; @@ -18,45 +18,45 @@ /// </summary> public class DeviceDimmer : DeviceGeneric { - private int m_iLevel = 0; - private string m_sWatt = "-"; - private string m_sKwh = "-"; + private int _level = 0; + private string _watt = "-"; + private string _kwh = "-"; - public DeviceDimmer( XmlNode xn ): base (xn) + public DeviceDimmer(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_iLevel = helper.getAttrAsInt (xn, "level", m_iLevel); - m_sWatt = helper.getAttrAsString(xn, "watts", m_sWatt); - m_sKwh = helper.getAttrAsString(xn, "kwh", m_sKwh); + _level = _helper.GetAttrAsInt (xn, "level", _level); + _watt = _helper.GetAttrAsString(xn, "watts", _watt); + _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); - return base.update(xn); + return base.Update(xn); } public string watts { - get { return m_sWatt; } + get { return _watt; } set { } } public override bool status { - get { return (m_iLevel > 0); } - set { - + get { return (_level > 0); } + set { + } } public override int level { - get { return m_iLevel; } - set + get { return _level; } + set { int newValue = value; if (newValue > 100) { @@ -65,15 +65,15 @@ if (newValue < 0) { newValue = 0; } } if (id > 0) // Only send when a valid ID is found - { - reportPendingRequest(); + { + ReportPendingRequest(); // Do something with vera - string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ + string cmd = "?id=lu_action&DeviceNum="+id.ToString() + "&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget" + - "&newLoadlevelTarget="+value; - vera.doVeraCommandRequest(cmd, reportRequestError); + "&newLoadlevelTarget=" + value; + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } - m_iLevel = newValue; + _level = newValue; } } @@ -85,7 +85,7 @@ public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } public override bool isControllable @@ -94,7 +94,7 @@ set { } } - public override string getIconName() + public override string GetIconName() { string leveltxt = "0"; if (level > 0) { leveltxt = "25"; } @@ -102,18 +102,18 @@ if (level > 50) { leveltxt = "75"; } if (level > 75) { leveltxt = "100"; } - return "Dimmable_Light_"+leveltxt; + return "Dimmable_Light_" + leveltxt; } - public override string getExtraText() + public override string GetExtraText() { - return (m_sKwh != "" ? m_sKwh + "kWh" : ""); + return (_kwh != "" ? _kwh + "kWh" : ""); } - public override string getStatusText() + public override string GetStatusText() { - return ( status ? level.ToString() + "%" : "Off"); + return (status ? level.ToString() + "%" : "Off"); } } } Modified: trunk/plugins/VeraControl/DeviceDoorlock.cs =================================================================== --- trunk/plugins/VeraControl/DeviceDoorlock.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceDoorlock.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,42 +18,42 @@ /// </summary> public class DeviceDoorlock : DeviceGeneric { - private bool m_bStatus = false; + private bool _status = false; public DeviceDoorlock( XmlNode xn ): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_bStatus = helper.getAttrAsBool(xn, "status", m_bStatus); + _status = _helper.GetAttrAsBool(xn, "status", _status); - return base.update(xn); + return base.Update(xn); } public override bool status { - get { return m_bStatus; } + get { return _status; } set { if (id > 0) // Only send when a valid ID is found { - reportPendingRequest(); + ReportPendingRequest(); // Do something with vera string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ "&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget" + "&newTargetValue="+(value ? "1" : "0"); - vera.doVeraCommandRequest(cmd, reportRequestError); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } } } public override int level { - get { return (m_bStatus ? 1 : 0); } + get { return (_status ? 1 : 0); } set { status = (value > 0); @@ -68,7 +68,7 @@ public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } public override bool isControllable @@ -77,12 +77,12 @@ set { } } - public override string getIconName() + public override string GetIconName() { - return "Door_" + (m_bStatus ? "LOCKED" : "UNLOCKED"); + return "Door_" + (_status ? "LOCKED" : "UNLOCKED"); } - public override string getStatusText() + public override string GetStatusText() { return (status ? "Locked" : "Unlocked"); } Modified: trunk/plugins/VeraControl/DeviceGWeather.cs =================================================================== --- trunk/plugins/VeraControl/DeviceGWeather.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceGWeather.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,42 +18,42 @@ /// </summary> public class DeviceGWeather : DeviceGeneric { - private string m_sCondition = "-"; - private string m_sWindCondition = "-"; + private string _condition = "-"; + private string _windCondition = "-"; - public DeviceGWeather( XmlNode xn ): base (xn) + public DeviceGWeather(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_sCondition = helper.getAttrAsString(xn, "Condition", m_sCondition); // Google Weather Plugin - m_sCondition = helper.getAttrAsString(xn, "condition", m_sCondition); // World Weather plugin - m_sWindCondition = helper.getAttrAsString(xn, "WindCondition", m_sWindCondition); - m_sWindCondition = helper.getAttrAsString(xn, "windcondition", m_sWindCondition); + _condition = _helper.GetAttrAsString(xn, "Condition", _condition); // Google Weather Plugin + _condition = _helper.GetAttrAsString(xn, "condition", _condition); // World Weather plugin + _windCondition = _helper.GetAttrAsString(xn, "WindCondition", _windCondition); + _windCondition = _helper.GetAttrAsString(xn, "windcondition", _windCondition); - return base.update(xn); + return base.Update(xn); } public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } - public override string getStatusText() + public override string GetStatusText() { - return m_sCondition.Replace("_", " "); + return _condition.Replace("_", " "); } - public override string getExtraText() + public override string GetExtraText() { - return m_sWindCondition; + return _windCondition; } - public override string getIconName() + public override string GetIconName() { return "location"; } Modified: trunk/plugins/VeraControl/DeviceGeneric.cs =================================================================== --- trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -19,29 +19,29 @@ /// </summary> public class DeviceGeneric : BaseDevice { - private string m_sAltId = ""; - private int m_iCategory = 0; + private string _altId = ""; + private int _category = 0; public DeviceGeneric(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_sAltId = helper.getAttrAsString(xn, "altid", m_sAltId); - m_iCategory = helper.getAttrAsInt (xn, "category", m_iCategory); + _altId = _helper.GetAttrAsString(xn, "altid", _altId); + _category = _helper.GetAttrAsInt (xn, "category", _category); - bool b = base.update(xn); + bool b = base.Update(xn); // Make sure the room exists - if (room == 0 || !vera.status.isRoomFound(room)) + if (room == 0 || !_vera.status.IsRoomFound(room)) { - if (!vera.status.isRoomFound(0)) + if (!_vera.status.IsRoomFound(0)) { // create dummy room to attach to - vera.rooms.Add(new Room(null)); + _vera.rooms.Add(new Room(null)); } room = 0; } @@ -51,13 +51,13 @@ public string altid { - get { return m_sAltId; } + get { return _altId; } set { } } public int category { - get { return m_iCategory; } + get { return _category; } set { } } @@ -96,48 +96,48 @@ set { } } - public virtual string getIconName() + public virtual string GetIconName() { return "generic_sensor"; } - public virtual string getStatusText() + public virtual string GetStatusText() { return ""; } - public virtual string getExtraText() + public virtual string GetExtraText() { return ""; } - public virtual string[] getCommands() + public virtual string [] GetCommands() { return new string [] {"Off", "On"}; } - // Overrides for Cam Device - public virtual void moveUp() + // Overridables for Cam Device + public virtual void MoveUp() { // do nothing } - public virtual void moveLeft() + public virtual void MoveLeft() { // do nothing } - public virtual void moveRight() + public virtual void MoveRight() { // do nothing } - public virtual void moveDown() + public virtual void MoveDown() { // do nothing } - public virtual void moveZoomIn() + public virtual void ZoomIn() { // do nothing } - public virtual void moveZoomOut() + public virtual void ZoomOut() { // do nothing } Modified: trunk/plugins/VeraControl/DeviceHumidity.cs =================================================================== --- trunk/plugins/VeraControl/DeviceHumidity.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceHumidity.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,25 +18,25 @@ /// </summary> public class DeviceHumidity : DeviceGeneric { - private int m_iLevel = 0; + private int _level = 0; - public DeviceHumidity( XmlNode xn ): base (xn) + public DeviceHumidity(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_iLevel = helper.getAttrAsInt(xn, "humidity", m_iLevel); - return base.update(xn); + _level = _helper.GetAttrAsInt(xn, "humidity", _level); + return base.Update(xn); } public override int level { - get { return m_iLevel; } + get { return _level; } set {} } @@ -51,12 +51,12 @@ return name + " [" + level.ToString() + "%]"; } - public override string getIconName() + public override string GetIconName() { return "Humidity_Sensor"; } - public override string getStatusText() + public override string GetStatusText() { return level + "%"; } Modified: trunk/plugins/VeraControl/DeviceLightSensor.cs =================================================================== --- trunk/plugins/VeraControl/DeviceLightSensor.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceLightSensor.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,32 +18,32 @@ /// </summary> public class DeviceLightSensor : DeviceGeneric { - private int m_iLevel = 0; + private int _level = 0; - public DeviceLightSensor( XmlNode xn ): base (xn) + public DeviceLightSensor(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_iLevel = helper.getAttrAsInt(xn, "level", m_iLevel); - m_iLevel = helper.getAttrAsInt(xn, "light", m_iLevel); - return base.update(xn); + _level = _helper.GetAttrAsInt(xn, "level", _level); + _level = _helper.GetAttrAsInt(xn, "light", _level); + return base.Update(xn); } public override bool status { - get { return (m_iLevel > 0); } + get { return (_level > 0); } set { } } public override int level { - get { return m_iLevel; } + get { return _level; } set { } } @@ -55,15 +55,15 @@ public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } - public override string getIconName() + public override string GetIconName() { return "Light_Sensor"; } - public override string getStatusText() + public override string GetStatusText() { return level.ToString() + "%"; } Modified: trunk/plugins/VeraControl/DevicePowerMeter.cs =================================================================== --- trunk/plugins/VeraControl/DevicePowerMeter.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DevicePowerMeter.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,39 +18,39 @@ /// </summary> public class DevicePowerMeter : DeviceGeneric { - private int m_iLevel = 0; - private string m_sKwh = ""; + private int _level = 0; + private string _kwh = ""; - public DevicePowerMeter( XmlNode xn ): base (xn) + public DevicePowerMeter(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_iLevel = helper.getAttrAsInt (xn, "watts", m_iLevel); - m_sKwh = helper.getAttrAsString(xn, "kwh", m_sKwh); - return base.update(xn); + _level = _helper.GetAttrAsInt (xn, "watts", _level); + _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); + return base.Update(xn); } public string watts { - get { return m_iLevel.ToString(); } + get { return _level.ToString(); } set { } } public override bool status { - get { return (m_iLevel > 0); } + get { return (_level > 0); } set { } } public override int level { - get { return m_iLevel; } + get { return _level; } set { } } @@ -62,20 +62,20 @@ public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } - public override string getIconName() + public override string GetIconName() { return "Power_Meter"; } - public override string getExtraText() + public override string GetExtraText() { - return (m_sKwh != "" ? m_sKwh + "kWh" : ""); + return (_kwh != "" ? _kwh + "kWh" : ""); } - public override string getStatusText() + public override string GetStatusText() { return level.ToString() + "W"; } Modified: trunk/plugins/VeraControl/DeviceSceneController.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSceneController.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceSceneController.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -16,52 +16,52 @@ /// </summary> public class DeviceSceneController: DeviceGeneric { - private bool m_bTripped = false; + private bool _isTripped = false; public DeviceSceneController( XmlNode xn ): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_bTripped = helper.getAttrAsBool(xn, "status", m_bTripped); - m_bTripped = helper.getAttrAsBool(xn, "tripped", m_bTripped); - return base.update(xn); + _isTripped = _helper.GetAttrAsBool(xn, "status", _isTripped); + _isTripped = _helper.GetAttrAsBool(xn, "tripped", _isTripped); + return base.Update(xn); } public override bool status { - get { return m_bTripped; } + get { return _isTripped; } set { } } - public bool tripped + public bool isTripped { - get { return m_bTripped; } + get { return _isTripped; } set { } } public override int level { - get { return (m_bTripped ? 1 : 0); } + get { return (_isTripped ? 1 : 0); } set { } } public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } - public override string getIconName() + public override string GetIconName() { - return "Motion_Sensor_" + (m_bTripped ? "100" : "0"); + return "Motion_Sensor_" + (_isTripped ? "100" : "0"); } - public override string getStatusText() + public override string GetStatusText() { return (status ? "ACTIVE" : "standby"); } Modified: trunk/plugins/VeraControl/DeviceSecurity.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSecurity.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceSecurity.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -17,52 +17,52 @@ /// <summary> /// Description of DeviceSecurity. /// </summary> - public class DeviceSecurity: DeviceGeneric + public class DeviceSecurity : DeviceGeneric { - private bool m_bTripped = false; - private bool m_bArmed = true; + private bool _isTripped = false; + private bool _isArmed = true; - public DeviceSecurity( XmlNode xn ): base (xn) + public DeviceSecurity(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_bTripped = helper.getAttrAsBool(xn, "tripped", m_bTripped); - m_bArmed = helper.getAttrAsBool(xn, "armed", m_bArmed); - return base.update(xn); + _isTripped = _helper.GetAttrAsBool(xn, "tripped", _isTripped); + _isArmed = _helper.GetAttrAsBool(xn, "armed", _isArmed); + return base.Update(xn); } public override bool status { - get { return m_bArmed; } + get { return _isArmed; } set { if (id > 0) // Only send when a valid ID is found { - reportPendingRequest(); + ReportPendingRequest(); // Do something with vera string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ "&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&action=SetArmed" + "&newArmedValue=" + (value ? "1" : "0"); - vera.doVeraCommandRequest(cmd, reportRequestError); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } } } - public bool tripped + public bool isTripped { - get { return m_bTripped; } + get { return _isTripped; } set { } } public override int level { - get { return (m_bArmed ? 1 : 0); } - set { status = (value > 0); } + get { return (_isArmed ? 1 : 0); } + set { status = (value > 0); } } public override int maxLevel @@ -77,20 +77,20 @@ } public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } - public override string getIconName() + public override string GetIconName() { - return "Motion_Sensor_" + (m_bTripped ? "100" : "0"); + return "Motion_Sensor_" + (_isTripped ? "100" : "0"); } - public override string getStatusText() + public override string GetStatusText() { - return (status ? ( tripped ? "TRIPPED" : "standby") : "bypass"); + return (status ? ( isTripped ? "TRIPPED" : "standby") : "bypass"); } - public override string[] getCommands() + public override string [] GetCommands() { return new string [] {"Bypass", "Arm"}; } Modified: trunk/plugins/VeraControl/DeviceSprinkler.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSprinkler.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceSprinkler.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -19,71 +19,71 @@ /// </summary> public class DeviceSprinkler : DeviceGeneric { - private bool m_bStatus = false; - private string m_sMode = "-"; - private string m_sShortMode = "-"; - private string m_sOperationMode = "-"; - private string m_sCondition = "-"; + private bool _status = false; + private string _mode = "-"; + private string _shortMode = "-"; + private string _operationMode = "-"; + private string _condition = "-"; - public DeviceSprinkler( XmlNode xn ): base (xn) + public DeviceSprinkler(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_bStatus = helper.getAttrAsBool (xn, "status", m_bStatus); - m_sMode = helper.getAttrAsString(xn, "Mode", m_sMode); - m_sShortMode = helper.getAttrAsString(xn, "ShortMode", m_sShortMode); - m_sOperationMode = helper.getAttrAsString(xn, "OperationMode", m_sOperationMode); - m_sCondition = helper.getAttrAsString(xn, "Condition", m_sCondition); - return base.update(xn); + _status = _helper.GetAttrAsBool (xn, "status", _status); + _mode = _helper.GetAttrAsString(xn, "Mode", _mode); + _shortMode = _helper.GetAttrAsString(xn, "ShortMode", _shortMode); + _operationMode = _helper.GetAttrAsString(xn, "OperationMode", _operationMode); + _condition = _helper.GetAttrAsString(xn, "Condition", _condition); + return base.Update(xn); } public override bool status { - get { return m_bStatus; } + get { return _status; } set { if (id > 0) // Only send when a valid ID is found { - reportPendingRequest(); + ReportPendingRequest(); // Do something with vera string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ "&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget" + "&newTargetValue="+(value ? "1" : "0"); - vera.doVeraCommandRequest(cmd, reportRequestError); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } } } public override int level { - get { return (m_bStatus ? 1 : 0); } + get { return (_status ? 1 : 0); } set { status = (value > 0); } } public override string mode { - get { return m_sMode; } + get { return _mode; } set { if (id > 0) // Only send when a valid ID is found { - reportPendingRequest(); + ReportPendingRequest(); // Do something with vera string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ "&serviceId=urn:upnp-micasaverde-com:serviceId:Sprinkler1&action=" + (value == "Auto" ? "SetModeAuto" : (value == "Block" ? "SetModeBlock" : "SetModeManual")); - vera.doVeraCommandRequest(cmd, reportRequestError); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } } } public override string ToString() { - return name + " [" + m_sShortMode + "]"; + return name + " [" + _shortMode + "]"; } public override bool isControllable @@ -98,22 +98,22 @@ set { } } - public override string getIconName() + public override string GetIconName() { return "Humidity_Sensor"; } - public override string getStatusText() + public override string GetStatusText() { - return m_sOperationMode.Replace("_", " "); + return _operationMode.Replace("_", " "); } - public override string getExtraText() + public override string GetExtraText() { - return m_sCondition; + return _condition; } - public override string [] getCommands() + public override string [] GetCommands() { return new string [] {"Off", "On", "Auto", "Block", "Manual"}; } Modified: trunk/plugins/VeraControl/DeviceSwitch.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSwitch.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceSwitch.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,52 +18,52 @@ /// </summary> public class DeviceSwitch : DeviceGeneric { - private bool m_bStatus = false; - private string m_sWatt = "-"; - private string m_sKwh = "-"; + private bool _status = false; + private string _watt = "-"; + private string _kwh = "-"; - public DeviceSwitch( XmlNode xn ): base (xn) + public DeviceSwitch(XmlNode xn): base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_bStatus = helper.getAttrAsBool (xn, "status", m_bStatus); - m_sWatt = helper.getAttrAsString(xn, "watts", m_sWatt); - m_sKwh = helper.getAttrAsString(xn, "kwh", m_sKwh); + _status = _helper.GetAttrAsBool (xn, "status", _status); + _watt = _helper.GetAttrAsString(xn, "watts", _watt); + _kwh = _helper.GetAttrAsString(xn, "kwh", _kwh); - return base.update(xn); + return base.Update(xn); } public string watts { - get { return m_sWatt; } + get { return _watt; } set { } } public override bool status { - get { return m_bStatus; } + get { return _status; } set { if (id > 0) // Only send when a valid ID is found { - reportPendingRequest(); + ReportPendingRequest(); // Do something with vera string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ "&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget" + "&newTargetValue="+(value ? "1" : "0"); - vera.doVeraCommandRequest(cmd, reportRequestError); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } } } public override int level { - get { return (m_bStatus ? 1 : 0); } + get { return (_status ? 1 : 0); } set { status = (value > 0); } } @@ -75,7 +75,7 @@ public override string ToString() { - return name + " [" + getStatusText()+ "]"; + return name + " [" + GetStatusText()+ "]"; } public override bool isControllable @@ -84,17 +84,17 @@ set { } } - public override string getIconName() + public override string GetIconName() { - return "Binary_Light_" + (m_bStatus ? "100" : "0"); + return "Binary_Light_" + (_status ? "100" : "0"); } - public override string getExtraText() + public override string GetExtraText() { - return (m_sKwh != "" ? m_sKwh + "kWh" : ""); + return (_kwh != "" ? _kwh + "kWh" : ""); } - public override string getStatusText() + public override string GetStatusText() { return (status ? "On" : "Off"); } Modified: trunk/plugins/VeraControl/DeviceSystem.cs =================================================================== --- trunk/plugins/VeraControl/DeviceSystem.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceSystem.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -21,165 +21,165 @@ { } - public VeraHelper helper = VeraHelper.Instance; + public VeraHelper _helper = VeraHelper.Instance; - public long m_lLastUpdate = 0; - public bool m_bScreenUpdateRequired = false; - private bool m_bFullReload = true; - private string m_sVersion = ""; - private string m_sModel = ""; - private bool m_zWaveHeal = false; - private bool m_bMetric = true; - private string m_sSerial = ""; - private string m_sFwd1Server = ""; - private string m_sFwd2Server = ""; - private string m_sLoadTime = "0"; - private string m_sDataVersion = "0"; - private string m_sComment = ""; - private DevState m_dsVeraState = DevState.NONE; + public long _lastUpdate = 0; + public bool _screenUpdateRequired = false; + private bool _fullReload = true; + private string _version = ""; + private string _model = ""; + private bool _zWaveHeal = false; + private bool _metric = true; + private string _serial = ""; + private string _fwd1Server = ""; + private string _fwd2Server = ""; + private string _loadTime = "0"; + private string _dataVersion = "0"; + private string _comment = ""; + private DevState _dsVeraState = DevState.NONE; public bool update(XmlNode xn) { - m_bFullReload = helper.getAttrAsBool (xn, "full", m_bFullReload); - m_sVersion = helper.getAttrAsString (xn, "version", m_sVersion); - m_sModel = helper.getAttrAsString (xn, "model", m_sModel); - m_zWaveHeal = helper.getAttrAsBool (xn, "zwave_heal", m_zWaveHeal); - m_sSerial = helper.getAttrAsString (xn, "serial_number", m_sSerial); - m_sFwd1Server = helper.getAttrAsString (xn, "fwd1", m_sFwd1Server); - m_sFwd2Server = helper.getAttrAsString (xn, "fwd2", m_sFwd2Server); - m_sLoadTime = helper.getAttrAsString (xn, "loadtime", m_sLoadTime); + _fullReload = _helper.GetAttrAsBool (xn, "full", _fullReload); + _version = _helper.GetAttrAsString (xn, "version", _version); + _model = _helper.GetAttrAsString (xn, "model", _model); + _zWaveHeal = _helper.GetAttrAsBool (xn, "zwave_heal", _zWaveHeal); + _serial = _helper.GetAttrAsString (xn, "serial_number", _serial); + _fwd1Server = _helper.GetAttrAsString (xn, "fwd1", _fwd1Server); + _fwd2Server = _helper.GetAttrAsString (xn, "fwd2", _fwd2Server); + _loadTime = _helper.GetAttrAsString (xn, "loadtime", _loadTime); // Set update flag - string tempDataversion = helper.getAttrAsString (xn, "dataversion", m_sDataVersion); - DevState tempVeraState = helper.toDevState(helper.getAttrAsInt(xn, "state", -1)); - string tempComment = helper.getAttrAsString (xn, "comment", ""); + string tempDataversion = _helper.GetAttrAsString (xn, "dataversion", _dataVersion); + DevState tempVeraState = _helper.ToDevState(_helper.GetAttrAsInt(xn, "state", -1)); + string tempComment = _helper.GetAttrAsString (xn, "comment", ""); - if ((m_sDataVersion != tempDataversion) || m_sComment != tempComment || m_dsVeraState != tempVeraState) + if ((_dataVersion != tempDataversion) || _comment != tempComment || _dsVeraState != tempVeraState) { - m_bScreenUpdateRequired = true; - m_lLastUpdate = DateTime.Now.Ticks; + _screenUpdateRequired = true; + _lastUpdate = DateTime.Now.Ticks; } - m_sDataVersion = tempDataversion; - m_dsVeraState = tempVeraState; - m_sComment = tempComment; + _dataVersion = tempDataversion; + _dsVeraState = tempVeraState; + _comment = tempComment; - m_dsVeraState = helper.toDevState(helper.getAttrAsInt(xn, "state", -1)); - m_sComment = helper.getAttrAsString (xn, "comment", ""); - m_bMetric = (helper.getAttrAsString(xn, "temperature", "C") == "C"); + _dsVeraState = _helper.ToDevState(_helper.GetAttrAsInt(xn, "state", -1)); + _comment = _helper.GetAttrAsString (xn, "comment", ""); + _metric = (_helper.GetAttrAsString(xn, "temperature", "C") == "C"); return true; } - public void clearFullReloadFlag() + public void ClearFullReloadFlag() { - m_bFullReload = false; + _fullReload = false; } - public void setFullReloadFlag() + public void SetFullReloadFlag() { - m_bFullReload = true; + _fullReload = true; } public bool fullReload { - get { return m_bFullReload; } + get { return _fullReload; } set { } } public string versionInfo { - get { return m_sModel + " " + m_sVersion; } + get { return _model + " " + _version; } set { } } - public bool bZWaveHeal + public bool zWaveHeal { - get { return m_zWaveHeal; } + get { return _zWaveHeal; } set { } } public string serialno { - get { return m_sSerial; } + get { return _serial; } set { } } public string fwd { - get { return m_sFwd1Server; } + get { return _fwd1Server; } set { } } public string fwdBackup { - get { return m_sFwd2Server; } + get { return _fwd2Server; } set { } } public string loadtime { - get { return m_sLoadTime; } + get { return _loadTime; } set { } } public string dataversion { - get { return m_sDataVersion; } + get { return _dataVersion; } set { } } public DevState state { - get { return m_dsVeraState; } + get { return _dsVeraState; } set { } } public string comment { - get { return m_sComment; } + get { return _comment; } set { } } - public void reportConnectionError( string errmsg ) + public void ReportConnectionError(string errmsg) { - m_dsVeraState = DevState.CONNECTION_ERROR; - m_sComment = errmsg; - m_bScreenUpdateRequired = true; - m_lLastUpdate = DateTime.Now.Ticks; + _dsVeraState = DevState.CONNECTION_ERROR; + _comment = errmsg; + _screenUpdateRequired = true; + _lastUpdate = DateTime.Now.Ticks; } - public void reportCommandError( string errmsg ) + public void ReportCommandError(string errmsg) { - m_dsVeraState = DevState.COMMAND_ERROR; - m_sComment = errmsg; - m_bScreenUpdateRequired = true; - m_lLastUpdate = DateTime.Now.Ticks; + _dsVeraState = DevState.COMMAND_ERROR; + _comment = errmsg; + _screenUpdateRequired = true; + _lastUpdate = DateTime.Now.Ticks; } - public void clearConnectionError( ) + public void ClearConnectionError() { - m_dsVeraState = DevState.NONE; - m_sComment = ""; - m_bScreenUpdateRequired = true; - m_lLastUpdate = DateTime.Now.Ticks; + _dsVeraState = DevState.NONE; + _comment = ""; + _screenUpdateRequired = true; + _lastUpdate = DateTime.Now.Ticks; } - public bool isMetric() + public bool IsMetric() { - return m_bMetric; + return _metric; } - public bool newScreenUpdateWaitingAndClearFlag( ) + public bool NewScreenUpdateWaitingAndClearFlag() { // Invoking this method will clear the update ready flag -> so caller need to handle the update - bool b = m_bScreenUpdateRequired; - m_bScreenUpdateRequired = false; + bool b = _screenUpdateRequired; + _screenUpdateRequired = false; return b; } - public bool newUpdateSince(float fTimePreviousCheck) + public bool NewUpdateSince(float timePreviousCheck) { - return (fTimePreviousCheck <= m_lLastUpdate); + return (timePreviousCheck <= _lastUpdate); } } } Modified: trunk/plugins/VeraControl/DeviceTemperature.cs =================================================================== --- trunk/plugins/VeraControl/DeviceTemperature.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceTemperature.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,55 +18,55 @@ /// </summary> public class DeviceTemperature : DeviceGeneric { - public string m_sTemp = "0"; // public thermostat class - private bool m_bMetric = true; + public string _temperature = "0"; // public thermostat class + private bool _metric = true; - public DeviceTemperature( XmlNode xn, bool bMetric ): base (xn) + public DeviceTemperature(XmlNode xn, bool metric): base (xn) { - m_bMetric = bMetric; + _metric = metric; if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_sTemp = helper.getAttrAsString(xn, "temperature", m_sTemp); - return base.update(xn); + _temperature = _helper.GetAttrAsString(xn, "temperature", _temperature); + return base.Update(xn); } public override int level { - get { return int.Parse(m_sTemp); } + get { return int.Parse(_temperature); } set { } } public override int maxLevel { - get { return (m_bMetric ? 100 : 212); } + get { return (_metric ? 100 : 212); } set { } } public override int minLevel { - get { return (m_bMetric ? -22 : -7); } + get { return (_metric ? -22 : -7); } set { } } public override string ToString() { - return name + " [" + getStatusText() + "]"; + return name + " [" + GetStatusText() + "]"; } - public override string getIconName() + public override string GetIconName() { return "Temperature_Sensor"; } - public override string getStatusText() + public override string GetStatusText() { - return m_sTemp + (m_bMetric ? "°C" : "°F"); + return _temperature + (_metric ? "°C" : "°F"); } } Modified: trunk/plugins/VeraControl/DeviceThermostat.cs =================================================================== --- trunk/plugins/VeraControl/DeviceThermostat.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceThermostat.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,28 +18,28 @@ /// </summary> public class DeviceThermostat : DeviceTemperature { - private bool m_bMetric = true; - private string m_sFanMode = ""; - private string m_sHvacState = "Off"; // "Off', "Idle", "Heating", "Cooling", "FanOnly", "PendingHeat", "PendingCool", "Vent" - private string m_sMode = "Off"; // "Off', "InDeadBand", "HeatOn", "CoolOn", "AutoChangeOver", "AuxHeatOn", "EconomyHeatOn", "EmergencyHeatOn", + private bool _metric = true; + private string _fanMode = ""; + private string _hvacState = "Off"; // "Off', "Idle", "Heating", "Cooling", "FanOnly", "PendingHeat", "PendingCool", "Vent" + private string _mode = "Off"; // "Off', "InDeadBand", "HeatOn", "CoolOn", "AutoChangeOver", "AuxHeatOn", "EconomyHeatOn", "EmergencyHeatOn", // "AuxCoolOn", "EconomyCoolOn", "BuildingProtection", "EnergySavingsHeating", "EnergySavingsCooling" - public DeviceThermostat( XmlNode xn, bool bMetric ): base (xn, bMetric) + public DeviceThermostat(XmlNode xn, bool metric) : base (xn, metric) { - m_bMetric = bMetric; + _metric = metric; if (xn != null) { - update(xn); + Update(xn); } } - public override bool update(XmlNode xn) + public override bool Update(XmlNode xn) { - m_sTemp = helper.getAttrAsString(xn, "temperature", m_sTemp); - m_sFanMode = helper.getAttrAsString(xn, "fanmode", m_sFanMode); - m_sHvacState = helper.getAttrAsString(xn, "hvacstate", m_sHvacState); - m_sMode = helper.getAttrAsString(xn, "mode", m_sMode); - return base.update(xn); + _temperature = _helper.GetAttrAsString(xn, "temperature", _temperature); + _fanMode = _helper.GetAttrAsString(xn, "fanmode", _fanMode); + _hvacState = _helper.GetAttrAsString(xn, "hvacstate", _hvacState); + _mode = _helper.GetAttrAsString(xn, "mode", _mode); + return base.Update(xn); } public override bool status @@ -56,17 +56,17 @@ public override string mode { - get { return m_sMode; } + get { return _mode; } set { if (id > 0) // Only send when a valid ID is found { - reportPendingRequest(); + ReportPendingRequest(); // Do something with vera string cmd = "?id=lu_action&DeviceNum="+id.ToString()+ "&serviceId=urn:upnp-org:serviceId:HVAC_UserOperatingMode1&action=SetModeTarget" + "&NewModeTarget="+(value == "Off" ? "Off" : (value == "Cool" ? "CoolOn" : (value == "Heat" ? "HeatOn" : "AutoChangeOver")) ); - vera.doVeraCommandRequest(cmd, reportRequestError); + _vera.DoVeraCommandRequest(cmd, ReportRequestError); } } } @@ -88,22 +88,22 @@ set { } } - public override string getStatusText() + public override string GetStatusText() { return mode; } - public override string getExtraText() + public override string GetExtraText() { - return m_sHvacState + " - Fan : " + m_sFanMode + " - " + m_sTemp + (m_bMetric ? "°C" : "°F") ; + return _hvacState + " - Fan : " + _fanMode + " - " + _temperature + (_metric ? "°C" : "°F") ; } - public override string getIconName() + public override string GetIconName() { return "Thermostat"; } - public override string [] getCommands() + public override string [] GetCommands() { return new string [] {"Off", "On", "Auto", "Heat", "Cool"}; } Modified: trunk/plugins/VeraControl/DeviceWindowCovering.cs =================================================================== --- trunk/plugins/VeraControl/DeviceWindowCovering.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DeviceWindowCovering.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -18,15 +18,15 @@ /// </summary> public class DeviceWindowCovering : DeviceDimmer { - public DeviceWindowCovering( XmlNode xn ): base (xn) + public DeviceWindowCovering(XmlNode xn) : base (xn) { if (xn != null) { - update(xn); + Update(xn); } } - public override string getIconName() + public override string GetIconName() { return "Window_Covering"; } Modified: trunk/plugins/VeraControl/DialogActionTrigger.cs =================================================================== --- trunk/plugins/VeraControl/DialogActionTrigger.cs 2012-01-21 12:45:56 UTC (rev 4417) +++ trunk/plugins/VeraControl/DialogActionTrigger.cs 2012-01-21 23:31:37 UTC (rev 4418) @@ -26,75 +26,74 @@ /// </summary> public class DialogActionTrigger : GUIDialogWindow { - [SkinControl(2)] protected GUIButtonControl btnClose = null; - [SkinControl(4)] protected GUILabelControl lblHeading = null; - [SkinControl(100)] protected GUIButtonControl btnStore = null; + [SkinControl(2)] protected GUIButtonControl _btnClose = null; + [SkinControl(4)] protected GUILabelControl _lblHeading = null; + [SkinControl(100)] protected GUIButtonControl _btnStore = null; - [SkinControlAttribute(20)] protected GUISpinButton spMusicStart = null; - [SkinControlAttribute(21)] protected GUISpinButton spMusicPause = null; - [SkinControlAttribute(22)] protected GUISpinButton spMusicResume = null; - [SkinControlAttribute(23)] protected GUISpinButton spMusicStop = null; + [SkinControlAttribute(20)] protected GUISpinButton _spMusicStart = null; + [SkinControlAttribute(21)] protected GUISpinButton _spMusicPause = null; + [SkinControlAttribute(22)] protected GUISpinButton _spMusicResume = null; + [SkinControlAttribute(23)] protected GUISpinButton _spMusicStop = null; - [SkinControlAttribute(25)] protected GUISpinButton spVideoStart = null; - [SkinControlAttribute(26)] protected GUISpinButton spVideoPause = null; - [SkinControlAttribute(27)] protected GUISpinButton spVideoResume = null; - [SkinControlAttribute(28)] protected GUISpinButton spVideoStop = null; + [SkinControlAttribute(25)] protected GUISpinButton _spVideoStart = null; + [SkinControlAttribute(26)] protected GUISpinButton _spVideoPause = null; + [SkinControlAttribute(27)] protected ... [truncated message content] |
From: <Ba...@us...> - 2012-01-21 12:46:03
|
Revision: 4417 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4417&view=rev Author: BartEv Date: 2012-01-21 12:45:56 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Added WebCam movement control support Modified Paths: -------------- trunk/plugins/VeraControl/DeviceCam.cs trunk/plugins/VeraControl/DeviceGeneric.cs trunk/plugins/VeraControl/DialogDeviceControl.cs trunk/plugins/VeraControl/skin/Default/VeraDialogDeviceControl.xml trunk/plugins/VeraControl/skin/DefaultWide/VeraDialogDeviceControl.xml Modified: trunk/plugins/VeraControl/DeviceCam.cs =================================================================== --- trunk/plugins/VeraControl/DeviceCam.cs 2012-01-21 10:50:48 UTC (rev 4416) +++ trunk/plugins/VeraControl/DeviceCam.cs 2012-01-21 12:45:56 UTC (rev 4417) @@ -18,11 +18,13 @@ { // TODO: add IP-cam control buttons private string m_sIp = "127.0.0.1"; private string m_sUrl = "/"; - private string m_sStream = ""; + private string m_sStream = ""; private string m_sVideoUrl = ""; - private int m_refresh = 10; + private int m_refresh = 2; + private string m_sUser = ""; + private string m_sPass = ""; - public DeviceCam( XmlNode xn ): base (xn) + public DeviceCam( XmlNode xn ): base (xn) { if (xn != null) { @@ -30,22 +32,44 @@ } } - public override bool update(XmlNode xn) + public override bool update(XmlNode xn) { m_sIp = helper.getAttrAsString(xn, "ip", m_sIp); m_sUrl = helper.getAttrAsString(xn, "url", m_sUrl); m_sStream = helper.getAttrAsString(xn, "streaming", m_sStream); m_sVideoUrl = helper.getAttrAsString(xn, "videourls", m_sVideoUrl); + m_sUser = helper.getAttrAsString(xn, "username", ""); + m_sPass = helper.getAttrAsString(xn, "password", ""); - return base.update(xn); + return base.update(xn); } + private string passString + { + get { + if (m_sUser == "") + { + return ""; + } + return m_sUser + ":" + m_sPass + "@"; + } + set { } + } + public string imgUrl { - get { return "http://" + m_sIp + "/" + m_sUrl.Replace("%2F", "/"); } + get { return "http://" + passString + vera.vera_Address + "/data_request?id=cam_image¶meters=get_video_frame&Device_Num=" + id + "&rand=" + DateTime.Now.Ticks; + // return "http://" + passString + m_sIp + "/" + m_sUrl.Replace("%2F", "/"); + } set { } } + public string streamUrl + { + get { return "http://" + passString + m_sIp + "/" + m_sStream.Replace("%2F", "/"); } + set { } + } + public int refreshRate { get { return m_refresh; } @@ -84,5 +108,42 @@ } return b; } + + private void move(string direction) + { + if (id == 0) + { + vera.status.system.reportCommandError("Unknown device"); + m_bScreenUpdateRequired = true; + return; + } + string cmd = "?id=lu_action&DeviceNum=" + id + "&serviceId=urn:micasaverde-com:serviceId:PanTiltZoom1&action=" + direction; + vera.doVeraCommandRequest(cmd, reportRequestError); + } + + public override void moveUp() + { + move("MoveUp"); + } + public override void moveLeft() + { + move("MoveLeft"); + } + public override void moveRight() + { + move("MoveRight"); + } + public override void moveDown() + { + move("MoveDown"); + } + public override void moveZoomIn() + { + move("ZoomIn"); + } + public override void moveZoomOut() + { + move("ZoomOut"); + } } } Modified: trunk/plugins/VeraControl/DeviceGeneric.cs =================================================================== --- trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-21 10:50:48 UTC (rev 4416) +++ trunk/plugins/VeraControl/DeviceGeneric.cs 2012-01-21 12:45:56 UTC (rev 4417) @@ -115,5 +115,31 @@ { return new string [] {"Off", "On"}; } + + // Overrides for Cam Device + public virtual void moveUp() + { + // do nothing + } + public virtual void moveLeft() + { + // do nothing + } + public virtual void moveRight() + { + // do nothing + } + public virtual void moveDown() + { + // do nothing + } + public virtual void moveZoomIn() + { + // do nothing + } + public virtual void moveZoomOut() + { + // do nothing + } } } Modified: trunk/plugins/VeraControl/DialogDeviceControl.cs =================================================================== --- trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-01-21 10:50:48 UTC (rev 4416) +++ trunk/plugins/VeraControl/DialogDeviceControl.cs 2012-01-21 12:45:56 UTC (rev 4417) @@ -9,6 +9,7 @@ * E-mail: ba...@ev... */ using System; +using System.Threading; using System.Collections; using MediaPortal; using MediaPortal.Util; @@ -35,15 +36,25 @@ [SkinControlAttribute(7)] protected GUILabelControl label2=null; [SkinControlAttribute(8)] protected GUILabelControl label3=null; - [SkinControl(10)] protected GUIButtonControl btnLeft = null; - [SkinControl(11)] protected GUIButtonControl btnRight = null; - [SkinControl(12)] protected GUIButtonControl btnMode1 = null; - [SkinControl(13)] protected GUIButtonControl btnMode2 = null; - [SkinControl(14)] protected GUIButtonControl btnMode3 = null; - [SkinControl(15)] protected GUISliderControl slider = null; - [SkinControl(20)] protected GUIImage camImage = null; + [SkinControl(10)] protected GUIButtonControl btnLeft = null; + [SkinControl(11)] protected GUIButtonControl btnRight = null; + [SkinControl(12)] protected GUIButtonControl btnMode1 = null; + [SkinControl(13)] protected GUIButtonControl btnMode2 = null; + [SkinControl(14)] protected GUIButtonControl btnMode3 = null; + [SkinControl(15)] protected GUISliderControl slider = null; - [SkinControl(30)] protected GUIImage cmtImage = null; + [SkinControl(20)] protected GUIImage camImage1 = null; + [SkinControl(21)] protected GUIImage camImage2 = null; + [SkinControl(50)] protected GUIButtonControl btnCamUp = null; + [SkinControl(51)] protected GUIButtonControl btnCamLeft = null; + [SkinControl(52)] protected GUIButtonControl btnCamRight = null; + [SkinControl(53)] protected GUIButtonControl btnCamDown = null; + [SkinControl(55)] protected GUIButtonControl btnCamZmMin = null; + [SkinControl(56)] protected GUIButtonControl btnCamZmPlus = null; + [SkinControl(57)] protected GUILabelControl labelLoading = null; + + + [SkinControl(30)] protected GUIImage cmtImage = null; [SkinControlAttribute(31)] protected GUILabelControl comment=null; private VeraHelper helper = new VeraHelper(); @@ -52,6 +63,8 @@ private bool m_bLevelUpdatePending = false; private long m_lLastLevelUpdate = 0; private int m_iDesiredLevel = 0; + private bool m_bKeepUpdating = false; + private int _camUpdateDelay = 2; public DialogDeviceControl() { @@ -79,6 +92,22 @@ } updateStatus(); + + if (myDev.GetType() == typeof(DeviceCam)) + { + btnCamUp.Visibility = System.Windows.Visibility.Visible; + btnCamLeft.Visibility = System.Windows.Visibility.Visible; + btnCamRight.Visibility = System.Windows.Visibility.Visible; + btnCamDown.Visibility = System.Windows.Visibility.Visible; + btnCamZmMin.Visibility = System.Windows.Visibility.Visible; + btnCamZmPlus.Visibility = System.Windows.Visibility.Visible; + + btnClose.NavigateDown = 50; + btnClose.NavigateUp = 56; + + imgLogo.Visibility = System.Windows.Visibility.Hidden; + startCamImageUpdater(((DeviceCam)dev).imgUrl); + } } public void updateStatus() @@ -114,11 +143,6 @@ } else { - if (myDev.GetType() == typeof(DeviceCam)) - { - DeviceCam cam = (DeviceCam) myDev; - SetCamImage(cam.imgUrl); - } SetText(myDev.name, myDev.getStatusText(), myDev.getExtraText()); } // save last update ticks @@ -128,6 +152,7 @@ protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnClose) { + m_bKeepUpdating = false; PageDestroy(); } else { if (control == btnLeft) { @@ -145,6 +170,25 @@ if (control == btnMode3) { myDev.mode = btnMode3.Label; } + // Cam only commands + if (control == btnCamUp) { + myDev.moveUp(); + } + if (control == btnCamLeft) { + myDev.moveLeft(); + } + if (control == btnCamRight) { + myDev.moveRight(); + } + if (control == btnCamDown) { + myDev.moveDown(); + } + if (control == btnCamZmMin) { + myDev.moveZoomOut(); + } + if (control == btnCamZmPlus) { + myDev.moveZoomIn(); + } if (control == slider) { // Do something with fast repeating level changes.... slow down communications m_bLevelUpdatePending = true; @@ -237,17 +281,55 @@ } } - public void SetCamImage(string url) + public int camUpdateDelay { - - camImage.Dispose(); - camImage.SetFileName(url); - camImage.AllocResources(); - camImage.KeepAspectRatio = true; - camImage.Visibility = System.Windows.Visibility.Visible; - imgLogo.Visibility = System.Windows.Visibility.Hidden; + get { return _camUpdateDelay; } + set { _camUpdateDelay = value; } } + public void startCamImageUpdater(string url) + { + m_bKeepUpdating = true; + labelLoading.Visibility = System.Windows.Visibility.Visible; + new Thread (() => + { + while (m_bKeepUpdating) + { + camImage1.Dispose(); + camImage1.SetFileName(url+"&time="+DateTime.Now.Ticks); + camImage1.AllocResources(); + camImage1.KeepAspectRatio = true; + + while (!camImage1.Allocated) + { + Thread.Sleep(100); + } + camImage1.Visibility = System.Windows.Visibility.Visible; + camImage2.Visibility = System.Windows.Visibility.Hidden; + labelLoading.Visibility = System.Windows.Visibility.Hidden; + + Thread.Sleep(_camUpdateDelay * 1000); + + if (m_bKeepUpdating) + { + camImage2.Dispose(); + camImage2.SetFileName(url+"&time="+DateTime.Now.Ticks); + camImage2.AllocResources(); + camImage2.KeepAspectRatio = true; + while (!camImage2.Allocated) + { + Thread.Sleep(100); + } + camImage2.Visibility = System.Windows.Visibility.Visible; + camImage1.Visibility = System.Windows.Visibility.Hidden; + labelLoading.Visibility = System.Windows.Visibility.Hidden; + + Thread.Sleep(_camUpdateDelay * 1000); + } + } + }).Start(); + } + public void SetImage(string filename) { imgLogo.Dispose(); Modified: trunk/plugins/VeraControl/skin/Default/VeraDialogDeviceControl.xml =================================================================== --- trunk/plugins/VeraControl/skin/Default/VeraDialogDeviceControl.xml 2012-01-21 10:50:48 UTC (rev 4416) +++ trunk/plugins/VeraControl/skin/Default/VeraDialogDeviceControl.xml 2012-01-21 12:45:56 UTC (rev 4417) @@ -237,15 +237,168 @@ </control> <control> + <description>loading label</description> + <type>label</type> + <id>57</id> + <posX>400</posX> + <posY>240</posY> + <label>Loading image...</label> + <font>font13</font> + <textcolor>90FFFFFF</textcolor> + <visible>no</visible> + </control> + <control> <type>image</type> <id>20</id> - <posX>240</posX> + <posX>340</posX> <posY>160</posY> <width>600</width> <height>240</height> <texture></texture> <visible>no</visible> </control> - + <control> + <type>image</type> + <id>21</id> + <posX>340</posX> + <posY>160</posY> + <width>600</width> + <height>240</height> + <texture></texture> + <visible>no</visible> + </control> + <control> + <description>Cam Up</description> + <type>button</type> + <id>50</id> + <posX>190</posX> + <posY>180</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>80</width> + <height>32</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>up</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>51</onleft> + <onright>52</onright> + <onup>2</onup> + <ondown>53</ondown> + <visible>no</visible> + </control> + <control> + <description>Cam left</description> + <type>button</type> + <id>51</id> + <posX>140</posX> + <posY>220</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>80</width> + <height>32</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>left</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>52</onleft> + <onright>52</onright> + <onup>50</onup> + <ondown>52</ondown> + <visible>no</visible> + </control> + <control> + <description>Cam right</description> + <type>button</type> + <id>52</id> + <posX>240</posX> + <posY>220</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>80</width> + <height>32</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>right</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>51</onleft> + <onright>51</onright> + <onup>50</onup> + <ondown>53</ondown> + <visible>no</visible> + </control> + <control> + <description>Cam down</description> + <type>button</type> + <id>53</id> + <posX>190</posX> + <posY>260</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>80</width> + <height>32</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>down</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>51</onleft> + <onright>52</onright> + <onup>50</onup> + <ondown>55</ondown> + <visible>no</visible> + </control> + <control> + <description>Zoom min</description> + <type>button</type> + <id>55</id> + <posX>140</posX> + <posY>320</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>80</width> + <height>32</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>zoom -</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>56</onleft> + <onright>56</onright> + <onup>53</onup> + <ondown>2</ondown> + <visible>no</visible> + </control> + <control> + <description>Zoom plus</description> + <type>button</type> + <id>56</id> + <posX>240</posX> + <posY>320</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>80</width> + <height>32</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>zoom +</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>55</onleft> + <onright>55</onright> + <onup>53</onup> + <ondown>2</ondown> + <visible>no</visible> + </control> + </controls> </window> Modified: trunk/plugins/VeraControl/skin/DefaultWide/VeraDialogDeviceControl.xml =================================================================== --- trunk/plugins/VeraControl/skin/DefaultWide/VeraDialogDeviceControl.xml 2012-01-21 10:50:48 UTC (rev 4416) +++ trunk/plugins/VeraControl/skin/DefaultWide/VeraDialogDeviceControl.xml 2012-01-21 12:45:56 UTC (rev 4417) @@ -239,15 +239,169 @@ <animation effect="fade" time="250">windowopen</animation> </control> + <control> + <description>loading label</description> + <type>label</type> + <id>57</id> + <posX>630</posX> + <posY>280</posY> + <label>Loading image...</label> + <font>font13</font> + <textcolor>90FFFFFF</textcolor> + <visible>no</visible> + </control> <control> <type>image</type> <id>20</id> - <posX>450</posX> + <posX>550</posX> <posY>200</posY> <width>600</width> <height>300</height> <texture></texture> <visible>no</visible> + </control> + <control> + <type>image</type> + <id>21</id> + <posX>550</posX> + <posY>200</posY> + <width>600</width> + <height>300</height> + <texture></texture> + <visible>no</visible> </control> + <control> + <description>Cam Up</description> + <type>button</type> + <id>50</id> + <posX>335</posX> + <posY>220</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>130</width> + <height>50</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>up</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>51</onleft> + <onright>52</onright> + <onup>2</onup> + <ondown>53</ondown> + <visible>no</visible> + </control> + <control> + <description>Cam left</description> + <type>button</type> + <id>51</id> + <posX>260</posX> + <posY>275</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>130</width> + <height>50</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>left</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>52</onleft> + <onright>52</onright> + <onup>50</onup> + <ondown>52</ondown> + <visible>no</visible> + </control> + <control> + <description>Cam right</description> + <type>button</type> + <id>52</id> + <posX>400</posX> + <posY>275</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>130</width> + <height>50</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>right</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>51</onleft> + <onright>51</onright> + <onup>50</onup> + <ondown>53</ondown> + <visible>no</visible> + </control> + <control> + <description>Cam down</description> + <type>button</type> + <id>53</id> + <posX>335</posX> + <posY>330</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>130</width> + <height>50</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>down</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>51</onleft> + <onright>52</onright> + <onup>50</onup> + <ondown>55</ondown> + <visible>no</visible> + </control> + <control> + <description>Zoom min</description> + <type>button</type> + <id>55</id> + <posX>260</posX> + <posY>420</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>130</width> + <height>50</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>zoom -</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>56</onleft> + <onright>56</onright> + <onup>53</onup> + <ondown>2</ondown> + <visible>no</visible> + </control> + <control> + <description>Zoom plus</description> + <type>button</type> + <id>56</id> + <posX>400</posX> + <posY>420</posY> + <textXOff>29</textXOff> + <textYOff>6</textYOff> + <width>130</width> + <height>50</height> + <textureFocus>button_focus.png</textureFocus> + <textureNoFocus>button_nofocus.png</textureNoFocus> + <label>zoom +</label> + <font>font10</font> + <textalign>center</textalign> + <textvalign>middle</textvalign> + <onleft>55</onleft> + <onright>55</onright> + <onup>53</onup> + <ondown>2</ondown> + <visible>no</visible> + </control> + </controls> </window> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hor...@us...> - 2012-01-21 10:50:56
|
Revision: 4416 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4416&view=rev Author: horned-reaper Date: 2012-01-21 10:50:48 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat trunk/plugins/FritzBox/Build/Build.log trunk/plugins/FritzBox/Docs/Ausstehend.txt trunk/plugins/FritzBox/Docs/Changes.txt trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs trunk/plugins/FritzBox/FritzBox/Settings.cs trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb 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.dll trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 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.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.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/ResolveAssemblyReference.cache 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.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.pdb 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/Docs/Documentation/Call strings.xls trunk/plugins/FritzBox/releases/FritzBox_v0.4.1.4415.mpe1 Modified: trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat =================================================================== --- trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat 2012-01-21 10:50:48 UTC (rev 4416) @@ -3,61 +3,5 @@ D: cd \FritzBox\Build -REM Set program path based on current machine environment -set ProgramDir=%ProgramFiles% -if not "%ProgramFiles(x86)%".=="". set ProgramDir=%ProgramFiles(x86)% - -REM Set build path -set BuildPath=..\FritzBox\bin\Release - -REM Set plugin DLL path -set PluginDLL=%BuildPath%\FritzBox.dll - -REM set log file where the infos are written to, and clear that file -set LOG=Build.log -echo. > %LOG% - -echo. -echo -= FRITZ!Box Manager =- -echo -=====================- -echo. - -echo. -echo Writing SVN revision assemblies... -DeployVersionSVN.exe /svn=".." >> %LOG% - -echo. -echo Building FRITZ!Box Manager... -"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;AllowUnsafeBlocks=true "..\FritzBox.sln" >> %LOG% - -echo. -echo Reverting assemblies... -DeployVersionSVN.exe /svn=".." /revert >> %LOG% - -rmdir /S /Q ..\_release -xcopy "%PluginDLL%" ..\_release\plugins\windows\ >> %LOG% -xcopy ..\FritzBox\Resources\speexdec.exe ..\_release\base\ >> %LOG% -xcopy ..\FritzBox\Skin ..\_release\skin /S /I >> %LOG% -xcopy ..\FritzBox\Languages ..\_release\language /S /I >> %LOG% - -echo. -echo Reading the version number... -if not exist "%PluginDLL%" goto version_error -for /f "Tokens=5" %%a in ('filever "%PluginDLL%"') do set version=%%a -goto :version_done -:version_error -echo FritzBox.dll not found. version could not be read >> %LOG% -echo FritzBox.dll not found. version could not be read. Build is cancelled -pause -goto :EOF -:version_done - -echo. -echo Building MpeExtension package including update.xml... -del "..\MpeRelease\update.xml" /Q -"%ProgramDir%\Team MediaPortal\MediaPortal\MpeMaker.exe" "..\MpeRelease\FritzBox.xmp2" /V=%version% /B /UpdateXML >> %LOG% - -echo. -echo Move installer and update.xml files to the releases folder -move /Y "..\MpeRelease\FritzBox.mpe1" "..\releases\FritzBox_v%Version%.mpe1" -move /Y "..\MpeRelease\update.xml" "..\releases\update.xml" +echo Updating SVN path... +TortoiseProc.exe /path:".." /command:commit /closeonend:1 Modified: trunk/plugins/FritzBox/Build/Build.log =================================================================== --- trunk/plugins/FritzBox/Build/Build.log 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Build/Build.log 2012-01-21 10:50:48 UTC (rev 4416) @@ -1,6 +1,6 @@ Running : C:\Program Files\TortoiseSVN\bin\SubWCRev.exe -SVN Version: 4414 +SVN Version: 4415 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 18.01.2012 12:14:44. +Build started 21.01.2012 11:32:07. Project "D:\FritzBox\FritzBox.sln" on node 1 (Rebuild target(s)). ValidateSolutionConfiguration: Building solution configuration "Release|Mixed Platforms". @@ -195,7 +195,7 @@ 0 Warning(s) 0 Error(s) -Time Elapsed 00:00:02.47 +Time Elapsed 00:00:02.53 Reverting to build 0 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs @@ -280,7 +280,7 @@ ..\FritzBox\Languages\Unsupported\strings_zh-CN.xml 36 File(s) copied MpeMaker version: 1.2.1.0 -Build started at 12:14:48 +Build started at 11:32:12 Building "D:\FritzBox\MpeRelease\FritzBox.xmp2" Output: "..\MpeRelease\FritzBox.mpe1" Writing UpdateXML to "update.xml" Modified: trunk/plugins/FritzBox/Docs/Ausstehend.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-01-21 10:50:48 UTC (rev 4416) @@ -3,16 +3,17 @@ Fehler beheben: - auch bei einem "Unbekannten Anrufer" (unterdr\xFCckte bzw. nicht \xFCbertragene Rufnummer) \xF6ffnet sich \xFCber das Kontextrufen "zur\xFCckrufen". Sollte man deaktivieren -- btnModus umbenennen? - ObjectDisposed-Exception bei Client-Stop - ein kleiner schwarzer Balken \xFCberdeckt das erste Zeichen oder die erste Ziffer zur H\xE4lfte - Problem beim Laden gro\xDFer meta0-Dateien, siehe "Problembeschreibung 1.txt" + +Optimierungen: +- btnModus umbenennen? - blauer Hintergrund f\xFCr Default und DefaultWide Skins - GUI-Properties \xFCberpr\xFCfen und Dokumentation vervollst\xE4ndigen - vertrauliche Daten im Log trotz "Extensive Logging"-Einstellung Neue Funktionen/Erweiterungen: -- Schalter zum Deaktivieren von Benachrichtigungen bei ausgehenden Anrufen - Rufnummer-Typ hinzuf\xFCgen - GUI-Adressbuch - Anruf-Benachrichtigungen @@ -68,4 +69,7 @@ Ich h\xE4tte noch Idee, wei\xDF nicht ob dies M\xF6glich ist. Aber sch\xF6n w\xE4re es wenn Mediaportal aus dem Standby oder Hibernate erwacht anzeigen w\xFCrde wenn es verpasste Anrufe gibt. Also das vlt. ein Popup Fenster sich \xF6ffnet und anzeigt das es verpasste Anrufe gibt... Ist dies wohl M\xF6glich ? IchBinsShort, 17.01.2012, 15:23: -Eventuell w\xE4re es dann auch noch gut wenn neue Anrufe in der Anrufliste als Neu markiert werden k\xF6nnen. Also so was wie ein "gelesen Status" woraus ersichtlich welche der Anrufe seit dem letztem Aufruf der Anrufliste neu hinzugekommen sind :-) \ No newline at end of file +Eventuell w\xE4re es dann auch noch gut wenn neue Anrufe in der Anrufliste als Neu markiert werden k\xF6nnen. Also so was wie ein "gelesen Status" woraus ersichtlich welche der Anrufe seit dem letztem Aufruf der Anrufliste neu hinzugekommen sind :-) + +IchBinsShort, 20.01.2012, 12:38: +Nebenstelle in der Anrufliste anzeigen \ No newline at end of file Modified: trunk/plugins/FritzBox/Docs/Changes.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Changes.txt 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Docs/Changes.txt 2012-01-21 10:50:48 UTC (rev 4416) @@ -1,12 +0,0 @@ -Fixed bugs: -- on multiple contact deletions multiple synchronisations are necessary -- multiple contacts with the same name cause update actions on every synchronization -- multiple MSN filter entries when FRITZ!Box Manager configuration window is closed and re-opened without closing the MediaPortal Configuration window -- MediaPortal crashes on calls with phone numbers not contained in the phone book - -Optimizations: -- phone book is now saved on every change instead of MediaPortal exit -- entry checks for the following settings: - - update interval - - dial port -- first MSN filter entry is automatically displayed when Configuration window is opened \ No newline at end of file Added: trunk/plugins/FritzBox/Docs/Documentation/Call strings.xls =================================================================== (Binary files differ) Property changes on: trunk/plugins/FritzBox/Docs/Documentation/Call strings.xls ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -63,12 +63,12 @@ #region Variables private readonly List<CallAction> _actionList = new List<CallAction>(); - private readonly List<CallAction> _notifyQueue = new List<CallAction>(); - private bool _showNotify = true; - private object _tempNotify; + private readonly List<CallAction> _notificationQueue = new List<CallAction>(); + private bool _showNotification = true; + private object _tempNotification; private static bool windowIsDisplayed = false; - private int notifyCount = 0; + private int notificationCount = 0; #endregion Variables @@ -80,15 +80,15 @@ private void OnStartExternal(Process proc, bool waitForExit) { - if (waitForExit) _showNotify = false; - else _showNotify = true; + if (waitForExit) _showNotification = false; + else _showNotification = true; } private void OnStopExternal(Process proc, bool waitForExit) { - _showNotify = true; + _showNotification = true; - _notifyQueue.Clear(); + _notificationQueue.Clear(); } private void OnCallAction(CallAction callAction) @@ -96,33 +96,29 @@ Log.Info("FRITZ!Box: OnCallAction()"); callAction.WriteToLog(); - if (!_showNotify) + if (!_showNotification) { Log.Info("External process is running. Notification is queued and will be shown later"); - _notifyQueue.Add(callAction); + _notificationQueue.Add(callAction); return; } switch (callAction.Type) { case CallAction.CallType.Incoming: - if (Settings.PhoneBookEnabled) callAction.Caller = phoneBook.FindContactEntry(callAction.Caller); - OnCall(callAction); break; case CallAction.CallType.Outgoing: - if (Settings.PhoneBookEnabled) callAction.Caller = phoneBook.FindContactEntry(callAction.Caller); - OnCall(callAction); break; case CallAction.CallType.ConnectionStarted: break; case CallAction.CallType.ConnectionClosed: - if (Settings.CloseOnConnectionClosed) + if (Settings.CloseNotificationOnConnectionClosed) { Log.Info("\"Close On Connection Close\" setting is enabled. Try to close active notification"); - if (_tempNotify != null) + if (_tempNotification != null) { MediaPortal.GUI.Library.Action act = new MediaPortal.GUI.Library.Action(); act.wID = MediaPortal.GUI.Library.Action.ActionType.ACTION_CLOSE_DIALOG; @@ -168,11 +164,9 @@ private void OnCall(CallAction callAction) { - PhoneBookItem phoneBookItem = callAction.Caller.PhoneBookItem; - - Log.Info("FRITZ!Box: OnCall()"); + Log.Info("New call"); - if (_tempNotify != null) + if (_tempNotification != null) { Log.Info("Yet another dialog is active. Action is sent to queue"); @@ -183,6 +177,10 @@ 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; + // play sound string incomingSoundPath = null; @@ -193,7 +191,7 @@ if (!String.IsNullOrEmpty(incomingSoundPath) && File.Exists(incomingSoundPath)) { - Log.Debug("Playing sound for incoming call: {0}", incomingSoundPath); + Log.Debug("Playing sound on incoming call: {0}", incomingSoundPath); Utils.PlaySound(incomingSoundPath, false, true); } } @@ -201,57 +199,71 @@ // check if call notification shall be shown bool showNotification = false; - if (!Settings.PhoneBookEnabled) + switch (callAction.Type) { - Log.Info("Phone book is disabled. Notify will be shown"); - showNotification = true; + case CallAction.CallType.Incoming: + showNotification = Settings.ShowNotficationOnIncomingCall; + break; + case CallAction.CallType.Outgoing: + showNotification = Settings.ShowNotficationOnOutgoingCall; + break; } - else + + if (showNotification) { - if (phoneBookItem != null) // phone book entry exists + if (!Settings.PhoneBookEnabled) { - if (Settings.ExtensiveLogging) Log.Info("Caller is identified by phone book as {0}", phoneBookItem.Name); + Log.Info("Phone book is disabled. Notification will be shown"); + showNotification = true; + } + else + { + if (phoneBookItem != null) + { + if (Settings.ExtensiveLogging) Log.Info("Caller is identified by phone book as {0}", phoneBookItem.Name); - if (phoneBookItem.ShowCallNotification) showNotification = true; + if (phoneBookItem.ShowCallNotification) showNotification = true; + } + else if (Settings.ShowUnknownCaller) showNotification = true; // unknown caller } - else if (Settings.ShowUnknownCaller) showNotification = true; // unknown caller - } - // configure call notificaton - if (showNotification) - { - string strHeading = string.Empty; - string strImage = string.Empty; - string strText = string.Empty; - - // ...heading - switch (callAction.Type) + // configure call notificaton + if (showNotification) { - case CallAction.CallType.Incoming: - strHeading = GUILocalizeStrings.Get(1); // 1 = Incoming call - break; - case CallAction.CallType.Outgoing: - strHeading = GUILocalizeStrings.Get(2); // 2 = Outgoing call - break; - } + string strHeading = string.Empty; + string strImage = string.Empty; + string strText = string.Empty; - // ..image - strImage = phoneBook.GetCallerImagePath(callAction.Caller); + // ...heading + switch (callAction.Type) + { + case CallAction.CallType.Incoming: + strHeading = GUILocalizeStrings.Get(1); // 1 = Incoming call + break; + case CallAction.CallType.Outgoing: + strHeading = GUILocalizeStrings.Get(2); // 2 = Outgoing call + break; + } - // ...message text - strText = Environment.NewLine; + // ..image + strImage = phoneBook.GetCallerImagePath(callAction.Caller); - if (callAction.Caller.PhoneNumber != "") - { - if (phoneBookItem != null) strText += phoneBookItem.Name; + // ...message text + strText = Environment.NewLine; - if (Settings.ShowPhoneNumberOnNotify) strText += Environment.NewLine + callAction.Caller.PhoneNumber; + if (callAction.Caller.PhoneNumber != "") + { + if (phoneBookItem != null) strText += phoneBookItem.Name; + + if (Settings.ShowPhoneNumberOnNotification) strText += Environment.NewLine + callAction.Caller.PhoneNumber; + } + else strText += GUILocalizeStrings.Get(3); // 3 = Unknown + + // show call notification + showNotificationWindow(callAction.Type, strHeading, strImage, strText); } - else strText += GUILocalizeStrings.Get(3); // 3 = Unknown - - // show call notification - ShowNotify(callAction.Type, strHeading, strImage, strText); } + // update call list and voice box items and refresh GUI worker.queue.Enqueue(new Task(Task.TaskAction.LoadCallListItems, null)); worker.queue.Enqueue(new Task(Task.TaskAction.LoadVoiceBoxItems, null)); @@ -278,80 +290,96 @@ } else { - Log.Info("MSN is not on the list. Notify won't be shown"); + Log.Info("MSN is not on the list. Notification won't be shown"); return false; } } - - private void ShowNotify(CallAction.CallType callType, string strHeading, string strImage, string strText) + private void showNotificationWindow(CallAction.CallType callType, string strHeading, string strImage, string strText) { bool resumePlayer = false; + + if (notificationCount >= Settings.MaxNotifies) return; - if (notifyCount >= Settings.MaxNotifies) return; - - // pause player - if (g_Player.Playing && !g_Player.Paused) + if (!isMovingPicturesOrMPTVSeriesDialogOpened()) // this check avoids that the current movie starts when dialog asking if the movie shall be continued on the last position is opened { - switch (callType) + // pause player + if (g_Player.Playing && !g_Player.Paused) { - case CallAction.CallType.Incoming: - if (Settings.PauseMediaOnIncomingCall) - { - g_Player.Pause(); - resumePlayer = true; - } - break; - case CallAction.CallType.Outgoing: - if (Settings.PauseMediaOnOutgoingCall) - { - g_Player.Pause(); - resumePlayer = true; - } - break; + switch (callType) + { + case CallAction.CallType.Incoming: + if (Settings.PauseMediaOnIncomingCall) + { + g_Player.Pause(); + resumePlayer = true; + } + break; + case CallAction.CallType.Outgoing: + if (Settings.PauseMediaOnOutgoingCall) + { + g_Player.Pause(); + resumePlayer = true; + } + break; + } } - } - // show dialog - GUIDialogNotify dlgNotify = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); - if (dlgNotify == null) return; + // show dialog + GUIDialogNotify dlgNotification = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); + if (dlgNotification == null) return; - dlgNotify.Reset(); - dlgNotify.ClearAll(); - dlgNotify.SetHeading(strHeading); - dlgNotify.SetImage(strImage); - dlgNotify.SetText(strText); - if (Settings.CloseOnTimeout) dlgNotify.TimeOut = Settings.NotifyTimeout; - else dlgNotify.TimeOut = -1; + dlgNotification.Reset(); + dlgNotification.ClearAll(); + dlgNotification.SetHeading(strHeading); + dlgNotification.SetImage(strImage); + dlgNotification.SetText(strText); + if (Settings.CloseNotificationOnTimeout) dlgNotification.TimeOut = Settings.NotificationTimeout; + else dlgNotification.TimeOut = -1; - _tempNotify = dlgNotify; - dlgNotify.DoModal(GUIWindowManager.ActiveWindow); + _tempNotification = dlgNotification; + dlgNotification.DoModal(GUIWindowManager.ActiveWindow); - // resume player - if (resumePlayer && g_Player.Playing && g_Player.Paused) - { - switch (callType) + // resume player + if (resumePlayer && g_Player.Playing && g_Player.Paused) { - case CallAction.CallType.Incoming: - if (Settings.ResumeMediaOnIncomingCall) g_Player.Pause(); - break; - case CallAction.CallType.Outgoing: - if (Settings.ResumeMediaOnOutgoingCall) g_Player.Pause(); - break; + switch (callType) + { + case CallAction.CallType.Incoming: + if (Settings.ResumeMediaOnIncomingCall) g_Player.Pause(); + break; + case CallAction.CallType.Outgoing: + if (Settings.ResumeMediaOnOutgoingCall) g_Player.Pause(); + break; + } } + + _tempNotification = null; + + if (_actionList.Count > 0) + { + CallAction tmpAction = _actionList[0]; + _actionList.RemoveAt(0); + OnCallAction(tmpAction); + } } + else Log.Info("Moving Pictures or MP-TV Series dialog is opened, call notification won't be shown"); + } - _tempNotify = null; - - if (_actionList.Count > 0) + private bool isMovingPicturesOrMPTVSeriesDialogOpened() + { + if (GUIWindowManager.IsRouted) // check if dialog window is opened { - CallAction tmpAction = _actionList[0]; - _actionList.RemoveAt(0); - OnCallAction(tmpAction); + if (GUIWindowManager.ActiveWindow == 96742 || GUIWindowManager.ActiveWindow == 9811) // 96742 = window ID of "Moving Pictures", 9811 = window ID of "MP-TV Series" + { + if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_YES_NO) return true; + } } + + return false; } - #endregion + #endregion Helper Methods #endregion CallMonitor @@ -365,7 +393,7 @@ public void Start() { Log.Info("FRITZ!Box Manager {0} plugin is starting", Assembly.GetExecutingAssembly().GetName().Version); - + Settings.Load(); // register events Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -42,11 +42,11 @@ this.groupBoxPhonebook = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.checkBoxShowUnknownCaller = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxUsePhonebook = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.groupBoxNotify = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.groupBoxNotification = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.checkBoxCloseOnConnectionClosed = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.lblMaxNotifies = new MediaPortal.UserInterface.Controls.MPLabel(); this.numericUpDownMaxNotifies = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); - this.checkBoxShowPhoneNumberOnNotify = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBoxShowPhoneNumberOnNotification = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.buttonMSNsRemove = new MediaPortal.UserInterface.Controls.MPButton(); this.checkBoxFilterMSNs = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.buttonMSNsAdd = new MediaPortal.UserInterface.Controls.MPButton(); @@ -77,11 +77,13 @@ this.label4 = new System.Windows.Forms.Label(); this.dialPortNumericUpDown = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); this.updateInterval = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); + this.checkBoxShowNotificationOnOutgoingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBoxShowNotificationOnIncomingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabPageDiagnostics.SuspendLayout(); this.tabPagePhoneBook.SuspendLayout(); this.tabPageCallNotification.SuspendLayout(); this.groupBoxPhonebook.SuspendLayout(); - this.groupBoxNotify.SuspendLayout(); + this.groupBoxNotification.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxNotifies)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); this.groupBoxMedia.SuspendLayout(); @@ -197,7 +199,7 @@ // tabPageCallNotification // this.tabPageCallNotification.Controls.Add(this.groupBoxPhonebook); - this.tabPageCallNotification.Controls.Add(this.groupBoxNotify); + this.tabPageCallNotification.Controls.Add(this.groupBoxNotification); this.tabPageCallNotification.Controls.Add(this.groupBoxMedia); this.tabPageCallNotification.Location = new System.Drawing.Point(4, 22); this.tabPageCallNotification.Name = "tabPageCallNotification"; @@ -212,7 +214,7 @@ this.groupBoxPhonebook.Controls.Add(this.checkBoxShowUnknownCaller); this.groupBoxPhonebook.Controls.Add(this.checkBoxUsePhonebook); this.groupBoxPhonebook.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.groupBoxPhonebook.Location = new System.Drawing.Point(7, 229); + this.groupBoxPhonebook.Location = new System.Drawing.Point(7, 250); this.groupBoxPhonebook.Name = "groupBoxPhonebook"; this.groupBoxPhonebook.Size = new System.Drawing.Size(177, 67); this.groupBoxPhonebook.TabIndex = 2; @@ -242,33 +244,35 @@ this.checkBoxUsePhonebook.UseVisualStyleBackColor = true; this.checkBoxUsePhonebook.CheckedChanged += new System.EventHandler(this.checkBoxUsePhonebook_CheckedChanged); // - // groupBoxNotify + // groupBoxNotification // - this.groupBoxNotify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.groupBoxNotification.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxNotify.Controls.Add(this.checkBoxCloseOnConnectionClosed); - this.groupBoxNotify.Controls.Add(this.lblMaxNotifies); - this.groupBoxNotify.Controls.Add(this.numericUpDownMaxNotifies); - this.groupBoxNotify.Controls.Add(this.checkBoxShowPhoneNumberOnNotify); - this.groupBoxNotify.Controls.Add(this.buttonMSNsRemove); - this.groupBoxNotify.Controls.Add(this.checkBoxFilterMSNs); - this.groupBoxNotify.Controls.Add(this.buttonMSNsAdd); - this.groupBoxNotify.Controls.Add(this.comboBoxMSNs); - this.groupBoxNotify.Controls.Add(this.numericUpDownTimeout); - this.groupBoxNotify.Controls.Add(this.checkBoxCloseOnTimout); - this.groupBoxNotify.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.groupBoxNotify.Location = new System.Drawing.Point(6, 6); - this.groupBoxNotify.Name = "groupBoxNotify"; - this.groupBoxNotify.Size = new System.Drawing.Size(561, 114); - this.groupBoxNotify.TabIndex = 0; - this.groupBoxNotify.TabStop = false; - this.groupBoxNotify.Text = "Notify settings"; + this.groupBoxNotification.Controls.Add(this.checkBoxShowNotificationOnOutgoingCall); + this.groupBoxNotification.Controls.Add(this.checkBoxCloseOnConnectionClosed); + this.groupBoxNotification.Controls.Add(this.checkBoxShowNotificationOnIncomingCall); + this.groupBoxNotification.Controls.Add(this.lblMaxNotifies); + this.groupBoxNotification.Controls.Add(this.numericUpDownMaxNotifies); + this.groupBoxNotification.Controls.Add(this.checkBoxShowPhoneNumberOnNotification); + this.groupBoxNotification.Controls.Add(this.buttonMSNsRemove); + this.groupBoxNotification.Controls.Add(this.checkBoxFilterMSNs); + this.groupBoxNotification.Controls.Add(this.buttonMSNsAdd); + this.groupBoxNotification.Controls.Add(this.comboBoxMSNs); + this.groupBoxNotification.Controls.Add(this.numericUpDownTimeout); + this.groupBoxNotification.Controls.Add(this.checkBoxCloseOnTimout); + this.groupBoxNotification.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxNotification.Location = new System.Drawing.Point(6, 6); + this.groupBoxNotification.Name = "groupBoxNotification"; + this.groupBoxNotification.Size = new System.Drawing.Size(561, 135); + this.groupBoxNotification.TabIndex = 0; + this.groupBoxNotification.TabStop = false; + this.groupBoxNotification.Text = "Notification settings"; // // checkBoxCloseOnConnectionClosed // this.checkBoxCloseOnConnectionClosed.AutoSize = true; this.checkBoxCloseOnConnectionClosed.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxCloseOnConnectionClosed.Location = new System.Drawing.Point(6, 43); + this.checkBoxCloseOnConnectionClosed.Location = new System.Drawing.Point(7, 66); this.checkBoxCloseOnConnectionClosed.Name = "checkBoxCloseOnConnectionClosed"; this.checkBoxCloseOnConnectionClosed.Size = new System.Drawing.Size(198, 17); this.checkBoxCloseOnConnectionClosed.TabIndex = 9; @@ -279,7 +283,7 @@ // lblMaxNotifies // this.lblMaxNotifies.AutoSize = true; - this.lblMaxNotifies.Location = new System.Drawing.Point(21, 68); + this.lblMaxNotifies.Location = new System.Drawing.Point(22, 91); this.lblMaxNotifies.Name = "lblMaxNotifies"; this.lblMaxNotifies.Size = new System.Drawing.Size(90, 13); this.lblMaxNotifies.TabIndex = 8; @@ -287,7 +291,7 @@ // // numericUpDownMaxNotifies // - this.numericUpDownMaxNotifies.Location = new System.Drawing.Point(206, 66); + this.numericUpDownMaxNotifies.Location = new System.Drawing.Point(207, 89); this.numericUpDownMaxNotifies.Maximum = new decimal(new int[] { 20, 0, @@ -308,21 +312,21 @@ 0, 0}); // - // checkBoxShowPhoneNumberOnNotify + // checkBoxShowPhoneNumberOnNotification // - this.checkBoxShowPhoneNumberOnNotify.AutoSize = true; - this.checkBoxShowPhoneNumberOnNotify.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxShowPhoneNumberOnNotify.Location = new System.Drawing.Point(6, 88); - this.checkBoxShowPhoneNumberOnNotify.Name = "checkBoxShowPhoneNumberOnNotify"; - this.checkBoxShowPhoneNumberOnNotify.Size = new System.Drawing.Size(122, 17); - this.checkBoxShowPhoneNumberOnNotify.TabIndex = 6; - this.checkBoxShowPhoneNumberOnNotify.Text = "Show phone number"; - this.checkBoxShowPhoneNumberOnNotify.UseVisualStyleBackColor = true; + this.checkBoxShowPhoneNumberOnNotification.AutoSize = true; + this.checkBoxShowPhoneNumberOnNotification.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowPhoneNumberOnNotification.Location = new System.Drawing.Point(7, 111); + this.checkBoxShowPhoneNumberOnNotification.Name = "checkBoxShowPhoneNumberOnNotification"; + this.checkBoxShowPhoneNumberOnNotification.Size = new System.Drawing.Size(122, 17); + this.checkBoxShowPhoneNumberOnNotification.TabIndex = 6; + this.checkBoxShowPhoneNumberOnNotification.Text = "Show phone number"; + this.checkBoxShowPhoneNumberOnNotification.UseVisualStyleBackColor = true; // // buttonMSNsRemove // this.buttonMSNsRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsRemove.Location = new System.Drawing.Point(386, 66); + this.buttonMSNsRemove.Location = new System.Drawing.Point(387, 86); this.buttonMSNsRemove.Name = "buttonMSNsRemove"; this.buttonMSNsRemove.Size = new System.Drawing.Size(63, 21); this.buttonMSNsRemove.TabIndex = 5; @@ -334,18 +338,18 @@ // this.checkBoxFilterMSNs.AutoSize = true; this.checkBoxFilterMSNs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxFilterMSNs.Location = new System.Drawing.Point(302, 20); + this.checkBoxFilterMSNs.Location = new System.Drawing.Point(303, 43); this.checkBoxFilterMSNs.Name = "checkBoxFilterMSNs"; - this.checkBoxFilterMSNs.Size = new System.Drawing.Size(195, 17); + this.checkBoxFilterMSNs.Size = new System.Drawing.Size(221, 17); this.checkBoxFilterMSNs.TabIndex = 2; - this.checkBoxFilterMSNs.Text = "Show notify only for following MSNs:"; + this.checkBoxFilterMSNs.Text = "Show notification only for following MSNs:"; this.checkBoxFilterMSNs.UseVisualStyleBackColor = true; this.checkBoxFilterMSNs.Click += new System.EventHandler(this.checkBoxFilterMSNs_CheckedChanged); // // buttonMSNsAdd // this.buttonMSNsAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsAdd.Location = new System.Drawing.Point(302, 66); + this.buttonMSNsAdd.Location = new System.Drawing.Point(303, 89); this.buttonMSNsAdd.Name = "buttonMSNsAdd"; this.buttonMSNsAdd.Size = new System.Drawing.Size(63, 21); this.buttonMSNsAdd.TabIndex = 4; @@ -359,7 +363,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.comboBoxMSNs.BorderColor = System.Drawing.Color.Empty; this.comboBoxMSNs.FormattingEnabled = true; - this.comboBoxMSNs.Location = new System.Drawing.Point(302, 39); + this.comboBoxMSNs.Location = new System.Drawing.Point(303, 62); this.comboBoxMSNs.Name = "comboBoxMSNs"; this.comboBoxMSNs.Size = new System.Drawing.Size(226, 21); this.comboBoxMSNs.Sorted = true; @@ -368,7 +372,7 @@ // numericUpDownTimeout // this.numericUpDownTimeout.Enabled = false; - this.numericUpDownTimeout.Location = new System.Drawing.Point(206, 20); + this.numericUpDownTimeout.Location = new System.Drawing.Point(207, 43); this.numericUpDownTimeout.Minimum = new decimal(new int[] { 1, 0, @@ -388,7 +392,7 @@ // this.checkBoxCloseOnTimout.AutoSize = true; this.checkBoxCloseOnTimout.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxCloseOnTimout.Location = new System.Drawing.Point(6, 20); + this.checkBoxCloseOnTimout.Location = new System.Drawing.Point(7, 43); this.checkBoxCloseOnTimout.Name = "checkBoxCloseOnTimout"; this.checkBoxCloseOnTimout.Size = new System.Drawing.Size(172, 17); this.checkBoxCloseOnTimout.TabIndex = 0; @@ -407,7 +411,7 @@ this.groupBoxMedia.Controls.Add(this.checkBoxResumeMediaOnIncomingCall); this.groupBoxMedia.Controls.Add(this.checkBoxPauseMediaOnIncomingCall); this.groupBoxMedia.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.groupBoxMedia.Location = new System.Drawing.Point(6, 126); + this.groupBoxMedia.Location = new System.Drawing.Point(6, 147); this.groupBoxMedia.Name = "groupBoxMedia"; this.groupBoxMedia.Size = new System.Drawing.Size(561, 97); this.groupBoxMedia.TabIndex = 1; @@ -690,6 +694,28 @@ 0, 0}); // + // checkBoxShowNotificationOnOutgoingCall + // + this.checkBoxShowNotificationOnOutgoingCall.AutoSize = true; + this.checkBoxShowNotificationOnOutgoingCall.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowNotificationOnOutgoingCall.Location = new System.Drawing.Point(207, 20); + this.checkBoxShowNotificationOnOutgoingCall.Name = "checkBoxShowNotificationOnOutgoingCall"; + this.checkBoxShowNotificationOnOutgoingCall.Size = new System.Drawing.Size(183, 17); + this.checkBoxShowNotificationOnOutgoingCall.TabIndex = 13; + this.checkBoxShowNotificationOnOutgoingCall.Text = "Show notification on outgoing call"; + this.checkBoxShowNotificationOnOutgoingCall.UseVisualStyleBackColor = true; + // + // checkBoxShowNotificationOnIncomingCall + // + this.checkBoxShowNotificationOnIncomingCall.AutoSize = true; + this.checkBoxShowNotificationOnIncomingCall.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowNotificationOnIncomingCall.Location = new System.Drawing.Point(7, 20); + this.checkBoxShowNotificationOnIncomingCall.Name = "checkBoxShowNotificationOnIncomingCall"; + this.checkBoxShowNotificationOnIncomingCall.Size = new System.Drawing.Size(184, 17); + this.checkBoxShowNotificationOnIncomingCall.TabIndex = 12; + this.checkBoxShowNotificationOnIncomingCall.Text = "Show notification on incoming call"; + this.checkBoxShowNotificationOnIncomingCall.UseVisualStyleBackColor = true; + // // FritzBoxConfig // this.AcceptButton = this.okButton; @@ -715,8 +741,8 @@ this.tabPageCallNotification.ResumeLayout(false); this.groupBoxPhonebook.ResumeLayout(false); this.groupBoxPhonebook.PerformLayout(); - this.groupBoxNotify.ResumeLayout(false); - this.groupBoxNotify.PerformLayout(); + this.groupBoxNotification.ResumeLayout(false); + this.groupBoxNotification.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxNotifies)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).EndInit(); this.groupBoxMedia.ResumeLayout(false); @@ -745,11 +771,11 @@ private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxPhonebook; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowUnknownCaller; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxUsePhonebook; - private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxNotify; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxNotification; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxCloseOnConnectionClosed; private MediaPortal.UserInterface.Controls.MPLabel lblMaxNotifies; private MediaPortal.UserInterface.Controls.MPNumericUpDown numericUpDownMaxNotifies; - private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowPhoneNumberOnNotify; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowPhoneNumberOnNotification; private MediaPortal.UserInterface.Controls.MPButton buttonMSNsRemove; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxFilterMSNs; private MediaPortal.UserInterface.Controls.MPButton buttonMSNsAdd; @@ -784,5 +810,7 @@ private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxExtensiveLogging; private MediaPortal.UserInterface.Controls.MPNumericUpDown dialPortNumericUpDown; private MediaPortal.UserInterface.Controls.MPNumericUpDown updateInterval; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnOutgoingCall; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnIncomingCall; } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -62,10 +62,13 @@ vBPath.Text = Settings.VBPath; // call notification settings + checkBoxShowNotificationOnIncomingCall.Checked = Settings.ShowNotficationOnIncomingCall; + checkBoxShowNotificationOnOutgoingCall.Checked = Settings.ShowNotficationOnOutgoingCall; + numericUpDownMaxNotifies.Value = Settings.MaxNotifies; - checkBoxCloseOnTimout.Checked = Settings.CloseOnTimeout; - numericUpDownTimeout.Value = Settings.NotifyTimeout; - checkBoxCloseOnConnectionClosed.Checked = Settings.CloseOnConnectionClosed; + checkBoxCloseOnTimout.Checked = Settings.CloseNotificationOnTimeout; + numericUpDownTimeout.Value = Settings.NotificationTimeout; + checkBoxCloseOnConnectionClosed.Checked = Settings.CloseNotificationOnConnectionClosed; numericUpDownTimeout.Enabled = checkBoxCloseOnTimout.Checked; @@ -78,7 +81,7 @@ comboBoxMSNs.Items.AddRange(Settings.MSNList.ToArray()); if (comboBoxMSNs.Items.Count > 0) comboBoxMSNs.Text = Settings.MSNList[0]; // select the first entry - checkBoxShowPhoneNumberOnNotify.Checked = Settings.ShowPhoneNumberOnNotify; + checkBoxShowPhoneNumberOnNotification.Checked = Settings.ShowPhoneNumberOnNotification; checkBoxPauseMediaOnIncomingCall.Checked = Settings.PauseMediaOnIncomingCall; checkBoxResumeMediaOnIncomingCall.Checked = Settings.ResumeMediaOnIncomingCall; @@ -109,10 +112,13 @@ Settings.VBPath = vBPath.Text; // call notification settings + Settings.ShowNotficationOnIncomingCall = checkBoxShowNotificationOnIncomingCall.Checked; + Settings.ShowNotficationOnOutgoingCall = checkBoxShowNotificationOnOutgoingCall.Checked; + Settings.MaxNotifies = (int)numericUpDownMaxNotifies.Value; - Settings.CloseOnTimeout = checkBoxCloseOnTimout.Checked; - Settings.NotifyTimeout = (int)numericUpDownTimeout.Value; - Settings.CloseOnConnectionClosed = checkBoxCloseOnConnectionClosed.Checked; + Settings.CloseNotificationOnTimeout = checkBoxCloseOnTimout.Checked; + Settings.NotificationTimeout = (int)numericUpDownTimeout.Value; + Settings.CloseNotificationOnConnectionClosed = checkBoxCloseOnConnectionClosed.Checked; Settings.FilterMSN = checkBoxFilterMSNs.Checked; @@ -123,7 +129,7 @@ Settings.MSNList.Add(item); } - Settings.ShowPhoneNumberOnNotify = checkBoxShowPhoneNumberOnNotify.Checked; + Settings.ShowPhoneNumberOnNotification = checkBoxShowPhoneNumberOnNotification.Checked; Settings.PauseMediaOnIncomingCall = checkBoxPauseMediaOnIncomingCall.Checked; Settings.ResumeMediaOnIncomingCall = checkBoxResumeMediaOnIncomingCall.Checked; @@ -196,7 +202,7 @@ private void buttonMSNsAdd_Click(object sender, EventArgs e) { - if (isMSNValid(comboBoxMSNs.Text)) comboBoxMSNs.Items.Add(comboBoxMSNs.Text); + if (isMSNValid(comboBoxMSNs.Text) && !comboBoxMSNs.Items.Contains(comboBoxMSNs.Text)) comboBoxMSNs.Items.Add(comboBoxMSNs.Text); } private void buttonMSNsRemove_Click(object sender, EventArgs e) Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -337,19 +337,16 @@ { case "RING": callAction.Type = CallAction.CallType.Incoming; - callAction.Caller.PhoneNumber = strList[3]; callAction.MSN = strList[4]; break; case "CALL": callAction.Type = CallAction.CallType.Outgoing; - callAction.Caller.PhoneNumber = strList[5]; callAction.MSN = strList[4]; break; case "CONNECT": callAction.Type = CallAction.CallType.ConnectionStarted; - callAction.Caller.PhoneNumber = strList[4]; break; case "DISCONNECT": Modified: trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -57,8 +57,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.4.0.0")] -[assembly: AssemblyFileVersion("0.4.0.0")] +[assembly: AssemblyVersion("0.4.1.0")] +[assembly: AssemblyFileVersion("0.4.1.0")] // specifiy comp tags for [assembly: CompatibleVersion("1.1.7.0","1.1.0.0")] Modified: trunk/plugins/FritzBox/FritzBox/Settings.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -51,12 +51,22 @@ public static bool ExtensiveLogging { get; set; } /// <summary> + /// show notification on incoming call + /// </summary> + public static bool ShowNotficationOnIncomingCall { get; set; } + + /// <summary> + /// show notification on incoming call + /// </summary> + public static bool ShowNotficationOnOutgoingCall { get; set; } + + /// <summary> /// stop media on incoming call when an event happend /// </summary> public static bool PauseMediaOnIncomingCall { get; set; } /// <summary> - /// resume media on incoming call when notify is closed + /// resume media on incoming call when notification is closed /// </summary> public static bool ResumeMediaOnIncomingCall { get; set; } @@ -66,7 +76,7 @@ public static bool PauseMediaOnOutgoingCall { get; set; } /// <summary> - /// resume media on outgoing call when notify is closed + /// resume media on outgoing call when notification is closed /// </summary> /// public static bool ResumeMediaOnOutgoingCall { get; set; } @@ -76,13 +86,13 @@ /// <summary> /// autoclose the dialog after the timeout expired /// </summary> - public static int NotifyTimeout { get; set; } + public static int NotificationTimeout { get; set; } - public static bool CloseOnTimeout { get; set; } + public static bool CloseNotificationOnTimeout { get; set; } - public static bool CloseOnConnectionClosed { get; set; } + public static bool CloseNotificationOnConnectionClosed { get; set; } - public static bool ShowPhoneNumberOnNotify { get; set; } + public static bool ShowPhoneNumberOnNotification { get; set; } public static bool ShowUnknownCaller { get; set; } @@ -135,7 +145,7 @@ PauseMediaOnOutgoingCall = true; ResumeMediaOnOutgoingCall = true; MaxNotifies = 20; - NotifyTimeout = 10; + NotificationTimeout = 10; } #endregion @@ -161,20 +171,28 @@ PhoneBookFilePath = Config.GetFolder(Config.Dir.Config) + "\\FRITZ!Box Manager Phone Book.xml"; // call notification settings + ShowNotficationOnIncomingCall = xmlreader.GetValueAsBool("fritzbox", "showNotificationOnIncomingCall", true); + ShowNotficationOnOutgoingCall = xmlreader.GetValueAsBool("fritzbox", "showNotificationOnOutgoingCall", true); + MaxNotifies = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); - CloseOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); - NotifyTimeout = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); - CloseOnConnectionClosed = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); + CloseNotificationOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); + NotificationTimeout = xmlreader.GetValueAsInt("fritzbox", "notificationTimeout", 10); + CloseNotificationOnConnectionClosed = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); FilterMSN = xmlreader.GetValueAsBool("fritzbox", "filterMSNs", false); string strMSN = xmlreader.GetValueAsString("fritzbox", "MSN", ""); char[] charSeparators = new[] { ';' }; MSNList.Clear(); // necessary to avoid multiple entries when FRITZ!Box Manager configuration window is closed and re-opened without closing the MediaPortal Configuration window - MSNList.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); + //MSNList.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); - ShowPhoneNumberOnNotify = xmlreader.GetValueAsBool("fritzbox", "showPhoneNumberOnNotify", true); + foreach (string mSN in strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)) + { + if (!MSNList.Contains(mSN)) MSNList.Add(mSN); + } + ShowPhoneNumberOnNotification = xmlreader.GetValueAsBool("fritzbox", "showPhoneNumberOnNotification", true); + ShowUnknownCaller = xmlreader.GetValueAsBool("fritzbox", "showUnknownCaller", true); PhoneBookEnabled = xmlreader.GetValueAsBool("fritzbox", "usePhonebook", true); @@ -231,6 +249,12 @@ xmlreader.RemoveEntry("fritzbox", "saveUnknownCaller"); xmlreader.RemoveEntry("fritzbox", "showMSNOnNotify"); + + xmlreader.RemoveEntry("fritzbox", "timeout"); + + xmlreader.RemoveEntry("fritzbox", "showPhoneNumberOnNotify"); + + xmlreader.RemoveEntry("fritzbox", "showPhoneNumberOnNotify"); } } @@ -249,10 +273,13 @@ xmlwriter.SetValue("fritzbox", "port", FritzBoxClient.Port); // call notification settings + xmlwriter.SetValueAsBool("fritzbox", "showNotificationOnIncomingCall", ShowNotficationOnIncomingCall); + xmlwriter.SetValueAsBool("fritzbox", "showNotificationOnOutgoingCall", ShowNotficationOnOutgoingCall); + xmlwriter.SetValue("fritzbox", "maxNotifies", MaxNotifies); - xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", CloseOnTimeout); - xmlwriter.SetValue("fritzbox", "timeout", NotifyTimeout); - xmlwriter.SetValueAsBool("fritzbox", "closeOnConnectionClosed", CloseOnConnectionClosed); + xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", CloseNotificationOnTimeout); + xmlwriter.SetValue("fritzbox", "notificationTimeout", NotificationTimeout); + xmlwriter.SetValueAsBool("fritzbox", "closeOnConnectionClosed", CloseNotificationOnConnectionClosed); xmlwriter.SetValueAsBool("fritzbox", "filterMSNs", FilterMSN); @@ -265,7 +292,7 @@ xmlwriter.SetValue("fritzbox", "MSN", strMSN); - xmlwriter.SetValueAsBool("fritzbox", "showPhoneNumberOnNotify", ShowPhoneNumberOnNotify); + xmlwriter.SetValueAsBool("fritzbox", "showPhoneNumberOnNotification", ShowPhoneNumberOnNotification); xmlwriter.SetValueAsBool("fritzbox", "usePhonebook", PhoneBookEnabled); Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/GenerateResource-ResGen.read.1.tlog =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 =================================================================== --- trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-21 10:50:48 UTC (rev 4416) @@ -559,7 +559,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4414</DesignedForVersion> + <DesignedForVersion>1.1.7.4415</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -581,8 +581,8 @@ <Vers... [truncated message content] |
From: <hor...@us...> - 2012-01-18 11:29:29
|
Revision: 4415 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4415&view=rev Author: horned-reaper Date: 2012-01-18 11:29:15 +0000 (Wed, 18 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/FritzBox/Build/Build.log trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb 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/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/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/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/Release/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.pdb trunk/plugins/FritzBox/releases/update.xml Added Paths: ----------- trunk/plugins/FritzBox/releases/FritzBox_v0.4.0.4414.mpe1 Modified: trunk/plugins/FritzBox/Build/Build.log =================================================================== --- trunk/plugins/FritzBox/Build/Build.log 2012-01-18 09:00:52 UTC (rev 4414) +++ trunk/plugins/FritzBox/Build/Build.log 2012-01-18 11:29:15 UTC (rev 4415) @@ -1,6 +1,6 @@ Running : C:\Program Files\TortoiseSVN\bin\SubWCRev.exe -SVN Version: 4413 +SVN Version: 4414 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 18.01.2012 09:46:45. +Build started 18.01.2012 12:14:44. Project "D:\FritzBox\FritzBox.sln" on node 1 (Rebuild target(s)). ValidateSolutionConfiguration: Building solution configuration "Release|Mixed Platforms". @@ -195,7 +195,7 @@ 0 Warning(s) 0 Error(s) -Time Elapsed 00:00:02.46 +Time Elapsed 00:00:02.47 Reverting to build 0 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs @@ -280,7 +280,7 @@ ..\FritzBox\Languages\Unsupported\strings_zh-CN.xml 36 File(s) copied MpeMaker version: 1.2.1.0 -Build started at 09:46:50 +Build started at 12:14:48 Building "D:\FritzBox\MpeRelease\FritzBox.xmp2" Output: "..\MpeRelease\FritzBox.mpe1" Writing UpdateXML to "update.xml" Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-18 09:00:52 UTC (rev 4414) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-18 11:29:15 UTC (rev 4415) @@ -76,7 +76,7 @@ comboBoxMSNs.Items.Clear(); comboBoxMSNs.Items.AddRange(Settings.MSNList.ToArray()); - comboBoxMSNs.Text = Settings.MSNList[0]; + if (comboBoxMSNs.Items.Count > 0) comboBoxMSNs.Text = Settings.MSNList[0]; // select the first entry checkBoxShowPhoneNumberOnNotify.Checked = Settings.ShowPhoneNumberOnNotify; Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 =================================================================== --- trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-18 09:00:52 UTC (rev 4414) +++ trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-18 11:29:15 UTC (rev 4415) @@ -559,7 +559,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4413</DesignedForVersion> + <DesignedForVersion>1.1.7.4414</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -582,7 +582,7 @@ <Major>0</Major> <Minor>4</Minor> <Build>0</Build> - <Revision>4413</Revision> + <Revision>4414</Revision> </Version> <ExtensionDescription>With FRITZ!Box Manager you can access several AVM FRITZ!Box informations from MediaPortal. @@ -596,7 +596,7 @@ <VersionDescription /> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>http://www.team-mediaportal.com/index.php?option=com_mtree&task=att_download&link_id=118&cf_id=24</OnlineLocation> - <ReleaseDate>2012-01-18T09:46:50.1990036+01:00</ReleaseDate> + <ReleaseDate>2012-01-18T12:14:48.8716896+01:00</ReleaseDate> <Tags>fritzbox, fritzbox manager, callmonitor</Tags> <Location>..\MpeRelease\FritzBox.mpe1</Location> <Params> Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/ResolveAssemblyReference.cache =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.exe =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.pdb =================================================================== (Binary files differ) Added: trunk/plugins/FritzBox/releases/FritzBox_v0.4.0.4414.mpe1 =================================================================== (Binary files differ) Property changes on: trunk/plugins/FritzBox/releases/FritzBox_v0.4.0.4414.mpe1 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/FritzBox/releases/update.xml =================================================================== --- trunk/plugins/FritzBox/releases/update.xml 2012-01-18 09:00:52 UTC (rev 4414) +++ trunk/plugins/FritzBox/releases/update.xml 2012-01-18 11:29:15 UTC (rev 4415) @@ -88,7 +88,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4413</DesignedForVersion> + <DesignedForVersion>1.1.7.4414</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -111,7 +111,7 @@ <Major>0</Major> <Minor>4</Minor> <Build>0</Build> - <Revision>4413</Revision> + <Revision>4414</Revision> </Version> <ExtensionDescription>With FRITZ!Box Manager you can access several AVM FRITZ!Box informations from MediaPortal. @@ -125,7 +125,7 @@ <VersionDescription /> <DevelopmentStatus>Stable</DevelopmentStatus> <OnlineLocation>http://www.team-mediaportal.com/index.php?option=com_mtree&task=att_download&link_id=118&cf_id=24</OnlineLocation> - <ReleaseDate>2012-01-18T09:46:50.1990036+01:00</ReleaseDate> + <ReleaseDate>2012-01-18T12:14:48.8716896+01:00</ReleaseDate> <Tags>fritzbox, fritzbox manager, callmonitor</Tags> <Location>..\MpeRelease\FritzBox.mpe1</Location> <Params> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |