Commit 3dcd0c7c authored by jehan's avatar jehan

use liblinphone-sdk multi arch

parent f686d430
......@@ -143,6 +143,7 @@
[cell.detailTextLabel setText:[NSString stringWithFormat:@"%s"/* [%s]"*/,username/*,callLogs->start_date*/]];
} else {
[cell.textLabel setText:[[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]]];
[cell.detailTextLabel setText:nil];
}
......@@ -170,8 +171,20 @@
}
const char* username = linphone_address_get_username(partyToCall)!=0?linphone_address_get_username(partyToCall):"";
const char* displayName = linphone_address_get_display_name(partyToCall)!=0?linphone_address_get_display_name(partyToCall):"";
const char* domain = linphone_address_get_domain(partyToCall);
LinphoneProxyConfig* proxyCfg;
linphone_core_get_default_proxy(myLinphoneCore,&proxyCfg);
NSString* phoneNumber;
if (proxyCfg && (strcmp(domain, linphone_proxy_config_get_domain(proxyCfg)) == 0)) {
phoneNumber = [[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]];
} else {
phoneNumber = [[NSString alloc] initWithCString:linphone_address_as_string_uri_only(partyToCall) encoding:[NSString defaultCStringEncoding]];
}
[self.phoneControllerDelegate
setPhoneNumber:[[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]]
setPhoneNumber: phoneNumber
withDisplayName:[[NSString alloc] initWithCString:displayName encoding:[NSString defaultCStringEncoding]]];
[self.linphoneDelegate selectDialerTab];
......
......@@ -10,8 +10,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="38"/>
<integer value="4"/>
<integer value="43"/>
<integer value="25"/>
<integer value="42"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -163,7 +163,7 @@
<object class="IBUIImageView" id="457821340">
<reference key="NSNextResponder" ref="869038871"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{23, 7}, {263, 154}}</string>
<string key="NSFrame">{{23, 11}, {263, 154}}</string>
<reference key="NSSuperview" ref="869038871"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
......@@ -171,7 +171,7 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">linphone.png</string>
<string key="NSResourceName">linphone-3-250x130.png</string>
</object>
</object>
<object class="IBUITextView" id="432332592">
......
......@@ -73,14 +73,15 @@
if (sender == call) {
if (!linphone_core_in_call(mCore)) {
LinphoneProxyConfig* proxyCfg;
//get default proxy
linphone_core_get_default_proxy(mCore,&proxyCfg);
if ([address.text length] == 0) return; //just return
if ([address.text hasPrefix:@"sip:"]) {
if ([address.text hasPrefix:@"sip:"] | proxyCfg==nil) {
linphone_core_invite(mCore, [address.text cStringUsingEncoding:[NSString defaultCStringEncoding]]);
} else {
char normalizedUserName[256];
LinphoneProxyConfig* proxyCfg;
//get default proxy
linphone_core_get_default_proxy(mCore,&proxyCfg);
NSString* toUserName = [NSString stringWithString:[address text]];
linphone_proxy_config_normalize_number(proxyCfg,[toUserName cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
LinphoneAddress* tmpAddress = linphone_address_new(linphone_core_get_identity(mCore));
......@@ -113,10 +114,6 @@
-(IBAction) doKeyPad:(id)sender {
if (!linphone_core_in_call(mCore)) {
//outcall behavior
//remove sip: if first digits
if ([address.text isEqualToString:@"sip:"]) {
[address setText:@""];
}
NSString* newAddress = nil;
if (sender == one) {
......@@ -150,7 +147,7 @@
newAddress = [address.text substringToIndex: [address.text length]-1];
}
} else {
NSLog(@"unknown event from diad pad");
ms_message(@"unknown event from diad pad");
return;
}
if (newAddress != nil) {
......@@ -196,7 +193,7 @@
selector:@selector(doKeyZeroLongPress)
object:nil];
} else {
NSLog(@"unknown up event from dial pad");
ms_message(@"unknown up event from dial pad");
}
}
......@@ -374,7 +371,7 @@
}
[peerLabel setText:@""];
[callDuration setText:@""];
break;
}
default:
......
......@@ -166,7 +166,7 @@ LinphoneCoreVTable linphonec_vtable = {
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
if (isStarted) {
NSLog(@"becomming active, make sure we are registered");
ms_message(@"becomming active, make sure we are registered");
[self doRegister];
} else {
isStarted=true;
......@@ -238,6 +238,11 @@ LinphoneCoreVTable linphonec_vtable = {
NSString* username = [[NSUserDefaults standardUserDefaults] stringForKey:@"username_preference"];
NSString* domain = [[NSUserDefaults standardUserDefaults] stringForKey:@"domain_preference"];
NSString* accountPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"];
//clear auth info list
linphone_core_clear_all_auth_info(myLinphoneCore);
//clear existing proxy config
linphone_core_clear_proxy_config(myLinphoneCore);
if (username && [username length] >0 && domain && [domain length]>0) {
......@@ -257,10 +262,6 @@ LinphoneCoreVTable linphonec_vtable = {
NSString* prefix = [[NSUserDefaults standardUserDefaults] stringForKey:@"prefix_preference"];
//possible valid config detected
LinphoneProxyConfig* proxyCfg;
//clear auth info list
linphone_core_clear_all_auth_info(myLinphoneCore);
//clear existing proxy config
linphone_core_clear_proxy_config(myLinphoneCore);
proxyCfg = linphone_proxy_config_new();
// add username password
......
......@@ -11,7 +11,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>linphone2.png</string>
<string>linphone2-57x57.png</string>
<key>CFBundleIdentifier</key>
<string>org.linphone.phone</string>
<key>CFBundleInfoDictionaryVersion</key>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment