diff --git a/Classes/CallDelegate.h b/Classes/CallDelegate.h index 516c2074d..4541e13b2 100644 --- a/Classes/CallDelegate.h +++ b/Classes/CallDelegate.h @@ -29,14 +29,14 @@ enum CallDelegateType { CD_TRANSFER_CALL }; -@protocol UIActionSheetCustomDelegate +@protocol CallActionSheetDelegate - (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType) type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void*) datas; @end @interface CallDelegate : NSObject { enum CallDelegateType eventType; LinphoneCall* call; - id delegate; + id delegate; NSTimer* timeout; } diff --git a/Classes/ContactsViewController.h b/Classes/ContactsViewController.h index f1244803b..2f6de1125 100644 --- a/Classes/ContactsViewController.h +++ b/Classes/ContactsViewController.h @@ -19,13 +19,18 @@ #import +#import "ContactTableViewController.h" + @interface ContactsViewController : UIViewController { - UITableViewController *tableController; + ContactTableViewController *tableController; + UITableView *tableView; + UIButton *allButton; UIButton *linphoneButton; } @property (nonatomic, retain) IBOutlet UITableViewController* tableController; +@property (nonatomic, retain) IBOutlet UITableView *tableView; @property (nonatomic, retain) IBOutlet UIButton* allButton; @property (nonatomic, retain) IBOutlet UIButton* linphoneButton; diff --git a/Classes/ContactsViewController.m b/Classes/ContactsViewController.m index 52ee33ce9..2512f2e1c 100644 --- a/Classes/ContactsViewController.m +++ b/Classes/ContactsViewController.m @@ -24,6 +24,8 @@ @implementation ContactsViewController @synthesize tableController; +@synthesize tableView; + @synthesize allButton; @synthesize linphoneButton; @@ -33,8 +35,12 @@ typedef enum _HistoryView { History_MAX } HistoryView; +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + [self.tableView reloadData]; +} -- (void) changeView: (HistoryView) view { +- (void)changeView: (HistoryView) view { if(view == History_All) { allButton.selected = TRUE; } else { @@ -48,16 +54,16 @@ typedef enum _HistoryView { } } -- (void) viewDidLoad { +- (void)viewDidLoad { [super viewDidLoad]; [self changeView: History_All]; } --(IBAction) onAllClick: (id) event { +- (IBAction)onAllClick: (id) event { [self changeView: History_All]; } --(IBAction) onLinphoneClick: (id) event { +- (IBAction)onLinphoneClick: (id) event { [self changeView: History_Linphone]; } diff --git a/Classes/ContactsViewController.xib b/Classes/ContactsViewController.xib index 6b12285d4..3739eab2e 100644 --- a/Classes/ContactsViewController.xib +++ b/Classes/ContactsViewController.xib @@ -156,7 +156,6 @@ {{0, 58}, {320, 402}} - _NS:10 3 @@ -167,7 +166,7 @@ NO IBCocoaTouchFramework 0.0 - 15 + 10 0.0 0.0 YES @@ -238,6 +237,14 @@ 83 + + + tableView + + + + 84 + onAllClick: @@ -374,7 +381,7 @@ - 83 + 84 @@ -407,6 +414,7 @@ UIButton UIButton UITableViewController + UITableView @@ -421,6 +429,10 @@ tableController UITableViewController + + tableView + UITableView + IBProjectSource diff --git a/Classes/DialerViewController.h b/Classes/DialerViewController.h new file mode 100644 index 000000000..80e2c7a93 --- /dev/null +++ b/Classes/DialerViewController.h @@ -0,0 +1,67 @@ +/* DialerViewController.h + * + * Copyright (C) 2009 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import + +#import "UILinphone.h" + +@interface DialerViewController : UIViewController { + +@private + //Buttons + UITextField* addressField; + UIEraseButton* eraseButton; + UICallButton* callButton; + + //Key pad + UIDigitButton* oneButton; + UIDigitButton* twoButton; + UIDigitButton* threeButton; + UIDigitButton* fourButton; + UIDigitButton* fiveButton; + UIDigitButton* sixButton; + UIDigitButton* sevenButton; + UIDigitButton* eightButton; + UIDigitButton* nineButton; + UIDigitButton* starButton; + UIDigitButton* zeroButton; + UIDigitButton* hashButton; +} + +- (void)setAddress:(NSString*) address; + +@property (nonatomic, retain) IBOutlet UITextField* addressField; +@property (nonatomic, retain) IBOutlet UIButton* callButton; +@property (nonatomic, retain) IBOutlet UIEraseButton* eraseButton; +@property (nonatomic, retain) IBOutlet UIButton* oneButton; +@property (nonatomic, retain) IBOutlet UIButton* twoButton; +@property (nonatomic, retain) IBOutlet UIButton* threeButton; +@property (nonatomic, retain) IBOutlet UIButton* fourButton; +@property (nonatomic, retain) IBOutlet UIButton* fiveButton; +@property (nonatomic, retain) IBOutlet UIButton* sixButton; +@property (nonatomic, retain) IBOutlet UIButton* sevenButton; +@property (nonatomic, retain) IBOutlet UIButton* eightButton; +@property (nonatomic, retain) IBOutlet UIButton* nineButton; +@property (nonatomic, retain) IBOutlet UIButton* starButton; +@property (nonatomic, retain) IBOutlet UIButton* zeroButton; +@property (nonatomic, retain) IBOutlet UIButton* hashButton; + +- (IBAction)onAddContact: (id) event; + +@end diff --git a/Classes/DialerViewController.m b/Classes/DialerViewController.m new file mode 100644 index 000000000..647defb5c --- /dev/null +++ b/Classes/DialerViewController.m @@ -0,0 +1,117 @@ +/* DialerViewController.h + * + * Copyright (C) 2009 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import +#import + +#import "DialerViewController.h" +#import "linphoneAppDelegate.h" +#import "IncallViewController.h" +#import "LinphoneManager.h" +#import "PhoneMainView.h" + +#include "linphonecore.h" +#include "private.h" + +@implementation DialerViewController + +@synthesize addressField; +@synthesize callButton; +@synthesize eraseButton; + +@synthesize oneButton; +@synthesize twoButton; +@synthesize threeButton; +@synthesize fourButton; +@synthesize fiveButton; +@synthesize sixButton; +@synthesize sevenButton; +@synthesize eightButton; +@synthesize nineButton; +@synthesize starButton; +@synthesize zeroButton; +@synthesize hashButton; + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + //TODO + /*if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == true) { + myFirstLoginViewController = [[FirstLoginViewController alloc] initWithNibName:@"FirstLoginViewController" + bundle:[NSBundle mainBundle]]; + [self presentModalViewController:myFirstLoginViewController animated:true]; + }*/ + // [[LinphoneManager instance] setRegistrationDelegate:self]; + + //TODO + //[mMainScreenWithVideoPreview showPreview:YES]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + [zeroButton initWithNumber:'0' addressField:addressField dtmf:false]; + [oneButton initWithNumber:'1' addressField:addressField dtmf:false]; + [twoButton initWithNumber:'2' addressField:addressField dtmf:false]; + [threeButton initWithNumber:'3' addressField:addressField dtmf:false]; + [fourButton initWithNumber:'4' addressField:addressField dtmf:false]; + [fiveButton initWithNumber:'5' addressField:addressField dtmf:false]; + [sixButton initWithNumber:'6' addressField:addressField dtmf:false]; + [sevenButton initWithNumber:'7' addressField:addressField dtmf:false]; + [eightButton initWithNumber:'8' addressField:addressField dtmf:false]; + [nineButton initWithNumber:'9' addressField:addressField dtmf:false]; + [starButton initWithNumber:'*' addressField:addressField dtmf:false]; + [hashButton initWithNumber:'#' addressField:addressField dtmf:false]; + [callButton initWithAddress:addressField]; + [eraseButton initWithAddressField:addressField]; +} + +- (void)setAddress:(NSString*) address { + [addressField setText:address]; +} + +- (void)dealloc { + [addressField release]; + [callButton release]; + [oneButton release]; + [twoButton release]; + [threeButton release]; + [fourButton release]; + [fiveButton release]; + [sixButton release]; + [sevenButton release]; + [eightButton release]; + [nineButton release]; + [starButton release]; + [zeroButton release]; + [hashButton release]; + [super dealloc]; +} + +- (BOOL)textFieldShouldReturn:(UITextField *)textField { + if (textField == addressField) { + [addressField resignFirstResponder]; + } + return YES; +} + +- (IBAction)onAddContact: (id) event { + +} + +@end diff --git a/Classes/PhoneViewController.xib b/Classes/DialerViewController.xib similarity index 86% rename from Classes/PhoneViewController.xib rename to Classes/DialerViewController.xib index 87104bbe8..9eebe377a 100644 --- a/Classes/PhoneViewController.xib +++ b/Classes/DialerViewController.xib @@ -41,132 +41,86 @@ 292 YES - + - 292 + 288 YES - - + + 292 - {105, 72} - + {320, 80} + - + _NS:9 - NO + NO + IBCocoaTouchFramework + + NSImage + champ-saisie-numero.png + + + + + 292 + {320, 60} + + + + + 3 + MSAwAA + + NO + NO IBCocoaTouchFramework - 0 0 - + + sip: + 3 MQA - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + YES + 15 + + 1 + 3 + IBCocoaTouchFramework - - 3 - MC41AA + 1 + + Helvetica + Helvetica + 0 + 36 - - NSImage - add-contact-over.png - - - NSImage - add-contact-inactif.png - - - NSImage - add-contact-actif.png - - - 2 - 15 - - - Helvetica-Bold - 15 + + Helvetica + 36 16 - - - 292 - {{105, 0}, {110, 72}} - - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - appeler-over.png - - - NSImage - appeler-actif.png - - - - - - - 292 - {{215, 0}, {105, 72}} - - - _NS:9 - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - backspace-over.png - - - NSImage - backspace-actif.png - - - - - {{0, 293}, {320, 72}} + {320, 80} - + _NS:9 3 - MQA + MSAwAA 2 + YES IBCocoaTouchFramework - 292 + 288 YES @@ -208,7 +162,10 @@ 1 MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - + + 3 + MC41AA + NSImage 1-over.png @@ -223,7 +180,11 @@ 2 15 - + + Helvetica-Bold + 15 + 16 + @@ -252,7 +213,7 @@ 2-actif.png - + @@ -277,7 +238,7 @@ 3-actif.png - + @@ -306,7 +267,7 @@ 4-actif.png - + @@ -335,7 +296,7 @@ 5-actif.png - + @@ -364,7 +325,7 @@ 7-actif.png - + @@ -393,7 +354,7 @@ 6-actif.png - + @@ -422,7 +383,7 @@ 8-actif.png - + @@ -451,7 +412,7 @@ 9-actif.png - + @@ -480,7 +441,7 @@ etoile-actif.png - + @@ -509,7 +470,7 @@ 0-actif.png - + @@ -538,7 +499,7 @@ diese-actif.png - + {{0, 58}, {320, 260}} @@ -553,76 +514,111 @@ IBCocoaTouchFramework - + - 292 + 288 YES - - + + 292 - {320, 80} - + {106, 69} + - + _NS:9 - NO - IBCocoaTouchFramework - - NSImage - champ-saisie-numero.png - - - - - 292 - {320, 60} - - - - - 3 - MSAwAA - NO - NO IBCocoaTouchFramework + 0 0 - - sip: - - YES - 15 - - 1 - 3 - IBCocoaTouchFramework + NO + NO + + + NSImage + add-contact-over.png - 1 - - Helvetica - Helvetica - 0 - 36 + + NSImage + add-contact-inactif.png - - Helvetica - 36 - 16 + + NSImage + add-contact-actif.png + + 2 + 15 + + + + + + 292 + {{106, 0}, {108, 69}} + + + + _NS:9 + NO + IBCocoaTouchFramework + 0 + 0 + NO + NO + + + NSImage + appeler-over.png + + + NSImage + appeler-actif.png + + + + + + + 292 + {{214, 0}, {106, 69}} + + + _NS:9 + NO + IBCocoaTouchFramework + 0 + 0 + NO + NO + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + backspace-over.png + + + NSImage + backspace-actif.png + + + - {320, 80} + {{0, 305}, {320, 69}} - + _NS:9 3 MSAwAA - YES IBCocoaTouchFramework @@ -651,131 +647,123 @@ - address - - - - 12 - - - - hash - - - - 46 - - - - zero - - - - 54 - - - - star - - - - 51 - - - - nine - - - - 47 - - - - eight - - - - 43 - - - - six - - - - 50 - - - - seven - - - - 49 - - - - five - - - - 44 - - - - four - - - - 45 - - - - three - - - - 52 - - - - two - - - - 53 - - - - one + oneButton - 48 + 191 - dialerView + twoButton - + - 181 + 192 - erase + threeButton + + + + 193 + + + + fourButton + + + + 194 + + + + fiveButton + + + + 195 + + + + sixButton + + + + 196 + + + + sevenButton + + + + 197 + + + + zeroButton + + + + 198 + + + + starButton + + + + 199 + + + + nineButton + + + + 200 + + + + hashButton + + + + 201 + + + + eraseButton - 186 + 202 - callLarge + callButton - 189 + 203 + + + + eightButton + + + + 204 + + + + addressField + + + + 205 @@ -783,7 +771,7 @@ - 19 + 190 @@ -957,9 +945,9 @@ YES - - + + toolBar @@ -970,18 +958,18 @@ addContact - - 184 - - - call - 185 backspace + + 184 + + + call + @@ -1045,7 +1033,7 @@ YES - PhoneViewController + DialerViewController com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -1059,7 +1047,7 @@ UICallButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin - + UIEraseButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -1113,53 +1101,13 @@ - 189 + 205 YES - MainScreenWithVideoPreview - UIViewController - - YES - - YES - phoneMainView - window - - - YES - PhoneViewController - UIWindow - - - - YES - - YES - phoneMainView - window - - - YES - - phoneMainView - PhoneViewController - - - window - UIWindow - - - - - IBProjectSource - ./Classes/MainScreenWithVideoPreview.h - - - - PhoneViewController + DialerViewController UIViewController onAddContact: @@ -1176,52 +1124,36 @@ YES YES - address - backToCallView - callLarge - callShort - dialerView - eight - erase - five - four - hash - mMainScreenWithVideoPreview - myTabBarController - nine - one - seven - six - star - status - statusViewHolder - switchCamera - three - two - zero + addressField + callButton + eightButton + eraseButton + fiveButton + fourButton + hashButton + nineButton + oneButton + sevenButton + sixButton + starButton + threeButton + twoButton + zeroButton YES UITextField UIButton UIButton - UIButton - UIView - UIButton UIEraseButton UIButton UIButton UIButton - MainScreenWithVideoPreview - UITabBarController UIButton UIButton UIButton UIButton UIButton - UILabel - UIView - UIButton UIButton UIButton UIButton @@ -1231,129 +1163,89 @@ YES YES - address - backToCallView - callLarge - callShort - dialerView - eight - erase - five - four - hash - mMainScreenWithVideoPreview - myTabBarController - nine - one - seven - six - star - status - statusViewHolder - switchCamera - three - two - zero + addressField + callButton + eightButton + eraseButton + fiveButton + fourButton + hashButton + nineButton + oneButton + sevenButton + sixButton + starButton + threeButton + twoButton + zeroButton YES - address + addressField UITextField - backToCallView + callButton UIButton - callLarge + eightButton UIButton - callShort - UIButton - - - dialerView - UIView - - - eight - UIButton - - - erase + eraseButton UIEraseButton - five + fiveButton UIButton - four + fourButton UIButton - hash + hashButton UIButton - mMainScreenWithVideoPreview - MainScreenWithVideoPreview - - - myTabBarController - UITabBarController - - - nine + nineButton UIButton - one + oneButton UIButton - seven + sevenButton UIButton - six + sixButton UIButton - star + starButton UIButton - status - UILabel - - - statusViewHolder - UIView - - - switchCamera + threeButton UIButton - three + twoButton UIButton - two - UIButton - - - zero + zeroButton UIButton IBProjectSource - ./Classes/PhoneViewController.h + ./Classes/DialerViewController.h @@ -1374,12 +1266,20 @@ UIEraseButton - UIButton + UILongTouchButton IBProjectSource ./Classes/UIEraseButton.h + + UILongTouchButton + UIButton + + IBProjectSource + ./Classes/UILongTouchButton.h + + 0 @@ -1456,13 +1356,13 @@ {220, 113} {210, 113} {210, 113} - {210, 143} - {210, 143} - {210, 143} - {220, 143} - {220, 143} - {210, 143} - {210, 143} + {213, 138} + {213, 138} + {213, 138} + {214, 138} + {214, 138} + {213, 138} + {213, 138} {640, 135} {210, 113} {210, 113} diff --git a/Classes/HistoryTableViewController.m b/Classes/HistoryTableViewController.m index ae8fc4aae..052af435d 100644 --- a/Classes/HistoryTableViewController.m +++ b/Classes/HistoryTableViewController.m @@ -110,14 +110,8 @@ // Go to dialer view NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys: - [[NSDictionary alloc] initWithObjectsAndKeys: - [[NSArray alloc] initWithObjects: dispName, nil] - , @"setText:", nil] - , @"mDisplayName", - [[NSDictionary alloc] initWithObjectsAndKeys: - [[NSArray alloc] initWithObjects: phoneNumber, nil] - , @"setText:", nil] - , @"address", + [[NSArray alloc] initWithObjects: phoneNumber, nil] + , @"setAddress:", nil]; [[LinphoneManager instance] changeView:PhoneView_Dialer dict:dict]; diff --git a/Classes/HistoryViewController.h b/Classes/HistoryViewController.h index bfd90386e..7b7742e1d 100644 --- a/Classes/HistoryViewController.h +++ b/Classes/HistoryViewController.h @@ -23,11 +23,15 @@ @interface HistoryViewController : UIViewController { HistoryTableViewController *tableController; + UITableView *tableView; + UIButton *allButton; UIButton *missedButton; } @property (nonatomic, retain) IBOutlet HistoryTableViewController* tableController; +@property (nonatomic, retain) IBOutlet UITableView *tableView; + @property (nonatomic, retain) IBOutlet UIButton* allButton; @property (nonatomic, retain) IBOutlet UIButton* missedButton; diff --git a/Classes/HistoryViewController.m b/Classes/HistoryViewController.m index 502827320..ea27f9250 100644 --- a/Classes/HistoryViewController.m +++ b/Classes/HistoryViewController.m @@ -21,7 +21,9 @@ @implementation HistoryViewController +@synthesize tableView; @synthesize tableController; + @synthesize allButton; @synthesize missedButton; @@ -31,6 +33,11 @@ typedef enum _HistoryView { History_MAX } HistoryView; +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + [self.tableView reloadData]; +} + - (void)changeView: (HistoryView) view { if(view == History_All) { allButton.selected = TRUE; diff --git a/Classes/HistoryViewController.xib b/Classes/HistoryViewController.xib index 9fb67afc8..dc4740a57 100644 --- a/Classes/HistoryViewController.xib +++ b/Classes/HistoryViewController.xib @@ -156,7 +156,6 @@ {{0, 58}, {320, 402}} - _NS:9 3 @@ -165,7 +164,7 @@ YES IBCocoaTouchFramework 0.0 - 15 + 10 0.0 0.0 YES @@ -234,6 +233,14 @@ 28 + + + tableView + + + + 31 + onAllClick: @@ -370,7 +377,7 @@ - 30 + 31 @@ -403,6 +410,7 @@ UIButton UIButton HistoryTableViewController + UITableView @@ -417,6 +425,10 @@ tableController HistoryTableViewController + + tableView + UITableView + IBProjectSource diff --git a/Classes/InCallViewController.h b/Classes/InCallViewController.h index ccb5f3779..0f26a1cb2 100644 --- a/Classes/InCallViewController.h +++ b/Classes/InCallViewController.h @@ -20,17 +20,17 @@ #import #import -#import "linphonecore.h" -#import "PhoneViewController.h" #import "ConferenceCallDetailView.h" #import "UIVideoButton.h" #import "VideoZoomHandler.h" +#import "UILinphone.h" +#import "CallDelegate.h" -#include "UILinphone.h" +#include "linphonecore.h" @class VideoViewController; -@interface InCallViewController : UIViewController { +@interface InCallViewController : UIViewController { UIView* controlSubView, *hangUpView; @@ -66,7 +66,6 @@ #ifdef TEST_VIDEO_VIEW_CHANGE UIView* testVideoView; #endif - UIImageView* videoCallQuality; UICamSwitch* videoCameraSwitch; UIActivityIndicatorView* videoUpdateIndicator; UIActivityIndicatorView* videoWaitingForFirstImage; diff --git a/Classes/InCallViewController.m b/Classes/InCallViewController.m index 943341133..79f1796ef 100644 --- a/Classes/InCallViewController.m +++ b/Classes/InCallViewController.m @@ -18,7 +18,6 @@ */ #import "IncallViewController.h" -#import "VideoViewController.h" #import "LinphoneManager.h" #import #import @@ -186,7 +185,7 @@ void addAnimationFadeTransition(UIView* view, float duration) { // show controls [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.3]; - [controlSubView setAlpha:1.0]; + [[LinphoneManager instance] showTabBar: true]; [hangUpView setAlpha:1.0]; if ([LinphoneManager instance].frontCamId !=nil ) { // only show camera switch button if we have more than 1 camera @@ -205,6 +204,7 @@ void addAnimationFadeTransition(UIView* view, float duration) { [hangUpView setAlpha:0.0]; [videoCameraSwitch setAlpha:0.0]; [UIView commitAnimations]; + [[LinphoneManager instance] showTabBar: false]; hideControlsTimer = nil; } @@ -262,7 +262,7 @@ void addAnimationFadeTransition(UIView* view, float duration) { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [videoGroup setAlpha:1.0]; - [controlSubView setAlpha:0.0]; + [hangUpView setAlpha:0.0]; [callTableView setAlpha:0.0]; [UIView commitAnimations]; @@ -273,7 +273,8 @@ void addAnimationFadeTransition(UIView* view, float duration) { linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView); linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)videoPreview); - [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; + [[LinphoneManager instance] fullScreen: true]; + [[LinphoneManager instance] showTabBar: false]; // This is a bit hacky: take into account toolbar removal (only once). // It's probably possible to do this from the Xib file (?) @@ -295,7 +296,7 @@ void addAnimationFadeTransition(UIView* view, float duration) { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [videoGroup setAlpha:0.0]; - [controlSubView setAlpha:1.0]; + [[LinphoneManager instance] showTabBar: true]; [hangUpView setAlpha:1.0]; [callTableView setAlpha:1.0]; [videoCameraSwitch setAlpha:0.0]; @@ -317,7 +318,7 @@ void addAnimationFadeTransition(UIView* view, float duration) { dialer.imageView.transform = CGAffineTransformIdentity; videoCallQuality.transform = CGAffineTransformIdentity; - [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; + [[LinphoneManager instance] fullScreen:false]; } /* Update in call view buttons (visibility, state, ...) and call duration text. @@ -327,11 +328,9 @@ void addAnimationFadeTransition(UIView* view, float duration) { // check LinphoneCore is initialized LinphoneCore* lc = nil; - @try { + if([LinphoneManager isLcReady]) lc = [LinphoneManager getLc]; - } @catch (NSException* exc) { - return; - } + // 1 call: show pause button, otherwise show merge btn // [LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:"call count"]; // reload table (glow update + call duration) @@ -395,17 +394,11 @@ void addAnimationFadeTransition(UIView* view, float duration) { if ([LinphoneManager runningOnIpad]) { ms_message("Running on iPad"); - mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController-ipad" - bundle:[NSBundle mainBundle]]; conferenceDetail = [[ConferenceCallDetailView alloc] initWithNibName:@"ConferenceCallDetailView-ipad" bundle:[NSBundle mainBundle]]; - } else { - mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController" - bundle:[NSBundle mainBundle]]; conferenceDetail = [[ConferenceCallDetailView alloc] initWithNibName:@"ConferenceCallDetailView" bundle:[NSBundle mainBundle]]; - } UITapGestureRecognizer* singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)]; @@ -630,12 +623,12 @@ void addAnimationFadeTransition(UIView* view, float duration) { if (modalVC != nil) { mVideoIsPending=FALSE; // clear previous native window ids - if (modalVC == mVideoViewController) { + /*if (modalVC == mVideoViewController) { mVideoShown=FALSE; linphone_core_set_native_video_window_id([LinphoneManager getLc],0); linphone_core_set_native_preview_window_id([LinphoneManager getLc],0); - } - [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; + }*/ + [[LinphoneManager instance] fullScreen:false]; [self dismissModalViewControllerAnimated:FALSE];//just in case } @@ -777,19 +770,6 @@ static void hideSpinner(LinphoneCall* call, void* user_data) { if (call->videostream) { linphone_call_set_next_video_frame_decoded_callback(call, hideSpinner, self); } - return; - - if (mIncallViewIsReady) { - [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone]; - mVideoShown=TRUE; - if (self.modalViewController != mVideoViewController) - [self presentModalViewController:mVideoViewController animated:true]; - else - ms_message("Do not present again videoViewController"); - } else { - //postpone presentation - mVideoIsPending=TRUE; - } } -(void) dismissActionSheet: (id)o { diff --git a/Classes/InCallViewController.xib b/Classes/InCallViewController.xib index f8880c72f..1d2335581 100644 --- a/Classes/InCallViewController.xib +++ b/Classes/InCallViewController.xib @@ -12,7 +12,6 @@ YES - IBUIImageView IBUIButton IBUITableView IBUIView @@ -67,28 +66,16 @@ {{240, 354}, {80, 106}} - IBCocoaTouchFramework - - - 292 - {{4, 428}, {28, 28}} - - - - _NS:567 - NO - IBCocoaTouchFramework - 292 {{141, 212}, {37, 37}} - + _NS:1030 NO IBCocoaTouchFramework @@ -100,7 +87,7 @@ {320, 460} - + _NS:196 2 @@ -514,30 +501,6 @@ 141 - - - videoPreview - - - - 130 - - - - videoCallQuality - - - - 138 - - - - videoView - - - - 133 - callTableView @@ -562,14 +525,6 @@ 129 - - - videoWaitingForFirstImage - - - - 145 - star @@ -682,6 +637,30 @@ 45 + + + videoView + + + + 133 + + + + videoWaitingForFirstImage + + + + 145 + + + + videoPreview + + + + 130 + doAction: @@ -754,7 +733,6 @@ YES - @@ -766,32 +744,6 @@ - - 144 - - - - - 137 - - - videocallquality - - - 127 - - - preview - - - 132 - - - YES - - - display - 27 @@ -892,6 +844,23 @@ 5 + + 132 + + + display + + + 144 + + + + + 127 + + + preview + @@ -906,7 +875,6 @@ 126.IBPluginDependency 127.IBPluginDependency 132.IBPluginDependency - 137.IBPluginDependency 140.CustomClassName 140.IBPluginDependency 144.IBPluginDependency @@ -949,7 +917,6 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin UICamSwitch com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -1295,203 +1262,6 @@ ./Classes/UIDigitButton.h - - UIHangUpButton - UIButton - - IBProjectSource - ./Classes/UIHangUpButton.h - - - - UIMicroButton - UIToggleButton - - IBProjectSource - ./Classes/UIMicroButton.h - - - - UIToggleButton - UIButton - - IBProjectSource - ./Classes/UIToggleButton.h - - - - VideoViewController - UIViewController - - YES - - YES - mCallQuality - mCallQualityLandLeft - mCallQualityLandRight - mCamSwitch - mCamSwitchLandLeft - mCamSwitchLandRight - mDisplay - mDisplayLandLeft - mDisplayLandRight - mHangUp - mHangUpLandLeft - mHangUpLandRight - mLandscapeLeft - mLandscapeRight - mMute - mMuteLandLeft - mMuteLandRight - mPortrait - mPreview - mPreviewLandLeft - mPreviewLandRight - - - YES - UIImageView - UIImageView - UIImageView - UICamSwitch - UICamSwitch - UICamSwitch - UIView - UIView - UIView - UIHangUpButton - UIHangUpButton - UIHangUpButton - UIView - UIView - UIMicroButton - UIMicroButton - UIMicroButton - UIView - UIView - UIView - UIView - - - - YES - - YES - mCallQuality - mCallQualityLandLeft - mCallQualityLandRight - mCamSwitch - mCamSwitchLandLeft - mCamSwitchLandRight - mDisplay - mDisplayLandLeft - mDisplayLandRight - mHangUp - mHangUpLandLeft - mHangUpLandRight - mLandscapeLeft - mLandscapeRight - mMute - mMuteLandLeft - mMuteLandRight - mPortrait - mPreview - mPreviewLandLeft - mPreviewLandRight - - - YES - - mCallQuality - UIImageView - - - mCallQualityLandLeft - UIImageView - - - mCallQualityLandRight - UIImageView - - - mCamSwitch - UICamSwitch - - - mCamSwitchLandLeft - UICamSwitch - - - mCamSwitchLandRight - UICamSwitch - - - mDisplay - UIView - - - mDisplayLandLeft - UIView - - - mDisplayLandRight - UIView - - - mHangUp - UIHangUpButton - - - mHangUpLandLeft - UIHangUpButton - - - mHangUpLandRight - UIHangUpButton - - - mLandscapeLeft - UIView - - - mLandscapeRight - UIView - - - mMute - UIMicroButton - - - mMuteLandLeft - UIMicroButton - - - mMuteLandRight - UIMicroButton - - - mPortrait - UIView - - - mPreview - UIView - - - mPreviewLandLeft - UIView - - - mPreviewLandRight - UIView - - - - - IBProjectSource - ./Classes/VideoViewController.h - - 0 diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 6a95c069e..1a80a09a0 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -18,7 +18,6 @@ */ #import "PhoneMainView.h" -#import "PhoneViewController.h" #import "linphoneAppDelegate.h" #import "AddressBook/ABPerson.h" diff --git a/Classes/LinphoneUI/LinphoneManager.h b/Classes/LinphoneUI/LinphoneManager.h index 36bb3e922..7786e9e88 100644 --- a/Classes/LinphoneUI/LinphoneManager.h +++ b/Classes/LinphoneUI/LinphoneManager.h @@ -86,32 +86,35 @@ typedef struct _LinphoneCallAppData { @public CallContext currentCallContextBeforeGoingBackground; } -+(LinphoneManager*) instance; -+(LinphoneCore*) getLc; -+(BOOL) runningOnIpad; -+(void) set:(UIView*)view hidden: (BOOL) hidden withName:(const char*)name andReason:(const char*) reason; -+(void) set:(UIButton*)view enabled: (BOOL) enabled withName:(const char*)name andReason:(const char*) reason; -+(void) logUIElementPressed:(const char*) name; ++ (LinphoneManager*) instance; ++ (LinphoneCore*) getLc; ++ (BOOL)isLcReady; ++ (BOOL)runningOnIpad; ++ (void)set:(UIView*)view hidden: (BOOL) hidden withName:(const char*)name andReason:(const char*) reason; ++ (void)set:(UIButton*)view enabled: (BOOL) enabled withName:(const char*)name andReason:(const char*) reason; ++ (void)logUIElementPressed:(const char*) name; + (void)abstractCall:(id) object dict:(NSDictionary *) dict; --(void) registerLogView:(id) view; +- (void)registerLogView:(id) view; --(void) startLibLinphone; --(BOOL) isNotIphone3G; --(void) destroyLibLinphone; +- (void)startLibLinphone; +- (BOOL)isNotIphone3G; +- (void)destroyLibLinphone; --(BOOL) enterBackgroundMode; --(void) becomeActive; --(void) kickOffNetworkConnection; --(NSString*) getDisplayNameFromAddressBook:(NSString*) number andUpdateCallLog:(LinphoneCallLog*)log; --(UIImage*) getImageFromAddressBook:(NSString*) number; +- (BOOL)enterBackgroundMode; +- (void)becomeActive; +- (void)kickOffNetworkConnection; +- (NSString*)getDisplayNameFromAddressBook:(NSString*) number andUpdateCallLog:(LinphoneCallLog*)log; +- (UIImage*)getImageFromAddressBook:(NSString*) number; --(BOOL) reconfigureLinphoneIfNeeded:(NSDictionary *)oldSettings; --(void) setupNetworkReachabilityCallback; --(void) refreshRegisters; +- (BOOL)reconfigureLinphoneIfNeeded:(NSDictionary *)oldSettings; +- (void)setupNetworkReachabilityCallback; +- (void)refreshRegisters; --(void) changeView:(PhoneView) view; --(void) changeView:(PhoneView) view dict:(NSDictionary *)dict; --(PhoneView) currentView; +- (void)changeView:(PhoneView) view; +- (void)changeView:(PhoneView) view dict:(NSDictionary *)dict; +- (void)showTabBar:(BOOL) show; +- (void)fullScreen:(BOOL) enabled; +- (PhoneView) currentView; @property Connectivity connectivity; @property (readonly) const char* frontCamId; diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 31655c117..4a520d1a0 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -80,6 +80,20 @@ extern void libmsbcg729_init(); return theLinphoneManager; } +- (void) showTabBar:(BOOL) show { + NSMutableDictionary* mdict = [NSMutableDictionary dictionaryWithObject: [NSNumber numberWithBool:show] forKey:@"tabBar"]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneMainViewChange" object:self userInfo:mdict]; +} + +- (void)fullScreen:(BOOL) enabled { + if(enabled) + [[UIApplication sharedApplication] setStatusBarHidden:enabled withAnimation:UIStatusBarAnimationSlide]; + else + [[UIApplication sharedApplication] setStatusBarHidden:enabled withAnimation:UIStatusBarAnimationNone]; + NSMutableDictionary* mdict = [NSMutableDictionary dictionaryWithObject: [NSNumber numberWithBool:enabled] forKey:@"fullscreen"]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneMainViewChange" object:self userInfo:mdict]; +} + - (void)changeView:(PhoneView) view { [self changeView:view dict:nil]; } @@ -195,56 +209,19 @@ extern void libmsbcg729_init(); [[NSString stringWithFormat:@"%c", message] autorelease], @"message", nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneCallUpdate" object:self userInfo:dict]; - - const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(call)); - NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil); - switch (new_state) { - case LinphoneCallError: { - /* - NSString* lTitle= state->message!=nil?[NSString stringWithCString:state->message length:strlen(state->message)]: @"Error"; - NSString* lMessage=lTitle; - */ - NSString* lMessage; - NSString* lTitle; - LinphoneProxyConfig* proxyCfg; - //get default proxy - linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg); - if (proxyCfg == nil) { - lMessage=NSLocalizedString(@"Please make sure your device is connected to the internet and double check your SIP account configuration in the settings.",nil ); - } else { - lMessage=[NSString stringWithFormat : NSLocalizedString(@"Cannot call %@",nil),lUserName]; - } - - if (linphone_call_get_reason(call) == LinphoneReasonNotFound) { - lMessage=[NSString stringWithFormat : NSLocalizedString(@"'%@' not registered to Service",nil), lUserName]; - } else { - if (message!=nil){ - lMessage=[NSString stringWithFormat : NSLocalizedString(@"%@\nReason was: %s",nil),lMessage, message]; - } - } - lTitle=NSLocalizedString(@"Call failed",nil); - UIAlertView* error = [[UIAlertView alloc] initWithTitle:lTitle - message:lMessage - delegate:nil - cancelButtonTitle:NSLocalizedString(@"Dismiss",nil) - otherButtonTitles:nil]; - [error show]; - [error release]; - break; - } - default: - break; - } - } -+(LinphoneCore*) getLc { ++ (LinphoneCore*)getLc { if (theLinphoneCore==nil) { @throw([NSException exceptionWithName:@"LinphoneCoreException" reason:@"Linphone core not initialized yet" userInfo:nil]); } return theLinphoneCore; } ++ (BOOL)isLcReady { + return theLinphoneCore != nil; +} + - (void)addLog:(NSString*) log { [mLogView addLog:log]; } diff --git a/Classes/LinphoneUI/UICallBar.m b/Classes/LinphoneUI/UICallBar.m index 0171dfccf..d3b0eb147 100644 --- a/Classes/LinphoneUI/UICallBar.m +++ b/Classes/LinphoneUI/UICallBar.m @@ -37,11 +37,8 @@ - (void)callUpdate: (NSNotification*) notif { // check LinphoneCore is initialized LinphoneCore* lc = nil; - @try { + if([LinphoneManager isLcReady]) lc = [LinphoneManager getLc]; - } @catch (NSException* exc) { - return; - } //TODO //[LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:"call count"]; diff --git a/Classes/LinphoneUI/UICallBar.xib b/Classes/LinphoneUI/UICallBar.xib index 2b55621c8..88a73a157 100644 --- a/Classes/LinphoneUI/UICallBar.xib +++ b/Classes/LinphoneUI/UICallBar.xib @@ -38,10 +38,10 @@ -2147483356 - {320, 135} + {{0, 10}, {320, 125}} - + _NS:9 3 @@ -50,6 +50,9 @@ 2 + NO + NO + NO -1 NO IBCocoaTouchFramework @@ -60,7 +63,7 @@ {80, 67} - + _NS:9 NO @@ -70,6 +73,7 @@ 0 0 NO + NO 3 MQA @@ -86,6 +90,10 @@ NSImage video-ON-over.png + + NSImage + video-OFF-disabled.png + NSImage video-ON-actif.png @@ -318,7 +326,7 @@ {320, 135} - + _NS:9 1 @@ -469,7 +477,7 @@ UIVideoButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin - + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -609,6 +617,7 @@ {160, 134} {160, 134} {160, 134} + {160, 134} {160, 134} {160, 134} diff --git a/Classes/LinphoneUI/UIEraseButton.h b/Classes/LinphoneUI/UIEraseButton.h index 168d930f1..44eebd84e 100644 --- a/Classes/LinphoneUI/UIEraseButton.h +++ b/Classes/LinphoneUI/UIEraseButton.h @@ -19,8 +19,9 @@ #import +#import "UILongTouchButton.h" -@interface UIEraseButton : UIButton { +@interface UIEraseButton : UILongTouchButton { @private UITextField* mAddress; diff --git a/Classes/LinphoneUI/UIEraseButton.m b/Classes/LinphoneUI/UIEraseButton.m index 1113ba817..0f2011267 100644 --- a/Classes/LinphoneUI/UIEraseButton.m +++ b/Classes/LinphoneUI/UIEraseButton.m @@ -21,15 +21,22 @@ @implementation UIEraseButton --(void) touchUp:(id) sender { - if ([mAddress.text length] > 0) { +-(void) touchDown:(id) sender { + if ([mAddress.text length] > 0) { [mAddress setText:[mAddress.text substringToIndex:[mAddress.text length]-1]]; - } + } } -(void) initWithAddressField:(UITextField*) address { mAddress = address; - [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside]; + [self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown]; +} + +- (void)onRepeatTouch { +} + +- (void)onLongTouch { + [mAddress setText:@""]; } - (void)dealloc { diff --git a/Classes/LinphoneUI/UILongTouchButton.h b/Classes/LinphoneUI/UILongTouchButton.h new file mode 100644 index 000000000..e7fa2efb8 --- /dev/null +++ b/Classes/LinphoneUI/UILongTouchButton.h @@ -0,0 +1,31 @@ +/* UILongTouchButton.h + * + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import + +@protocol UILongTouchButtonDelegate +-(void) onRepeatTouch; +-(void) onLongTouch; +@end + +@interface UILongTouchButton : UIButton { + +} + +@end diff --git a/Classes/LinphoneUI/UILongTouchButton.m b/Classes/LinphoneUI/UILongTouchButton.m new file mode 100644 index 000000000..616aa87c7 --- /dev/null +++ b/Classes/LinphoneUI/UILongTouchButton.m @@ -0,0 +1,76 @@ +/* UILongTouchButton.h + * + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import "UILongTouchButton.h" + +@implementation UILongTouchButton + +- (id)init { + [self addTarget:self action:@selector(___touchDown:) forControlEvents:UIControlEventTouchDown]; + [self addTarget:self action:@selector(___touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside]; + return self; +} + +- (void)___touchDown:(id) sender { + [self performSelector:@selector(doLongTouch) withObject:nil afterDelay:0.5]; +} + +- (void)___touchUp:(id) sender { + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doLongTouch) object:nil]; + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doRepeatTouch) object:nil]; +} + +- (void)doLongTouch { + [self onLongTouch]; + [self onRepeatTouch]; + [self performSelector:@selector(doRepeatTouch) withObject:nil afterDelay:0.1]; +} + +- (void)doRepeatTouch { + [self onRepeatTouch]; + [self performSelector:@selector(doRepeatTouch) withObject:nil afterDelay:0.1]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self init]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (self) { + [self init]; + } + return self; +} + +- (void)onRepeatTouch { + [NSException raise:NSInternalInconsistencyException + format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]; +} + +- (void)onLongTouch { + [NSException raise:NSInternalInconsistencyException + format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]; +} + +@end diff --git a/Classes/LinphoneUI/UIMainBar.xib b/Classes/LinphoneUI/UIMainBar.xib index bdd3c6dba..3779c3709 100644 --- a/Classes/LinphoneUI/UIMainBar.xib +++ b/Classes/LinphoneUI/UIMainBar.xib @@ -38,7 +38,7 @@ -2147483356 - {{0, 7}, {320, 65}} + {{0, 11}, {320, 66}} @@ -50,6 +50,9 @@ 2 + NO + NO + NO -1 NO IBCocoaTouchFramework @@ -57,7 +60,7 @@ 292 - {64, 72} + {64, 77} @@ -107,7 +110,7 @@ 292 - {{64, 0}, {64, 72}} + {{64, 0}, {64, 77}} @@ -141,38 +144,10 @@ - - - 292 - {{128, 0}, {64, 72}} - - - - _NS:9 - NO - - Dialer - - IBCocoaTouchFramework - 0 - 0 - NO - - - NSImage - dialer-actif.png - - - NSImage - dialer-over.png - - - - 292 - {{192, 0}, {64, 72}} + {{192, 0}, {64, 77}} @@ -206,13 +181,40 @@ + + + 292 + {{128, 0}, {64, 77}} + + + + _NS:9 + NO + + Dialer + + IBCocoaTouchFramework + 0 + 0 + NO + + + NSImage + dialer-actif.png + + + NSImage + dialer-over.png + + + + 292 - {{256, 0}, {64, 72}} + {{256, 0}, {64, 77}} - _NS:9 NO @@ -244,7 +246,7 @@ - {320, 72} + {320, 77} @@ -267,14 +269,6 @@ 13 - - - dialerButton - - - - 12 - view @@ -307,6 +301,14 @@ 29 + + + dialerButton + + + + 12 + onChatClick: @@ -378,10 +380,10 @@ - + mainTabBar @@ -389,6 +391,7 @@ 4 + mask @@ -404,12 +407,6 @@ history - - 7 - - - dialer - 8 @@ -422,6 +419,12 @@ settings + + 7 + + + dialer + @@ -528,20 +531,20 @@ YES 3 - {127, 144} - {127, 144} - {127, 144} - {132, 144} - {132, 144} - {127, 144} - {127, 144} - {127, 144} - {127, 144} - {127, 144} - {127, 144} - {127, 144} - {127, 144} - {127, 144} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} + {128, 154} 1181 diff --git a/Classes/LinphoneUI/UIMicroButton.m b/Classes/LinphoneUI/UIMicroButton.m index 1238d0580..d3b506951 100644 --- a/Classes/LinphoneUI/UIMicroButton.m +++ b/Classes/LinphoneUI/UIMicroButton.m @@ -32,9 +32,9 @@ } - (bool)onUpdate { - @try { + if([LinphoneManager isLcReady]) { return linphone_core_is_mic_muted([LinphoneManager getLc]) == false; - } @catch(NSException* e) { + } else { //not ready yet return true; } diff --git a/Classes/LinphoneUI/UIPauseButton.m b/Classes/LinphoneUI/UIPauseButton.m index b271839ef..1ff3186cc 100644 --- a/Classes/LinphoneUI/UIPauseButton.m +++ b/Classes/LinphoneUI/UIPauseButton.m @@ -60,7 +60,7 @@ - (bool)onUpdate { // TODO: disable pause on not running call - @try { + if([LinphoneManager isLcReady]) { bool ret = false; LinphoneCall* currentCall = [UIPauseButton getCall]; if (currentCall != nil) { @@ -84,7 +84,7 @@ [LinphoneManager set:self enabled:FALSE withName:"PAUSE button" andReason:""]; } return ret; - } @catch(NSException* e) { + } else { //not ready yet return false; } diff --git a/Classes/LinphoneUI/UIStateBar.h b/Classes/LinphoneUI/UIStateBar.h index 33a4a9ca5..e9033cb53 100644 --- a/Classes/LinphoneUI/UIStateBar.h +++ b/Classes/LinphoneUI/UIStateBar.h @@ -20,13 +20,13 @@ #import @interface UIStateBar : UIViewController { - UIImageView* image; - UIActivityIndicatorView* spinner; - UILabel* label; + UIImageView* registrationStateImage; + UILabel* registrationStateLabel; + UIImageView* callQualityImage; } -@property (nonatomic, retain) IBOutlet UIImageView* image; -@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* spinner; -@property (nonatomic, retain) IBOutlet UILabel* label; +@property (nonatomic, retain) IBOutlet UIImageView* registrationStateImage; +@property (nonatomic, retain) IBOutlet UILabel* registrationStateLabel; +@property (nonatomic, retain) IBOutlet UIImageView* callQualityImage; @end diff --git a/Classes/LinphoneUI/UIStateBar.m b/Classes/LinphoneUI/UIStateBar.m index 22059760b..524f1366f 100644 --- a/Classes/LinphoneUI/UIStateBar.m +++ b/Classes/LinphoneUI/UIStateBar.m @@ -24,15 +24,28 @@ @implementation UIStateBar -@synthesize image; -@synthesize spinner; -@synthesize label; +@synthesize registrationStateImage; +@synthesize registrationStateLabel; +@synthesize callQualityImage; + +NSTimer *callQualityTimer; - (void)viewDidLoad { [super viewDidLoad]; // Set observer [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(registrationUpdate:) name:@"LinphoneRegistrationUpdate" object:nil]; + + // Set callQualityTimer + [callQualityImage setHidden: true]; + callQualityTimer = [NSTimer scheduledTimerWithTimeInterval:1 + target:self + selector:@selector(callQualityUpdate) + userInfo:nil + repeats:YES]; + + // Update to default state + [self proxyConfigUpdate: NULL]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { @@ -40,24 +53,56 @@ } - (void)registrationUpdate: (NSNotification*) notif { - LinphoneProxyConfig* config; + LinphoneProxyConfig* config = NULL; linphone_core_get_default_proxy([LinphoneManager getLc], &config); - + [self proxyConfigUpdate:config]; +} + +- (void)callQualityUpdate { + UIImage *image = nil; + if([LinphoneManager isLcReady]) { + LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]); + if(call != NULL) { + float quality = linphone_call_get_average_quality(call); + if(quality < 1) { + image = [UIImage imageNamed:@"quality-call-0.png"]; + } else if (quality < 2) { + image = [UIImage imageNamed:@"quality-call-1.png"]; + } else if (quality < 3) { + image = [UIImage imageNamed:@"quality-call-2.png"]; + } else { + image = [UIImage imageNamed:@"quality-call-3.png"]; + } + } + } + if(image != nil) { + [callQualityImage setHidden: false]; + [callQualityImage setImage: image]; + } else { + [callQualityImage setHidden: true]; + } +} + +- (void)proxyConfigUpdate: (LinphoneProxyConfig*) config { LinphoneRegistrationState state; NSString* message = nil; - + UIImage* image = nil; + if (config == NULL) { state = LinphoneRegistrationNone; - message = linphone_core_is_network_reachabled([LinphoneManager getLc]) ? NSLocalizedString(@"No SIP account configured", nil) : NSLocalizedString(@"Network down", nil); + if(![LinphoneManager isLcReady] || linphone_core_is_network_reachabled([LinphoneManager getLc])) + message = NSLocalizedString(@"No SIP account configured", nil); + else + message = NSLocalizedString(@"Network down", nil); } else { state = linphone_proxy_config_get_state(config); - + switch (state) { case LinphoneRegistrationOk: message = @"Registered"; break; case LinphoneRegistrationNone: - case LinphoneRegistrationCleared: - message = @"Not registered"; break; + case LinphoneRegistrationCleared: + message = @"Not registered"; break; case LinphoneRegistrationFailed: message = @"Registration failed"; break; case LinphoneRegistrationProgress: @@ -66,44 +111,46 @@ default: break; } } - - label.hidden = NO; + + registrationStateLabel.hidden = NO; switch(state) { case LinphoneRegistrationCleared: -/* image.hidden = NO; - [image setImage:[UIImage imageNamed:@"status_orange.png"]]; - [spinner stopAnimating]; - [label setText:message != nil ? message : NSLocalizedString(@"No SIP account defined", nil)];*/ + /* image.hidden = NO; + [image setImage:[UIImage imageNamed:@"status_orange.png"]]; + [spinner stopAnimating]; + [label setText:message != nil ? message : NSLocalizedString(@"No SIP account defined", nil)];*/ + break; case LinphoneRegistrationFailed: - image.hidden = NO; - [image setImage:[UIImage imageNamed:@"status_error.png"]]; - [spinner stopAnimating]; - [label setText:message]; + registrationStateImage.hidden = NO; + image = [UIImage imageNamed:@"status_error.png"]; + break; case LinphoneRegistrationNone: - image.hidden = NO; - [image setImage:[UIImage imageNamed:@"status_disconnected.png"]]; - [spinner stopAnimating]; - [label setText:message]; + registrationStateImage.hidden = NO; + image =[UIImage imageNamed:@"status_disconnected.png"]; + break; case LinphoneRegistrationProgress: - image.hidden = NO; - [image setImage:[UIImage imageNamed:@"status_inprogress.png"]]; - [spinner stopAnimating]; - [label setText:message]; + registrationStateImage.hidden = NO; + image = [UIImage imageNamed:@"status_inprogress.png"]; + break; case LinphoneRegistrationOk: - image.hidden = NO; - [image setImage:[UIImage imageNamed:@"status_connected.png"]]; - [spinner stopAnimating]; - [label setText:message]; + registrationStateImage.hidden = NO; + image = [UIImage imageNamed:@"status_connected.png"]; + break; } + [registrationStateLabel setText:message]; + [registrationStateImage setImage:image]; } - (void) viewDidUnload { [[NSNotificationCenter defaultCenter] removeObserver:self]; + [callQualityTimer invalidate]; } - (void) dealloc { - [super dealloc]; [[NSNotificationCenter defaultCenter] removeObserver:self]; + [callQualityTimer invalidate]; + [callQualityTimer release]; + [super dealloc]; } @end diff --git a/Classes/LinphoneUI/UIStateBar.xib b/Classes/LinphoneUI/UIStateBar.xib index 013370200..d692bb7d8 100644 --- a/Classes/LinphoneUI/UIStateBar.xib +++ b/Classes/LinphoneUI/UIStateBar.xib @@ -53,7 +53,7 @@ - -2147483356 + 292 {{6, 6}, {10, 10}} @@ -63,16 +63,16 @@ IBCocoaTouchFramework NSImage - status_gray.png + status_disconnected.png - -2147483356 - {{22, 0}, {298, 20}} + 292 + {{22, 0}, {189, 20}} - + _NS:328 NO YES @@ -97,6 +97,17 @@ 16 + + + 292 + {{219, 3}, {27, 17}} + + + + _NS:567 + NO + IBCocoaTouchFramework + {320, 23} @@ -112,22 +123,6 @@ - - - image - - - - 8 - - - - label - - - - 9 - view @@ -136,6 +131,30 @@ 11 + + + registrationStateImage + + + + 14 + + + + registrationStateLabel + + + + 15 + + + + callQualityImage + + + + 16 + @@ -163,6 +182,7 @@ + @@ -170,13 +190,13 @@ 6 - status + registrationStateLabel 5 - image + registrationStateImage 12 @@ -184,6 +204,12 @@ background + + 13 + + + callQualityImage + @@ -192,6 +218,7 @@ UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -200,9 +227,39 @@ - 12 + 16 + + + + + UIStateBar + UIViewController + + UIImageView + UIImageView + UILabel + + + + callQualityImage + UIImageView + + + registrationStateImage + UIImageView + + + registrationStateLabel + UILabel + + + + IBProjectSource + ./Classes/UIStateBar.h + + + - 0 IBCocoaTouchFramework @@ -213,7 +270,7 @@ 3 {640, 46} - {25, 23} + {18, 17} 1181 diff --git a/Classes/LinphoneUI/UIToggleButton.m b/Classes/LinphoneUI/UIToggleButton.m index 73e3caae3..c5a2b62c5 100644 --- a/Classes/LinphoneUI/UIToggleButton.m +++ b/Classes/LinphoneUI/UIToggleButton.m @@ -41,7 +41,7 @@ return self.selected; } -- (id) init { +- (id)init { [self update]; [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside]; return self; diff --git a/Classes/LinphoneUI/UIVideoButton.m b/Classes/LinphoneUI/UIVideoButton.m index 8d13c0495..98687629a 100644 --- a/Classes/LinphoneUI/UIVideoButton.m +++ b/Classes/LinphoneUI/UIVideoButton.m @@ -66,7 +66,7 @@ } - (bool)onUpdate { - @try { + if([LinphoneManager isLcReady]) { bool val = false; LinphoneCall* currentCall = linphone_core_get_current_call([LinphoneManager getLc]); if (currentCall) { @@ -83,7 +83,7 @@ [self setEnabled:FALSE]; } return val; - } @catch(NSException* e) { + } else { //not ready yet return false; } diff --git a/Classes/LinphoneUI/VideoZoomHandler.h b/Classes/LinphoneUI/VideoZoomHandler.h index 6065d2453..2b4bb3a86 100644 --- a/Classes/LinphoneUI/VideoZoomHandler.h +++ b/Classes/LinphoneUI/VideoZoomHandler.h @@ -1,10 +1,21 @@ -// -// VideoZoomHandler.h -// linphone -// -// Created by Pierre-Eric Pelloux-Prayer on 25/04/12. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// +/* VideoZoomHandler.h + * + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #import @@ -12,7 +23,8 @@ float zoomLevel, cx, cy; UIView* videoView; } --(void) setup: (UIView*) videoView; --(void) resetZoom; + +- (void) setup: (UIView*) videoView; +- (void) resetZoom; @end diff --git a/Classes/LinphoneUI/VideoZoomHandler.m b/Classes/LinphoneUI/VideoZoomHandler.m index 33c735f8f..ce529ba70 100644 --- a/Classes/LinphoneUI/VideoZoomHandler.m +++ b/Classes/LinphoneUI/VideoZoomHandler.m @@ -1,10 +1,21 @@ -// -// VideoZoomHandler.m -// linphone -// -// Created by Pierre-Eric Pelloux-Prayer on 25/04/12. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// +/* VideoZoomHandler.m + * + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #import "VideoZoomHandler.h" #include "linphonecore.h" @@ -12,8 +23,7 @@ @implementation VideoZoomHandler - --(void) zoomInOut:(UITapGestureRecognizer*) reco { +- (void)zoomInOut:(UITapGestureRecognizer*) reco { if (zoomLevel != 1) zoomLevel = 1; else @@ -29,7 +39,7 @@ linphone_call_zoom_video(linphone_core_get_current_call([LinphoneManager getLc]), zoomLevel, &cx, &cy); } --(void) videoPan:(UIPanGestureRecognizer*) reco { +- (void)videoPan:(UIPanGestureRecognizer*) reco { if (zoomLevel <= 1.0) return; @@ -53,7 +63,7 @@ cy = y; } --(void) pinch:(UIPinchGestureRecognizer*) reco { +- (void)pinch:(UIPinchGestureRecognizer*) reco { float s = zoomLevel; // CGPoint point = [reco locationInView:videoGroup]; // float ccx = cx + (point.x / videoGroup.frame.size.width - 0.5) / s; @@ -76,13 +86,12 @@ linphone_call_zoom_video(linphone_core_get_current_call([LinphoneManager getLc]), s, &cx, &cy); } --(void) resetZoom { +- (void)resetZoom { zoomLevel = 1; cx = cy = 0.5; } - --(void) setup: (UIView*) view { +- (void)setup: (UIView*) view { videoView = view; UITapGestureRecognizer* doubleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(zoomInOut:)]; @@ -101,4 +110,5 @@ [self resetZoom]; } + @end diff --git a/Classes/MainScreenWithVideoPreview.h b/Classes/MainScreenWithVideoPreview.h index e981e7d63..c02bd0647 100644 --- a/Classes/MainScreenWithVideoPreview.h +++ b/Classes/MainScreenWithVideoPreview.h @@ -19,11 +19,12 @@ #import #import -#import "PhoneViewController.h" + +#import "DialerViewController.h" @interface MainScreenWithVideoPreview : UIViewController { UIWindow *window; - PhoneViewController* phoneMainView; + DialerViewController* phoneMainView; AVCaptureSession* session; @@ -36,6 +37,6 @@ -(void) useCameraAtIndex:(NSInteger)camIndex startSession:(BOOL)start; -@property (nonatomic, retain) IBOutlet PhoneViewController* phoneMainView; +@property (nonatomic, retain) IBOutlet DialerViewController* phoneMainView; @property (nonatomic, retain) IBOutlet UIWindow *window; @end diff --git a/Classes/MainScreenWithVideoPreview.m b/Classes/MainScreenWithVideoPreview.m index c35983820..ff2927ad7 100644 --- a/Classes/MainScreenWithVideoPreview.m +++ b/Classes/MainScreenWithVideoPreview.m @@ -129,12 +129,8 @@ -(void) showPreview:(BOOL) show { LinphoneCore* lc; - @try { + if([LinphoneManager isLcReady]) lc = [LinphoneManager getLc]; - } - @catch (NSException *exception) { - return; - } bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"]; @@ -160,7 +156,8 @@ -(void) viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - [phoneMainView.switchCamera addTarget:self action:@selector(switchCameraPressed) forControlEvents:UIControlEventTouchUpInside]; + //TODO + //[phoneMainView.switchCamera addTarget:self action:@selector(switchCameraPressed) forControlEvents:UIControlEventTouchUpInside]; } -(void) viewDidDisappear:(BOOL)animated { diff --git a/Classes/PhoneMainView.h b/Classes/PhoneMainView.h index d730d95e8..dfe55a503 100644 --- a/Classes/PhoneMainView.h +++ b/Classes/PhoneMainView.h @@ -18,9 +18,22 @@ */ #import -#import "LinphoneManager.h" -@interface PhoneMainView : UIViewController { +#import "LinphoneManager.h" +#import "CallDelegate.h" + +@interface ViewsDescription: NSObject{ +@public + UIViewController *content; + UIViewController *tabBar; + bool tabBarEnabled; + bool statusEnabled; + bool fullscreen; +} +-(id) copy; +@end + +@interface PhoneMainView : UIViewController { UIView *stateBarView; UIView *contentView; UIView *tabBarView; @@ -34,8 +47,11 @@ UIViewController *callTabBarController; UIViewController *mainTabBarController; UIViewController *incomingCallTabBarController; + ViewsDescription *currentViewDescription; + UIActionSheet *incomingCallActionSheet; } + @property (nonatomic, retain) IBOutlet UIView* stateBarView; @property (nonatomic, retain) IBOutlet UIView* contentView; @property (nonatomic, retain) IBOutlet UIView* tabBarView; diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index fbc5c5301..72a6936ab 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -18,25 +18,22 @@ */ #import "PhoneMainView.h" -#import "PhoneViewController.h" +#import "DialerViewController.h" #import "HistoryViewController.h" #import "ContactsViewController.h" #import "InCallViewController.h" -typedef enum _TabBar { - TabBar_Main, - TabBar_END -} TabBar; - - -@interface ViewsDescription: NSObject{ - @public - UIViewController *content; - UIViewController *tabBar; - bool statusEnabled; -} -@end @implementation ViewsDescription + +-(id) copy { + ViewsDescription *copy = [ViewsDescription alloc]; + copy->content = self->content; + copy->tabBar = self->tabBar; + copy->tabBarEnabled = self->tabBarEnabled; + copy->statusEnabled = self->statusEnabled; + copy->fullscreen = self->fullscreen; + return copy; +} @end @implementation PhoneMainView @@ -52,33 +49,64 @@ typedef enum _TabBar { @synthesize incomingCallTabBarController; - (void)changeView: (NSNotification*) notif { - PhoneView view = [[notif.userInfo objectForKey: @"view"] intValue]; - ViewsDescription *description = [viewDescriptions objectForKey:[NSNumber numberWithInt: view]]; + NSNumber *viewId = [notif.userInfo objectForKey: @"view"]; + NSNumber *tabBar = [notif.userInfo objectForKey: @"tabBar"]; + NSNumber *fullscreen = [notif.userInfo objectForKey: @"fullscreen"]; - for (UIView *view in contentView.subviews) { - [view removeFromSuperview]; + if(viewId != nil) { + PhoneView view = [viewId intValue]; + currentViewDescription = [[viewDescriptions objectForKey:[NSNumber numberWithInt: view]] copy]; } - for (UIView *view in tabBarView.subviews) { - [view removeFromSuperview]; - } - if(description == nil) + + ViewsDescription *description = currentViewDescription; + if(description == nil) { return; + } UIView *innerView = description->content.view; - [contentView addSubview: innerView]; - CGRect contentFrame = contentView.frame; - if(description->statusEnabled) { - stateBarView.hidden = false; - contentFrame.origin.y = stateBarView.frame.size.height + stateBarView.frame.origin.y; - } else { - stateBarView.hidden = true; - contentFrame.origin.y = 0; + // Change view + if(viewId != nil) { + for (UIView *view in contentView.subviews) { + [view removeFromSuperview]; + } + for (UIView *view in tabBarView.subviews) { + [view removeFromSuperview]; + } + + [contentView addSubview: innerView]; + [tabBarView addSubview: description->tabBar.view]; } - // Resize tabbar + if(tabBar != nil) { + description->tabBarEnabled = [tabBar boolValue]; + } + + if(fullscreen != nil) { + description->fullscreen = [fullscreen boolValue]; + } + + CGRect contentFrame = contentView.frame; + + // Resize StateBar + CGRect stateBarFrame = stateBarView.frame; + if(description->fullscreen) + stateBarFrame.origin.y = -20; + else + stateBarFrame.origin.y = 0; + + if(description->statusEnabled) { + stateBarView.hidden = false; + [stateBarView setFrame: stateBarFrame]; + contentFrame.origin.y = stateBarFrame.size.height + stateBarFrame.origin.y; + } else { + stateBarView.hidden = true; + contentFrame.origin.y = stateBarFrame.origin.y; + } + + // Resize TabBar CGRect tabFrame = tabBarView.frame; - if(description->tabBar != nil) { + if(description->tabBar != nil && description->tabBarEnabled) { tabBarView.hidden = false; tabFrame.origin.y += tabFrame.size.height; tabFrame.origin.x += tabFrame.size.width; @@ -94,17 +122,20 @@ typedef enum _TabBar { break; } } - [tabBarView addSubview: description->tabBar.view]; } else { tabBarView.hidden = true; - contentFrame.size.height = tabFrame.origin.y - tabFrame.size.height; + contentFrame.size.height = tabFrame.origin.y + tabFrame.size.height; + if(description->fullscreen) + contentFrame.size.height += 20; } + // Resize innerView [contentView setFrame: contentFrame]; CGRect innerContentFrame = innerView.frame; innerContentFrame.size = contentFrame.size; [innerView setFrame: innerContentFrame]; + // Call abstractCall NSDictionary *dict = [notif.userInfo objectForKey: @"args"]; if(dict != nil) [LinphoneManager abstractCall:description->content dict:dict]; @@ -126,15 +157,17 @@ typedef enum _TabBar { // // Main View // - PhoneViewController* myPhoneViewController = [[PhoneViewController alloc] - initWithNibName:@"PhoneViewController" + DialerViewController* myDialerViewController = [[DialerViewController alloc] + initWithNibName:@"DialerViewController" bundle:[NSBundle mainBundle]]; //[myPhoneViewController loadView]; - ViewsDescription *mainViewDescription = [ViewsDescription alloc]; - mainViewDescription->content = myPhoneViewController; - mainViewDescription->tabBar = mainTabBarController; - mainViewDescription->statusEnabled = true; - [viewDescriptions setObject:mainViewDescription forKey:[NSNumber numberWithInt: PhoneView_Dialer]]; + ViewsDescription *dialerDescription = [ViewsDescription alloc]; + dialerDescription->content = myDialerViewController; + dialerDescription->tabBar = mainTabBarController; + dialerDescription->statusEnabled = true; + dialerDescription->fullscreen = false; + dialerDescription->tabBarEnabled = true; + [viewDescriptions setObject:dialerDescription forKey:[NSNumber numberWithInt: PhoneView_Dialer]]; // @@ -148,6 +181,8 @@ typedef enum _TabBar { contactsDescription->content = myContactsController; contactsDescription->tabBar = mainTabBarController; contactsDescription->statusEnabled = false; + contactsDescription->fullscreen = false; + contactsDescription->tabBarEnabled = true; [viewDescriptions setObject:contactsDescription forKey:[NSNumber numberWithInt: PhoneView_Contacts]]; @@ -162,6 +197,8 @@ typedef enum _TabBar { historyDescription->content = myHistoryController; historyDescription->tabBar = mainTabBarController; historyDescription->statusEnabled = false; + historyDescription->fullscreen = false; + historyDescription->tabBarEnabled = true; [viewDescriptions setObject:historyDescription forKey:[NSNumber numberWithInt: PhoneView_History]]; @@ -175,18 +212,218 @@ typedef enum _TabBar { ViewsDescription *inCallDescription = [ViewsDescription alloc]; inCallDescription->content = myInCallController; inCallDescription->tabBar = callTabBarController; - inCallDescription->statusEnabled = false; + inCallDescription->statusEnabled = true; + inCallDescription->fullscreen = false; + inCallDescription->tabBarEnabled = true; [viewDescriptions setObject:inCallDescription forKey:[NSNumber numberWithInt: PhoneView_InCall]]; - // Set observer + // Set observers [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeView:) name:@"LinphoneMainViewChange" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callUpdate:) name:@"LinphoneCallUpdate" object:nil]; } - (void)viewDidUnload { [[NSNotificationCenter defaultCenter] removeObserver:self]; } +- (void)callUpdate: (NSNotification*) notif { + LinphoneCallWrapper *callWrapper = [notif.userInfo objectForKey: @"call"]; + LinphoneCall *call = callWrapper->call; + LinphoneCallState state = [[notif.userInfo objectForKey: @"state"] intValue]; + NSString *message = [notif.userInfo objectForKey: @"message"]; + + bool canHideInCallView = (linphone_core_get_calls([LinphoneManager getLc]) == NULL); + + switch (state) { + case LinphoneCallIncomingReceived: + { + [self displayIncomingCall:call]; + break; + } + case LinphoneCallOutgoingInit: + case LinphoneCallPausedByRemote: + case LinphoneCallConnected: + case LinphoneCallUpdated: + { + if ([[LinphoneManager instance] currentView] != PhoneView_InCall) { + [[LinphoneManager instance] changeView:PhoneView_InCall]; + } + break; + } + case LinphoneCallUpdatedByRemote: + { + const LinphoneCallParams* current = linphone_call_get_current_params(call); + const LinphoneCallParams* remote = linphone_call_get_remote_params(call); + + /* remote wants to add video */ + if (!linphone_call_params_video_enabled(current) && + linphone_call_params_video_enabled(remote) && + !linphone_core_get_video_policy([LinphoneManager getLc])->automatically_accept) { + linphone_core_defer_call_update([LinphoneManager getLc], call); + //TODO + //[self displayAskToEnableVideoCall:call forUser:lUserName withDisplayName:lDisplayName]; + } else if (linphone_call_params_video_enabled(current) && !linphone_call_params_video_enabled(remote)) { + if ([[LinphoneManager instance] currentView] != PhoneView_InCall) { + [[LinphoneManager instance] changeView:PhoneView_InCall]; + } + } + break; + } + case LinphoneCallError: + { + [self displayCallError:call message: message]; + } + case LinphoneCallEnd: + { + [self dismissIncomingCall]; + if (canHideInCallView) { + if ([[LinphoneManager instance] currentView] != PhoneView_Dialer) { + // Go to dialer view + NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys: + [[NSArray alloc] initWithObjects: @"", nil] + , @"setAddress:", + nil]; + [[LinphoneManager instance] changeView:PhoneView_Dialer dict:dict]; + } + } else { + if ([[LinphoneManager instance] currentView] != PhoneView_InCall) { + [[LinphoneManager instance] changeView:PhoneView_InCall]; + } + } + break; + } + case LinphoneCallStreamsRunning: + { + if ([[LinphoneManager instance] currentView] != PhoneView_InCall) { + [[LinphoneManager instance] changeView:PhoneView_InCall]; + } + break; + } + default: + break; + } + +} + +- (void)displayCallError:(LinphoneCall*) call message:(NSString*) message { + const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(call)); + NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil); + NSString* lMessage; + NSString* lTitle; + + //get default proxy + LinphoneProxyConfig* proxyCfg; + linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg); + if (proxyCfg == nil) { + lMessage = NSLocalizedString(@"Please make sure your device is connected to the internet and double check your SIP account configuration in the settings.", nil); + } else { + lMessage = [NSString stringWithFormat : NSLocalizedString(@"Cannot call %@", nil), lUserName]; + } + + if (linphone_call_get_reason(call) == LinphoneReasonNotFound) { + lMessage = [NSString stringWithFormat : NSLocalizedString(@"'%@' not registered to Service", nil), lUserName]; + } else { + if (message != nil) { + lMessage = [NSString stringWithFormat : NSLocalizedString(@"%@\nReason was: %@", nil), lMessage, message]; + } + } + lTitle = NSLocalizedString(@"Call failed",nil); + UIAlertView* error = [[UIAlertView alloc] initWithTitle:lTitle + message:lMessage + delegate:nil + cancelButtonTitle:NSLocalizedString(@"Dismiss",nil) + otherButtonTitles:nil]; + [error show]; + [error release]; +} + +- (void)dismissIncomingCall { + //cancel local notification, just in case + if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] + && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground ) { + // cancel local notif if needed + [[UIApplication sharedApplication] cancelAllLocalNotifications]; + } else { + if (incomingCallActionSheet) { + [incomingCallActionSheet dismissWithClickedButtonIndex:1 animated:true]; + incomingCallActionSheet = nil; + } + } + + //TODO + /* + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlogindone_preference" ] == true) { + //first login case, dismmis first login view + [self dismissModalViewControllerAnimated:true]; + }; */ +} + + +- (void)displayIncomingCall:(LinphoneCall*) call{ + const char* userNameChars=linphone_address_get_username(linphone_call_get_remote_address(call)); + NSString* userName = userNameChars?[[[NSString alloc] initWithUTF8String:userNameChars] autorelease]:NSLocalizedString(@"Unknown",nil); + const char* displayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(call)); + NSString* displayName = [displayNameChars?[[NSString alloc] initWithUTF8String:displayNameChars]:@"" autorelease]; + + //TODO + //[mMainScreenWithVideoPreview showPreview:NO]; + if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] + && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) { + // Create a new notification + UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease]; + if (notif) + { + notif.repeatInterval = 0; + notif.alertBody =[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:userName]; + notif.alertAction = @"Answer"; + notif.soundName = @"oldphone-mono-30s.caf"; + NSData *callData = [NSData dataWithBytes:&call length:sizeof(call)]; + notif.userInfo = [NSDictionary dictionaryWithObject:callData forKey:@"call"]; + + [[UIApplication sharedApplication] presentLocalNotificationNow:notif]; + } + } else { + CallDelegate* cd = [[CallDelegate alloc] init]; + cd.eventType = CD_NEW_CALL; + cd.delegate = self; + cd.call = call; + + incomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:userName] + delegate:cd + cancelButtonTitle:nil + destructiveButtonTitle:NSLocalizedString(@"Answer",nil) + otherButtonTitles:NSLocalizedString(@"Decline",nil),nil]; + + incomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault; + //TODO + /*if ([LinphoneManager runningOnIpad]) { + if (self.modalViewController != nil) + [incomingCallActionSheet showInView:[self.modalViewController view]]; + else + [incomingCallActionSheet showInView:self.parentViewController.view]; + } else */{ + [incomingCallActionSheet showInView: self.view]; + } + [incomingCallActionSheet release]; + } +} + +- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type + clickedButtonAtIndex:(NSInteger)buttonIndex + withUserDatas:(void *)datas { + if (type != CD_NEW_CALL) + return; + + LinphoneCall* call = (LinphoneCall*)datas; + if (buttonIndex == actionSheet.destructiveButtonIndex) { + linphone_core_accept_call([LinphoneManager getLc], call); + } else { + linphone_core_terminate_call([LinphoneManager getLc], call); + } + incomingCallActionSheet = nil; +} + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -197,4 +434,5 @@ typedef enum _TabBar { [super dealloc]; } + @end \ No newline at end of file diff --git a/Classes/PhoneMainView.xib b/Classes/PhoneMainView.xib index 178a8c774..c9b528625 100644 --- a/Classes/PhoneMainView.xib +++ b/Classes/PhoneMainView.xib @@ -40,6 +40,17 @@ 292 YES + + + 314 + {{0, 23}, {320, 380}} + + + + _NS:9 + YES + IBCocoaTouchFramework + 274 @@ -55,24 +66,12 @@ YES IBCocoaTouchFramework - - - 314 - {{0, 23}, {320, 380}} - - - - _NS:9 - YES - IBCocoaTouchFramework - 280 {{0, 400}, {320, 60}} - _NS:9 1 @@ -169,7 +168,6 @@ {{160, 0}, {160, 77}} - _NS:9 NO @@ -268,7 +266,6 @@ {{192, 0}, {128, 72}} - _NS:9 NO @@ -364,7 +361,7 @@ NO - UIStatusBar + UIStateBar 1 @@ -1046,8 +1043,8 @@ {254, 144} {320, 154} {320, 154} - {132, 144} - {132, 144} + {128, 154} + {128, 154} {320, 154} {320, 154} diff --git a/Classes/PhoneViewController.h b/Classes/PhoneViewController.h deleted file mode 100644 index 2312ce397..000000000 --- a/Classes/PhoneViewController.h +++ /dev/null @@ -1,101 +0,0 @@ -/* PhoneViewController.h - * - * Copyright (C) 2009 Belledonne Comunications, Grenoble, France - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#import -#import -#import "linphonecore.h" -#import "UILinphone.h" -#import "CallDelegate.h" - -@class MainScreenWithVideoPreview; -@class InCallViewController; -@class FirstLoginViewController; - - -@interface PhoneViewController : UIViewController { - -@private - //UI definition - UIView* dialerView; - UITextField* address; - UILabel* mDisplayName; - UIEraseButton* erase; - UICallButton* callShort; - UICallButton* callLarge; - - UILabel* status; - - //key pad - UIDigitButton* one; - UIDigitButton* two; - UIDigitButton* three; - UIDigitButton* four; - UIDigitButton* five; - UIDigitButton* six; - UIDigitButton* seven; - UIDigitButton* eight; - UIDigitButton* nine; - UIDigitButton* star; - UIDigitButton* zero; - UIDigitButton* hash; - - UIButton* backToCallView; - UIView* statusViewHolder; - - UITabBarController* myTabBarController; - - UIActionSheet *mIncomingCallActionSheet; - FirstLoginViewController* myFirstLoginViewController; - MainScreenWithVideoPreview* mMainScreenWithVideoPreview; - - UIButton* switchCamera; -} - -@property (nonatomic, retain) IBOutlet UIView* dialerView; - -@property (nonatomic, retain) IBOutlet UITextField* address; -@property (nonatomic, retain) IBOutlet UILabel* mDisplayName; -@property (nonatomic, retain) IBOutlet UIButton* callShort; -@property (nonatomic, retain) IBOutlet UIButton* callLarge; -@property (nonatomic, retain) IBOutlet UILabel* status; -@property (nonatomic, retain) IBOutlet UIEraseButton* erase; - -@property (nonatomic, retain) IBOutlet UIButton* one; -@property (nonatomic, retain) IBOutlet UIButton* two; -@property (nonatomic, retain) IBOutlet UIButton* three; -@property (nonatomic, retain) IBOutlet UIButton* four; -@property (nonatomic, retain) IBOutlet UIButton* five; -@property (nonatomic, retain) IBOutlet UIButton* six; -@property (nonatomic, retain) IBOutlet UIButton* seven; -@property (nonatomic, retain) IBOutlet UIButton* eight; -@property (nonatomic, retain) IBOutlet UIButton* nine; -@property (nonatomic, retain) IBOutlet UIButton* star; -@property (nonatomic, retain) IBOutlet UIButton* zero; -@property (nonatomic, retain) IBOutlet UIButton* hash; - -@property (nonatomic, retain) IBOutlet UIView* statusViewHolder; - -@property (nonatomic, retain) IBOutlet UIButton* backToCallView; - -@property (nonatomic, retain) IBOutlet UIButton* switchCamera; - -@property (nonatomic, retain) IBOutlet UITabBarController* myTabBarController; -@property (nonatomic, retain) IBOutlet MainScreenWithVideoPreview* mMainScreenWithVideoPreview; --(IBAction) onAddContact: (id) event; -@end diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m deleted file mode 100644 index e8a7f5a48..000000000 --- a/Classes/PhoneViewController.m +++ /dev/null @@ -1,462 +0,0 @@ -/* PhoneViewController.h - * - * Copyright (C) 2009 Belledonne Comunications, Grenoble, France - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#import "PhoneViewController.h" -#import "linphoneAppDelegate.h" -#import "IncallViewController.h" -#import -#import -#import "LinphoneManager.h" -#include "FirstLoginViewController.h" -#include "MainScreenWithVideoPreview.h" -#include "linphonecore.h" -#include "private.h" -#import "PhoneMainView.h" - -@implementation PhoneViewController -@synthesize dialerView; -@synthesize mDisplayName; -@synthesize address; -@synthesize callShort; -@synthesize callLarge; -@synthesize status; -@synthesize erase; - -@synthesize one; -@synthesize two; -@synthesize three; -@synthesize four; -@synthesize five; -@synthesize six; -@synthesize seven; -@synthesize eight; -@synthesize nine; -@synthesize star; -@synthesize zero; -@synthesize hash; - -@synthesize statusViewHolder; - -@synthesize myTabBarController; -@synthesize mMainScreenWithVideoPreview; -@synthesize backToCallView; - -@synthesize switchCamera; - -- (void)updateCallAndBackButtons { - @try { - bool zeroCall = (linphone_core_get_calls_nb([LinphoneManager getLc]) == 0); - - [LinphoneManager set:callLarge hidden:!zeroCall withName:"CALL_LARGE button" andReason:__FUNCTION__]; - [LinphoneManager set:switchCamera hidden:!zeroCall withName:"SWITCH_CAM button" andReason:__FUNCTION__]; - [LinphoneManager set:callShort hidden:zeroCall withName:"CALL_SHORT button" andReason:__FUNCTION__]; - [LinphoneManager set:backToCallView hidden:zeroCall withName:"BACK button" andReason:__FUNCTION__]; - - [callShort setTitle:[UICallButton transforModeEnabled] ? @"transfer":@"call" forState:UIControlStateNormal]; - - if (!callShort.hidden) - [callShort setEnabled:!linphone_core_sound_resources_locked([LinphoneManager getLc])]; - } @catch (NSException* exc) { - // R.A.S: linphone core si simply not ready... - ms_warning("Catched exception %s: %s", - [exc.name cStringUsingEncoding:[NSString defaultCStringEncoding]], - [exc.reason cStringUsingEncoding:[NSString defaultCStringEncoding]]); - } -} - - -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == true) { - myFirstLoginViewController = [[FirstLoginViewController alloc] initWithNibName:@"FirstLoginViewController" - bundle:[NSBundle mainBundle]]; - [self presentModalViewController:myFirstLoginViewController animated:true]; - } - // [[LinphoneManager instance] setRegistrationDelegate:self]; - - [mMainScreenWithVideoPreview showPreview:YES]; - [self updateCallAndBackButtons]; -} - -- (void)viewDidDisappear:(BOOL)animated { - [super viewDidDisappear:animated]; -} - - -// Implement viewDidLoad to do additional setup after loading the view, typically from a nib : may be called twice -- (void)viewDidLoad { - [super viewDidLoad]; - - // Set observer - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callUpdate:) name:@"LinphoneCallUpdate" object:nil]; - - [mDisplayName release]; - mDisplayName = [UILabel alloc]; - [zero initWithNumber:'0' addressField:address dtmf:false]; - [one initWithNumber:'1' addressField:address dtmf:false]; - [two initWithNumber:'2' addressField:address dtmf:false]; - [three initWithNumber:'3' addressField:address dtmf:false]; - [four initWithNumber:'4' addressField:address dtmf:false]; - [five initWithNumber:'5' addressField:address dtmf:false]; - [six initWithNumber:'6' addressField:address dtmf:false]; - [seven initWithNumber:'7' addressField:address dtmf:false]; - [eight initWithNumber:'8' addressField:address dtmf:false]; - [nine initWithNumber:'9' addressField:address dtmf:false]; - [star initWithNumber:'*' addressField:address dtmf:false]; - [hash initWithNumber:'#' addressField:address dtmf:false]; - [callShort initWithAddress:address]; - [callLarge initWithAddress:address]; - [erase initWithAddressField:address]; - [backToCallView addTarget:self action:@selector(backToCallViewPressed) forControlEvents:UIControlEventTouchUpInside]; - - /*if (statusSubViewController == nil) { - statusSubViewController = [[StatusSubViewController alloc] initWithNibName:@"StatusSubViewController" - bundle:[NSBundle mainBundle]]; - [statusViewHolder addSubview:statusSubViewController.view]; - }*/ - - [self updateCallAndBackButtons]; -} - -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -- (void)viewDidUnload { - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -- (BOOL)textFieldShouldReturn:(UITextField *)theTextField { - if (theTextField == address) { - [address resignFirstResponder]; - [mDisplayName setText:@""]; //display name only relefvant - - } - return YES; -} - -- (void)viewWillAppear:(BOOL)animated { - [self updateCallAndBackButtons]; - [super viewWillAppear:animated]; -} - -- (void)callUpdate: (NSNotification*) notif { - LinphoneCallWrapper *callWrapper = [notif.userInfo objectForKey: @"call"]; - LinphoneCall *call = callWrapper->call; - LinphoneCallState state = [[notif.userInfo objectForKey: @"state"] intValue]; - - const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(call)); - NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil); - const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(call)); - NSString* lDisplayName = [lDisplayNameChars?[[NSString alloc] initWithUTF8String:lDisplayNameChars]:@"" autorelease]; - - bool canHideInCallView = (linphone_core_get_calls([LinphoneManager getLc]) == NULL); - - switch (state) { - case LinphoneCallIncomingReceived: - [self displayIncomingCall:call - NotificationFromUI:nil - forUser:lUserName - withDisplayName:lDisplayName]; - break; - - case LinphoneCallOutgoingInit: - [self displayCall:call - InProgressFromUI:nil - forUser:lUserName - withDisplayName:lDisplayName]; - break; - case LinphoneCallPausedByRemote: - case LinphoneCallConnected: - [self displayInCall: call - FromUI:nil - forUser:lUserName - withDisplayName:lDisplayName]; - break; - case LinphoneCallUpdatedByRemote: - { - const LinphoneCallParams* current = linphone_call_get_current_params(call); - const LinphoneCallParams* remote = linphone_call_get_remote_params(call); - - /* remote wants to add video */ - if (!linphone_call_params_video_enabled(current) && - linphone_call_params_video_enabled(remote) && - !linphone_core_get_video_policy([LinphoneManager getLc])->automatically_accept) { - linphone_core_defer_call_update([LinphoneManager getLc], call); - [self displayAskToEnableVideoCall:call forUser:lUserName withDisplayName:lDisplayName]; - } else if (linphone_call_params_video_enabled(current) && !linphone_call_params_video_enabled(remote)) { - [self displayInCall:call FromUI:nil forUser:lUserName withDisplayName:lDisplayName]; - } - break; - } - case LinphoneCallUpdated: - { - const LinphoneCallParams* current = linphone_call_get_current_params(call); - if (linphone_call_params_video_enabled(current)) { - [self displayVideoCall:call FromUI:nil forUser:lUserName withDisplayName:lDisplayName]; - } else { - [self displayInCall:call FromUI:nil forUser:lUserName withDisplayName:lDisplayName]; - } - break; - - } - case LinphoneCallError: { - if (canHideInCallView) { - [self displayDialerFromUI:nil - forUser:@"" - withDisplayName:@""]; - } else { - [self displayInCall:call - FromUI:nil - forUser:lUserName - withDisplayName:lDisplayName]; - } - break; - } - case LinphoneCallEnd: - if (canHideInCallView) { - [self displayDialerFromUI:nil - forUser:@"" - withDisplayName:@""]; - } else { - [self displayInCall:call - FromUI:nil - forUser:lUserName - withDisplayName:lDisplayName]; - } - break; - case LinphoneCallStreamsRunning: - //check video - if (linphone_call_params_video_enabled(linphone_call_get_current_params(call))) { - [self displayVideoCall:call FromUI:nil - forUser:lUserName - withDisplayName:lDisplayName]; - } else { - [self displayInCall:call FromUI:nil forUser:lUserName withDisplayName:lDisplayName]; - } - break; - default: - break; - } - -} - -- (void)displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { - - //cancel local notification, just in case - if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] - && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground ) { - // cancel local notif if needed - [[UIApplication sharedApplication] cancelAllLocalNotifications]; - } else { - if (mIncomingCallActionSheet) { - [mIncomingCallActionSheet dismissWithClickedButtonIndex:1 animated:true]; - mIncomingCallActionSheet=nil; - } - } - - if (username) { - [address setText:username]; - } //else keep previous - - [mDisplayName setText:displayName]; - - [self updateCallAndBackButtons]; - - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlogindone_preference" ] == true) { - //first login case, dismmis first login view - [self dismissModalViewControllerAnimated:true]; - }; - - [[LinphoneManager instance] changeView:PhoneView_Dialer]; - - [mMainScreenWithVideoPreview showPreview:YES]; -} - -- (void)displayIncomingCall:(LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { - [mMainScreenWithVideoPreview showPreview:NO]; - if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] - && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) { - // Create a new notification - UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease]; - if (notif) - { - notif.repeatInterval = 0; - notif.alertBody =[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username]; - notif.alertAction = @"Answer"; - notif.soundName = @"oldphone-mono-30s.caf"; - NSData *callData = [NSData dataWithBytes:&call length:sizeof(call)]; - notif.userInfo = [NSDictionary dictionaryWithObject:callData forKey:@"call"]; - - [[UIApplication sharedApplication] presentLocalNotificationNow:notif]; - } - } else { - CallDelegate* cd = [[CallDelegate alloc] init]; - cd.eventType = CD_NEW_CALL; - cd.delegate = self; - cd.call = call; - - mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username] - delegate:cd - cancelButtonTitle:nil - destructiveButtonTitle:NSLocalizedString(@"Answer",nil) - otherButtonTitles:NSLocalizedString(@"Decline",nil),nil]; - - mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault; - if ([LinphoneManager runningOnIpad]) { - if (self.modalViewController != nil) - [mIncomingCallActionSheet showInView:[self.modalViewController view]]; - else - [mIncomingCallActionSheet showInView:self.parentViewController.view]; - } else { - [mIncomingCallActionSheet showInView:self.parentViewController.view]; - } - [mIncomingCallActionSheet release]; - } - - [mMainScreenWithVideoPreview showPreview:NO]; -} - -- (void)backToCallViewPressed { - [UICallButton enableTransforMode:NO]; - [[LinphoneManager instance] changeView:PhoneView_InCall]; - - LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); - - if (!call || !linphone_call_params_video_enabled(linphone_call_get_current_params(call)) || linphone_call_get_state(call) != LinphoneCallStreamsRunning) { - [self displayInCall: call - FromUI:nil - forUser:nil - withDisplayName:nil]; - } else { - [self displayVideoCall:call FromUI:nil forUser:nil withDisplayName:nil]; - } -} - -- (void)displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { - [mMainScreenWithVideoPreview showPreview:NO]; - if ([[LinphoneManager instance]currentView] != PhoneView_InCall) { - [[LinphoneManager instance] changeView:PhoneView_InCall]; - } - - [mMainScreenWithVideoPreview showPreview:NO]; -} - -- (void)displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { - [mMainScreenWithVideoPreview showPreview:NO]; - if ([[LinphoneManager instance]currentView] != PhoneView_InCall && (call == 0x0 || - linphone_call_get_dir(call)==LinphoneCallIncoming)){ - [[LinphoneManager instance] changeView:PhoneView_InCall]; - } - - [LinphoneManager set:callLarge hidden:YES withName:"CALL_LARGE button" andReason:__FUNCTION__]; - [LinphoneManager set:switchCamera hidden:YES withName:"SWITCH_CAMERA button" andReason:__FUNCTION__]; - [LinphoneManager set:callShort hidden:NO withName:"CALL_SHORT button" andReason:__FUNCTION__]; - [LinphoneManager set:backToCallView hidden:NO withName:"CALL_BACK button" andReason:__FUNCTION__]; - - [self updateCallAndBackButtons]; -} - - -- (void)displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { - [mMainScreenWithVideoPreview showPreview:NO]; - - [mMainScreenWithVideoPreview showPreview:NO]; - [self updateCallAndBackButtons]; -} - -- (void)displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName { -} - -- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas { - if (type != CD_NEW_CALL) - return; - - LinphoneCall* call = (LinphoneCall*)datas; - if (buttonIndex == actionSheet.destructiveButtonIndex ) { - linphone_core_accept_call([LinphoneManager getLc],call); - } else { - linphone_core_terminate_call ([LinphoneManager getLc], call); - } - mIncomingCallActionSheet = nil; -} - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [address dealloc]; - [mDisplayName dealloc]; - [dialerView dealloc]; - [callShort dealloc]; - [callLarge dealloc]; - [status dealloc]; - [one dealloc]; - [two dealloc]; - [three dealloc]; - [four dealloc]; - [five dealloc]; - [six dealloc]; - [seven dealloc]; - [eight dealloc]; - [nine dealloc]; - [star dealloc]; - [zero dealloc]; - [hash dealloc]; - [myTabBarController release]; - [super dealloc]; -} - -- (void)displayRegisteredFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain { - if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) { - //[myFirstLoginViewController displayRegisteredFromUI:viewCtrl forUser:username withDisplayName:displayName onDomain:domain]; - } -} - -- (void)displayRegisteringFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain { - if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) { - //[myFirstLoginViewController displayRegisteringFromUI:viewCtrl forUser:username withDisplayName:displayName onDomain:domain]; - } -} - -- (void)displayRegistrationFailedFromUI:(UIViewController*) viewCtrl forUser:(NSString*) user withDisplayName:(NSString*) displayName onDomain:(NSString*)domain forReason:(NSString*) reason { - if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) { - //[myFirstLoginViewController displayRegistrationFailedFromUI:viewCtrl forUser:user withDisplayName:displayName onDomain:domain forReason:reason]; - } -} - -- (void)displayNotRegisteredFromUI:(UIViewController*) viewCtrl { - if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) { - //[myFirstLoginViewController displayNotRegisteredFromUI:viewCtrl]; - } -} - -- (void)firstVideoFrameDecoded: (LinphoneCall*) call { - // [mIncallViewController firstVideoFrameDecoded:call]; -} - -- (IBAction)onAddContact: (id) event { - -} - - -@end diff --git a/Classes/VideoViewController-ipad.xib b/Classes/VideoViewController-ipad.xib deleted file mode 100644 index 01b0daa4c..000000000 --- a/Classes/VideoViewController-ipad.xib +++ /dev/null @@ -1,993 +0,0 @@ - - - - 1280 - 11C74 - 1938 - 1138.23 - 567.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 933 - - - IBUIButton - IBUIImageView - IBUIView - IBProxyObject - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - {768, 1024} - - - - - 4 - MAA - - IBIPadFramework - - - - 274 - - - - 292 - {768, 1024} - - - - _NS:569 - NO - IBIPadFramework - - - - 292 - {{329, 962}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - stopcall-red.png - - - NSImage - clavier-01-108px.png - - - Helvetica-Bold - Helvetica - 2 - 15 - - - Helvetica-Bold - 15 - 16 - - - - - 292 - {{223, 962}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 292 - {{598, 799}, {170, 225}} - - - - - 3 - MQA - - 2 - - - IBIPadFramework - - - - 292 - {{436, 962}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - 1 - switch - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 292 - {{20, 976}, {28, 28}} - - - - _NS:567 - NO - IBIPadFramework - - - {768, 1024} - - - - _NS:212 - - 3 - MC42NjY2NjY2NjY3AA - - IBIPadFramework - - - - 274 - - - - 292 - {1024, 768} - - - - _NS:569 - NO - IBIPadFramework - - - - 292 - {{799, 598}, {225, 170}} - - - - 3 - MQA - - - IBIPadFramework - - - - 292 - {{351, 706}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 292 - {{458, 706}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - - 292 - {{565, 706}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - 1 - switch - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 292 - {{20, 720}, {28, 28}} - - - _NS:567 - NO - IBIPadFramework - - - {1024, 768} - - - - _NS:212 - - 1 - MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA - - - 3 - 3 - - IBIPadFramework - - - - 274 - - - - 292 - {1024, 768} - - - - _NS:569 - NO - IBIPadFramework - - - - 292 - {{799, 598}, {225, 170}} - - - - 3 - MQA - - - IBIPadFramework - - - - 292 - {{351, 706}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 292 - {{458, 706}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - - 292 - {{565, 706}, {108, 62}} - - - - NO - IBIPadFramework - 0 - 0 - 1 - switch - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 292 - {{20, 720}, {28, 28}} - - - _NS:567 - NO - IBIPadFramework - - - {1024, 768} - - - - _NS:212 - - 1 - MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA - - - 3 - 3 - - IBIPadFramework - - - - - - - mCamSwitch - - - - 13 - - - - mHangUp - - - - 16 - - - - mPortrait - - - - 19 - - - - mPreview - - - - 20 - - - - view - - - - 22 - - - - mMute - - - - 23 - - - - mDisplay - - - - 27 - - - - mCamSwitchLandLeft - - - - 35 - - - - mCamSwitchLandRight - - - - 36 - - - - mDisplayLandLeft - - - - 37 - - - - mDisplayLandRight - - - - 38 - - - - mHangUpLandLeft - - - - 39 - - - - mHangUpLandRight - - - - 40 - - - - mLandscapeLeft - - - - 41 - - - - mLandscapeRight - - - - 42 - - - - mMuteLandLeft - - - - 43 - - - - mMuteLandRight - - - - 44 - - - - mPreviewLandLeft - - - - 45 - - - - mPreviewLandRight - - - - 46 - - - - mCallQuality - - - - 51 - - - - mCallQualityLandLeft - - - - 52 - - - - mCallQualityLandRight - - - - 53 - - - - - - 0 - - - - - - 1 - - - - root - - - -1 - - - File's Owner - - - -2 - - - - - 3 - - - - - - - - - - - portrait - - - 4 - - - - - - - - - - - landscape-right - - - 5 - - - Hang Up Button - - - 6 - - - - - 7 - - - preview - - - 8 - - - - - 10 - - - - preview - - - 11 - - - Hang Up Button - - - 12 - - - - - 9 - - - - - 25 - - - - - 26 - - - - - 29 - - - - - - - - - - - landscape-left - - - 30 - - - - - 31 - - - Hang Up Button - - - 32 - - - - - 33 - - - preview - - - 34 - - - - - 48 - - - - - 49 - - - - - 50 - - - - - - - VideoViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIHangUpButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UICamSwitch - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIMuteButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIHangUpButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UICamSwitch - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIHangUpButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIMuteButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UICamSwitch - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIMuteButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 53 - - - - - UICamSwitch - UIButton - - preview - UIView - - - preview - - preview - UIView - - - - IBProjectSource - ./Classes/UICamSwitch.h - - - - UIHangUpButton - UIButton - - IBProjectSource - ./Classes/UIHangUpButton.h - - - - UIMuteButton - UIToggleButton - - IBProjectSource - ./Classes/UIMuteButton.h - - - - UIToggleButton - UIButton - - IBProjectSource - ./Classes/UIToggleButton.h - - - - VideoViewController - UIViewController - - UIImageView - UIImageView - UIImageView - UICamSwitch - UICamSwitch - UICamSwitch - UIView - UIView - UIView - UIHangUpButton - UIHangUpButton - UIHangUpButton - UIView - UIView - UIMuteButton - UIMuteButton - UIMuteButton - UIView - UIView - UIView - UIView - - - - mCallQuality - UIImageView - - - mCallQualityLandLeft - UIImageView - - - mCallQualityLandRight - UIImageView - - - mCamSwitch - UICamSwitch - - - mCamSwitchLandLeft - UICamSwitch - - - mCamSwitchLandRight - UICamSwitch - - - mDisplay - UIView - - - mDisplayLandLeft - UIView - - - mDisplayLandRight - UIView - - - mHangUp - UIHangUpButton - - - mHangUpLandLeft - UIHangUpButton - - - mHangUpLandRight - UIHangUpButton - - - mLandscapeLeft - UIView - - - mLandscapeRight - UIView - - - mMute - UIMuteButton - - - mMuteLandLeft - UIMuteButton - - - mMuteLandRight - UIMuteButton - - - mPortrait - UIView - - - mPreview - UIView - - - mPreviewLandLeft - UIView - - - mPreviewLandRight - UIView - - - - IBProjectSource - ./Classes/VideoViewController.h - - - - - 0 - IBIPadFramework - YES - 3 - - {108, 60} - {62, 54} - - 933 - - diff --git a/Classes/VideoViewController.h b/Classes/VideoViewController.h deleted file mode 100644 index b7a31603a..000000000 --- a/Classes/VideoViewController.h +++ /dev/null @@ -1,74 +0,0 @@ -/* VideoViewController.h - * - * Copyright (C) 2011 Belledonne Comunications, Grenoble, France - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -#import -#import "UILinphone.h" - -@interface VideoViewController : UIViewController { - UIView* mPortrait; - UIView* mDisplay; - UIView* mPreview; - UIMicroButton* mMute; - UIHangUpButton* mHangUp; - UICamSwitch* mCamSwitch; - - UIView* mLandscapeRight; - UIView* mDisplayLandRight; - UIView* mPreviewLandRight; - UIMicroButton* mMuteLandRight; - UIHangUpButton* mHangUpLandRight; - UICamSwitch* mCamSwitchLandRight; - - UIView* mLandscapeLeft; - UIView* mDisplayLandLeft; - UIView* mPreviewLandLeft; - UIMicroButton* mMuteLandLeft; - UIHangUpButton* mHangUpLandLeft; - UICamSwitch* mCamSwitchLandLeft; - BOOL isFirst; - int maxCall; - -} - -@property (nonatomic, retain) IBOutlet UIView* mPortrait; -@property (nonatomic, retain) IBOutlet UIView* mDisplay; -@property (nonatomic, retain) IBOutlet UIView* mPreview; -@property (nonatomic, retain) IBOutlet UIMicroButton* mMute; -@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUp; -@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitch; -@property (nonatomic, retain) IBOutlet UIImageView *mCallQuality; - -@property (nonatomic, retain) IBOutlet UIView* mLandscapeRight; -@property (nonatomic, retain) IBOutlet UIView* mDisplayLandRight; -@property (nonatomic, retain) IBOutlet UIView* mPreviewLandRight; -@property (nonatomic, retain) IBOutlet UIMicroButton* mMuteLandRight; -@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUpLandRight; -@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitchLandRight; -@property (nonatomic, retain) IBOutlet UIImageView *mCallQualityLandRight; - -@property (nonatomic, retain) IBOutlet UIView* mLandscapeLeft; -@property (nonatomic, retain) IBOutlet UIView* mDisplayLandLeft; -@property (nonatomic, retain) IBOutlet UIView* mPreviewLandLeft; -@property (nonatomic, retain) IBOutlet UIMicroButton* mMuteLandLeft; -@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUpLandLeft; -@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitchLandLeft; -@property (retain, nonatomic) IBOutlet UIImageView *mCallQualityLandLeft; - -- (void) updateCallQualityIndicator; - -@end \ No newline at end of file diff --git a/Classes/VideoViewController.m b/Classes/VideoViewController.m deleted file mode 100644 index 2da07cf5c..000000000 --- a/Classes/VideoViewController.m +++ /dev/null @@ -1,230 +0,0 @@ -/* VideoViewController.m - * - * Copyright (C) 2011 Belledonne Comunications, Grenoble, France - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#import "VideoViewController.h" -#import "LinphoneManager.h" -#import - -@implementation VideoViewController -@synthesize mPortrait; -@synthesize mDisplay; -@synthesize mPreview; -@synthesize mMute; -@synthesize mHangUp; -@synthesize mCamSwitch; -@synthesize mCallQuality; - -@synthesize mLandscapeRight; -@synthesize mDisplayLandRight; -@synthesize mPreviewLandRight; -@synthesize mMuteLandRight; -@synthesize mHangUpLandRight; -@synthesize mCamSwitchLandRight; -@synthesize mCallQualityLandRight; - -@synthesize mLandscapeLeft; -@synthesize mDisplayLandLeft; -@synthesize mPreviewLandLeft; -@synthesize mMuteLandLeft; -@synthesize mHangUpLandLeft; -@synthesize mCamSwitchLandLeft; -@synthesize mCallQualityLandLeft; - -NSTimer *callQualityRefresher; - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)dealloc -{ - [mCallQuality release]; - [mCallQualityLandRight release]; - [mCallQualityLandLeft release]; - [super dealloc]; -} - -- (void)didReceiveMemoryWarning -{ - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -#pragma mark - View lifecycle - -- (void)viewDidLoad -{ - [super viewDidLoad]; - /*[mMute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE button"]; - [mMuteLandRight initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE2 button"]; - [mMuteLandLeft initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE3 button"];*/ - [mCamSwitch setPreview:mPreview]; - [mCamSwitchLandRight setPreview:mPreviewLandRight]; - [mCamSwitchLandLeft setPreview:mPreviewLandLeft]; - - isFirst=TRUE; -} - -- (void) updateCallQualityIndicator -{ - LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); - if (!call) - return; - - if (linphone_call_get_average_quality(call) >= 4) { - [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_4.png"]]; - [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_4.png"]]; - [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_4.png"]]; - } - else if (linphone_call_get_average_quality(call) >= 3) { - [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_3.png"]]; - [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_3.png"]]; - [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_3.png"]]; - } - else if (linphone_call_get_average_quality(call) >= 2) { - [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_2.png"]]; - [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_2.png"]]; - [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_2.png"]]; - } - else if (linphone_call_get_average_quality(call) >= 1) { - [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_1.png"]]; - [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_1.png"]]; - [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_1.png"]]; - } - else { - [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_0.png"]]; - [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_0.png"]]; - [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_0.png"]]; - } -} - - --(void) configureOrientation:(UIInterfaceOrientation) oritentation { - int oldLinphoneOrientation = linphone_core_get_device_rotation([LinphoneManager getLc]); - if (oritentation == UIInterfaceOrientationPortrait ) { - [self.view addSubview:mPortrait]; - linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplay); - linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreview); - linphone_core_set_device_rotation([LinphoneManager getLc], 0); - - } else if (oritentation == UIInterfaceOrientationLandscapeRight ) { - [self.view addSubview:mLandscapeRight]; - linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplayLandRight); - linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreviewLandRight); - linphone_core_set_device_rotation([LinphoneManager getLc], 270); - - } else if (oritentation == UIInterfaceOrientationLandscapeLeft ) { - [self.view addSubview:mLandscapeLeft]; - linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplayLandLeft); - linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreviewLandLeft); - linphone_core_set_device_rotation([LinphoneManager getLc], 90); - } - if ((oldLinphoneOrientation != linphone_core_get_device_rotation([LinphoneManager getLc])) - && linphone_core_get_current_call([LinphoneManager getLc])) { - //Orientation has change, must call update call - linphone_core_update_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), NULL); - } -} - --(void) configureOrientation { - [self configureOrientation:self.interfaceOrientation]; -} - -- (void)viewDidUnload -{ - [mCallQuality release]; - mCallQuality = nil; - [self setMCallQualityLandRight:nil]; - [self setMCallQualityLandLeft:nil]; - [super viewDidUnload]; - - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; -} - - --(void) viewDidDisappear:(BOOL)animated{ - [super viewDidDisappear:animated]; - [[UIApplication sharedApplication] setIdleTimerDisabled:NO]; - linphone_core_set_max_calls([LinphoneManager getLc], maxCall); - - if (callQualityRefresher != nil) { - [callQualityRefresher invalidate]; - callQualityRefresher=nil; - } -} - --(void) viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - //redirect audio to speaker - UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; - AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute - , sizeof (audioRouteOverride) - , &audioRouteOverride); - - - [self performSelectorOnMainThread:@selector(configureOrientation) - withObject:nil - waitUntilDone:YES]; - [mMute update]; - [mMuteLandRight update]; - [mMuteLandLeft update]; - maxCall = linphone_core_get_max_calls([LinphoneManager getLc]); - linphone_core_set_max_calls([LinphoneManager getLc], 1); -} - -- (void) viewDidAppear:(BOOL)animated{ - [super viewDidAppear:animated]; - [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; - - callQualityRefresher = [NSTimer scheduledTimerWithTimeInterval:1 - target:self - selector:@selector(updateCallQualityIndicator) - userInfo:nil - repeats:YES]; -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - BOOL result = interfaceOrientation == UIInterfaceOrientationPortrait - || interfaceOrientation == UIInterfaceOrientationLandscapeRight - || interfaceOrientation == UIInterfaceOrientationLandscapeLeft; - - return result; -} - -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [self configureOrientation:self.interfaceOrientation]; - [mMute update]; - [mMuteLandRight update]; - [mMuteLandLeft update]; -} -- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { - [mLandscapeLeft removeFromSuperview]; - [mLandscapeRight removeFromSuperview]; - [mPortrait removeFromSuperview]; -} -@end diff --git a/Classes/VideoViewController.xib b/Classes/VideoViewController.xib deleted file mode 100644 index f7c680281..000000000 --- a/Classes/VideoViewController.xib +++ /dev/null @@ -1,919 +0,0 @@ - - - - 1280 - 11C74 - 1938 - 1138.23 - 567.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 933 - - - YES - IBUIButton - IBUIImageView - IBUIView - IBProxyObject - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 292 - {320, 460} - - - 1 - MCAwIDAAA - - IBCocoaTouchFramework - - - - 274 - - YES - - - 274 - {320, 420} - - - 1 - NO - IBCocoaTouchFramework - - - - 292 - {{1, 418}, {108, 62}} - - - NO - IBCocoaTouchFramework - 0 - 0 - - 3 - MQA - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 3 - MC41AA - - - NSImage - clavier-01-108px.png - - - Helvetica-Bold - Helvetica - 2 - 15 - - - Helvetica-Bold - 15 - 16 - - - - - 292 - {{106, 418}, {106, 63}} - - - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - stopcall-red.png - - - - - - - - 292 - {{211, 418}, {108, 62}} - - NO - IBCocoaTouchFramework - 0 - 0 - 1 - switch - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 292 - {{233, 309}, {80, 106}} - - - - 3 - MQA - - 2 - - - IBCocoaTouchFramework - - - - 292 - {{6, 387}, {28, 28}} - - - _NS:567 - NO - IBCocoaTouchFramework - - - {320, 480} - - - - 3 - MC42NjY2NjY2NjY3AA - - IBCocoaTouchFramework - - - - 292 - - YES - - - 274 - {420, 320} - - - - 3 - MQA - - - IBCocoaTouchFramework - - - - 292 - {{420, 0}, {60, 108}} - - - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - NSImage - micro.png - - - NSImage - clavier-01-106px.png - - - - - - - 292 - {{420, 107}, {60, 106}} - - - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - - 292 - {{420, 212}, {60, 108}} - - NO - IBCocoaTouchFramework - 0 - 0 - Switch - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 274 - {{308, 233}, {106, 80}} - - - - 3 - MQA - - - IBCocoaTouchFramework - - - - 292 - {{8, 285}, {28, 28}} - - - _NS:567 - NO - IBCocoaTouchFramework - - - {480, 320} - - - - 3 - MQA - - - - 3 - 3 - - IBCocoaTouchFramework - - - - 292 - - YES - - - 274 - - YES - - - 292 - {{8, 285}, {28, 28}} - - - _NS:567 - NO - IBCocoaTouchFramework - - - {{60, 0}, {420, 320}} - - - - 3 - MQA - - - IBCocoaTouchFramework - - - - 292 - {60, 108} - - - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - - 292 - {{0, 107}, {60, 106}} - - - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - - 292 - {{0, 212}, {60, 108}} - - - NO - IBCocoaTouchFramework - 0 - 0 - Switch - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - - - - 274 - {{360, 233}, {106, 80}} - - - 3 - MQA - - - IBCocoaTouchFramework - - - {480, 320} - - - - 3 - MQA - - - - 3 - 3 - - IBCocoaTouchFramework - - - - - YES - - - mDisplay - - - - 10 - - - - mPreview - - - - 11 - - - - mCamSwitch - - - - 12 - - - - mMute - - - - 13 - - - - mPortrait - - - - 21 - - - - mHangUp - - - - 26 - - - - view - - - - 32 - - - - mMuteLandRight - - - - 40 - - - - mHangUpLandRight - - - - 41 - - - - mCamSwitchLandRight - - - - 42 - - - - mLandscapeRight - - - - 43 - - - - mPreviewLandRight - - - - 45 - - - - mMuteLandLeft - - - - 47 - - - - mHangUpLandLeft - - - - 48 - - - - mCamSwitchLandLeft - - - - 49 - - - - mPreviewLandLeft - - - - 50 - - - - mLandscapeLeft - - - - 51 - - - - mCallQuality - - - - 54 - - - - mDisplayLandRight - - - - 44 - - - - mCallQualityLandRight - - - - 58 - - - - mDisplayLandLeft - - - - 46 - - - - mCallQualityLandLeft - - - - 60 - - - - - YES - - 0 - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 31 - - - YES - - - root - - - 1 - - - YES - - - - - - - - - portrait - - - 5 - - - display - - - 9 - - - YES - - - preview - - - 6 - - - - - 7 - - - Hang Up Button - - - 8 - - - - - 14 - - - YES - - - - - - - - - landscape-right - - - 19 - - - Cam Switch - - - 18 - - - HangHup - - - 17 - - - Mute - - - 16 - - - preview - - - 34 - - - YES - - - - - - - - landscape-left - - - 35 - - - YES - - - preview - - - 36 - - - Cam Switch - - - 37 - - - HangHup - - - 38 - - - Mute - - - 52 - - - - - 56 - - - - - 15 - - - display - - - 39 - - - YES - - - - display - - - 59 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 1.IBPluginDependency - 14.IBPluginDependency - 15.IBPluginDependency - 16.IBPluginDependency - 17.CustomClassName - 17.IBPluginDependency - 18.CustomClassName - 18.IBPluginDependency - 19.CustomClassName - 19.IBPluginDependency - 31.IBPluginDependency - 34.IBPluginDependency - 35.IBPluginDependency - 36.CustomClassName - 36.IBPluginDependency - 37.CustomClassName - 37.IBPluginDependency - 38.CustomClassName - 38.IBPluginDependency - 39.IBPluginDependency - 5.IBPluginDependency - 52.IBPluginDependency - 56.IBPluginDependency - 59.IBPluginDependency - 6.CustomClassName - 6.IBPluginDependency - 7.CustomClassName - 7.IBPluginDependency - 8.CustomClassName - 8.IBPluginDependency - 9.IBPluginDependency - - - YES - VideoViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIMuteButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIHangUpButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UICamSwitch - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UICamSwitch - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIHangUpButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIMuteButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIMuteButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIHangUpButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UICamSwitch - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 60 - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - - YES - - YES - clavier-01-106px.png - clavier-01-108px.png - micro.png - stopcall-red.png - - - YES - {106, 60} - {108, 60} - {107, 67} - {62, 54} - - - 933 - - diff --git a/Resources/add-contact-actif.png b/Resources/add-contact-actif.png index 2a3f3f6c0..5da115460 100644 Binary files a/Resources/add-contact-actif.png and b/Resources/add-contact-actif.png differ diff --git a/Resources/add-contact-inactif.png b/Resources/add-contact-inactif.png index 812fd0aef..f140e980b 100644 Binary files a/Resources/add-contact-inactif.png and b/Resources/add-contact-inactif.png differ diff --git a/Resources/add-contact-over.png b/Resources/add-contact-over.png index 8bc6a0fac..0230d7e76 100644 Binary files a/Resources/add-contact-over.png and b/Resources/add-contact-over.png differ diff --git a/Resources/appeler-actif.png b/Resources/appeler-actif.png index 08f8cc948..fc2792247 100644 Binary files a/Resources/appeler-actif.png and b/Resources/appeler-actif.png differ diff --git a/Resources/appeler-over.png b/Resources/appeler-over.png index e141b9a67..9cbf18c60 100644 Binary files a/Resources/appeler-over.png and b/Resources/appeler-over.png differ diff --git a/Resources/backspace-actif.png b/Resources/backspace-actif.png index 387b1ef83..b19ba4fa1 100644 Binary files a/Resources/backspace-actif.png and b/Resources/backspace-actif.png differ diff --git a/Resources/backspace-over.png b/Resources/backspace-over.png index 8408dae75..abd0e13a6 100644 Binary files a/Resources/backspace-over.png and b/Resources/backspace-over.png differ diff --git a/Resources/contacts-actif.png b/Resources/contacts-actif.png index 93088dd3e..88039d6c5 100644 Binary files a/Resources/contacts-actif.png and b/Resources/contacts-actif.png differ diff --git a/Resources/contacts-over.png b/Resources/contacts-over.png index 2ac5159cf..1cf7fd7ab 100644 Binary files a/Resources/contacts-over.png and b/Resources/contacts-over.png differ diff --git a/Resources/contacts-selectionne.png b/Resources/contacts-selectionne.png index 58ddc4b7d..002335b08 100644 Binary files a/Resources/contacts-selectionne.png and b/Resources/contacts-selectionne.png differ diff --git a/Resources/dialer-actif.png b/Resources/dialer-actif.png index 2e5cd10bc..5883398d2 100644 Binary files a/Resources/dialer-actif.png and b/Resources/dialer-actif.png differ diff --git a/Resources/dialer-over.png b/Resources/dialer-over.png index bd0cd5a8a..b23fcbb41 100644 Binary files a/Resources/dialer-over.png and b/Resources/dialer-over.png differ diff --git a/Resources/history-actif.png b/Resources/history-actif.png index fb1414dda..866a25a77 100644 Binary files a/Resources/history-actif.png and b/Resources/history-actif.png differ diff --git a/Resources/history-over.png b/Resources/history-over.png index e792c8abd..fbcaec907 100644 Binary files a/Resources/history-over.png and b/Resources/history-over.png differ diff --git a/Resources/history-selectionne.png b/Resources/history-selectionne.png index 751c7db9a..b672b21f3 100644 Binary files a/Resources/history-selectionne.png and b/Resources/history-selectionne.png differ diff --git a/Resources/settings-actif.png b/Resources/settings-actif.png index 43af1a90d..ecf4ab11b 100644 Binary files a/Resources/settings-actif.png and b/Resources/settings-actif.png differ diff --git a/Resources/settings-over.png b/Resources/settings-over.png index 13806e0c8..37339b4af 100644 Binary files a/Resources/settings-over.png and b/Resources/settings-over.png differ diff --git a/Resources/settings-selectionne.png b/Resources/settings-selectionne.png index 0844b8c98..1befba3bf 100644 Binary files a/Resources/settings-selectionne.png and b/Resources/settings-selectionne.png differ diff --git a/Resources/tchat-actif.png b/Resources/tchat-actif.png index facb65ea9..5e9716cc8 100644 Binary files a/Resources/tchat-actif.png and b/Resources/tchat-actif.png differ diff --git a/Resources/tchat-over.png b/Resources/tchat-over.png index fddc874b0..1d945dbfd 100644 Binary files a/Resources/tchat-over.png and b/Resources/tchat-over.png differ diff --git a/Resources/tchat-selectionne.png b/Resources/tchat-selectionne.png index 5b42104d6..2638c0c10 100644 Binary files a/Resources/tchat-selectionne.png and b/Resources/tchat-selectionne.png differ diff --git a/Resources/video-OFF-disabled.png b/Resources/video-OFF-disabled.png new file mode 100644 index 000000000..bcbc4d7a8 Binary files /dev/null and b/Resources/video-OFF-disabled.png differ diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index cfcb1e8a0..203b71cca 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -72,7 +72,7 @@ 22C755601317E59C007BC101 /* UIBluetoothButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */; }; 22D1B68112A3E0BE001AE361 /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D1B68012A3E0BE001AE361 /* libresolv.dylib */; }; 22D8F11F147548E2008C97DB /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 2274550710700509006EC466 /* linphonerc */; }; - 22D8F120147548E2008C97DB /* PhoneViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F2508D107141E100AC9B3F /* PhoneViewController.xib */; }; + 22D8F120147548E2008C97DB /* DialerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F2508D107141E100AC9B3F /* DialerViewController.xib */; }; 22D8F121147548E2008C97DB /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; }; 22D8F124147548E2008C97DB /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; }; 22D8F125147548E2008C97DB /* oldphone-mono.wav in Resources */ = {isa = PBXBuildFile; fileRef = 2237D4081084D7A9001383EE /* oldphone-mono.wav */; }; @@ -86,13 +86,12 @@ 22D8F13B147548E2008C97DB /* FirstLoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2218A92412FBE1340088A667 /* FirstLoginViewController.xib */; }; 22D8F13C147548E2008C97DB /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 228B19AE130290C500F154D3 /* iTunesArtwork */; }; 22D8F13D147548E2008C97DB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2214783B1386A2030020F8B8 /* Localizable.strings */; }; - 22D8F13F147548E2008C97DB /* VideoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E028B613B4CCBD0068A713 /* VideoViewController.xib */; }; 22D8F140147548E2008C97DB /* audio.plist in Resources */ = {isa = PBXBuildFile; fileRef = 226B563E13CAF1CD00921595 /* audio.plist */; }; 22D8F141147548E2008C97DB /* video.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22E1A9E713CAF4AA00219531 /* video.plist */; }; 22D8F142147548E2008C97DB /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; }; 22D8F144147548E2008C97DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 22D8F145147548E2008C97DB /* LinphoneAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* LinphoneAppDelegate.m */; }; - 22D8F146147548E2008C97DB /* PhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F2508C107141E100AC9B3F /* PhoneViewController.m */; }; + 22D8F146147548E2008C97DB /* DialerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F2508C107141E100AC9B3F /* DialerViewController.m */; }; 22D8F14A147548E2008C97DB /* MoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81C111C44E100B04932 /* MoreViewController.m */; }; 22D8F14B147548E2008C97DB /* ConsoleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81F111C44E100B04932 /* ConsoleViewController.m */; }; 22D8F14C147548E2008C97DB /* UIDigitButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2248E90D12F7E4CF00220D9C /* UIDigitButton.m */; }; @@ -106,7 +105,6 @@ 22D8F155147548E2008C97DB /* UIBluetoothButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */; }; 22D8F156147548E2008C97DB /* UIEraseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22BB1A68132FF16A005CD7AA /* UIEraseButton.m */; }; 22D8F157147548E2008C97DB /* FastAddressBook.m in Sources */ = {isa = PBXBuildFile; fileRef = 223963161393CFAF001DE689 /* FastAddressBook.m */; }; - 22D8F158147548E2008C97DB /* VideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E028B513B4CCBD0068A713 /* VideoViewController.m */; }; 22D8F159147548E2008C97DB /* UICamSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 22AA8B0013D83F6300B30535 /* UICamSwitch.m */; }; 22D8F15B147548E2008C97DB /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; }; 22D8F15C147548E2008C97DB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E542F413E147EB002BA2C0 /* QuartzCore.framework */; }; @@ -141,16 +139,14 @@ 22D8F17E147548E2008C97DB /* libSKP_SILK_SDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AA1472527D0037138E /* libSKP_SILK_SDK.a */; }; 22D8F17F147548E2008C97DB /* libsrtp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AB1472527D0037138E /* libsrtp.a */; }; 22D8F180147548E2008C97DB /* libmssilk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AF147259670037138E /* libmssilk.a */; }; - 22E028B713B4CCBD0068A713 /* VideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E028B513B4CCBD0068A713 /* VideoViewController.m */; }; - 22E028B813B4CCBD0068A713 /* VideoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E028B613B4CCBD0068A713 /* VideoViewController.xib */; }; 22E0A822111C44E100B04932 /* MoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81C111C44E100B04932 /* MoreViewController.m */; }; 22E0A823111C44E100B04932 /* ConsoleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81E111C44E100B04932 /* ConsoleViewController.xib */; }; 22E0A824111C44E100B04932 /* ConsoleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81F111C44E100B04932 /* ConsoleViewController.m */; }; 22E1A9E813CAF4AA00219531 /* video.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22E1A9E713CAF4AA00219531 /* video.plist */; }; 22E5B0AF133B5EA20044EA25 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E5B0AD133B5EA20044EA25 /* libssl.a */; }; 22E5B0B0133B5EA20044EA25 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E5B0AE133B5EA20044EA25 /* libcrypto.a */; }; - 22F2508E107141E100AC9B3F /* PhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F2508C107141E100AC9B3F /* PhoneViewController.m */; }; - 22F2508F107141E100AC9B3F /* PhoneViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F2508D107141E100AC9B3F /* PhoneViewController.xib */; }; + 22F2508E107141E100AC9B3F /* DialerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F2508C107141E100AC9B3F /* DialerViewController.m */; }; + 22F2508F107141E100AC9B3F /* DialerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F2508D107141E100AC9B3F /* DialerViewController.xib */; }; 22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; }; 22F51EF6107FA66500F98953 /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; }; 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; @@ -184,8 +180,6 @@ 34C7646D14CD5585008E9607 /* history-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646B14CD5585008E9607 /* history-orange.png */; }; 34CA852F148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */; }; 34CA8530148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */; }; - 34CA8535148F669900503C01 /* VideoViewController-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CA8534148F669900503C01 /* VideoViewController-ipad.xib */; }; - 34CA8536148F669900503C01 /* VideoViewController-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CA8534148F669900503C01 /* VideoViewController-ipad.xib */; }; 34CA8539148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */; }; 34CA853A148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */; }; 57282931154AF1460076F540 /* history-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646B14CD5585008E9607 /* history-orange.png */; }; @@ -206,6 +200,8 @@ D31C9C95158A1C1000756B45 /* appel-sortant.png in Resources */ = {isa = PBXBuildFile; fileRef = D31C9C8F158A1C1000756B45 /* appel-sortant.png */; }; D31C9C98158A1CDF00756B45 /* UIHistoryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D31C9C97158A1CDE00756B45 /* UIHistoryCell.m */; }; D31C9C99158A1CDF00756B45 /* UIHistoryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D31C9C97158A1CDE00756B45 /* UIHistoryCell.m */; }; + D32409C3158B49A600C8C119 /* UILongTouchButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D32409C2158B49A600C8C119 /* UILongTouchButton.m */; }; + D32409C4158B49A600C8C119 /* UILongTouchButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D32409C2158B49A600C8C119 /* UILongTouchButton.m */; }; D326483815887D5200930C67 /* OrderedDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = D326483715887D5200930C67 /* OrderedDictionary.m */; }; D326483915887D5200930C67 /* OrderedDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = D326483715887D5200930C67 /* OrderedDictionary.m */; }; D326483E1588950F00930C67 /* UICallBar.m in Sources */ = {isa = PBXBuildFile; fileRef = D326483C1588950F00930C67 /* UICallBar.m */; }; @@ -261,6 +257,10 @@ D35498241587716B000081D8 /* UIStateBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = D35498201587716B000081D8 /* UIStateBar.xib */; }; D36FB2D51589EF7C0036F6F2 /* UIPauseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */; }; D36FB2D61589EF7C0036F6F2 /* UIPauseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */; }; + D37295CA158B1E2D00D2C0C7 /* registration_inprogress.png in Resources */ = {isa = PBXBuildFile; fileRef = D37295C9158B1E2D00D2C0C7 /* registration_inprogress.png */; }; + D37295CB158B1E2D00D2C0C7 /* registration_inprogress.png in Resources */ = {isa = PBXBuildFile; fileRef = D37295C9158B1E2D00D2C0C7 /* registration_inprogress.png */; }; + D37295DB158B3C9600D2C0C7 /* video-OFF-disabled.png in Resources */ = {isa = PBXBuildFile; fileRef = D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */; }; + D37295DC158B3C9600D2C0C7 /* video-OFF-disabled.png in Resources */ = {isa = PBXBuildFile; fileRef = D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */; }; D38327F31580FE3A00FA0D23 /* contacts-actif.png in Resources */ = {isa = PBXBuildFile; fileRef = D38327EB1580FE3A00FA0D23 /* contacts-actif.png */; }; D38327F41580FE3A00FA0D23 /* contacts-selectionne.png in Resources */ = {isa = PBXBuildFile; fileRef = D38327EC1580FE3A00FA0D23 /* contacts-selectionne.png */; }; D38327F51580FE3A00FA0D23 /* dialer-actif.png in Resources */ = {isa = PBXBuildFile; fileRef = D38327ED1580FE3A00FA0D23 /* dialer-actif.png */; }; @@ -718,9 +718,6 @@ 22C7564B13265C6A007BC101 /* x509v3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x509v3.h; sourceTree = ""; }; 22D1B68012A3E0BE001AE361 /* libresolv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libresolv.dylib; path = usr/lib/libresolv.dylib; sourceTree = SDKROOT; }; 22D8F187147548E2008C97DB /* linphone-no-gpl-thirdparties.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "linphone-no-gpl-thirdparties.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 22E028B413B4CCBD0068A713 /* VideoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoViewController.h; sourceTree = ""; }; - 22E028B513B4CCBD0068A713 /* VideoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoViewController.m; sourceTree = ""; }; - 22E028B613B4CCBD0068A713 /* VideoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VideoViewController.xib; sourceTree = ""; }; 22E0A81B111C44E100B04932 /* MoreViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MoreViewController.xib; sourceTree = ""; }; 22E0A81C111C44E100B04932 /* MoreViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoreViewController.m; sourceTree = ""; }; 22E0A81D111C44E100B04932 /* MoreViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoreViewController.h; sourceTree = ""; }; @@ -730,9 +727,9 @@ 22E1A9E713CAF4AA00219531 /* video.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = video.plist; path = Settings.bundle/video.plist; sourceTree = ""; }; 22E5B0AD133B5EA20044EA25 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = "liblinphone-sdk/apple-darwin/lib/libssl.a"; sourceTree = ""; }; 22E5B0AE133B5EA20044EA25 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "liblinphone-sdk/apple-darwin/lib/libcrypto.a"; sourceTree = ""; }; - 22F2508B107141E100AC9B3F /* PhoneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhoneViewController.h; sourceTree = ""; }; - 22F2508C107141E100AC9B3F /* PhoneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhoneViewController.m; sourceTree = ""; }; - 22F2508D107141E100AC9B3F /* PhoneViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhoneViewController.xib; sourceTree = ""; }; + 22F2508B107141E100AC9B3F /* DialerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DialerViewController.h; sourceTree = ""; }; + 22F2508C107141E100AC9B3F /* DialerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DialerViewController.m; sourceTree = ""; }; + 22F2508D107141E100AC9B3F /* DialerViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DialerViewController.xib; sourceTree = ""; }; 22F254801073D99800AC9B3F /* ringback.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ringback.wav; path = "liblinphone-sdk/apple-darwin/share/sounds/linphone/ringback.wav"; sourceTree = ""; }; 22F51EF5107FA66500F98953 /* untitled.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = untitled.plist; sourceTree = ""; }; 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -760,7 +757,6 @@ 34C7646A14CD5585008E9607 /* dialer-orange.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "dialer-orange.png"; path = "submodules/linphone/pixmaps/dialer-orange.png"; sourceTree = ""; }; 34C7646B14CD5585008E9607 /* history-orange.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "history-orange.png"; path = "submodules/linphone/pixmaps/history-orange.png"; sourceTree = ""; }; 34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainScreenWithVideoPreview.xib; sourceTree = ""; }; - 34CA8534148F669900503C01 /* VideoViewController-ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "VideoViewController-ipad.xib"; sourceTree = ""; }; 34CA8537148F692A00503C01 /* MainScreenWithVideoPreview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainScreenWithVideoPreview.h; sourceTree = ""; }; 34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainScreenWithVideoPreview.m; sourceTree = ""; }; 70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = ""; }; @@ -775,6 +771,8 @@ D31C9C8F158A1C1000756B45 /* appel-sortant.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "appel-sortant.png"; path = "Resources/appel-sortant.png"; sourceTree = ""; }; D31C9C96158A1CDE00756B45 /* UIHistoryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHistoryCell.h; sourceTree = ""; }; D31C9C97158A1CDE00756B45 /* UIHistoryCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIHistoryCell.m; sourceTree = ""; }; + D32409C1158B49A600C8C119 /* UILongTouchButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILongTouchButton.h; sourceTree = ""; }; + D32409C2158B49A600C8C119 /* UILongTouchButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UILongTouchButton.m; sourceTree = ""; }; D326483615887D5200930C67 /* OrderedDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OrderedDictionary.h; path = Utils/OrderedDictionary.h; sourceTree = ""; }; D326483715887D5200930C67 /* OrderedDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OrderedDictionary.m; path = Utils/OrderedDictionary.m; sourceTree = ""; }; D326483B1588950F00930C67 /* UICallBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICallBar.h; sourceTree = ""; }; @@ -806,11 +804,13 @@ D3549815158761D0000081D8 /* ContactTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactTableViewController.m; sourceTree = ""; }; D354981815876FE7000081D8 /* bouton-detail-contact-actif.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bouton-detail-contact-actif.png"; path = "Resources/bouton-detail-contact-actif.png"; sourceTree = ""; }; D354981915876FE7000081D8 /* bouton-detail-contact-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bouton-detail-contact-over.png"; path = "Resources/bouton-detail-contact-over.png"; sourceTree = ""; }; - D354981E1587716B000081D8 /* UIStateBar.h */ = {isa = PBXFileReference; fileEncoding = 4; path = UIStateBar.h; sourceTree = ""; }; + D354981E1587716B000081D8 /* UIStateBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIStateBar.h; sourceTree = ""; }; D354981F1587716B000081D8 /* UIStateBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIStateBar.m; sourceTree = ""; }; D35498201587716B000081D8 /* UIStateBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UIStateBar.xib; sourceTree = ""; }; D36FB2D31589EF7C0036F6F2 /* UIPauseButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPauseButton.h; sourceTree = ""; }; D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIPauseButton.m; sourceTree = ""; }; + D37295C9158B1E2D00D2C0C7 /* registration_inprogress.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = registration_inprogress.png; path = Resources/registration_inprogress.png; sourceTree = ""; }; + D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "video-OFF-disabled.png"; path = "Resources/video-OFF-disabled.png"; sourceTree = ""; }; D38327EB1580FE3A00FA0D23 /* contacts-actif.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "contacts-actif.png"; path = "Resources/contacts-actif.png"; sourceTree = ""; }; D38327EC1580FE3A00FA0D23 /* contacts-selectionne.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "contacts-selectionne.png"; path = "Resources/contacts-selectionne.png"; sourceTree = ""; }; D38327ED1580FE3A00FA0D23 /* dialer-actif.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "dialer-actif.png"; path = "Resources/dialer-actif.png"; sourceTree = ""; }; @@ -1052,14 +1052,10 @@ D3F83F8D15822ABD00336684 /* PhoneMainView.m */, D34734791580DDF1003C7B8C /* PhoneMainView.xib */, 3422AA5214978352000D4E8A /* PhoneViewController-ipad.xib */, - 22F2508B107141E100AC9B3F /* PhoneViewController.h */, - 22F2508C107141E100AC9B3F /* PhoneViewController.m */, - 22F2508D107141E100AC9B3F /* PhoneViewController.xib */, + 22F2508B107141E100AC9B3F /* DialerViewController.h */, + 22F2508C107141E100AC9B3F /* DialerViewController.m */, + 22F2508D107141E100AC9B3F /* DialerViewController.xib */, D326483415887D4400930C67 /* Utils */, - 34CA8534148F669900503C01 /* VideoViewController-ipad.xib */, - 22E028B413B4CCBD0068A713 /* VideoViewController.h */, - 22E028B513B4CCBD0068A713 /* VideoViewController.m */, - 22E028B613B4CCBD0068A713 /* VideoViewController.xib */, 34216F3E1547EBCD00EA9777 /* VideoZoomHandler.h */, 34216F3F1547EBCD00EA9777 /* VideoZoomHandler.m */, ); @@ -1303,6 +1299,8 @@ D31C9C97158A1CDE00756B45 /* UIHistoryCell.m */, D31AC4AF158A29C600C2638B /* UIHistoryCell.xib */, 2214EB8A12F84FE9002A5394 /* UILinphone.h */, + D32409C1158B49A600C8C119 /* UILongTouchButton.h */, + D32409C2158B49A600C8C119 /* UILongTouchButton.m */, D3ED3E841586291B006C0DE4 /* UIMainBar.h */, D3ED3E851586291B006C0DE4 /* UIMainBar.m */, D3ED3E861586291C006C0DE4 /* UIMainBar.xib */, @@ -1310,11 +1308,11 @@ 2214EBF212F86360002A5394 /* UIMicroButton.m */, D36FB2D31589EF7C0036F6F2 /* UIPauseButton.h */, D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */, + 22968A5D12F875C600588287 /* UISpeakerButton.h */, + 22968A5E12F875C600588287 /* UISpeakerButton.m */, D354981E1587716B000081D8 /* UIStateBar.h */, D354981F1587716B000081D8 /* UIStateBar.m */, D35498201587716B000081D8 /* UIStateBar.xib */, - 22968A5D12F875C600588287 /* UISpeakerButton.h */, - 22968A5E12F875C600588287 /* UISpeakerButton.m */, D32648421588F6FA00930C67 /* UIToggleButton.h */, D32648431588F6FB00930C67 /* UIToggleButton.m */, 340751E5150F38FC00B89C47 /* UIVideoButton.h */, @@ -1478,6 +1476,8 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */, + D37295C9158B1E2D00D2C0C7 /* registration_inprogress.png */, D3F83F2C1582223B00336684 /* 0-actif.png */, D3F83F2D1582223B00336684 /* 0-over.png */, D3F83F2E1582223B00336684 /* 1-actif.png */, @@ -1693,7 +1693,7 @@ buildActionMask = 2147483647; files = ( 2274550810700509006EC466 /* linphonerc in Resources */, - 22F2508F107141E100AC9B3F /* PhoneViewController.xib in Resources */, + 22F2508F107141E100AC9B3F /* DialerViewController.xib in Resources */, 22F254811073D99800AC9B3F /* ringback.wav in Resources */, 2245671D107699F700F10948 /* Settings.bundle in Resources */, 22F51EF6107FA66500F98953 /* untitled.plist in Resources */, @@ -1708,14 +1708,12 @@ 2218A92612FBE1340088A667 /* FirstLoginViewController.xib in Resources */, 228B19AF130290C500F154D3 /* iTunesArtwork in Resources */, 2214783D1386A2030020F8B8 /* Localizable.strings in Resources */, - 22E028B813B4CCBD0068A713 /* VideoViewController.xib in Resources */, 226B563F13CAF1CD00921595 /* audio.plist in Resources */, 22E1A9E813CAF4AA00219531 /* video.plist in Resources */, 70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */, 344ABD72147FC438007420B6 /* ConferenceCallDetailView.xib in Resources */, 344ABD7A147FD32B007420B6 /* ConferenceCallDetailCell.xib in Resources */, 34CA852F148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */, - 34CA8535148F669900503C01 /* VideoViewController-ipad.xib in Resources */, 3422AA5014975EC9000D4E8A /* InCallViewController-ipad.xib in Resources */, 3422AA5314978352000D4E8A /* PhoneViewController-ipad.xib in Resources */, 341FCA8E149798210084BC26 /* linphonerc-ipad in Resources */, @@ -1836,6 +1834,8 @@ D3432A6C158A4446001C6B0B /* quality-call-3.png in Resources */, D3432A71158A45AF001C6B0B /* status_inprogress.png in Resources */, D3432A73158A45AF001C6B0B /* status_disconnected.png in Resources */, + D37295CA158B1E2D00D2C0C7 /* registration_inprogress.png in Resources */, + D37295DB158B3C9600D2C0C7 /* video-OFF-disabled.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1844,7 +1844,7 @@ buildActionMask = 2147483647; files = ( 22D8F11F147548E2008C97DB /* linphonerc in Resources */, - 22D8F120147548E2008C97DB /* PhoneViewController.xib in Resources */, + 22D8F120147548E2008C97DB /* DialerViewController.xib in Resources */, 22D8F121147548E2008C97DB /* ringback.wav in Resources */, 22D8F124147548E2008C97DB /* untitled.plist in Resources */, 22D8F125147548E2008C97DB /* oldphone-mono.wav in Resources */, @@ -1858,7 +1858,6 @@ 22D8F13B147548E2008C97DB /* FirstLoginViewController.xib in Resources */, 22D8F13C147548E2008C97DB /* iTunesArtwork in Resources */, 22D8F13D147548E2008C97DB /* Localizable.strings in Resources */, - 22D8F13F147548E2008C97DB /* VideoViewController.xib in Resources */, 22D8F140147548E2008C97DB /* audio.plist in Resources */, 22D8F141147548E2008C97DB /* video.plist in Resources */, 22D8F142147548E2008C97DB /* rootca.pem in Resources */, @@ -1866,7 +1865,6 @@ 344ABD73147FC438007420B6 /* ConferenceCallDetailView.xib in Resources */, 344ABD7B147FD32B007420B6 /* ConferenceCallDetailCell.xib in Resources */, 34CA8530148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */, - 34CA8536148F669900503C01 /* VideoViewController-ipad.xib in Resources */, 3422AA5114975EC9000D4E8A /* InCallViewController-ipad.xib in Resources */, 3422AA5414978352000D4E8A /* PhoneViewController-ipad.xib in Resources */, 341FCA8F149798210084BC26 /* linphonerc-ipad in Resources */, @@ -1971,6 +1969,8 @@ D3432A6D158A4446001C6B0B /* quality-call-3.png in Resources */, D3432A72158A45AF001C6B0B /* status_inprogress.png in Resources */, D3432A74158A45AF001C6B0B /* status_disconnected.png in Resources */, + D37295CB158B1E2D00D2C0C7 /* registration_inprogress.png in Resources */, + D37295DC158B3C9600D2C0C7 /* video-OFF-disabled.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1983,7 +1983,7 @@ files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* LinphoneAppDelegate.m in Sources */, - 22F2508E107141E100AC9B3F /* PhoneViewController.m in Sources */, + 22F2508E107141E100AC9B3F /* DialerViewController.m in Sources */, 22E0A822111C44E100B04932 /* MoreViewController.m in Sources */, 22E0A824111C44E100B04932 /* ConsoleViewController.m in Sources */, 2248E90E12F7E4CF00220D9C /* UIDigitButton.m in Sources */, @@ -1997,7 +1997,6 @@ 22C755601317E59C007BC101 /* UIBluetoothButton.m in Sources */, 22BB1A69132FF16A005CD7AA /* UIEraseButton.m in Sources */, 223963171393CFAF001DE689 /* FastAddressBook.m in Sources */, - 22E028B713B4CCBD0068A713 /* VideoViewController.m in Sources */, 22AA8B0113D83F6300B30535 /* UICamSwitch.m in Sources */, 2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */, 344ABD77147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */, @@ -2018,6 +2017,7 @@ D32648441588F6FC00930C67 /* UIToggleButton.m in Sources */, D36FB2D51589EF7C0036F6F2 /* UIPauseButton.m in Sources */, D31C9C98158A1CDF00756B45 /* UIHistoryCell.m in Sources */, + D32409C3158B49A600C8C119 /* UILongTouchButton.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2027,7 +2027,7 @@ files = ( 22D8F144147548E2008C97DB /* main.m in Sources */, 22D8F145147548E2008C97DB /* LinphoneAppDelegate.m in Sources */, - 22D8F146147548E2008C97DB /* PhoneViewController.m in Sources */, + 22D8F146147548E2008C97DB /* DialerViewController.m in Sources */, 22D8F14A147548E2008C97DB /* MoreViewController.m in Sources */, 22D8F14B147548E2008C97DB /* ConsoleViewController.m in Sources */, 22D8F14C147548E2008C97DB /* UIDigitButton.m in Sources */, @@ -2041,7 +2041,6 @@ 22D8F155147548E2008C97DB /* UIBluetoothButton.m in Sources */, 22D8F156147548E2008C97DB /* UIEraseButton.m in Sources */, 22D8F157147548E2008C97DB /* FastAddressBook.m in Sources */, - 22D8F158147548E2008C97DB /* VideoViewController.m in Sources */, 22D8F159147548E2008C97DB /* UICamSwitch.m in Sources */, 2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */, 344ABD78147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */, @@ -2062,6 +2061,7 @@ D32648451588F6FC00930C67 /* UIToggleButton.m in Sources */, D36FB2D61589EF7C0036F6F2 /* UIPauseButton.m in Sources */, D31C9C99158A1CDF00756B45 /* UIHistoryCell.m in Sources */, + D32409C4158B49A600C8C119 /* UILongTouchButton.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };