mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Use the remote provisioning path for the wizard, even for 'local' provisioning.
This makes the values modified in the wizard_* files applied.
This commit is contained in:
parent
54e0df8570
commit
c7cab403e3
6 changed files with 127 additions and 95 deletions
|
|
@ -31,6 +31,7 @@
|
|||
@private
|
||||
UITextField *activeTextField;
|
||||
UIView *currentView;
|
||||
UIView *nextView;
|
||||
NSMutableArray *historyViews;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -572,11 +572,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
- (void)loadWizardConfig:(NSString*)rcFilename {
|
||||
NSString* fullPath = [LinphoneManager bundleFile:rcFilename];
|
||||
LpConfig* current_conf = linphone_core_get_config([LinphoneManager getLc]);
|
||||
if( lp_config_read_file(current_conf, [fullPath cStringUsingEncoding:[NSString defaultCStringEncoding]]) != 0 ){
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"Couldn't push wizard file %@ to the Linphone config"];
|
||||
}
|
||||
NSString* fullPath = [@"file://" stringByAppendingString:[LinphoneManager bundleFile:rcFilename]];
|
||||
linphone_core_set_provisioning_uri([LinphoneManager getLc], [fullPath cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
[[LinphoneManager instance] lpConfigSetInt:1 forKey:@"transient_provisioning" forSection:@"misc"];
|
||||
[[LinphoneManager instance] resetLinphoneCore];
|
||||
}
|
||||
|
||||
#pragma mark - UITextFieldDelegate Functions
|
||||
|
|
@ -652,19 +651,18 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
- (IBAction)onCreateAccountClick:(id)sender {
|
||||
nextView = createAccountView;
|
||||
[self loadWizardConfig:@"wizard_linphone_create.rc"];
|
||||
[self changeView:createAccountView back:FALSE animation:TRUE];
|
||||
|
||||
}
|
||||
|
||||
- (IBAction)onConnectAccountClick:(id)sender {
|
||||
nextView = connectAccountView;
|
||||
[self loadWizardConfig:@"wizard_linphone_existing.rc"];
|
||||
[self changeView:connectAccountView back:FALSE animation:TRUE];
|
||||
}
|
||||
|
||||
- (IBAction)onExternalAccountClick:(id)sender {
|
||||
nextView = externalAccountView;
|
||||
[self loadWizardConfig:@"wizard_external_sip.rc"];
|
||||
[self changeView:externalAccountView back:FALSE animation:TRUE];
|
||||
}
|
||||
|
||||
- (IBAction)onCheckValidationClick:(id)sender {
|
||||
|
|
@ -846,7 +844,12 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
switch (status) {
|
||||
case LinphoneConfiguringSuccessful:
|
||||
if( nextView == nil ){
|
||||
[self fillDefaultValues];
|
||||
} else {
|
||||
[self changeView:nextView back:false animation:TRUE];
|
||||
nextView = nil;
|
||||
}
|
||||
break;
|
||||
case LinphoneConfiguringFailed:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,29 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config xmlns="http://www.linphone.org/xsds/lpconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.linphone.org/xsds/lpconfig.xsd lpconfig.xsd">
|
||||
|
||||
[proxy_default_values]
|
||||
<section name="proxy_default_values">
|
||||
<entry name="reg_proxy" overwrite="true"></entry>
|
||||
<entry name="reg_route" overwrite="true"></entry>
|
||||
<entry name="reg_identity" overwrite="true"></entry>
|
||||
<entry name="reg_expires" overwrite="true">3600</entry>
|
||||
<entry name="reg_sendregister" overwrite="true">1</entry>
|
||||
<entry name="publish" overwrite="true">0</entry>
|
||||
<entry name="dial_escape_plus" overwrite="true">0</entry>
|
||||
</section>
|
||||
|
||||
reg_proxy=
|
||||
reg_route=
|
||||
reg_identity=
|
||||
reg_expires=3600
|
||||
reg_sendregister=1
|
||||
publish=0
|
||||
dial_escape_plus=0
|
||||
<section name="wizard">
|
||||
<entry name="service_url" overwrite="true"></entry>
|
||||
</section>
|
||||
|
||||
[wizard]
|
||||
service_url=
|
||||
<section name="app">
|
||||
<entry name="pushnotification_preference" overwrite="true">0</entry>
|
||||
<entry name="sharing_server_preference" overwrite="true"></entry>
|
||||
<entry name="ice_preference" overwrite="true">1</entry>
|
||||
<entry name="stun_preference" overwrite="true">stun.linphone.org</entry>
|
||||
<entry name="random_port_preference" overwrite="true">1</entry>
|
||||
</section>
|
||||
|
||||
[app]
|
||||
pushnotification_preference=0
|
||||
sharing_server_preference=
|
||||
ice_preference=1
|
||||
stun_preference=stun.linphone.org
|
||||
random_port_preference=1
|
||||
<section name="net">
|
||||
<entry name="firewall_policy" overwrite="true">none</entry>
|
||||
<entry name="stun_server" overwrite="true"></entry>
|
||||
</section>
|
||||
|
||||
[net]
|
||||
firewall_policy=none
|
||||
stun_server=
|
||||
<section name="sip">
|
||||
<entry name="sip_port" overwrite="true">-1</entry>
|
||||
<entry name="sip_tcp_port" overwrite="true">-1</entry>
|
||||
<entry name="sip_tls_port" overwrite="true">-1</entry>
|
||||
</section>
|
||||
|
||||
[sip]
|
||||
sip_port=-1
|
||||
sip_tcp_port=-1
|
||||
sip_tls_port=-1
|
||||
</config>
|
||||
|
|
@ -1,29 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config xmlns="http://www.linphone.org/xsds/lpconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.linphone.org/xsds/lpconfig.xsd lpconfig.xsd">
|
||||
|
||||
[proxy_default_values]
|
||||
<section name="proxy_default_values">
|
||||
<entry name="reg_proxy" overwrite="true"><sip:sip.linphone.org:5223;transport=tls></entry>
|
||||
<entry name="reg_route" overwrite="true"><sip:sip.linphone.org:5223;transport=tls></entry>
|
||||
<entry name="reg_identity" overwrite="true">sip:?@sip.linphone.org</entry>
|
||||
<entry name="reg_expires" overwrite="true">604800</entry>
|
||||
<entry name="reg_sendregister" overwrite="true">1</entry>
|
||||
<entry name="publish" overwrite="true">0</entry>
|
||||
<entry name="dial_escape_plus" overwrite="true">0</entry>
|
||||
</section>
|
||||
|
||||
reg_proxy=<sip:sip.linphone.org:5223;transport=tls>
|
||||
reg_route=<sip:sip.linphone.org:5223;transport=tls>
|
||||
reg_identity=sip:?@sip.linphone.org
|
||||
reg_expires=604800
|
||||
reg_sendregister=1
|
||||
publish=0
|
||||
dial_escape_plus=0
|
||||
<section name="wizard">
|
||||
<entry name="service_url" overwrite="true">https://www.linphone.org/wizard.php</entry>
|
||||
</section>
|
||||
|
||||
[wizard]
|
||||
service_url=https://www.linphone.org/wizard.php
|
||||
<section name="app">
|
||||
<entry name="pushnotification_preference" overwrite="true">1</entry>
|
||||
<entry name="sharing_server_preference" overwrite="true">https://www.linphone.org:444/upload.php</entry>
|
||||
<entry name="ice_preference" overwrite="true">1</entry>
|
||||
<entry name="stun_preference" overwrite="true">stun.linphone.org</entry>
|
||||
<entry name="random_port_preference" overwrite="true">1</entry>
|
||||
</section>
|
||||
|
||||
[app]
|
||||
pushnotification_preference=1
|
||||
sharing_server_preference=https://www.linphone.org:444/upload.php
|
||||
ice_preference=1
|
||||
stun_preference=stun.linphone.org
|
||||
random_port_preference=1
|
||||
<section name="net">
|
||||
<entry name="firewall_policy" overwrite="true">ice</entry>
|
||||
<entry name="stun_server" overwrite="true">stun.linphone.org</entry>
|
||||
</section>
|
||||
|
||||
[net]
|
||||
firewall_policy=ice
|
||||
stun_server=stun.linphone.org
|
||||
<section name="sip">
|
||||
<entry name="sip_port" overwrite="true">-1</entry>
|
||||
<entry name="sip_tcp_port" overwrite="true">-1</entry>
|
||||
<entry name="sip_tls_port" overwrite="true">-1</entry>
|
||||
</section>
|
||||
|
||||
[sip]
|
||||
sip_port=-1
|
||||
sip_tcp_port=-1
|
||||
sip_tls_port=-1
|
||||
</config>
|
||||
|
|
|
|||
|
|
@ -1,29 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config xmlns="http://www.linphone.org/xsds/lpconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.linphone.org/xsds/lpconfig.xsd lpconfig.xsd">
|
||||
|
||||
[proxy_default_values]
|
||||
<section name="proxy_default_values">
|
||||
<entry name="reg_proxy" overwrite="true"><sip:sip.linphone.org:5223;transport=tls></entry>
|
||||
<entry name="reg_route" overwrite="true"><sip:sip.linphone.org:5223;transport=tls></entry>
|
||||
<entry name="reg_identity" overwrite="true">sip:?@sip.linphone.org</entry>
|
||||
<entry name="reg_expires" overwrite="true">604800</entry>
|
||||
<entry name="reg_sendregister" overwrite="true">1</entry>
|
||||
<entry name="publish" overwrite="true">0</entry>
|
||||
<entry name="dial_escape_plus" overwrite="true">0</entry>
|
||||
</section>
|
||||
|
||||
reg_proxy=<sip:sip.linphone.org:5223;transport=tls>
|
||||
reg_route=<sip:sip.linphone.org:5223;transport=tls>
|
||||
reg_identity=sip:?@sip.linphone.org
|
||||
reg_expires=604800
|
||||
reg_sendregister=1
|
||||
publish=0
|
||||
dial_escape_plus=0
|
||||
<section name="wizard">
|
||||
<entry name="service_url" overwrite="true"></entry>
|
||||
</section>
|
||||
|
||||
[wizard]
|
||||
service_url=
|
||||
<section name="app">
|
||||
<entry name="pushnotification_preference" overwrite="true">1</entry>
|
||||
<entry name="sharing_server_preference" overwrite="true">https://www.linphone.org:444/upload.php</entry>
|
||||
<entry name="ice_preference" overwrite="true">1</entry>
|
||||
<entry name="stun_preference" overwrite="true">stun.linphone.org</entry>
|
||||
<entry name="random_port_preference" overwrite="true">1</entry>
|
||||
</section>
|
||||
|
||||
[app]
|
||||
pushnotification_preference=1
|
||||
sharing_server_preference=https://www.linphone.org:444/upload.php
|
||||
ice_preference=1
|
||||
stun_preference=stun.linphone.org
|
||||
random_port_preference=1
|
||||
<section name="net">
|
||||
<entry name="firewall_policy" overwrite="true">ice</entry>
|
||||
<entry name="stun_server" overwrite="true">stun.linphone.org</entry>
|
||||
</section>
|
||||
|
||||
[net]
|
||||
firewall_policy=ice
|
||||
stun_server=stun.linphone.org
|
||||
|
||||
[sip]
|
||||
sip_port=-1
|
||||
sip_tcp_port=-1
|
||||
sip_tls_port=-1
|
||||
<section name="sip">
|
||||
<entry name="sip_port" overwrite="true">-1</entry>
|
||||
<entry name="sip_tcp_port" overwrite="true">-1</entry>
|
||||
<entry name="sip_tls_port" overwrite="true">-1</entry>
|
||||
</section>
|
||||
</config>
|
||||
|
|
@ -1,19 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config xmlns="http://www.linphone.org/xsds/lpconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.linphone.org/xsds/lpconfig.xsd lpconfig.xsd">
|
||||
|
||||
[proxy_default_values]
|
||||
<section name="proxy_default_values">
|
||||
<entry name="reg_proxy" overwrite="true"></entry>
|
||||
<entry name="reg_route" overwrite="true"></entry>
|
||||
<entry name="reg_identity" overwrite="true"></entry>
|
||||
<entry name="reg_expires" overwrite="true">3600</entry>
|
||||
<entry name="reg_sendregister" overwrite="true">1</entry>
|
||||
<entry name="publish" overwrite="true">0</entry>
|
||||
<entry name="dial_escape_plus" overwrite="true">0</entry>
|
||||
</section>
|
||||
<section name="wizard">
|
||||
<entry name="service_url" overwrite="true"></entry>
|
||||
</section>
|
||||
|
||||
reg_proxy=
|
||||
reg_route=
|
||||
reg_identity=
|
||||
reg_expires=3600
|
||||
reg_sendregister=1
|
||||
publish=0
|
||||
dial_escape_plus=0
|
||||
<section name="app">
|
||||
<entry name="pushnotification_preference" overwrite="true">0</entry>
|
||||
<entry name="sharing_server_preference" overwrite="true"></entry>
|
||||
<entry name="ice_preference" overwrite="true"></entry>
|
||||
<entry name="stun_preference" overwrite="true"></entry>
|
||||
</section>
|
||||
|
||||
[wizard]
|
||||
service_url=
|
||||
|
||||
[app]
|
||||
pushnotification_preference=0
|
||||
sharing_server_preference=
|
||||
ice_preference=
|
||||
stun_preference=
|
||||
</config>
|
||||
Loading…
Add table
Reference in a new issue