From 78a40c45a7496b17b559707df9ec6c15ccf0d347 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Mon, 29 Oct 2012 16:51:43 +0100 Subject: [PATCH] Add settings (in/incoming) call timeout --- Classes/LinphoneCoreSettingsStore.m | 9 +- Classes/SettingsViewController.m | 2 + Settings/InAppSettings.bundle/Call.plist | 36 ++++++ .../en.lproj/Call.strings | 5 + .../fr.lproj/Call.strings | Bin 518 -> 412 bytes .../fr.lproj/Root.strings | 4 +- linphone.ldb/Contents.plist | 114 ++++++++++++++++-- .../InAppSettings.bundle/Call/1/Call.strings | 5 + .../InAppSettings.bundle/Root/1/Root.strings | 2 +- 9 files changed, 164 insertions(+), 13 deletions(-) diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index 1eb1715f1..cc38ae9ac 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -212,8 +212,11 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); [self setBool:linphone_core_video_preview_enabled(lc) forKey:@"preview_preference"]; } { - [self setBool: lp_config_get_int(linphone_core_get_config(lc), LINPHONERC_APPLICATION_KEY, "sipinfo_dtmf_preference", 0) forKey:@"sipinfo_dtmf_preference"]; - [self setBool: lp_config_get_int(linphone_core_get_config(lc), LINPHONERC_APPLICATION_KEY, "rfc_dtmf_preference", 1) forKey:@"rfc_dtmf_preference"]; + [self setBool:linphone_core_get_use_info_for_dtmf(lc) forKey:@"sipinfo_dtmf_preference"]; + [self setBool:linphone_core_get_use_rfc2833_for_dtmf(lc) forKey:@"rfc_dtmf_preference"]; + + [self setInteger:linphone_core_get_inc_timeout(lc) forKey:@"incoming_call_timeout_preference"]; + //[self setInteger:linphone_core_get_inc_timeout(lc) forKey:@"in_call_timeout_preference"]; } @@ -425,6 +428,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); linphone_core_set_use_info_for_dtmf(lc, [self boolForKey:@"sipinfo_dtmf_preference"]); linphone_core_set_use_rfc2833_for_dtmf(lc, [self boolForKey:@"rfc_dtmf_preference"]); + linphone_core_set_inc_timeout(lc, [self integerForKey:@"incoming_call_timeout_preference"]); + //linphone_core_set_inc_timeout(lc, [self integerForKey:@"in_call_timeout_preference"]); bool enableVideo = [self boolForKey:@"enable_video_preference"]; linphone_core_enable_video(lc, enableVideo, enableVideo); diff --git a/Classes/SettingsViewController.m b/Classes/SettingsViewController.m index 85b897daa..0f9f21444 100644 --- a/Classes/SettingsViewController.m +++ b/Classes/SettingsViewController.m @@ -574,6 +574,8 @@ static UICompositeViewDescription *compositeDescription = nil; [hiddenKeys addObject:@"battery_alert_button"]; #endif + [hiddenKeys addObject:@"incoming_call_timeout_preference"]; + [hiddenKeys addObject:@"in_call_timeout_preference"]; [hiddenKeys addObject:@"quit_button"]; // Hide for the moment [hiddenKeys addObject:@"about_button"]; // Hide for the moment diff --git a/Settings/InAppSettings.bundle/Call.plist b/Settings/InAppSettings.bundle/Call.plist index 6996221ff..545bb198d 100644 --- a/Settings/InAppSettings.bundle/Call.plist +++ b/Settings/InAppSettings.bundle/Call.plist @@ -52,6 +52,42 @@ DefaultValue + + Key + incoming_call_timeout_preference + Title + Incoming call timeout + Type + PSTextFieldSpecifier + AutocapitalizationType + None + AutocorrectionType + No + KeyboardType + NumberPad + DefaultValue + 30 + IASKTextAlignment + IASKUITextAlignmentRight + + + Key + in_call_timeout_preference + Title + In call timeout + Type + PSTextFieldSpecifier + AutocapitalizationType + None + AutocorrectionType + No + KeyboardType + NumberPad + DefaultValue + 0 + IASKTextAlignment + IASKUITextAlignmentRight + diff --git a/Settings/InAppSettings.bundle/en.lproj/Call.strings b/Settings/InAppSettings.bundle/en.lproj/Call.strings index 68876b8cc..58a723b05 100644 --- a/Settings/InAppSettings.bundle/en.lproj/Call.strings +++ b/Settings/InAppSettings.bundle/en.lproj/Call.strings @@ -10,3 +10,8 @@ /* Send SIP INFO DTMFs */ "Send SIP INFO DTMFs" = "Send SIP INFO DTMFs"; +/* Incoming call timeout */ +"Incoming call timeout" = "Incoming call timeout"; + +/* In call timeout */ +"In call timeout" = "In call timeout"; \ No newline at end of file diff --git a/Settings/InAppSettings.bundle/fr.lproj/Call.strings b/Settings/InAppSettings.bundle/fr.lproj/Call.strings index 3ad20d6d2821b94f7684459e1ec9e8085d5d9cfa..7fec4c3339cd1cd9657d73ea22001150b8bc9f2a 100644 GIT binary patch literal 412 zcmZ|LO%8%E5Cz~pr+8tBiLfW`)P#jf)C&|CO_MSulo~ja=kQ`S1rmQ(oxHw&X(o=4 zw{(#`qBsc0F~kaPeB513VHyN+gp(~yCp$}6pcs%OzWRL~+J$!>NsGrP}6 zpgzlJrCe5f9aJe$*vdodBes9N*C&7`?Io@tmqqc_Q zs7$H0+7ah9V@B>`$NA~O>ZF9)fjb80v#~asYl=JXp$pY`n80w=nI61;!d<}MFdFon pj(bh18s?MIfA!T{q#5%yoC`cHTWoEAzmWfVbR8R}-&Xe1djb9AO;Z2> diff --git a/Settings/InAppSettings.bundle/fr.lproj/Root.strings b/Settings/InAppSettings.bundle/fr.lproj/Root.strings index 61d47db49..e075895e0 100644 --- a/Settings/InAppSettings.bundle/fr.lproj/Root.strings +++ b/Settings/InAppSettings.bundle/fr.lproj/Root.strings @@ -2,7 +2,7 @@ "SIP account" = "Compte SIP"; /* Wizard */ -"Wizard" = "Lancer l'assistant"; +"Wizard" = "Assistant"; /* User name */ "User name" = "Nom d'utilisateur"; @@ -23,7 +23,7 @@ "Settings" = "Options"; /* Enable video */ -"Enable video" = "Activer la vidéo"; +"Enable video" = "Activer vidéo"; /* Audio */ "Audio" = "Audio"; diff --git a/linphone.ldb/Contents.plist b/linphone.ldb/Contents.plist index 5c3c4c0a9..c3d6021f3 100644 --- a/linphone.ldb/Contents.plist +++ b/linphone.ldb/Contents.plist @@ -15470,7 +15470,7 @@ Raison: %2$s change date - 2012-09-18T09:26:35Z + 2012-10-22T08:50:22Z changed values class @@ -15480,7 +15480,7 @@ Raison: %2$s flags 0 hash - dc9f190a8a2dcdf8026518ff11e1d480 + 1637ea0ccdf086dbddb51c854d6310db name Root.strings @@ -15523,13 +15523,13 @@ Raison: %2$s errors flags - 0 + 1 key Wizard localizations en - Wizard + Run assistant fr Assistant @@ -16840,7 +16840,7 @@ Raison: %2$s change date - 2012-09-11T10:05:39Z + 2012-10-29T15:42:49Z changed values class @@ -16848,9 +16848,9 @@ Raison: %2$s errors flags - 1 + 0 hash - 3cc5ec7e298d1a3aa4449641876f5960 + 6ae28fd473b2900cce974380a72d5447 name Call.strings @@ -16956,9 +16956,107 @@ Raison: %2$s snapshots + + change date + 2001-01-01T00:00:00Z + changed values + + class + BLStringKeyObject + comment + Incoming call timeout + errors + + flags + 0 + key + Incoming call timeout + localizations + + en + Incoming call timeout + fr + Durée max. sonnerie + + snapshots + + + + change date + 2001-01-01T00:00:00Z + changed values + + class + BLStringKeyObject + comment + In call timeout + errors + + flags + 0 + key + In call timeout + localizations + + en + In call timeout + fr + Durée max. appel + + snapshots + + old objects - + + + change date + 2001-01-01T00:00:00Z + changed values + + <reference> + + class + BLStringKeyObject + comment + Incoming call timeout + errors + + flags + 0 + key + In + localizations + + en + call + + snapshots + + + + change date + 2001-01-01T00:00:00Z + changed values + + <reference> + + class + BLStringKeyObject + comment + Incoming call timeout + errors + + flags + 3 + key + timeout + localizations + + snapshots + + + plist file snapshots diff --git a/linphone.ldb/Resources/InAppSettings.bundle/Call/1/Call.strings b/linphone.ldb/Resources/InAppSettings.bundle/Call/1/Call.strings index 68876b8cc..58a723b05 100644 --- a/linphone.ldb/Resources/InAppSettings.bundle/Call/1/Call.strings +++ b/linphone.ldb/Resources/InAppSettings.bundle/Call/1/Call.strings @@ -10,3 +10,8 @@ /* Send SIP INFO DTMFs */ "Send SIP INFO DTMFs" = "Send SIP INFO DTMFs"; +/* Incoming call timeout */ +"Incoming call timeout" = "Incoming call timeout"; + +/* In call timeout */ +"In call timeout" = "In call timeout"; \ No newline at end of file diff --git a/linphone.ldb/Resources/InAppSettings.bundle/Root/1/Root.strings b/linphone.ldb/Resources/InAppSettings.bundle/Root/1/Root.strings index 3c249d05c..536d4563e 100644 --- a/linphone.ldb/Resources/InAppSettings.bundle/Root/1/Root.strings +++ b/linphone.ldb/Resources/InAppSettings.bundle/Root/1/Root.strings @@ -2,7 +2,7 @@ "SIP account" = "SIP account"; /* Wizard */ -"Wizard" = "Wizard"; +"Wizard" = "Run assistant"; /* User name */ "User name" = "User name";