many bugfixes, work in progress

This commit is contained in:
Simon Morlat 2012-06-12 00:38:34 +02:00
parent c058c5cbde
commit 2e3d4c0fdf
22 changed files with 304 additions and 790 deletions

View file

@ -239,9 +239,11 @@ int __aeabi_idiv(int a, int b) {
// Settings, setup delegate
settingsController.delegate = [LinphoneManager instance];
settingsController.settingsReader.delegate = [LinphoneManager instance];
settingsController.settingsReaderDelegate = [LinphoneManager instance];
settingsController.settingsStore=[[LinphoneCoreSettingsStore alloc] init];
[settingsController.settingsReader init];
//settingsController.file=@"settings/Inappsettings.bundle";
settingsController.showCreditsFooter=FALSE;
//[settingsController.settingsReader init];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound];

View file

@ -15,7 +15,6 @@
NSDictionary *dict;
}
- (void) enableCodecWithName: (const char*) name andRate: (int) rate to:(id)value;
-(void) transformLinphoneCoreToKeys;
@end

View file

@ -11,59 +11,6 @@
#include "lpconfig.h"
#if 0
// linphone_core_enable_logs_with_cb - linphone_core_disable_logs
debugenable_preference
// on change: edit/create linphone_core_get_default_proxy()
transport_preference
username_preference
domain_preference
password_preference
outbound_proxy_preference
proxy_preference
prefix_preference ++
substitute_+_by_00_preference ++
// app internal setting
check_config_disable_preference
wifi_only_preference
backgroundmode_preference
// linphone_core_enable_payload_type
silk_24k_preference
speex_16k_preference
speex_8k_preference
silk_16k_preference
amr_8k_preference
gsm_8k_preference
ilbc_preference
pcmu_preference
pcma_preference
g722_preference
g729_preference
// linphone_core_enable_payload_type
mp4v-es_preference
h264_preference
vp8_preference
// linphone_core_enable_video
enable_video_preference
// linphone_core_set_video_policy
start_video_preference
// linphone_core_set_media_encryption
enable_srtp_preference
// linphone_core_set_stun_server
// linphone_core_set_firewall_policy
stun_preference
#endif
struct codec_name_pref_table{
const char *name;
int rate;
@ -123,6 +70,10 @@ static NSString *getPrefForCodec(const char *name, int rate){
[self setObject: obj forKey:key];
}
- (NSString*) stringForKey:(NSString*) key{
return [self objectForKey: key];
}
-(void) transformCodecsToKeys: (const MSList *)codecs{
LinphoneCore *lc=[LinphoneManager getLc];
const MSList *elem=codecs;
@ -231,6 +182,9 @@ static NSString *getPrefForCodec(const char *name, int rate){
-(void) setObject:(id)value forKey:(NSString *)key {
[dict setValue:value forKey:key];
NSString *changed_value=[[NSString alloc] initWithFormat:@"%@_changed", key];
[dict setValue:[NSNumber numberWithBool:TRUE] forKey:changed_value];
[changed_value release];
}
- (id)objectForKey:(NSString*)key {
@ -238,17 +192,180 @@ static NSString *getPrefForCodec(const char *name, int rate){
}
- (BOOL)synchronize {
ms_message("Called in SettingsStore synchronize");
LinphoneCore *lc=[LinphoneManager getLc];
LinphoneManager* lLinphoneMgr = [LinphoneManager instance];
NSLog(@"Called in SettingsStore synchronize");
if ([self boolForKey:@"username_preference_changed"])
NSLog(@"username_preference_changed !!");
return YES;
/* unregister before modifying any settings */
{
LinphoneProxyConfig* proxyCfg;
linphone_core_get_default_proxy(lc, &proxyCfg);
if (proxyCfg) {
// this will force unregister WITHOUT destorying the proxyCfg object
linphone_proxy_config_edit(proxyCfg);
int i=0;
while (linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationNone &&
linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationCleared &&
linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationFailed &&
i++<40 ) {
linphone_core_iterate(lc);
usleep(10000);
}
}
}
NSString* transport = [self stringForKey:@"transport_preference"];
LCSipTransports transportValue;
if (transport!=nil) {
if (linphone_core_get_sip_transports(lc, &transportValue)) {
ms_error("cannot get current transport");
}
// Only one port can be set at one time, the others's value is 0
if ([transport isEqualToString:@"tcp"]) {
if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port + transportValue.tls_port;
transportValue.udp_port=0;
transportValue.tls_port=0;
} else if ([transport isEqualToString:@"udp"]){
if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port + transportValue.tls_port;
transportValue.tcp_port=0;
transportValue.tls_port=0;
} else if ([transport isEqualToString:@"tls"]){
if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port + transportValue.tcp_port;
transportValue.tcp_port=0;
transportValue.udp_port=0;
} else {
ms_error("unexpected transport [%s]",[transport cStringUsingEncoding:[NSString defaultCStringEncoding]]);
}
if (linphone_core_set_sip_transports(lc, &transportValue)) {
ms_error("cannot set transport");
}
}
//configure sip account
//mandatory parameters
NSString* username = [self stringForKey:@"username_preference"];
NSString* domain = [self stringForKey:@"domain_preference"];
NSString* accountPassword = [self stringForKey:@"password_preference"];
bool isOutboundProxy= [self boolForKey:@"outbound_proxy_preference"];
//clear auth info list
linphone_core_clear_all_auth_info(lc);
//clear existing proxy config
linphone_core_clear_proxy_config(lc);
if (username && [username length] >0 && domain && [domain length]>0) {
const char* identity = [[NSString stringWithFormat:@"sip:%@@%@",username,domain] cStringUsingEncoding:[NSString defaultCStringEncoding]];
const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* proxyAddress = [[NSUserDefaults standardUserDefaults] stringForKey:@"proxy_preference"];
if ((!proxyAddress || [proxyAddress length] <1 ) && domain) {
proxyAddress = [NSString stringWithFormat:@"sip:%@",domain] ;
} else {
proxyAddress = [NSString stringWithFormat:@"sip:%@",proxyAddress] ;
}
const char* proxy = [proxyAddress cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* prefix = [[NSUserDefaults standardUserDefaults] stringForKey:@"prefix_preference"];
bool substitute_plus_by_00 = [[NSUserDefaults standardUserDefaults] boolForKey:@"substitute_+_by_00_preference"];
//possible valid config detected
LinphoneProxyConfig* proxyCfg;
proxyCfg = linphone_proxy_config_new();
// add username password
LinphoneAddress *from = linphone_address_new(identity);
LinphoneAuthInfo *info;
if (from !=0){
info=linphone_auth_info_new(linphone_address_get_username(from),NULL,password,NULL,NULL);
linphone_core_add_auth_info(lc,info);
}
linphone_address_destroy(from);
// configure proxy entries
linphone_proxy_config_set_identity(proxyCfg,identity);
linphone_proxy_config_set_server_addr(proxyCfg,proxy);
linphone_proxy_config_enable_register(proxyCfg,true);
BOOL isWifiOnly = [self boolForKey:@"wifi_only_preference"];
if (isWifiOnly && lLinphoneMgr.connectivity == wwan) {
linphone_proxy_config_expires(proxyCfg, 0);
} else {
linphone_proxy_config_expires(proxyCfg, lLinphoneMgr.defaultExpires);
}
if (isOutboundProxy)
linphone_proxy_config_set_route(proxyCfg,proxy);
if ([prefix length]>0) {
linphone_proxy_config_set_dial_prefix(proxyCfg, [prefix cStringUsingEncoding:[NSString defaultCStringEncoding]]);
}
linphone_proxy_config_set_dial_escape_plus(proxyCfg,substitute_plus_by_00);
linphone_core_add_proxy_config(lc,proxyCfg);
//set to default proxy
linphone_core_set_default_proxy(lc,proxyCfg);
}
//Configure Codecs
PayloadType *pt;
const MSList *elem;
//disable all codecs
for (elem=linphone_core_get_audio_codecs(lc);elem!=NULL;elem=elem->next){
pt=(PayloadType*)elem->data;
linphone_core_enable_payload_type(lc,pt,[self boolForKey: getPrefForCodec(pt->mime_type,pt->clock_rate)]);
}
for (elem=linphone_core_get_video_codecs(lc);elem!=NULL;elem=elem->next){
pt=(PayloadType*)elem->data;
linphone_core_enable_payload_type(lc,pt,[self boolForKey: getPrefForCodec(pt->mime_type,pt->clock_rate)]);
}
bool enableVideo = [self boolForKey:@"enable_video_preference"];
linphone_core_enable_video(lc, enableVideo, enableVideo);
NSString *menc = [self stringForKey:@"media_encryption_preference"];
if (menc && [menc compare:@"SRTP"])
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionSRTP);
else if (menc && [menc compare:@"ZRTP"])
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionZRTP);
else linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionNone);
NSString* stun_server = [self stringForKey:@"stun_preference"];
if ([stun_server length]>0){
linphone_core_set_stun_server(lc,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]);
linphone_core_set_firewall_policy(lc, LinphonePolicyUseStun);
}else{
linphone_core_set_stun_server(lc, NULL);
linphone_core_set_firewall_policy(lc, LinphonePolicyNoFirewall);
}
LinphoneVideoPolicy policy;
policy.automatically_accept = [self boolForKey:@"start_video_preference"];;
policy.automatically_initiate = [self boolForKey:@"start_video_preference"];
linphone_core_set_video_policy(lc, &policy);
UIDevice* device = [UIDevice currentDevice];
bool backgroundSupported = false;
if ([device respondsToSelector:@selector(isMultitaskingSupported)])
backgroundSupported = [device isMultitaskingSupported];
BOOL isbackgroundModeEnabled;
if (backgroundSupported) {
isbackgroundModeEnabled = [self boolForKey:@"backgroundmode_preference"];
} else {
isbackgroundModeEnabled=false;
}
lp_config_set_int(linphone_core_get_config(lc),"app","backgroundmode_preference",backgroundSupported);
return YES;
}
- (void) enableCodecWithName: (const char*) name andRate: (int) rate to:(id)value{
LinphoneCore *lc=[LinphoneManager getLc];
PayloadType *pt;
pt=linphone_core_find_payload_type(lc, name, rate);
if (pt){
linphone_core_enable_payload_type(lc, pt, [value boolValue]);
}
}
@end

View file

@ -66,9 +66,7 @@ typedef struct _LinphoneCallAppData {
FastAddressBook* mFastAddressBook;
const char* frontCamId;
const char* backCamId;
NSDictionary* currentSettings;
@public
CallContext currentCallContextBeforeGoingBackground;
}
@ -92,13 +90,13 @@ typedef struct _LinphoneCallAppData {
-(NSString*) getDisplayNameFromAddressBook:(NSString*) number andUpdateCallLog:(LinphoneCallLog*)log;
-(UIImage*) getImageFromAddressBook:(NSString*) number;
-(BOOL) reconfigureLinphoneIfNeeded:(NSDictionary *)oldSettings;
-(void) setupNetworkReachabilityCallback: (const char*) nodeName withContext:(SCNetworkReachabilityContext*) ctx;
-(void) refreshRegisters;
@property (nonatomic, retain) id<LinphoneUICallDelegate> callDelegate;
@property (nonatomic, retain) id<LinphoneUIRegistrationDelegate> registrationDelegate;
@property Connectivity connectivity;
@property (nonatomic) int defaultExpires;
@property (readonly) const char* frontCamId;
@property (readonly) const char* backCamId;
@property (nonatomic) bool isbackgroundModeEnabled;

View file

@ -20,6 +20,7 @@
#import "LinphoneManager.h"
#include "linphonecore_utils.h"
#include "lpconfig.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
@ -42,7 +43,7 @@ extern void libmsx264_init();
#endif
#define FRONT_CAM_NAME "AV Capture: Front Camera"
#define BACK_CAM_NAME "AV Capture: Back Camera"
#define DEFAULT_EXPIRES 600
#if defined (HAVE_SILK)
extern void libmssilk_init();
#endif
@ -57,12 +58,14 @@ extern void libmsbcg729_init();
@synthesize frontCamId;
@synthesize backCamId;
@synthesize isbackgroundModeEnabled;
@synthesize defaultExpires;
-(id) init {
assert (!theLinphoneManager);
if ((self= [super init])) {
mFastAddressBook = [[FastAddressBook alloc] init];
theLinphoneManager = self;
self.defaultExpires=600;
}
return self;
}
@ -429,14 +432,6 @@ static LinphoneCoreVTable linphonec_vtable = {
};
-(void) configurePayloadType:(const char*) type fromPrefKey: (NSString*)key withRate:(int)rate {
if ([[NSUserDefaults standardUserDefaults] boolForKey:key]) {
PayloadType* pt;
if((pt = linphone_core_find_payload_type(theLinphoneCore,type,rate))) {
linphone_core_enable_payload_type(theLinphoneCore,pt, TRUE);
}
}
}
-(void) kickOffNetworkConnection {
/*start a new thread to avoid blocking the main ui in case of peer host failure*/
[NSThread detachNewThreadSelector:@selector(runNetworkConnection) toTarget:self withObject:nil];
@ -487,7 +482,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
[[LinphoneManager instance] kickOffNetworkConnection];
} else {
Connectivity newConnectivity;
BOOL isWifiOnly = [[NSUserDefaults standardUserDefaults] boolForKey:@"wifi_only_preference"];
BOOL isWifiOnly = lp_config_get_int(linphone_core_get_config([LinphoneManager getLc]),"app","wifi_only_preference",FALSE);
if (!ctx || ctx->testWWan)
newConnectivity = flags & kSCNetworkReachabilityFlagsIsWWAN ? wwan:wifi;
else
@ -499,7 +494,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
&& (lLinphoneMgr.connectivity == newConnectivity || lLinphoneMgr.connectivity == none)) {
linphone_proxy_config_expires(proxy, 0);
} else if (proxy){
linphone_proxy_config_expires(proxy, DEFAULT_EXPIRES); //might be better to save the previous value
linphone_proxy_config_expires(proxy, lLinphoneMgr.defaultExpires); //might be better to save the previous value
}
if (lLinphoneMgr.connectivity == none) {
@ -522,276 +517,29 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
}
-(BOOL) reconfigureLinphoneIfNeeded:(NSDictionary *)settings {
if (theLinphoneCore==nil) {
ms_warning("cannot configure linphone because not initialized yet");
return NO;
}
[[NSUserDefaults standardUserDefaults] synchronize];
NSDictionary* newSettings = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
if (settings != nil) {
/* reconfigure only if newSettings != settings */
if ([newSettings isEqualToDictionary:settings]) {
ms_message("Same settings: no need to reconfigure linphone");
return NO;
}
}
NSLog(@"Configuring Linphone (new settings)");
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"debugenable_preference"]) {
//redirect all traces to the iphone log framework
linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
}
else {
linphone_core_disable_logs();
}
NSBundle* myBundle = [NSBundle mainBundle];
/* unregister before modifying any settings */
{
LinphoneProxyConfig* proxyCfg;
linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg);
if (proxyCfg) {
// this will force unregister WITHOUT destorying the proxyCfg object
linphone_proxy_config_edit(proxyCfg);
int i=0;
while (linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationNone &&
linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationCleared &&
linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationFailed &&
i++<40 ) {
linphone_core_iterate(theLinphoneCore);
usleep(100000);
}
}
}
const char* lRootCa = [[myBundle pathForResource:@"rootca"ofType:@"pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_root_ca(theLinphoneCore, lRootCa);
NSString* transport = [[NSUserDefaults standardUserDefaults] stringForKey:@"transport_preference"];
LCSipTransports transportValue;
if (transport!=nil) {
if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) {
ms_error("cannot get current transport");
}
// Only one port can be set at one time, the others's value is 0
if ([transport isEqualToString:@"tcp"]) {
if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port + transportValue.tls_port;
transportValue.udp_port=0;
transportValue.tls_port=0;
} else if ([transport isEqualToString:@"udp"]){
if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port + transportValue.tls_port;
transportValue.tcp_port=0;
transportValue.tls_port=0;
} else if ([transport isEqualToString:@"tls"]){
if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port + transportValue.tcp_port;
transportValue.tcp_port=0;
transportValue.udp_port=0;
} else {
ms_error("unexpected transport [%s]",[transport cStringUsingEncoding:[NSString defaultCStringEncoding]]);
}
if (linphone_core_set_sip_transports(theLinphoneCore, &transportValue)) {
ms_error("cannot set transport");
}
}
// Set audio assets
const char* lRing = [[myBundle pathForResource:@"oldphone-mono"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ring(theLinphoneCore, lRing );
const char* lRingBack = [[myBundle pathForResource:@"ringback"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ringback(theLinphoneCore, lRingBack);
//configure sip account
//madatory parameters
NSString* username = [[NSUserDefaults standardUserDefaults] stringForKey:@"username_preference"];
NSString* domain = [[NSUserDefaults standardUserDefaults] stringForKey:@"domain_preference"];
NSString* accountPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"];
bool configCheckDisable = [[NSUserDefaults standardUserDefaults] boolForKey:@"check_config_disable_preference"];
bool isOutboundProxy= [[NSUserDefaults standardUserDefaults] boolForKey:@"outbound_proxy_preference"];
//clear auth info list
linphone_core_clear_all_auth_info(theLinphoneCore);
//clear existing proxy config
linphone_core_clear_proxy_config(theLinphoneCore);
if (username && [username length] >0 && domain && [domain length]>0) {
const char* identity = [[NSString stringWithFormat:@"sip:%@@%@",username,domain] cStringUsingEncoding:[NSString defaultCStringEncoding]];
const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* proxyAddress = [[NSUserDefaults standardUserDefaults] stringForKey:@"proxy_preference"];
if ((!proxyAddress || [proxyAddress length] <1 ) && domain) {
proxyAddress = [NSString stringWithFormat:@"sip:%@",domain] ;
} else {
proxyAddress = [NSString stringWithFormat:@"sip:%@",proxyAddress] ;
}
const char* proxy = [proxyAddress cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* prefix = [[NSUserDefaults standardUserDefaults] stringForKey:@"prefix_preference"];
bool substitute_plus_by_00 = [[NSUserDefaults standardUserDefaults] boolForKey:@"substitute_+_by_00_preference"];
//possible valid config detected
LinphoneProxyConfig* proxyCfg;
proxyCfg = linphone_proxy_config_new();
// add username password
LinphoneAddress *from = linphone_address_new(identity);
LinphoneAuthInfo *info;
if (from !=0){
info=linphone_auth_info_new(linphone_address_get_username(from),NULL,password,NULL,NULL);
linphone_core_add_auth_info(theLinphoneCore,info);
}
linphone_address_destroy(from);
// configure proxy entries
linphone_proxy_config_set_identity(proxyCfg,identity);
linphone_proxy_config_set_server_addr(proxyCfg,proxy);
linphone_proxy_config_enable_register(proxyCfg,true);
BOOL isWifiOnly = [[NSUserDefaults standardUserDefaults] boolForKey:@"wifi_only_preference"];
LinphoneManager* lLinphoneMgr = [LinphoneManager instance];
if (isWifiOnly && lLinphoneMgr.connectivity == wwan) {
linphone_proxy_config_expires(proxyCfg, 0);
} else {
linphone_proxy_config_expires(proxyCfg, DEFAULT_EXPIRES);
}
if (isOutboundProxy)
linphone_proxy_config_set_route(proxyCfg,proxy);
if ([prefix length]>0) {
linphone_proxy_config_set_dial_prefix(proxyCfg, [prefix cStringUsingEncoding:[NSString defaultCStringEncoding]]);
}
linphone_proxy_config_set_dial_escape_plus(proxyCfg,substitute_plus_by_00);
linphone_core_add_proxy_config(theLinphoneCore,proxyCfg);
//set to default proxy
linphone_core_set_default_proxy(theLinphoneCore,proxyCfg);
} else {
if (configCheckDisable == false ) {
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Warning",nil)
message:NSLocalizedString(@"It seems you have not configured any proxy server from settings",nil)
delegate:self
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
otherButtonTitles:NSLocalizedString(@"Never remind",nil),nil];
[error show];
[error release];
}
}
//Configure Codecs
PayloadType *pt;
//get codecs from linphonerc
const MSList *audioCodecs=linphone_core_get_audio_codecs(theLinphoneCore);
const MSList *elem;
//disable all codecs
for (elem=audioCodecs;elem!=NULL;elem=elem->next){
pt=(PayloadType*)elem->data;
linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
}
//read codecs from setting bundle and enable them one by one
if ([self isNotIphone3G]) {
[self configurePayloadType:"SILK" fromPrefKey:@"silk_24k_preference" withRate:24000];
}
else {
ms_message("SILK 24khz codec deactivated");
}
[self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
[self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
[self configurePayloadType:"SILK" fromPrefKey:@"silk_16k_preference" withRate:16000];
[self configurePayloadType:"AMR" fromPrefKey:@"amr_8k_preference" withRate:8000];
[self configurePayloadType:"GSM" fromPrefKey:@"gsm_8k_preference" withRate:8000];
[self configurePayloadType:"iLBC" fromPrefKey:@"ilbc_preference" withRate:8000];
[self configurePayloadType:"PCMU" fromPrefKey:@"pcmu_preference" withRate:8000];
[self configurePayloadType:"PCMA" fromPrefKey:@"pcma_preference" withRate:8000];
[self configurePayloadType:"G722" fromPrefKey:@"g722_preference" withRate:8000];
[self configurePayloadType:"G729" fromPrefKey:@"g729_preference" withRate:8000];
//get video codecs from linphonerc
const MSList *videoCodecs=linphone_core_get_video_codecs(theLinphoneCore);
//disable video all codecs
for (elem=videoCodecs;elem!=NULL;elem=elem->next){
pt=(PayloadType*)elem->data;
linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
}
[self configurePayloadType:"MP4V-ES" fromPrefKey:@"mp4v-es_preference" withRate:90000];
[self configurePayloadType:"H264" fromPrefKey:@"h264_preference" withRate:90000];
[self configurePayloadType:"VP8" fromPrefKey:@"vp8_preference" withRate:90000];
if ([self isNotIphone3G]) {
bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"];
linphone_core_enable_video(theLinphoneCore, enableVideo, enableVideo);
} else {
linphone_core_enable_video(theLinphoneCore, FALSE, FALSE);
ms_warning("Disable video for phones prior to iPhone 3GS");
}
bool enableSrtp = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_srtp_preference"];
linphone_core_set_media_encryption(theLinphoneCore, enableSrtp?LinphoneMediaEncryptionSRTP:LinphoneMediaEncryptionZRTP);
NSString* stun_server = [[NSUserDefaults standardUserDefaults] stringForKey:@"stun_preference"];
if ([stun_server length]>0){
linphone_core_set_stun_server(theLinphoneCore,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]);
linphone_core_set_firewall_policy(theLinphoneCore, LinphonePolicyUseStun);
}else{
linphone_core_set_stun_server(theLinphoneCore, NULL);
linphone_core_set_firewall_policy(theLinphoneCore, LinphonePolicyNoFirewall);
}
LinphoneVideoPolicy policy;
policy.automatically_accept = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"];;
policy.automatically_initiate = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"];
linphone_core_set_video_policy(theLinphoneCore, &policy);
UIDevice* device = [UIDevice currentDevice];
bool backgroundSupported = false;
if ([device respondsToSelector:@selector(isMultitaskingSupported)])
backgroundSupported = [device isMultitaskingSupported];
if (backgroundSupported) {
isbackgroundModeEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"backgroundmode_preference"];
} else {
isbackgroundModeEnabled=false;
}
[currentSettings release];
currentSettings = newSettings;
[currentSettings retain];
return YES;
}
- (BOOL)isNotIphone3G
{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [[NSString alloc ] initWithUTF8String:machine];
free(machine);
static BOOL done=FALSE;
static BOOL result;
if (!done){
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [[NSString alloc ] initWithUTF8String:machine];
free(machine);
BOOL result = ![platform isEqualToString:@"iPhone1,2"];
result = ![platform isEqualToString:@"iPhone1,2"];
[platform release];
[platform release];
done=TRUE;
}
return result;
}
// no proxy configured alert
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 1) {
[[NSUserDefaults standardUserDefaults] setBool:true forKey:@"check_config_disable_preference"];
}
}
-(void) destroyLibLinphone {
[mIterateTimer invalidate];
@ -906,18 +654,11 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *confiFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/.linphonerc"];
NSString *zrtpSecretsFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/zrtp_secrets"];
const char* lRootCa = [[myBundle pathForResource:@"rootca"ofType:@"pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
connectivity=none;
signal(SIGPIPE, SIG_IGN);
//log management
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"debugenable_preference"]) {
//redirect all traces to the iphone log framework
linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
}
else {
linphone_core_disable_logs();
}
libmsilbc_init();
#if defined (HAVE_SILK)
libmssilk_init();
@ -940,13 +681,17 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
, [factoryConfig cStringUsingEncoding:[NSString defaultCStringEncoding]]
,self);
[[NSUserDefaults standardUserDefaults] synchronize];//sync before loading config
linphone_core_set_root_ca(theLinphoneCore, lRootCa);
// Set audio assets
const char* lRing = [[myBundle pathForResource:@"oldphone-mono"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ring(theLinphoneCore, lRing );
const char* lRingBack = [[myBundle pathForResource:@"ringback"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ringback(theLinphoneCore, lRingBack);
linphone_core_set_zrtp_secrets_file(theLinphoneCore, [zrtpSecretsFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
[self setupNetworkReachabilityCallback: "linphone.org" withContext:nil];
[self reconfigureLinphoneIfNeeded:nil];
// start scheduler
mIterateTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
@ -1001,6 +746,14 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
NSUInteger cpucount = [[NSProcessInfo processInfo] processorCount];
ms_set_cpu_count(cpucount);
if (![self isNotIphone3G]){
PayloadType *pt=linphone_core_find_payload_type(theLinphoneCore,"SILK",24000);
if (pt) {
linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
ms_warning("SILK/24000 and video disabled on old iPhone 3G");
}
linphone_core_enable_video(theLinphoneCore, FALSE, FALSE);
}
ms_warning("Linphone [%s] started on [%s], running with [%u] processor(s)"
,linphone_core_get_version()
@ -1026,15 +779,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
//back from standby and background mode is disabled
[self startLibLinphone];
} else {
if (![self reconfigureLinphoneIfNeeded:currentSettings]) {
ms_message("becoming active with no config modification, make sure we are registered");
[self refreshRegisters];
}
[self refreshRegisters];
}
/*IOS specific*/
linphone_core_start_dtmf_stream(theLinphoneCore);
}
-(void) registerLogView:(id<LogView>) view {
mLogView = view;
}
@ -1070,7 +820,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
-(void) settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender {
[self reconfigureLinphoneIfNeeded: currentSettings];
NSLog(@"settingsViewControllerDidEnd");
}
-(NSDictionary*) filterPreferenceSpecifier:(NSDictionary *)specifier {
@ -1086,23 +836,21 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
// child pane maybe
NSString* title = [specifier objectForKey:@"Title"];
if ([title isEqualToString:@"Video"]) {
if (!linphone_core_video_enabled(theLinphoneCore))
if (!linphone_core_video_supported(theLinphoneCore))
return nil;
}
return specifier;
}
// NSLog(@"Specifier received: %@", identifier);
if ([identifier isEqualToString:@"srtp_preference"]) {
if (!ortp_srtp_supported())
return nil;
} else if ([identifier hasPrefix:@"silk"]) {
if ([identifier isEqualToString:@"speex_24k_preference"]) {
if (linphone_core_find_payload_type(theLinphoneCore, "SILK", 24000)) return nil;
} else if ([identifier isEqualToString:@"speex_16k_preference"]) {
if (linphone_core_find_payload_type(theLinphoneCore, "SILK", 16000)) return nil;
} else if ([identifier isEqualToString:@"speex_8k_preference"]) {
if (linphone_core_find_payload_type(theLinphoneCore, "SILK", 8000)) return nil;
}
if ([identifier hasPrefix:@"silk"]) {
if (linphone_core_find_payload_type(theLinphoneCore,"SILK",8000)==NULL){
return nil;
}
if ([identifier isEqualToString:@"silk_24k_preference"]) {
if (![self isNotIphone3G])
return nil;
}
} else if ([identifier isEqualToString:@"backgroundmode_preference"]) {
UIDevice* device = [UIDevice currentDevice];
if ([device respondsToSelector:@selector(isMultitaskingSupported)]) {

View file

@ -17,6 +17,7 @@
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
#import "IASKSettingsReader.h"
#import "IASKSettingsStore.h"
#import "IASKViewController.h"
@ -64,6 +65,7 @@
NSMutableArray *_viewList;
IASKSettingsReader *_settingsReader;
id<IASKSettingsReaderFilterDelegate> _settingsReaderDelegate;
id<IASKSettingsStore> _settingsStore;
NSString *_file;
@ -75,6 +77,7 @@
@property (nonatomic, assign) IBOutlet id delegate;
@property (nonatomic, copy) NSString *file;
@property (nonatomic, assign) id<IASKSettingsReaderFilterDelegate> settingsReaderDelegate;
@property (nonatomic, assign) BOOL showCreditsFooter;
@property (nonatomic, assign) BOOL showDoneButton;

View file

@ -63,11 +63,12 @@ CGRect IASKCGRectSwap(CGRect rect);
@synthesize showCreditsFooter = _showCreditsFooter;
@synthesize showDoneButton = _showDoneButton;
@synthesize settingsStore = _settingsStore;
@synthesize settingsReaderDelegate = _settingsReaderDelegate;
#pragma mark accessors
- (IASKSettingsReader*)settingsReader {
if (!_settingsReader) {
_settingsReader = [[IASKSettingsReader alloc] initWithFile:self.file];
_settingsReader = [[IASKSettingsReader alloc] initWithFile:self.file andDelegate:self.settingsReaderDelegate];
}
return _settingsReader;
}
@ -267,7 +268,7 @@ CGRect IASKCGRectSwap(CGRect rect);
[self.delegate settingsViewControllerDidEnd:self];
}
// reload
[self.settingsReader initWithFile:self.file];
[self.settingsReader initWithFile:self.file andDelegate:self.settingsReaderDelegate];
[self.tableView reloadData];
}
@ -620,9 +621,9 @@ CGRect IASKCGRectSwap(CGRect rect);
// load the view controll back in to push it
targetViewController = [[self.viewList objectAtIndex:kIASKSpecifierChildViewControllerIndex] objectForKey:@"viewController"];
}
targetViewController.settingsReaderDelegate = self.settingsReaderDelegate;
targetViewController.file = specifier.file; // changes settingsReader
targetViewController.settingsReader.delegate = self.settingsReader.delegate;
[targetViewController.settingsReader initWithFile:specifier.file];
targetViewController.title = specifier.title;
targetViewController.showCreditsFooter = NO;
[[self navigationController] pushViewController:targetViewController animated:YES];

View file

@ -125,10 +125,10 @@ __VA_ARGS__ \
NSDictionary *_settingsBundle;
NSArray *_dataSource;
NSBundle *_bundle;
id<IASKSettingsReaderFilterDelegate> delegate;
id<IASKSettingsReaderFilterDelegate> _delegate;
}
- (id)initWithFile:(NSString*)file;
- (id)initWithFile:(NSString*)file andDelegate:(id<IASKSettingsReaderFilterDelegate>)delegate;
- (NSInteger)numberOfSections;
- (NSInteger)numberOfRowsForSection:(NSInteger)section;
- (IASKSpecifier*)specifierForIndexPath:(NSIndexPath*)indexPath;
@ -145,5 +145,5 @@ __VA_ARGS__ \
@property (nonatomic, retain) NSString *bundlePath;
@property (nonatomic, retain) NSDictionary *settingsBundle;
@property (nonatomic, retain) NSArray *dataSource;
@property (nonatomic, retain) id<IASKSettingsReaderFilterDelegate> delegate;
@end

View file

@ -32,13 +32,13 @@ localizationTable=_localizationTable,
bundlePath=_bundlePath,
settingsBundle=_settingsBundle,
dataSource=_dataSource;
@synthesize delegate;
- (id)init {
return [self initWithFile:@"Root"];
return [self initWithFile:@"Root" andDelegate:nil];
}
- (id)initWithFile:(NSString*)file {
- (id)initWithFile:(NSString*)file andDelegate:(id<IASKSettingsReaderFilterDelegate>)delegate{
if ((self=[super init])) {
@ -61,7 +61,7 @@ dataSource=_dataSource;
self.localizationTable = @"Root";
}
}
_delegate=delegate;
if (_settingsBundle) {
[self _reinterpretBundle:_settingsBundle];
}
@ -86,8 +86,8 @@ dataSource=_dataSource;
NSMutableArray *dataSource = [[[NSMutableArray alloc] init] autorelease];
for (NSDictionary *specifier in preferenceSpecifiers) {
if (delegate != nil) {
specifier = [delegate filterPreferenceSpecifier:specifier];
if (_delegate != nil) {
specifier = [_delegate filterPreferenceSpecifier:specifier];
if (specifier == nil) {
// skip
continue;
@ -127,7 +127,8 @@ dataSource=_dataSource;
- (NSInteger)numberOfRowsForSection:(NSInteger)section {
int headingCorrection = [self _sectionHasHeading:section] ? 1 : 0;
return [(NSArray*)[[self dataSource] objectAtIndex:section] count] - headingCorrection;
NSInteger ret= [(NSArray*)[[self dataSource] objectAtIndex:section] count] - headingCorrection;
return ret;
}
- (IASKSpecifier*)specifierForIndexPath:(NSIndexPath*)indexPath {

View file

@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">784</int>
<string key="IBDocument.SystemVersion">11C74</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1138.23</string>
<string key="IBDocument.HIToolboxVersion">567.00</string>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">933</string>
<string key="NS.object.0">1181</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -67,10 +67,14 @@
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
<object class="IBUINavigationController" key="IBUISelectedViewController" id="695567073">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="461463762">
<object class="IBUINavigationController" key="IBUISelectedViewController" id="504332192">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="598644199">
<string key="IBUITitle">Settings</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">20-gear2.png</string>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUISystemItemIdentifier">0</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@ -81,7 +85,7 @@
<bool key="IBUIDefinesPresentationContext">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
<object class="IBUINavigationBar" key="IBUINavigationBar" id="1050547958">
<object class="IBUINavigationBar" key="IBUINavigationBar" id="698528405">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{0, 0}</string>
@ -93,14 +97,12 @@
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="598026987">
<string key="IBUITitle">Informations</string>
<object class="IBUINavigationItem" key="IBUINavigationItem" id="37830463">
<string key="IBUITitle">Information</string>
<object class="IBUIViewController" id="1009346023">
<object class="IBUINavigationItem" key="IBUINavigationItem" id="302143822">
<string key="IBUITitle">Root View Controller</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<reference key="IBUIParentViewController" ref="695567073"/>
<string key="IBUINibName">MoreViewController</string>
<reference key="IBUIParentViewController" ref="504332192"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
@ -192,14 +194,11 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUINavigationController" id="504332192">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="598644199">
<string key="IBUITitle">Settings</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">20-gear2.png</string>
</object>
<reference ref="504332192"/>
<object class="IBUINavigationController" id="695567073">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="461463762">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUISystemItemIdentifier">0</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@ -210,7 +209,7 @@
<bool key="IBUIDefinesPresentationContext">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
<object class="IBUINavigationBar" key="IBUINavigationBar" id="698528405">
<object class="IBUINavigationBar" key="IBUINavigationBar" id="1050547958">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{0, 0}</string>
@ -222,12 +221,14 @@
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="1009346023">
<object class="IBUINavigationItem" key="IBUINavigationItem" id="302143822">
<string key="IBUITitle">Root View Controller</string>
<object class="IBUIViewController" id="598026987">
<string key="IBUITitle">Informations</string>
<object class="IBUINavigationItem" key="IBUINavigationItem" id="37830463">
<string key="IBUITitle">Information</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<reference key="IBUIParentViewController" ref="504332192"/>
<reference key="IBUIParentViewController" ref="695567073"/>
<string key="IBUINibName">MoreViewController</string>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
@ -237,14 +238,12 @@
</object>
</object>
</object>
<reference ref="695567073"/>
</object>
<object class="IBUITabBar" key="IBUITabBar" id="995238651">
<reference key="NSNextResponder"/>
<int key="NSvFlags">266</int>
<string key="NSFrame">{{0, 431}, {320, 49}}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
@ -541,7 +540,7 @@
<string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -603,6 +602,10 @@
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="784" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1296" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
@ -617,13 +620,13 @@
<string>dialer-orange.png</string>
<string>history-orange.png</string>
</object>
<object class="NSMutableArray" key="dict.values">
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{26, 28}</string>
<string>{25, 24}</string>
<string>{25, 23}</string>
</object>
</object>
<string key="IBCocoaTouchPluginVersion">933</string>
<string key="IBCocoaTouchPluginVersion">1181</string>
</data>
</archive>

View file

@ -78,7 +78,6 @@
2242D91710D66BF300E9963F /* out_call.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91510D66BF300E9963F /* out_call.png */; };
2242D9C910D691F900E9963F /* GenericTabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2242D9C810D691F900E9963F /* GenericTabViewController.m */; };
2242E313125235120061DDCE /* oldphone-mono-30s.caf in Resources */ = {isa = PBXBuildFile; fileRef = 2242E312125235120061DDCE /* oldphone-mono-30s.caf */; };
2245671D107699F700F10948 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2245671C107699F700F10948 /* Settings.bundle */; };
224567C2107B968500F10948 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224567C1107B968500F10948 /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
2245F78A1201D38000C4179D /* MoreViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81B111C44E100B04932 /* MoreViewController.xib */; };
2248E90E12F7E4CF00220D9C /* UIDigitButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2248E90D12F7E4CF00220D9C /* UIDigitButton.m */; };
@ -312,7 +311,8 @@
57282931154AF1460076F540 /* history-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646B14CD5585008E9607 /* history-orange.png */; };
57282933154AF14D0076F540 /* dialer-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646A14CD5585008E9607 /* dialer-orange.png */; };
57D2B457157E4580002EA69B /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3415205B1563ABEB00205A0E /* MessageUI.framework */; };
57D2B45B1580FF58002EA69B /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 57D2B45A1580FF58002EA69B /* Settings.bundle */; };
57D2B47C1586384E002EA69B /* Inappsettings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 57D2B47B15863820002EA69B /* Inappsettings.bundle */; };
57D2B47D1586384F002EA69B /* Inappsettings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 57D2B47B15863820002EA69B /* Inappsettings.bundle */; };
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
7066FC0C13E830E400EFC6DC /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; };
70E542F313E147E3002BA2C0 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E542F213E147E3002BA2C0 /* OpenGLES.framework */; };
@ -518,7 +518,6 @@
2242D9C710D691F900E9963F /* GenericTabViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericTabViewController.h; sourceTree = "<group>"; };
2242D9C810D691F900E9963F /* GenericTabViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GenericTabViewController.m; sourceTree = "<group>"; };
2242E312125235120061DDCE /* oldphone-mono-30s.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "oldphone-mono-30s.caf"; path = "liblinphone-sdk/apple-darwin/share/sounds/linphone/rings/oldphone-mono-30s.caf"; sourceTree = "<group>"; };
2245671C107699F700F10948 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
224567C1107B968500F10948 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
2248E90C12F7E4CF00220D9C /* UIDigitButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIDigitButton.h; sourceTree = "<group>"; };
2248E90D12F7E4CF00220D9C /* UIDigitButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIDigitButton.m; sourceTree = "<group>"; };
@ -736,7 +735,7 @@
34CA8534148F669900503C01 /* VideoViewController-ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "VideoViewController-ipad.xib"; sourceTree = "<group>"; };
34CA8537148F692A00503C01 /* MainScreenWithVideoPreview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainScreenWithVideoPreview.h; sourceTree = "<group>"; };
34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainScreenWithVideoPreview.m; sourceTree = "<group>"; };
57D2B45A1580FF58002EA69B /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
57D2B47B15863820002EA69B /* Inappsettings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Inappsettings.bundle; sourceTree = "<group>"; };
70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = "<group>"; };
7066FC0B13E830E400EFC6DC /* libvpx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx.a; path = "liblinphone-sdk/apple-darwin/lib/libvpx.a"; sourceTree = "<group>"; };
70E542F213E147E3002BA2C0 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
@ -1213,7 +1212,7 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
57D2B45A1580FF58002EA69B /* Settings.bundle */,
57D2B47A15863820002EA69B /* settings */,
3415205B1563ABEB00205A0E /* MessageUI.framework */,
34151FB61563A8D800205A0E /* InAppSettingsKit */,
340751961506459A00B89C47 /* CoreTelephony.framework */,
@ -1260,7 +1259,6 @@
2274402E106F335E006EC466 /* AudioToolbox.framework */,
22744043106F33FC006EC466 /* Security.framework */,
22744056106F9BC9006EC466 /* CoreFoundation.framework */,
2245671C107699F700F10948 /* Settings.bundle */,
224567C1107B968500F10948 /* AVFoundation.framework */,
22F51EF5107FA66500F98953 /* untitled.plist */,
22B5EFA210CE50BD00777D97 /* AddressBookUI.framework */,
@ -1427,6 +1425,14 @@
path = Xibs;
sourceTree = "<group>";
};
57D2B47A15863820002EA69B /* settings */ = {
isa = PBXGroup;
children = (
57D2B47B15863820002EA69B /* Inappsettings.bundle */,
);
path = settings;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -1504,7 +1510,6 @@
22F2508F107141E100AC9B3F /* PhoneViewController.xib in Resources */,
22F254811073D99800AC9B3F /* ringback.wav in Resources */,
220FAE4B10767A6A0068D98F /* PhoneMainView.xib in Resources */,
2245671D107699F700F10948 /* Settings.bundle in Resources */,
22F51EF6107FA66500F98953 /* untitled.plist in Resources */,
2237D4091084D7A9001383EE /* oldphone-mono.wav in Resources */,
227BCDC310D4004600FBFD76 /* CallHistoryTableViewController.xib in Resources */,
@ -1573,6 +1578,7 @@
34151FF31563A8D800205A0E /* IASKPSToggleSwitchSpecifierViewCell.xib in Resources */,
34151FF41563A8D800205A0E /* IASKSpecifierValuesView.xib in Resources */,
3415205A1563AA8F00205A0E /* 20-gear2.png in Resources */,
57D2B47C1586384E002EA69B /* Inappsettings.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1580,7 +1586,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
57D2B45B1580FF58002EA69B /* Settings.bundle in Resources */,
22D8F11F147548E2008C97DB /* linphonerc in Resources */,
22D8F120147548E2008C97DB /* PhoneViewController.xib in Resources */,
22D8F121147548E2008C97DB /* ringback.wav in Resources */,
@ -1647,6 +1652,7 @@
341520081563A93B00205A0E /* IASKPSTextFieldSpecifierViewCell.xib in Resources */,
341520091563A93B00205A0E /* IASKPSToggleSwitchSpecifierViewCell.xib in Resources */,
3415200A1563A93B00205A0E /* IASKSpecifierValuesView.xib in Resources */,
57D2B47D1586384F002EA69B /* Inappsettings.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View file

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Key</key>
<string>stun_preference</string>
<key>Title</key>
<string>Stun server</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>debugenable_preference</string>
<key>Title</key>
<string>Debug</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>prefix_preference</string>
<key>KeyboardType</key>
<string>NumberPad</string>
<key>Title</key>
<string>Prefix</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>substitute_+_by_00_preference</string>
<key>Title</key>
<string>Substitue + by 00</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<string>udp</string>
<key>Key</key>
<string>transport_preference</string>
<key>Title</key>
<string>Transport</string>
<key>Titles</key>
<array>
<string>udp</string>
<string>tcp</string>
<string>tls</string>
</array>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Values</key>
<array>
<string>udp</string>
<string>tcp</string>
<string>tls</string>
</array>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>enable_srtp_preference</string>
<key>Title</key>
<string>Secure rtp</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>backgroundmode_preference</string>
<key>Title</key>
<string>Background mode</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
</array>
</dict>
</plist>

View file

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>SIP account</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>FooterText</key>
<string>Linphone must be restarted for changes to take effect</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>username_preference</string>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>Title</key>
<string>User name</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<true/>
<key>Key</key>
<string>password_preference</string>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>Title</key>
<string>Password</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>domain_preference</string>
<key>KeyboardType</key>
<string>URL</string>
<key>Title</key>
<string>Domain</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>proxy_preference</string>
<key>KeyboardType</key>
<string>URL</string>
<key>Title</key>
<string>Proxy</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>outbound_proxy_preference</string>
<key>Title</key>
<string>Outbound proxy</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>File</key>
<string>audio</string>
<key>Title</key>
<string>Audio Codecs</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>File</key>
<string>video</string>
<key>Title</key>
<string>Video</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>File</key>
<string>Advanced</string>
<key>Title</key>
<string>Advanced</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
</dict>
</plist>

View file

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>Codecs</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>speex_16k_preference</string>
<key>Title</key>
<string>Speex 16Khz</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>speex_8k_preference</string>
<key>Title</key>
<string>Speex 8Khz</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>g722_preference</string>
<key>Title</key>
<string>G722</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>gsm_8k_preference</string>
<key>Title</key>
<string>GSM</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>ilbc_preference</string>
<key>Title</key>
<string>ILBC</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>pcmu_preference</string>
<key>Title</key>
<string>PCMU</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>pcma_preference</string>
<key>Title</key>
<string>PCMA</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
</array>
</dict>
</plist>

View file

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Enable video</string>
<key>Key</key>
<string>enable_video_preference</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Automatically start video</string>
<key>Key</key>
<string>start_video_preference</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Title</key>
<string>Codecs</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>vp8_preference</string>
<key>Title</key>
<string>VP8</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
</array>
</dict>
</plist>

@ -1 +1 @@
Subproject commit af32518af41f97caee07070234a3475409b9a27d
Subproject commit a70714c2e8a1f6f9958450cb612e3dc9895981e7