Merge branch 'master' into apple_store

[Switch submodule branch] (for polarssl)
This commit is contained in:
Guillaume BIENKOWSKI 2015-02-25 14:47:22 +01:00
commit b315d1297f
148 changed files with 1540 additions and 326 deletions

2
.gitignore vendored
View file

@ -5,3 +5,5 @@ liblinphone-sdk
liblinphone-iphone-sdk*.zip
xcuserdata/
Classes/LinphoneIOSVersion.h
Pods/
build

10
.gitmodules vendored
View file

@ -22,10 +22,10 @@
url = git://git.linphone.org/msamr.git
[submodule "submodules/externals/ffmpeg"]
path = submodules/externals/ffmpeg
url = git://git.videolan.org/ffmpeg
url = git://git.linphone.org/ffmpeg.git
[submodule "submodules/externals/x264"]
path = submodules/externals/x264
url = git://git.videolan.org/x264.git
url = git://git.linphone.org/x264.git
ignore = dirty
[submodule "submodules/msx264"]
path = submodules/msx264
@ -36,7 +36,7 @@
ignore = dirty
[submodule "submodules/bzrtp"]
path = submodules/bzrtp
url = git://git.linphone.org/bzrtp.git
url = git://git.linphone.org/bzrtp.git
[submodule "submodules/mssilk"]
path = submodules/mssilk
url = git://git.linphone.org/mssilk.git
@ -76,3 +76,7 @@
[submodule "submodules/mswebrtc"]
path = submodules/mswebrtc
url = git://git.linphone.org/mswebrtc.git
[submodule "Classes/KIF"]
path = Classes/KIF
url = https://github.com/kif-framework/KIF.git
branch = origin/v3.1.2

27
.travis.yml Normal file
View file

@ -0,0 +1,27 @@
language: objective-c
xcode_project: linphone.xcworkspace
xcode_scheme: linphone
git:
submodules: false
env:
global:
- VERSION="8.1"
- KIF_SCREENSHOTS="${TRAVIS_BUILD_DIR}/Screenshots"
install:
- cd submodules/build
- make download-sdk
- cd ../..
- pod install
- ls -la
script:
- export KIF_SCREENSHOTS=$TRAVIS_BUILD_DIR/Screenshots
- mkdir -p "$KIF_SCREENSHOTS"
- echo $KIF_SCREENSHOTS
- xcodebuild -scheme linphone -workspace linphone.xcworkspace -sdk iphonesimulator8.1 test
after_failure:
- ls -la $KIF_SCREENSHOTS

View file

@ -1,6 +1,5 @@
[main]
host = https://www.transifex.com
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,sv_SE:sv-rSE,kn_IN:kn-rIN,nl_NL:nl-rNL,en_NL:en-rNL
minimum_perc = 1
[linphone-ios.localizablestrings]

View file

@ -47,7 +47,7 @@
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="avatar_unknown_small.png" id="41" userLabel="avatarImage">
<rect key="frame" x="20" y="6" width="65" height="65"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's avatar">
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
@ -55,7 +55,7 @@
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Contact1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="40" userLabel="addressLabel">
<rect key="frame" x="101" y="37" width="199" height="43"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's name">
<accessibility key="accessibilityConfiguration" label="Contact name">
<accessibilityTraits key="traits" none="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
@ -174,6 +174,9 @@
<rect key="frame" x="39" y="12" width="218" height="33"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<accessibility key="accessibilityConfiguration" label="Message field">
<bool key="isElement" value="YES"/>
</accessibility>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>

View file

@ -102,7 +102,7 @@
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="avatar_unknown_small.png" id="23" userLabel="avatarImage">
<rect key="frame" x="20" y="6" width="65" height="65"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's avatar">
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
@ -110,7 +110,7 @@
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Contact1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="25" userLabel="addressLabel">
<rect key="frame" x="101" y="37" width="192" height="43"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's name"/>
<accessibility key="accessibilityConfiguration" label="Contact name"/>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>

View file

@ -44,7 +44,7 @@
<label autoresizesSubviews="NO" opaque="NO" userInteractionEnabled="NO" tag="5" contentMode="left" text="0102030405" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="9" userLabel="addressLabel">
<rect key="frame" x="10" y="53" width="300" height="51"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's name"/>
<accessibility key="accessibilityConfiguration" label="Contact name"/>
<fontDescription key="fontDescription" type="system" pointSize="30"/>
<color key="textColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
<nil key="highlightedColor"/>
@ -56,7 +56,7 @@
<imageView userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" image="avatar_unknown.png" id="19" userLabel="avatarImage">
<rect key="frame" x="80" y="113" width="160" height="170"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's avatar">
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>

View file

@ -45,7 +45,7 @@
<label autoresizesSubviews="NO" opaque="NO" userInteractionEnabled="NO" tag="5" contentMode="left" text="0102030405" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="9" userLabel="addressLabel">
<rect key="frame" x="10" y="53" width="748" height="51"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's name"/>
<accessibility key="accessibilityConfiguration" label="Contact name"/>
<fontDescription key="fontDescription" type="system" pointSize="30"/>
<color key="textColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
<nil key="highlightedColor"/>
@ -57,7 +57,7 @@
<imageView userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" image="avatar_unknown.png" id="19" userLabel="avatarImage">
<rect key="frame" x="304" y="113" width="160" height="170"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's avatar">
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
@ -136,7 +136,7 @@
<label autoresizesSubviews="NO" opaque="NO" userInteractionEnabled="NO" tag="5" contentMode="left" text="0102030405" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="69" userLabel="addressLabel">
<rect key="frame" x="10" y="53" width="1004" height="51"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's name"/>
<accessibility key="accessibilityConfiguration" label="Contact name"/>
<fontDescription key="fontDescription" type="system" pointSize="30"/>
<color key="textColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
<nil key="highlightedColor"/>
@ -148,7 +148,7 @@
<imageView userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" image="avatar_unknown.png" id="71" userLabel="avatarImage">
<rect key="frame" x="432" y="113" width="160" height="170"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's avatar">
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>

View file

@ -135,7 +135,7 @@
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="Kbn-dL-C5h" userLabel="remoteProvisioningButton" customClass="UILinphoneButton">
<rect key="frame" x="34" y="327" width="255" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Sign in SIP account">
<accessibility key="accessibilityConfiguration" label="Remote provisioning">
<bool key="isElement" value="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>

View file

@ -48,6 +48,7 @@
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.tableView.accessibilityIdentifier = @"Chat list";
[self reloadData];
}

View file

@ -298,6 +298,7 @@ static UICompositeViewDescription *compositeDescription = nil;
ms_free(address);
}
[addressLabel setText:displayName];
[addressLabel setAccessibilityValue:displayName];
// Avatar
if(image == nil) {

View file

@ -38,11 +38,11 @@
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.tableView.accessibilityIdentifier = @"ChatRoom list";
[self loadData];
}

View file

@ -25,6 +25,15 @@
#import "UIContactDetailsHeader.h"
#import "UIContactDetailsFooter.h"
typedef enum _ContactSections {
ContactSections_None = 0,
ContactSections_Number,
ContactSections_Sip,
ContactSections_Email,
ContactSections_MAX
} ContactSections_e;
@interface ContactDetailsTableViewController : UITableViewController<ContactDetailsLabelViewDelegate, UITextFieldDelegate> {
@private
NSMutableArray *dataCache;

View file

@ -55,14 +55,6 @@
@implementation ContactDetailsTableViewController
typedef enum _ContactSections {
ContactSections_None = 0,
ContactSections_Number,
ContactSections_Sip,
ContactSections_Email,
ContactSections_MAX
} ContactSections_e;
static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSections_None, ContactSections_Number, ContactSections_Sip, ContactSections_Email};
@synthesize footerController;
@ -124,6 +116,8 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
[super viewDidLoad];
[headerController view]; // Force view load
[footerController view]; // Force view load
self.tableView.accessibilityIdentifier = @"Contact numbers table";
}
- (void)viewDidDisappear:(BOOL)animated {

View file

@ -225,7 +225,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
} else {
[editButton setHidden:TRUE];
}
}
}
#pragma mark - UICompositeViewDelegate Functions

View file

@ -176,11 +176,12 @@ static int ms_strcmpfuz(const char * fuzzy_word, const char * sentence) {
if ([ContactSelection getNameOrEmailFilter] == nil ||
(ms_strcmpfuz([[[ContactSelection getNameOrEmailFilter] lowercaseString] UTF8String], [[name lowercaseString] UTF8String]) == 0)) {
//Get first char. However translate them to ASCII first, because foreign languages (spanish) use tildes for instance
NSString *firstCharUTF8 = [[name substringToIndex:1] uppercaseString];
NSData *data = [firstCharUTF8 dataUsingEncoding:NSASCIIStringEncoding
allowLossyConversion:YES];
NSString *firstChar = [[[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding] autorelease];
//Sort contacts by first letter. We need to translate the name to ASCII first, because of UTF-8 issues. For instance
// we expect order: Alberta(A tilde) before ASylvano.
NSData *name2ASCIIdata = [name dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *name2ASCII = [[[NSString alloc] initWithData:name2ASCIIdata encoding:NSASCIIStringEncoding] autorelease];
NSString *firstChar = [[name2ASCII substringToIndex:1] uppercaseString];
// Put in correct subDic
if([firstChar characterAtIndex:0] < 'A' || [firstChar characterAtIndex:0] > 'Z') {
firstChar = @"#";
@ -190,7 +191,7 @@ static int ms_strcmpfuz(const char * fuzzy_word, const char * sentence) {
subDic = [[[OrderedDictionary alloc] init] autorelease];
[addressBookMap insertObject:subDic forKey:firstChar selector:@selector(caseInsensitiveCompare:)];
}
[subDic insertObject:lPerson forKey:name selector:@selector(caseInsensitiveCompare:)];
[subDic insertObject:lPerson forKey:name2ASCII selector:@selector(caseInsensitiveCompare:)];
}
}
if(lLocalizedlOrganization != nil)

View file

@ -27,7 +27,7 @@
#import "UITransferButton.h"
#import "UIDigitButton.h"
@interface DialerViewController : UIViewController <UITextFieldDelegate, UICompositeViewDelegate> {
@interface DialerViewController : UIViewController <UITextFieldDelegate, UICompositeViewDelegate, MFMailComposeViewControllerDelegate> {
}
- (void)setAddress:(NSString*)address;

View file

@ -22,6 +22,7 @@
#import "DialerViewController.h"
#import "IncallViewController.h"
#import "DTAlertView.h"
#import "LinphoneManager.h"
#import "PhoneMainView.h"
#import "Utils.h"
@ -276,6 +277,89 @@ static UICompositeViewDescription *compositeDescription = nil;
}
}
#pragma mark - Debug Functions
-(void)presentMailViewWithTitle:(NSString*)subject forRecipients:(NSArray*)recipients attachLogs:(BOOL)attachLogs {
if( [MFMailComposeViewController canSendMail] ){
MFMailComposeViewController* controller = [[MFMailComposeViewController alloc] init];
if( controller ){
controller.mailComposeDelegate = self;
[controller setSubject:subject];
[controller setToRecipients:recipients];
if( attachLogs ){
char * filepath = linphone_core_compress_log_collection([LinphoneManager getLc]);
if (filepath == NULL) {
Linphone_err(@"Cannot sent logs: file is NULL");
return;
}
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
NSString *filename = [appName stringByAppendingString:@".gz"];
NSString *mimeType = @"text/plain";
if ([filename hasSuffix:@".gz"]) {
mimeType = @"application/gzip";
filename = [appName stringByAppendingString:@".gz"];
} else {
Linphone_err(@"Unknown extension type: %@, cancelling email", filename);
return;
}
[controller setMessageBody:NSLocalizedString(@"Application logs", nil) isHTML:NO];
[controller addAttachmentData:[NSData dataWithContentsOfFile:[NSString stringWithUTF8String:filepath]] mimeType:mimeType fileName:filename];
ms_free(filepath);
}
self.modalPresentationStyle = UIModalPresentationPageSheet;
[self.view.window.rootViewController presentViewController:controller animated:TRUE completion:^{}];
[controller release];
}
} else {
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:subject
message:NSLocalizedString(@"Error: no mail account configured", nil)
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", nil)
otherButtonTitles: nil];
[alert show];
[alert release];
}
}
- (BOOL)displayDebugPopup:(NSString*)address {
LinphoneManager* mgr = [LinphoneManager instance];
NSString* debugAddress = [mgr lpConfigStringForKey:@"debug_popup_magic" withDefault:@""];
if( ![debugAddress isEqualToString:@""] && [address isEqualToString:debugAddress]){
DTAlertView* alertView = [[DTAlertView alloc] initWithTitle:NSLocalizedString(@"Debug", nil)
message:NSLocalizedString(@"Choose an action", nil)];
[alertView addCancelButtonWithTitle:NSLocalizedString(@"Cancel", nil) block:nil];
[alertView addButtonWithTitle:NSLocalizedString(@"Send logs", nil) block:^{
NSString* appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
NSString* logsAddress = [mgr lpConfigStringForKey:@"debug_popup_email" withDefault:@"linphone-ios@linphone.org"];
[self presentMailViewWithTitle:appName forRecipients:@[logsAddress] attachLogs:true];
}];
BOOL debugEnabled = [[LinphoneManager instance] lpConfigBoolForKey:@"debugenable_preference"];
NSString* actionLog = (debugEnabled ? NSLocalizedString(@"Disable logs", nil) : NSLocalizedString(@"Enable logs", nil));
[alertView addButtonWithTitle:actionLog block:^{
// enable / disable
BOOL enableDebug = ![mgr lpConfigBoolForKey:@"debugenable_preference"];
[mgr lpConfigSetBool:enableDebug forKey:@"debugenable_preference"];
[mgr setLogsEnabled:enableDebug];
}];
[alertView show];
[alertView release];
return true;
}
return false;
}
#pragma mark -
- (void)callUpdate:(LinphoneCall*)call state:(LinphoneCallState)state {
@ -339,6 +423,13 @@ static UICompositeViewDescription *compositeDescription = nil;
return YES;
}
#pragma mark - MFComposeMailDelegate
-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
[controller dismissViewControllerAnimated:TRUE completion:^{}];
[self.navigationController setNavigationBarHidden:TRUE animated:FALSE];
}
#pragma mark - Action Functions
@ -359,6 +450,9 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (IBAction)onAddressChange: (id)sender {
if( [self displayDebugPopup:self.addressField.text] ){
self.addressField.text = @"";
}
if([[addressField text] length] > 0) {
[addContactButton setEnabled:TRUE];
[eraseButton setEnabled:TRUE];

View file

@ -190,7 +190,7 @@ static UICompositeViewDescription *compositeDescription = nil;
,linphone_proxy_config_get_domain(proxyCfg));
linphone_core_add_auth_info([LinphoneManager getLc], auth_info);
linphone_core_add_proxy_config([LinphoneManager getLc], proxyCfg);
linphone_core_set_default_proxy([LinphoneManager getLc], proxyCfg);
linphone_core_set_default_proxy_config([LinphoneManager getLc], proxyCfg);
[self.waitView setHidden:false];
};
}

1
Classes/KIF Submodule

@ -0,0 +1 @@
Subproject commit 6a21291a3b6653304be63eeaca8a0edfeb01d7c6

View file

@ -172,24 +172,29 @@
UIApplication* app= [UIApplication sharedApplication];
UIApplicationState state = app.applicationState;
if( [app respondsToSelector:@selector(registerUserNotificationSettings:)] ){
/* iOS8 notifications can be actioned! Awesome: */
UIUserNotificationType notifTypes = UIUserNotificationTypeBadge|UIUserNotificationTypeSound|UIUserNotificationTypeAlert;
NSSet* categories = [NSSet setWithObjects:[self getCallNotificationCategory], [self getMessageNotificationCategory], nil];
UIUserNotificationSettings* userSettings = [UIUserNotificationSettings settingsForTypes:notifTypes categories:categories];
[app registerUserNotificationSettings:userSettings];
[app registerForRemoteNotifications];
} else {
NSUInteger notifTypes = UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeNewsstandContentAvailability;
[app registerForRemoteNotificationTypes:notifTypes];
}
LinphoneManager* instance = [LinphoneManager instance];
BOOL background_mode = [instance lpConfigBoolForKey:@"backgroundmode_preference"];
BOOL start_at_boot = [instance lpConfigBoolForKey:@"start_at_boot_preference"];
if( !instance.isTesting ){
if( [app respondsToSelector:@selector(registerUserNotificationSettings:)] ){
/* iOS8 notifications can be actioned! Awesome: */
UIUserNotificationType notifTypes = UIUserNotificationTypeBadge|UIUserNotificationTypeSound|UIUserNotificationTypeAlert;
NSSet* categories = [NSSet setWithObjects:[self getCallNotificationCategory], [self getMessageNotificationCategory], nil];
UIUserNotificationSettings* userSettings = [UIUserNotificationSettings settingsForTypes:notifTypes categories:categories];
[app registerUserNotificationSettings:userSettings];
[app registerForRemoteNotifications];
} else {
NSUInteger notifTypes = UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeNewsstandContentAvailability;
[app registerForRemoteNotificationTypes:notifTypes];
}
} else {
NSLog(@"No remote push for testing");
}
if (state == UIApplicationStateBackground)
{
@ -342,13 +347,13 @@
{
[[LinphoneManager instance] acceptCallForCallId:[notification.userInfo objectForKey:@"callId"]];
}
} else if([notification.userInfo objectForKey:@"from"] != nil) {
NSString *remoteContact = (NSString*)[notification.userInfo objectForKey:@"from"];
} else if([notification.userInfo objectForKey:@"from_addr"] != nil) {
NSString *remoteContact = (NSString*)[notification.userInfo objectForKey:@"from_addr"];
// Go to ChatRoom view
[[PhoneMainView instance] changeCurrentView:[ChatViewController compositeViewDescription]];
LinphoneChatRoom*room = [self findChatRoomForContact:remoteContact];
ChatRoomViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[ChatRoomViewController compositeViewDescription] push:TRUE], ChatRoomViewController);
if(controller != nil) {
LinphoneChatRoom*room = [self findChatRoomForContact:remoteContact];
if(controller != nil && room != nil) {
[controller setChatRoom:room];
}
} else if([notification.userInfo objectForKey:@"callLog"] != nil) {
@ -423,7 +428,7 @@
// use the standard handler
[self application:application didReceiveLocalNotification:notification];
} else if( [identifier isEqualToString:@"mark_read"] ){
NSString* from = [notification.userInfo objectForKey:@"from"];
NSString* from = [notification.userInfo objectForKey:@"from_addr"];
LinphoneChatRoom* room = linphone_core_get_or_create_chat_room(lc, [from UTF8String]);
if( room ){
linphone_chat_room_mark_as_read(room);
@ -472,7 +477,6 @@
otherButtonTitles:nil];
[error show];
[error release];
}
}

View file

@ -200,7 +200,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
switch(menc){
case LinphoneMediaEncryptionSRTP: val="SRTP"; break;
case LinphoneMediaEncryptionZRTP: val="ZRTP"; break;
default: val="None"; break;
case LinphoneMediaEncryptionDTLS: val="DTLS"; break;
case LinphoneMediaEncryptionNone: val="None"; break;
}
[self setString:val forKey:@"media_encryption_preference"];
}
@ -438,7 +439,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
} else {
// was a new proxy config, add it
linphone_core_add_proxy_config(lc, proxyCfg);
linphone_core_set_default_proxy(lc,proxyCfg);
linphone_core_set_default_proxy_config(lc,proxyCfg);
}
bad_proxy:
@ -573,6 +574,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionSRTP);
else if (menc && [menc compare:@"ZRTP"] == NSOrderedSame)
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionZRTP);
else if (menc && [menc compare:@"DTLS"] == NSOrderedSame)
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionDTLS);
else
linphone_core_set_media_encryption(lc, LinphoneMediaEncryptionNone);

View file

@ -157,6 +157,7 @@ typedef struct _LinphoneManagerSounds {
+ (BOOL)copyFile:(NSString*)src destination:(NSString*)dst override:(BOOL)override;
+ (NSString*)bundleFile:(NSString*)file;
+ (NSString*)documentFile:(NSString*)file;
+ (NSString*)cacheDirectory;
- (void)acceptCall:(LinphoneCall *)call;
- (void)call:(NSString *)address displayName:(NSString*)displayName transfer:(BOOL)transfer;
@ -180,6 +181,7 @@ typedef struct _LinphoneManagerSounds {
- (BOOL)lpConfigBoolForKey:(NSString*)key forSection:(NSString*)section;
- (void)silentPushFailed:(NSTimer*)timer;
@property (readonly) BOOL isTesting;
@property (readonly) FastAddressBook* fastAddressBook;
@property Connectivity connectivity;
@property (readonly) NetworkType network;

View file

@ -28,6 +28,7 @@
#import <SystemConfiguration/SystemConfiguration.h>
#import <CoreTelephony/CTCallCenter.h>
#import <SystemConfiguration/CaptiveNetwork.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import "LinphoneManager.h"
#import "LinphoneCoreSettingsStore.h"
@ -200,6 +201,12 @@ struct codec_name_pref_table codec_pref_table[]={
#endif
}
+ (BOOL)isRunningTests {
NSDictionary *environment = [[NSProcessInfo processInfo] environment];
NSString *injectBundle = environment[@"XCInjectBundle"];
return [[injectBundle pathExtension] isEqualToString:@"xctest"];
}
+ (BOOL)isNotIphone3G
{
static BOOL done=FALSE;
@ -278,6 +285,7 @@ struct codec_name_pref_table codec_pref_table[]={
[self copyDefaultSettings];
pushCallIDs = [[NSMutableArray alloc] init ];
photoLibrary = [[ALAssetsLibrary alloc] init];
self->_isTesting = [LinphoneManager isRunningTests];
NSString* factoryConfig = [LinphoneManager bundleFile:[LinphoneManager runningOnIpad]?@"linphonerc-factory~ipad":@"linphonerc-factory"];
NSString *confiFileName = [LinphoneManager documentFile:@".linphonerc"];
@ -315,6 +323,14 @@ struct codec_name_pref_table codec_pref_table[]={
[super dealloc];
}
- (void)silentPushFailed:(NSTimer*)timer
{
if( silentPushCompletion ){
[LinphoneLogger log:LinphoneLoggerLog format:@"silentPush failed, silentPushCompletion block: %p", silentPushCompletion ];
silentPushCompletion(UIBackgroundFetchResultNoData);
silentPushCompletion = nil;
}
}
#pragma mark - Database Functions
@ -569,10 +585,9 @@ static void linphone_iphone_log(struct _LinphoneCore * lc, const char * message)
- (void)displayStatus:(NSString*) message {
// Post event
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
message, @"message",
nil];
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneDisplayStatusUpdate object:self userInfo:dict];
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneDisplayStatusUpdate
object:self
userInfo:@{@"message":message}];
}
@ -772,10 +787,9 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
[self setupGSMInteraction];
}
// Post event
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSValue valueWithPointer:call], @"call",
[NSNumber numberWithInt:state], @"state",
[NSString stringWithUTF8String:message], @"message", nil];
NSDictionary* dict = @{@"call": [NSValue valueWithPointer:call],
@"state": [NSNumber numberWithInt:state],
@"message":[NSString stringWithUTF8String:message]};
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneCallUpdate object:self userInfo:dict];
}
@ -881,6 +895,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
const LinphoneAddress* remoteAddress = linphone_chat_message_get_from_address(msg);
char* c_address = linphone_address_as_string_uri_only(remoteAddress);
NSString* address = [NSString stringWithUTF8String:c_address];
NSString* remote_uri = [NSString stringWithUTF8String:c_address];
const char* call_id = linphone_chat_message_get_custom_header(msg, "Call-ID");
NSString* callID = [NSString stringWithUTF8String:call_id];
@ -912,7 +927,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
notif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"IM_MSG",nil), address];
notif.alertAction = NSLocalizedString(@"Show", nil);
notif.soundName = @"msg.caf";
notif.userInfo = @{@"from":address, @"call-id":callID};
notif.userInfo = @{@"from":address, @"from_addr":remote_uri, @"call-id":callID};
[[UIApplication sharedApplication] presentLocalNotificationNow:notif];
}
@ -1190,18 +1205,30 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
- (NetworkType)network {
UIApplication *app = [UIApplication sharedApplication];
NSArray *subviews = [[[app valueForKey:@"statusBar"] valueForKey:@"foregroundView"] subviews];
NSNumber *dataNetworkItemView = nil;
if( [[[UIDevice currentDevice] systemVersion] floatValue] < 7 ){
UIApplication *app = [UIApplication sharedApplication];
NSArray *subviews = [[[app valueForKey:@"statusBar"] valueForKey:@"foregroundView"] subviews];
NSNumber *dataNetworkItemView = nil;
for (id subview in subviews) {
if([subview isKindOfClass:[NSClassFromString(@"UIStatusBarDataNetworkItemView") class]]) {
dataNetworkItemView = subview;
break;
for (id subview in subviews) {
if([subview isKindOfClass:[NSClassFromString(@"UIStatusBarDataNetworkItemView") class]]) {
dataNetworkItemView = subview;
break;
}
}
NSNumber *number = (NSNumber*)[dataNetworkItemView valueForKey:@"dataNetworkType"];
return [number intValue];
} else {
CTTelephonyNetworkInfo* info = [[CTTelephonyNetworkInfo alloc] init];
NSString* currentRadio = info.currentRadioAccessTechnology;
if( [currentRadio isEqualToString:CTRadioAccessTechnologyEdge]){
return network_2g;
} else if ([currentRadio isEqualToString:CTRadioAccessTechnologyLTE]){
return network_4g;
}
return network_3g;
}
NSNumber *number = (NSNumber*)[dataNetworkItemView valueForKey:@"dataNetworkType"];
return [number intValue];
}
@ -1432,14 +1459,8 @@ static BOOL libStarted = FALSE;
libmsbcg729_init(); // load g729 plugin
#endif
/*to make sure we don't loose debug trace*/
if ([self lpConfigBoolForKey:@"debugenable_preference"]) {
linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
/*must be done before creating linphone core to get its traces too*/
}
linphone_core_set_log_collection_path([[LinphoneManager cacheDirectory] UTF8String]);
linphone_core_enable_log_collection([self lpConfigBoolForKey:@"debugenable_preference"]);
[self setLogsEnabled:[self lpConfigBoolForKey:@"debugenable_preference"]];
theLinphoneCore = linphone_core_new_with_config (&linphonec_vtable
@ -1451,7 +1472,8 @@ static BOOL libStarted = FALSE;
/* set the CA file no matter what, since the remote provisioning could be hitting an HTTPS server */
const char* lRootCa = [[LinphoneManager bundleFile:@"rootca.pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_root_ca(theLinphoneCore, lRootCa);
linphone_core_set_user_certificates_path(theLinphoneCore,[[LinphoneManager cacheDirectory] UTF8String]);
/* The core will call the linphone_iphone_configuring_status_changed callback when the remote provisioning is loaded (or skipped).
Wait for this to finish the code configuration */
@ -2052,10 +2074,12 @@ static void audioRouteChangeListenerCallback (
-(void)setLogsEnabled:(BOOL)enabled {
if (enabled) {
NSLog(@"Enabling debug logs");
linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
linphone_core_enable_log_collection(enabled);
} else {
NSLog(@"Disabling debug logs");
linphone_core_enable_log_collection(enabled);
linphone_core_disable_logs();
}
@ -2151,17 +2175,8 @@ static void audioRouteChangeListenerCallback (
- (BOOL)lpConfigBoolForKey:(NSString*)key forSection:(NSString *)section {
return [self lpConfigIntForKey:key forSection:section] == 1;
}
- (void)silentPushFailed:(NSTimer*)timer
{
if( silentPushCompletion ){
[LinphoneLogger log:LinphoneLoggerLog format:@"silentPush failed, silentPushCompletion block: %p", silentPushCompletion ];
silentPushCompletion(UIBackgroundFetchResultNoData);
silentPushCompletion = nil;
}
}
#pragma GSM management
#pragma mark - GSM management
-(void) removeCTCallCenterCb {
if (mCallCenter != nil) {

View file

@ -59,7 +59,7 @@
<rect key="frame" x="80" y="0.0" width="160" height="170"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<accessibility key="accessibilityConfiguration" label="Contact's avatar">
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
@ -364,7 +364,7 @@
<label autoresizesSubviews="NO" opaque="NO" userInteractionEnabled="NO" contentMode="left" text="0102030405" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="17" userLabel="addressLabel">
<rect key="frame" x="95" y="0.0" width="125" height="51"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's name">
<accessibility key="accessibilityConfiguration" label="Contact name">
<accessibilityTraits key="traits" none="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="30"/>

View file

@ -45,6 +45,7 @@
<rect key="frame" x="-8" y="-11" width="310" height="126"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<accessibility key="accessibilityConfiguration" label="Chat Message"/>
<color key="textColor" red="0.35686275360000003" green="0.3960784376" blue="0.43529412150000002" alpha="1" colorSpace="deviceRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
@ -79,10 +80,14 @@
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="chat_message_not_delivered.png" id="26" userLabel="status">
<rect key="frame" x="284" y="104" width="10" height="10"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<accessibility key="accessibilityConfiguration" label="Message status">
<bool key="isElement" value="YES"/>
</accessibility>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="18" userLabel="deleteButton">
<rect key="frame" x="250" y="0.0" width="44" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Delete message"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="imageEdgeInsets" minX="20" minY="2" maxX="2" maxY="20"/>
<state key="normal" image="list_delete_default.png">

View file

@ -31,7 +31,7 @@
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="22" userLabel="avatarButton">
<rect key="frame" x="20" y="6" width="65" height="65"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's avatar">
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
@ -53,7 +53,7 @@
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Contact1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="8" userLabel="addressLabel">
<rect key="frame" x="0.0" y="37" width="199" height="43"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact's name"/>
<accessibility key="accessibilityConfiguration" label="Contact name"/>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIMainBar">
@ -141,7 +141,7 @@
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="26"/>
</connections>
</button>
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="37" userLabel="chatNotificationView">
<view autoresizesSubviews="NO" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="37" userLabel="chatNotificationView">
<rect key="frame" x="235" y="0.0" width="21" height="21"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="history_notification.png" translatesAutoresizingMaskIntoConstraints="NO" id="39" userLabel="chatNotificationImage">

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="5056" systemVersion="13C1021" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="6254" systemVersion="14B25" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1536" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIMainBar">
@ -51,7 +51,7 @@
<action selector="onHistoryClick:" destination="-1" eventType="touchUpInside" id="58"/>
</connections>
</button>
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="2" contentMode="scaleToFill" id="4" userLabel="historyNotificationView">
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="2" contentMode="scaleToFill" id="4" userLabel="historyNotificationView">
<rect key="frame" x="144" y="1" width="21" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
@ -146,8 +146,8 @@
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="56"/>
</connections>
</button>
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" id="3" userLabel="chatNotificationView">
<rect key="frame" x="428" y="1" width="21" height="21"/>
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" id="3" userLabel="chatNotificationView">
<rect key="frame" x="564" y="1" width="21" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="history_notification.png" id="13" userLabel="chatNotificationImage">
@ -169,6 +169,8 @@
</view>
</subviews>
<color key="backgroundColor" red="0.0" green="1" blue="0.19194547549999999" alpha="0.0" colorSpace="calibratedRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
<view autoresizesSubviews="NO" contentMode="scaleToFill" id="28" userLabel="Landscape View">
<rect key="frame" x="0.0" y="0.0" width="1024" height="86"/>
@ -196,7 +198,7 @@
<color key="titleColor" red="0.72549019609999998" green="0.76862745099999996" blue="0.79607843140000001" alpha="1" colorSpace="deviceRGB"/>
</state>
</button>
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="2" contentMode="scaleToFill" id="36" userLabel="historyNotificationView">
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="2" contentMode="scaleToFill" id="36" userLabel="historyNotificationView">
<rect key="frame" x="209" y="1" width="21" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
@ -276,8 +278,8 @@
<color key="titleColor" red="0.72549019609999998" green="0.76862745099999996" blue="0.79607843140000001" alpha="1" colorSpace="deviceRGB"/>
</state>
</button>
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" id="29" userLabel="chatNotificationView">
<rect key="frame" x="558" y="1" width="21" height="21"/>
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" id="29" userLabel="chatNotificationView">
<rect key="frame" x="755" y="8" width="21" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="history_notification.png" id="40" userLabel="chatNotificationImage">
@ -296,6 +298,8 @@
</view>
</subviews>
<color key="backgroundColor" red="0.0" green="1" blue="0.19194547549999999" alpha="0.0" colorSpace="calibratedRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
<resources>
@ -328,4 +332,9 @@
<image name="settings_selected.png" width="353" height="153"/>
<image name="settings_selected_landscape.png" width="480" height="171"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>

View file

@ -197,17 +197,21 @@ static UIFont *CELL_FONT = nil;
[dateFormatter release];
LinphoneChatMessageState state = linphone_chat_message_get_state(chat);
BOOL outgoing = linphone_chat_message_is_outgoing(chat);
if( !linphone_chat_message_is_outgoing(chat) ){
if( !outgoing ){
statusImage.hidden = TRUE; // not useful for incoming chats..
} else if (state== LinphoneChatMessageStateInProgress) {
[statusImage setImage:[UIImage imageNamed:@"chat_message_inprogress.png"]];
[statusImage setAccessibilityValue:@"in progress"];
statusImage.hidden = FALSE;
} else if (state == LinphoneChatMessageStateDelivered) {
[statusImage setImage:[UIImage imageNamed:@"chat_message_delivered.png"]];
[statusImage setAccessibilityValue:@"delivered"];
statusImage.hidden = FALSE;
} else {
[statusImage setImage:[UIImage imageNamed:@"chat_message_not_delivered.png"]];
[statusImage setAccessibilityValue:@"not delivered"];
statusImage.hidden = FALSE;
NSAttributedString* resend_text = [[NSAttributedString alloc]
@ -216,6 +220,13 @@ static UIFont *CELL_FONT = nil;
[dateLabel setAttributedText:resend_text];
[resend_text release];
}
if( outgoing){
[messageText setAccessibilityLabel:@"Outgoing message"];
} else {
[messageText setAccessibilityLabel:@"Incoming message"];
}
}
- (void)setEditing:(BOOL)editing {

View file

@ -70,7 +70,7 @@
[self setHighlighted:false animated:true];
}
- (NSString *)accessibilityValue {
- (NSString *)accessibilityLabel {
return [NSString stringWithFormat:@"%@ %@", firstNameLabel.text, lastNameLabel.text];
}

View file

@ -94,6 +94,7 @@
[normalView setAlpha:1.0f];
[editView setAlpha:0.0f];
[tableView setEditing:TRUE animated:false];
tableView.accessibilityIdentifier = @"Contact Name Table";
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -325,6 +325,7 @@ static RootViewManager* rootViewManagerInstance = nil;
switch (state) {
case LinphoneCallIncomingReceived:
case LinphoneCallIncomingEarlyMedia:
{
[self displayIncomingCall:call];
break;
@ -407,15 +408,17 @@ static RootViewManager* rootViewManagerInstance = nil;
LinphoneCore* core = nil;
@try {
core = [LinphoneManager getLc];
LinphoneManager* lm = [LinphoneManager instance];
if( linphone_core_get_global_state(core) != LinphoneGlobalOn ){
[self changeCurrentView: [DialerViewController compositeViewDescription]];
} else if ([[LinphoneManager instance] lpConfigBoolForKey:@"enable_first_login_view_preference"] == true) {
// Change to fist login view
[self changeCurrentView: [FirstLoginViewController compositeViewDescription]];
} else {
// always start to dialer when testing
// Change to default view
const MSList *list = linphone_core_get_proxy_config_list(core);
if(list != NULL || ([[LinphoneManager instance] lpConfigBoolForKey:@"hide_wizard_preference"] == true)) {
if(list != NULL || ([lm lpConfigBoolForKey:@"hide_wizard_preference"] == true) || lm.isTesting) {
[self changeCurrentView: [DialerViewController compositeViewDescription]];
} else {
WizardViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[WizardViewController compositeViewDescription]], WizardViewController);

View file

@ -32,6 +32,8 @@
#import "IASKTextField.h"
#include "linphone/lpconfig.h"
#import "DTAlertView.h"
#ifdef DEBUG
@interface UIDevice (debug)
@ -562,6 +564,14 @@ static UICompositeViewDescription *compositeDescription = nil;
[values removeObject:@"SRTP"];
[dict setObject:values forKey:@"Values"];
}
if(!linphone_core_media_encryption_supported([LinphoneManager getLc], LinphoneMediaEncryptionDTLS)) {
NSMutableArray *titles = [NSMutableArray arrayWithArray:[dict objectForKey:@"Titles"]];
[titles removeObject:@"DTLS"];
[dict setObject:titles forKey:@"Titles"];
NSMutableArray *values = [NSMutableArray arrayWithArray:[dict objectForKey:@"Values"]];
[values removeObject:@"DTLS"];
[dict setObject:values forKey:@"Values"];
}
return [[[IASKSpecifier alloc] initWithSpecifier:dict] autorelease];
}
@ -686,6 +696,7 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForSpecifier:(IASKSpecifier*)specifier {
NSString *key = [specifier.specifierDict objectForKey:kIASKKey];
LinphoneCore* lc = [LinphoneManager getLc];
#ifdef DEBUG
if([key isEqual:@"release_button"]) {
[UIApplication sharedApplication].keyWindow.rootViewController = nil;
@ -701,9 +712,7 @@ static UICompositeViewDescription *compositeDescription = nil;
}
#endif
if([key isEqual:@"wizard_button"]) {
LinphoneProxyConfig* proxy = NULL;
linphone_core_get_default_proxy([LinphoneManager getLc], &proxy);
if (proxy == NULL ) {
if (linphone_core_get_default_proxy_config(lc) == NULL ) {
[self goToWizard];
return;
}
@ -714,12 +723,30 @@ static UICompositeViewDescription *compositeDescription = nil;
otherButtonTitles:NSLocalizedString(@"Launch Wizard",nil), nil];
[alert show];
[alert release];
} else if([key isEqual:@"about_button"]) {
} else if ( [key isEqual:@"clear_proxy_button"] ) {
if ( linphone_core_get_default_proxy_config(lc) == NULL ) {
return;
}
DTAlertView* alert = [[DTAlertView alloc] initWithTitle:NSLocalizedString(@"Warning", nil) message:NSLocalizedString(@"Are you sure to want to clear your proxy setup?",nil)];
[alert addCancelButtonWithTitle:NSLocalizedString(@"Cancel", nil) block:nil];
[alert addButtonWithTitle:NSLocalizedString(@"Yes", nil)
block:^{
linphone_core_clear_proxy_config(lc);
linphone_core_clear_all_auth_info(lc);
[settingsStore transformLinphoneCoreToKeys];
[settingsController.tableView reloadData];
}];
[alert show];
[alert release];
} else if([key isEqual:@"about_button"]) {
[[PhoneMainView instance] changeCurrentView:[AboutViewController compositeViewDescription] push:TRUE];
} else if ([key isEqualToString:@"reset_logs_button"]) {
linphone_core_reset_log_collection();
} else if ([key isEqual:@"send_logs_button"]) {
char * filepath = linphone_core_compress_log_collection([LinphoneManager getLc]);
char * filepath = linphone_core_compress_log_collection(lc);
if (filepath == NULL) {
[LinphoneLogger log:LinphoneLoggerError format:@"Cannot sent logs: file is NULL"];
return;

View file

@ -210,7 +210,8 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
[addressBookMap setObject:lPerson forKey:lNormalizedKey];
CFRelease(lValue);
if (lLabel) CFRelease(lLabel);
if (lLocalizedLabel) CFRelease(lLocalizedLabel); }
if (lLocalizedLabel) CFRelease(lLocalizedLabel);
}
CFRelease(lMap);
}
}

View file

@ -514,7 +514,7 @@ static UICompositeViewDescription *compositeDescription = nil;
linphone_proxy_config_enable_register(proxyCfg, true);
linphone_core_add_auth_info([LinphoneManager getLc], info);
linphone_core_add_proxy_config([LinphoneManager getLc], proxyCfg);
linphone_core_set_default_proxy([LinphoneManager getLc], proxyCfg);
linphone_core_set_default_proxy_config([LinphoneManager getLc], proxyCfg);
}
- (NSString*)identityFromUsername:(NSString*)username {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more