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. |