From 079b43b6befd05ec36adc52c3c8049455090dc20 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 12 Mar 2012 13:45:51 +0100 Subject: [PATCH] Rotate control buttons in video view (on device orientation change) --- Classes/CallDelegate.h | 39 +- Classes/CallDelegate.m | 58 +- Classes/InCallViewController-ipad.xib | 672 +++++++++++------- Classes/IncallViewController.h | 2 +- Classes/IncallViewController.m | 195 +++-- Classes/IncallViewController.xib | 23 +- Classes/LinphoneUI/LinphoneManager.h | 1 + Classes/LinphoneUI/LinphoneManager.m | 36 +- Classes/LinphoneUI/LinphoneUIDelegates.h | 1 + Classes/LinphoneUI/UICallButton.m | 2 - ...AddVideoButton.h => UIToggleVideoButton.h} | 4 +- ...AddVideoButton.m => UIToggleVideoButton.m} | 22 +- Classes/PhoneViewController.m | 10 +- Classes/VideoViewController-ipad.xib | 205 +----- linphone.xcodeproj/project.pbxproj | 26 +- submodules/externals/exosip | 2 +- submodules/linphone | 2 +- 17 files changed, 745 insertions(+), 555 deletions(-) rename Classes/LinphoneUI/{UIAddVideoButton.h => UIToggleVideoButton.h} (94%) rename Classes/LinphoneUI/{UIAddVideoButton.m => UIToggleVideoButton.m} (77%) diff --git a/Classes/CallDelegate.h b/Classes/CallDelegate.h index 02b69b026..d32864706 100644 --- a/Classes/CallDelegate.h +++ b/Classes/CallDelegate.h @@ -1,27 +1,46 @@ -// -// CallDelegate.h -// linphone -// -// Created by Pierre-Eric Pelloux-Prayer on 03/11/11. -// Copyright (c) 2011 __MyCompanyName__. All rights reserved. -// +/* LinphoneManager.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 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 #include "linphonecore.h" +enum CallDelegateType { + CD_UNDEFINED = 0, + CD_NEW_CALL, + CD_ZRTP, + CD_VIDEO_UPDATE +}; @protocol UIActionSheetCustomDelegate -- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void*) datas; +- (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; + NSTimer* timeout; } +@property (nonatomic) enum CallDelegateType eventType; @property (nonatomic) LinphoneCall* call; @property (nonatomic, retain) id delegate; +@property (nonatomic, retain) NSTimer* timeout; @end diff --git a/Classes/CallDelegate.m b/Classes/CallDelegate.m index 6ae87a25c..4aef98fa9 100644 --- a/Classes/CallDelegate.m +++ b/Classes/CallDelegate.m @@ -1,20 +1,62 @@ -// -// CallDelegate.m -// linphone -// -// Created by Pierre-Eric Pelloux-Prayer on 03/11/11. -// Copyright (c) 2011 __MyCompanyName__. All rights reserved. -// +/* LinphoneManager.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 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 "CallDelegate.h" @implementation CallDelegate +@synthesize eventType; @synthesize call; @synthesize delegate; +@synthesize timeout; -(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { - [delegate actionSheet:actionSheet clickedButtonAtIndex:buttonIndex withUserDatas:call]; + if (timeout) { + [timeout invalidate]; + timeout = nil; + } + if (eventType == CD_UNDEFINED) { + ms_error("Incorrect usage of CallDelegate/ActionSheet: eventType must be set"); + } + [delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:buttonIndex withUserDatas:call]; +} + +-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex { + if (timeout) { + [timeout invalidate]; + timeout = nil; + } + if (eventType == CD_UNDEFINED) { + ms_error("Incorrect usage of CallDelegate/ActionSheet: eventType must be set"); + } + [delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:buttonIndex withUserDatas:call]; +} + +-(void) actionSheetCancel:(UIActionSheet *)actionSheet { + if (timeout) { + [timeout invalidate]; + timeout = nil; + } + if (eventType == CD_UNDEFINED) { + ms_error("Incorrect usage of CallDelegate/ActionSheet: eventType must be set"); + } + [delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:actionSheet.cancelButtonIndex withUserDatas:call]; } @end diff --git a/Classes/InCallViewController-ipad.xib b/Classes/InCallViewController-ipad.xib index 17661327c..7921a5ac7 100644 --- a/Classes/InCallViewController-ipad.xib +++ b/Classes/InCallViewController-ipad.xib @@ -11,10 +11,11 @@ 933 + IBUIImageView IBUIViewController - IBUIButton - IBUIView IBUITableView + IBUIView + IBUIButton IBProxyObject @@ -44,12 +45,12 @@ {768, 805} - + _NS:408 3 MSAwAA - + 2 @@ -62,6 +63,99 @@ 22 22 + + + -2147483374 + + + + 292 + {768, 1024} + + + + _NS:569 + NO + IBIPadFramework + + + + 292 + {{20, 956}, {28, 28}} + + + + _NS:567 + NO + IBIPadFramework + + + + 292 + {{598, 799}, {170, 225}} + + + + + 3 + MQA + + + IBIPadFramework + + + + 292 + {{0, 962}, {108, 62}} + + + + NO + IBIPadFramework + 0 + 0 + 1 + switch + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + NSImage + clavier-01-108px.png + + + Helvetica-Bold + Helvetica + 2 + 15 + + + Helvetica-Bold + 15 + 16 + + + + {768, 1024} + + + + _NS:212 + + 3 + MC42NjY2NjY2NjY3AA + + IBIPadFramework + 292 @@ -82,18 +176,12 @@ IBIPadFramework 0 0 - - 3 - MQA - + 1 MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - 3 - MC41AA - + NSImage stopcall-red.png @@ -102,17 +190,8 @@ NSImage clavier-01-106px.png - - Helvetica-Bold - Helvetica - 2 - 15 - - - Helvetica-Bold - 15 - 16 - + + {{224, 937}, {320, 77}} @@ -411,7 +490,7 @@ - + @@ -420,10 +499,7 @@ - - 3 - MC42NjY2NjY2NjY3AA - + NO NO IBIPadFramework @@ -437,7 +513,7 @@ - + @@ -460,7 +536,7 @@ - + @@ -480,7 +556,7 @@ - + @@ -503,7 +579,7 @@ - + @@ -526,7 +602,7 @@ - + @@ -549,7 +625,7 @@ - + @@ -572,7 +648,7 @@ - + @@ -595,7 +671,7 @@ - + @@ -618,7 +694,7 @@ - + @@ -641,7 +717,7 @@ - + @@ -664,7 +740,7 @@ - + @@ -687,7 +763,7 @@ - + {{178, 146}, {320, 310}} @@ -726,51 +802,11 @@ - addCall + callTableView - + - 112 - - - - addVideo - - - - 113 - - - - close - - - - 115 - - - - contacts - - - - 116 - - - - controlSubView - - - - 117 - - - - eight - - - - 118 + 114 @@ -780,22 +816,6 @@ 119 - - - five - - - - 120 - - - - four - - - - 121 - hangUpView @@ -806,19 +826,11 @@ - hash + speaker - + - 123 - - - - mergeCalls - - - - 124 + 132 @@ -830,27 +842,43 @@ - nine + addVideo - + - 126 + 113 - one + mergeCalls - + - 127 + 124 - padSubView + addCall - + - 128 + 112 + + + + contacts + + + + 116 + + + + dialer + + + + 141 @@ -860,6 +888,30 @@ 129 + + + controlSubView + + + + 117 + + + + five + + + + 120 + + + + nine + + + + 126 + seven @@ -878,19 +930,11 @@ - speaker + four - + - 132 - - - - star - - - - 133 + 121 @@ -900,6 +944,14 @@ 134 + + + zero + + + + 137 + two @@ -908,6 +960,54 @@ 135 + + + close + + + + 115 + + + + hash + + + + 123 + + + + eight + + + + 118 + + + + one + + + + 127 + + + + star + + + + 133 + + + + padSubView + + + + 128 + view @@ -918,27 +1018,27 @@ - zero + videoGroup - + - 137 + 159 - callTableView + videoView - + - 114 + 161 - dialer + videoPreview - + - 141 + 162 @@ -1019,9 +1119,29 @@ + + + 61 + + + + + 88 + + + + + + + + 98 + + + end + 89 @@ -1038,48 +1158,18 @@ controls - - 97 - - - pauseresume - 96 speaker - - 95 - - - dialer - - - 94 - - - contacts - - - 93 - - - addcall - 92 mute - - 91 - - - merge - 90 @@ -1087,12 +1177,34 @@ video - 88 - - - - - + 91 + + + merge + + + 93 + + + addcall + + + 94 + + + contacts + + + 95 + + + dialer + + + 97 + + + pauseresume 87 @@ -1116,70 +1228,10 @@ pad - 111 - + 99 + - star - - - 110 - - - 1 - - - 109 - - - 8 - - - 108 - - - hash - - - 107 - - - close - - - 106 - - - 2 - - - 105 - - - 0 - - - 104 - - - 3 - - - 103 - - - 4 - - - 102 - - - 6 - - - 101 - - - 7 + 5 100 @@ -1188,21 +1240,105 @@ 9 - 99 - + 101 + - 5 + 7 - 98 - - - end + 102 + + + 6 - 61 - + 103 + + + 4 + + + 104 + + + 3 + + + 105 + + + 0 + + + 106 + + + 2 + + + 107 + + + close + + + 108 + + + hash + + + 109 + + + 8 + + + 110 + + + 1 + + + 111 + + + star + + + 152 + + + + + + + + video + + + 158 + + + video_preview + + + 157 + + + video_view + + + 154 + + + + + 153 + + + call_quality_video @@ -1235,13 +1371,19 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIDigitButton 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 com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIAddVideoButton + UIToggleVideoButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -1266,7 +1408,7 @@ - 144 + 162 @@ -1311,6 +1453,9 @@ UIButton UIButton UIButton + UIView + UIView + UIView VideoViewController UIButton @@ -1419,6 +1564,18 @@ two UIButton + + videoGroup + UIView + + + videoPreview + UIView + + + videoView + UIView + videoViewController VideoViewController @@ -1433,14 +1590,6 @@ ./Classes/IncallViewController.h - - UIAddVideoButton - UIButton - - IBProjectSource - ./Classes/UIAddVideoButton.h - - UICamSwitch UIButton @@ -1500,6 +1649,14 @@ ./Classes/UIToggleButton.h + + UIToggleVideoButton + UIButton + + IBProjectSource + ./Classes/UIToggleVideoButton.h + + VideoViewController UIViewController @@ -1628,6 +1785,7 @@ {107, 67} {107, 67} {106, 60} + {108, 60} {160, 60} {106, 67} {107, 67} diff --git a/Classes/IncallViewController.h b/Classes/IncallViewController.h index ac1081718..16d5ae004 100644 --- a/Classes/IncallViewController.h +++ b/Classes/IncallViewController.h @@ -82,7 +82,7 @@ UIImage* verified, *unverified; UIImage* stat_sys_signal_0, *stat_sys_signal_1, *stat_sys_signal_2, *stat_sys_signal_3, *stat_sys_signal_4; - UIActionSheet* zrtpVerificationSheet; + UIActionSheet* visibleActionSheet; NSTimer* hideControlsTimer; } diff --git a/Classes/IncallViewController.m b/Classes/IncallViewController.m index 1c3dd590b..2e740d733 100644 --- a/Classes/IncallViewController.m +++ b/Classes/IncallViewController.m @@ -122,6 +122,61 @@ void addAnimationFadeTransition(UIView* view, float duration) { [view.layer addAnimation:animation forKey:nil]; } +-(void) orientationChanged: (NSNotification*) notif { + int oldLinphoneOrientation = linphone_core_get_device_rotation([LinphoneManager getLc]); + UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; + switch (orientation) { + case UIInterfaceOrientationPortrait: + linphone_core_set_device_rotation([LinphoneManager getLc], 0); + break; + case UIInterfaceOrientationLandscapeRight: + linphone_core_set_device_rotation([LinphoneManager getLc], 270); + break; + case UIInterfaceOrientationLandscapeLeft: + linphone_core_set_device_rotation([LinphoneManager getLc], 90); + break; + default: + break; + } + if (oldLinphoneOrientation != linphone_core_get_device_rotation([LinphoneManager getLc])) { + linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView); + + LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); + if (call && linphone_call_params_video_enabled(linphone_call_get_current_params(call))) { + //Orientation has change, must call update call + linphone_core_update_call([LinphoneManager getLc], call, NULL); + + + /* animate button images rotation */ +#define degreesToRadians(x) (M_PI * x / 180.0) + CGAffineTransform transform = CGAffineTransformIdentity; + switch (orientation) { + case UIInterfaceOrientationLandscapeRight: + transform = CGAffineTransformMakeRotation(degreesToRadians(90)); + break; + case UIInterfaceOrientationLandscapeLeft: + transform = CGAffineTransformMakeRotation(degreesToRadians(-90)); + break; + default: + transform = CGAffineTransformIdentity; + break; + } + + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:0.2f]; + endCtrl.imageView.transform = transform; + mute.imageView.transform = transform; + speaker.imageView.transform = transform; + pause.imageView.transform = transform; + contacts.imageView.transform = transform; + addCall.imageView.transform = transform; + addVideo.imageView.transform = transform; + dialer.imageView.transform = transform; + [UIView commitAnimations]; + } + } +} + -(void) showControls:(id)sender { if (hideControlsTimer) { [hideControlsTimer invalidate]; @@ -148,6 +203,8 @@ void addAnimationFadeTransition(UIView* view, float duration) { } -(void) enableVideoDisplay { + [self orientationChanged:nil]; + [videoGroup setHidden:FALSE]; [controlSubView setHidden:TRUE]; [hangUpView setHidden:TRUE]; @@ -155,7 +212,6 @@ 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); - linphone_core_set_device_rotation([LinphoneManager getLc], 0); [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; @@ -180,6 +236,15 @@ void addAnimationFadeTransition(UIView* view, float duration) { hideControlsTimer = nil; } + /* restore buttons orientation */ + endCtrl.imageView.transform = CGAffineTransformIdentity; + mute.imageView.transform = CGAffineTransformIdentity; + speaker.imageView.transform = CGAffineTransformIdentity; + pause.imageView.transform = CGAffineTransformIdentity; + contacts.imageView.transform = CGAffineTransformIdentity; + addCall.imageView.transform = CGAffineTransformIdentity; + dialer.imageView.transform = CGAffineTransformIdentity; + [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; } @@ -212,6 +277,12 @@ void addAnimationFadeTransition(UIView* view, float duration) { } else { [LinphoneManager set:pause hidden:YES withName:"PAUSE button" andReason:AT]; } + + if (linphone_call_params_video_enabled(linphone_call_get_current_params(selectedCall))) { + addVideo.titleLabel.text = NSLocalizedString(@"-video", nil); + } else { + addVideo.titleLabel.text = NSLocalizedString(@"+video", nil); + } } else { if (callsCount == 1) { LinphoneCall* c = (LinphoneCall*)linphone_core_get_calls(lc)->data; @@ -342,28 +413,6 @@ void addAnimationFadeTransition(UIView* view, float duration) { [self updateUIFromLinphoneState: nil]; } --(void) orientationChanged: (NSNotification*) notif { - int oldLinphoneOrientation = linphone_core_get_device_rotation([LinphoneManager getLc]); - UIDeviceOrientation orientation = [UIDevice currentDevice].orientation; - switch (orientation) { - case UIInterfaceOrientationPortrait: - linphone_core_set_device_rotation([LinphoneManager getLc], 0); - break; - case UIInterfaceOrientationLandscapeRight: - linphone_core_set_device_rotation([LinphoneManager getLc], 270); - break; - case UIInterfaceOrientationLandscapeLeft: - linphone_core_set_device_rotation([LinphoneManager getLc], 90); - break; - } - if ((oldLinphoneOrientation != linphone_core_get_device_rotation([LinphoneManager getLc])) - && linphone_core_get_current_call([LinphoneManager getLc])) { - linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView); - //Orientation has change, must call update call - linphone_core_update_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), NULL); - } -} - -(void) awakeFromNib { @@ -403,15 +452,15 @@ void addAnimationFadeTransition(UIView* view, float duration) { bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"]; bool startVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"]; - [LinphoneManager set:contacts hidden:(enableVideo && !startVideo) withName:"CONTACT button" andReason:AT]; + [LinphoneManager set:contacts hidden:enableVideo withName:"CONTACT button" andReason:AT]; [LinphoneManager set:addVideo hidden:!contacts.hidden withName:"ADD_VIDEO button" andReason:AT]; } } } -(void) viewWillDisappear:(BOOL)animated { - if (zrtpVerificationSheet != nil) { - [zrtpVerificationSheet dismissWithClickedButtonIndex:2 animated:NO]; + if (visibleActionSheet != nil) { + [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:NO]; } } @@ -459,11 +508,6 @@ void addAnimationFadeTransition(UIView* view, float duration) { } --(void) dismissVideoView { - [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; - [self dismissModalViewControllerAnimated:FALSE];//just in case - mVideoShown=FALSE; -} -(void) displayInCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { dismissed = false; UIDevice *device = [UIDevice currentDevice]; @@ -474,9 +518,6 @@ void addAnimationFadeTransition(UIView* view, float duration) { [self updateUIFromLinphoneState: nil]; [self disableVideoDisplay]; - /*if (self.presentedViewController == (UIViewController*)mVideoViewController) { - [self dismissVideoView]; - }*/ } -(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { [self disableVideoDisplay]; @@ -512,11 +553,46 @@ void addAnimationFadeTransition(UIView* view, float duration) { else ms_message("Do not present again videoViewController"); } else { - //postepone presentation + //postpone presentation mVideoIsPending=TRUE; } } +-(void) dismissActionSheet: (id)o { + if (visibleActionSheet != nil) { + [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE]; + visibleActionSheet = nil; + } +} + +-(void) displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName { + if (linphone_core_get_video_policy([LinphoneManager getLc])->automatically_accept) + return; + + // ask the user if he agrees + CallDelegate* cd = [[CallDelegate alloc] init]; + cd.eventType = CD_VIDEO_UPDATE; + cd.delegate = self; + cd.call = call; + + if (visibleActionSheet != nil) { + [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE]; + } + NSString* title = [NSString stringWithFormat : NSLocalizedString(@"'%@' would like to enable video",nil), ([displayName length] > 0) ?displayName:username]; + visibleActionSheet = [[UIActionSheet alloc] initWithTitle:title + delegate:cd + cancelButtonTitle:NSLocalizedString(@"Decline",nil) + destructiveButtonTitle:NSLocalizedString(@"Accept",nil) + otherButtonTitles:nil]; + + visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault; + [visibleActionSheet showInView:self.view]; + + /* start cancel timer */ + cd.timeout = [NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(dismissActionSheet:) userInfo:nil repeats:NO]; + [visibleActionSheet release]; +} + - (IBAction)doAction:(id)sender { if (sender == dialer) { @@ -813,33 +889,60 @@ void addAnimationFadeTransition(UIView* view, float duration) { LinphoneCall* call = [IncallViewController retrieveCallAtIndex:path.row inConference:NO]; // start action sheet to validate/unvalidate zrtp code CallDelegate* cd = [[CallDelegate alloc] init]; + cd.eventType = CD_ZRTP; cd.delegate = self; cd.call = call; UIView* container=(UIView*)[callTableView cellForRowAtIndexPath:path].accessoryView; UIButton *button=(UIButton*)[container viewWithTag:SECURE_BUTTON_TAG]; [button setImage:nil forState:UIControlStateNormal]; - zrtpVerificationSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" Mark auth token '%s' as:",nil),linphone_call_get_authentication_token(call)] + if (visibleActionSheet != nil) { + [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE]; + } + visibleActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" Mark auth token '%s' as:",nil),linphone_call_get_authentication_token(call)] delegate:cd cancelButtonTitle:NSLocalizedString(@"Unverified",nil) destructiveButtonTitle:NSLocalizedString(@"Verified",nil) otherButtonTitles:nil]; - zrtpVerificationSheet.actionSheetStyle = UIActionSheetStyleDefault; - [zrtpVerificationSheet showInView:self.view]; - [zrtpVerificationSheet release]; + visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault; + [visibleActionSheet showInView:self.view]; + [visibleActionSheet release]; } } --(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas { +-(void) actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas { LinphoneCall* call = (LinphoneCall*)datas; // maybe we could verify call validity - - if (buttonIndex == 0) - linphone_call_set_authentication_token_verified(call, YES); - else if (buttonIndex == 1) - linphone_call_set_authentication_token_verified(call, NO); - zrtpVerificationSheet = nil; + + switch (type) { + case CD_ZRTP: { + if (buttonIndex == 0) + linphone_call_set_authentication_token_verified(call, YES); + else if (buttonIndex == 1) + linphone_call_set_authentication_token_verified(call, NO); + visibleActionSheet = nil; + break; + } + case CD_VIDEO_UPDATE: { + LinphoneCall* call = (LinphoneCall*)datas; + LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call)); + if ([visibleActionSheet destructiveButtonIndex] == buttonIndex) { + // accept video + linphone_call_params_enable_video(paramsCopy, TRUE); + linphone_core_accept_call_update([LinphoneManager getLc], call, paramsCopy); + } else { + // decline video + ms_message("User declined video proposal"); + linphone_core_accept_call_update([LinphoneManager getLc], call, NULL); + } + linphone_call_params_destroy(paramsCopy); + visibleActionSheet = nil; + break; + } + default: + ms_error("Unhandled CallDelegate event of type: %d received - ignoring", type); + } } // UITableViewDataSource (required) diff --git a/Classes/IncallViewController.xib b/Classes/IncallViewController.xib index ee1eac9e3..3cc434a7b 100644 --- a/Classes/IncallViewController.xib +++ b/Classes/IncallViewController.xib @@ -81,7 +81,7 @@ {320, 460} - + _NS:196 NO @@ -395,6 +395,7 @@ NO + NO NO IBCocoaTouchFramework 0 @@ -1381,7 +1382,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIAddVideoButton + UIToggleVideoButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -1440,7 +1441,7 @@ - 133 + 134 @@ -1699,14 +1700,6 @@ ./Classes/IncallViewController.h - - UIAddVideoButton - UIButton - - IBProjectSource - ./Classes/UIAddVideoButton.h - - UICamSwitch UIButton @@ -1766,6 +1759,14 @@ ./Classes/UIToggleButton.h + + UIToggleVideoButton + UIButton + + IBProjectSource + ./Classes/UIToggleVideoButton.h + + VideoViewController UIViewController diff --git a/Classes/LinphoneUI/LinphoneManager.h b/Classes/LinphoneUI/LinphoneManager.h index 95aaa8d60..42874fa8d 100644 --- a/Classes/LinphoneUI/LinphoneManager.h +++ b/Classes/LinphoneUI/LinphoneManager.h @@ -23,6 +23,7 @@ #include "linphonecore.h" #import "LogView.h" #import "LinphoneUIDelegates.h" + typedef enum _Connectivity { wifi, wwan diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 295aa96c0..ea5fabb4f 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -150,6 +150,7 @@ extern void libmsbcg729_init(); [lE164Number release]; return; } + -(void) onCall:(LinphoneCall*) call StateChanged: (LinphoneCallState) new_state withMessage: (const char *) 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); @@ -169,7 +170,9 @@ extern void libmsbcg729_init(); [callDelegate displayVideoCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName]; - } + } else { + [callDelegate displayInCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName]; + } break; case LinphoneCallIncomingReceived: @@ -192,7 +195,31 @@ extern void libmsbcg729_init(); 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(theLinphoneCore)->automatically_accept) { + linphone_core_defer_call_update(theLinphoneCore, call); + [callDelegate displayAskToEnableVideoCall:call forUser:lUserName withDisplayName:lDisplayName]; + } else if (linphone_call_params_video_enabled(current) && !linphone_call_params_video_enabled(remote)) { + [callDelegate displayInCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName]; + } + break; + } + case LinphoneCallUpdated: + { + const LinphoneCallParams* current = linphone_call_get_current_params(call); + if (linphone_call_params_video_enabled(current)) { + [callDelegate displayVideoCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName]; + } else { + [callDelegate displayInCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName]; + } + break; + + } case LinphoneCallError: { /* NSString* lTitle= state->message!=nil?[NSString stringWithCString:state->message length:strlen(state->message)]: @"Error"; @@ -649,6 +676,11 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach bool enableSrtp = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_srtp_preference"]; linphone_core_set_media_encryption(theLinphoneCore, enableSrtp?LinphoneMediaEncryptionSRTP:LinphoneMediaEncryptionZRTP); + LinphoneVideoPolicy policy; + policy.automatically_accept = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"];; + policy.automatically_initiate = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"]; + linphone_core_set_video_policy(theLinphoneCore, &policy); + UIDevice* device = [UIDevice currentDevice]; bool backgroundSupported = false; if ([device respondsToSelector:@selector(isMultitaskingSupported)]) diff --git a/Classes/LinphoneUI/LinphoneUIDelegates.h b/Classes/LinphoneUI/LinphoneUIDelegates.h index 1f2938cfe..0023ede04 100644 --- a/Classes/LinphoneUI/LinphoneUIDelegates.h +++ b/Classes/LinphoneUI/LinphoneUIDelegates.h @@ -28,6 +28,7 @@ -(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName; //status reporting -(void) displayStatus:(NSString*) message; +-(void) displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName; @end diff --git a/Classes/LinphoneUI/UICallButton.m b/Classes/LinphoneUI/UICallButton.m index 8ab033b6d..39661926c 100644 --- a/Classes/LinphoneUI/UICallButton.m +++ b/Classes/LinphoneUI/UICallButton.m @@ -52,9 +52,7 @@ LinphoneProxyConfig* proxyCfg; //get default proxy linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg); - bool startVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"]; LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters([LinphoneManager getLc]); - linphone_call_params_enable_video(lcallParams,startVideo&linphone_core_video_enabled([LinphoneManager getLc])); if ([mAddress.text length] == 0) return; //just return if ([mAddress.text hasPrefix:@"sip:"]) { diff --git a/Classes/LinphoneUI/UIAddVideoButton.h b/Classes/LinphoneUI/UIToggleVideoButton.h similarity index 94% rename from Classes/LinphoneUI/UIAddVideoButton.h rename to Classes/LinphoneUI/UIToggleVideoButton.h index 275de0672..c9a6cc83c 100644 --- a/Classes/LinphoneUI/UIAddVideoButton.h +++ b/Classes/LinphoneUI/UIToggleVideoButton.h @@ -1,4 +1,4 @@ -/* UIAddVideoButton.h +/* UIToggleVideoButton.h * * Copyright (C) 2011 Belledonne Comunications, Grenoble, France * @@ -19,6 +19,6 @@ #import -@interface UIAddVideoButton : UIButton +@interface UIToggleVideoButton : UIButton - (id)initWithCoder:(NSCoder *)decoder; @end diff --git a/Classes/LinphoneUI/UIAddVideoButton.m b/Classes/LinphoneUI/UIToggleVideoButton.m similarity index 77% rename from Classes/LinphoneUI/UIAddVideoButton.m rename to Classes/LinphoneUI/UIToggleVideoButton.m index e34cdfb8f..9f8db414d 100644 --- a/Classes/LinphoneUI/UIAddVideoButton.m +++ b/Classes/LinphoneUI/UIToggleVideoButton.m @@ -1,4 +1,4 @@ -/* UIAddVideoButton.m +/* UIToggleVideoButton.m * * Copyright (C) 2011 Belledonne Comunications, Grenoble, France * @@ -17,21 +17,31 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#import "UIAddVideoButton.h" +#import "UIToggleVideoButton.h" #include "LinphoneManager.h" -@implementation UIAddVideoButton +@implementation UIToggleVideoButton -(void) touchUp:(id) sender { LinphoneCore* lc = [LinphoneManager getLc]; + + if (!linphone_core_video_enabled(lc)) + return; + LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); if (call) { LinphoneCallParams* call_params = linphone_call_params_copy(linphone_call_get_current_params(call)); - linphone_call_params_enable_video(call_params, TRUE); + if (linphone_call_params_video_enabled(call_params)) { + ms_message("Disabling video"); + linphone_call_params_enable_video(call_params, FALSE); + } else { + ms_message("Enabling video"); + linphone_call_params_enable_video(call_params, TRUE); + } linphone_core_update_call(lc, call, call_params); linphone_call_params_destroy(call_params); - } { - ms_warning("Cannot add video, because no current call"); + } else { + ms_warning("Cannot toggle video, because no current call"); } } diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index cb803e988..42c5e5352 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -258,6 +258,7 @@ } } else { CallDelegate* cd = [[CallDelegate alloc] init]; + cd.eventType = CD_NEW_CALL; cd.delegate = self; cd.call = call; @@ -326,9 +327,16 @@ [mMainScreenWithVideoPreview showPreview:NO]; } +-(void) displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName { + [mIncallViewController displayAskToEnableVideoCall:call forUser:username withDisplayName:displayName]; +} -- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas{ + +- (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); diff --git a/Classes/VideoViewController-ipad.xib b/Classes/VideoViewController-ipad.xib index 6aee67bb2..f1f29d7f1 100644 --- a/Classes/VideoViewController-ipad.xib +++ b/Classes/VideoViewController-ipad.xib @@ -37,7 +37,6 @@ 274 {768, 1004} - 4 MAA @@ -53,18 +52,25 @@ 292 {{-9, 0}, {777, 1004}} - _NS:569 NO IBIPadFramework + + + 292 + {{20, 956}, {28, 28}} + + _NS:567 + NO + IBIPadFramework + 292 {{329, 942}, {108, 62}} - NO IBIPadFramework @@ -107,7 +113,6 @@ 292 {{223, 942}, {108, 62}} - NO IBIPadFramework @@ -128,7 +133,6 @@ 292 {{598, 779}, {170, 225}} - 3 MQA @@ -143,7 +147,6 @@ 292 {{436, 942}, {108, 62}} - NO IBIPadFramework @@ -161,20 +164,9 @@ - - - 292 - {{20, 956}, {28, 28}} - - - _NS:567 - NO - IBIPadFramework - {768, 1004} - _NS:212 @@ -192,7 +184,6 @@ 292 {1004, 768} - _NS:569 NO @@ -203,7 +194,6 @@ 292 {{779, 598}, {225, 170}} - 3 MQA @@ -216,7 +206,6 @@ 292 {{341, 706}, {108, 62}} - NO IBIPadFramework @@ -237,7 +226,6 @@ 292 {{448, 706}, {108, 62}} - NO IBIPadFramework @@ -259,7 +247,6 @@ 292 {{555, 706}, {108, 62}} - NO IBIPadFramework @@ -282,7 +269,6 @@ 292 {{20, 720}, {28, 28}} - _NS:567 NO IBIPadFramework @@ -290,7 +276,6 @@ {1004, 768} - _NS:212 @@ -312,7 +297,6 @@ 292 {1004, 768} - _NS:569 NO @@ -323,7 +307,6 @@ 292 {{779, 598}, {225, 170}} - 3 MQA @@ -336,7 +319,6 @@ 292 {{341, 706}, {108, 62}} - NO IBIPadFramework @@ -357,7 +339,6 @@ 292 {{448, 706}, {108, 62}} - NO IBIPadFramework @@ -379,7 +360,6 @@ 292 {{555, 706}, {108, 62}} - NO IBIPadFramework @@ -402,7 +382,6 @@ 292 {{20, 720}, {28, 28}} - _NS:567 NO IBIPadFramework @@ -410,7 +389,6 @@ {1004, 768} - _NS:212 @@ -813,170 +791,7 @@ 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 diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 43720f891..6b6213ba4 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -117,8 +117,6 @@ 22BB1A69132FF16A005CD7AA /* UIEraseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22BB1A68132FF16A005CD7AA /* UIEraseButton.m */; }; 22C755601317E59C007BC101 /* UIBluetoothButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */; }; 22D1B68112A3E0BE001AE361 /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D1B68012A3E0BE001AE361 /* libresolv.dylib */; }; - 22D817AD147A9F33001CFB9C /* UIAddVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22D817AC147A9F33001CFB9C /* UIAddVideoButton.m */; }; - 22D817AE147A9F33001CFB9C /* UIAddVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22D817AC147A9F33001CFB9C /* UIAddVideoButton.m */; }; 22D8F11F147548E2008C97DB /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 2274550710700509006EC466 /* linphonerc */; }; 22D8F120147548E2008C97DB /* PhoneViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F2508D107141E100AC9B3F /* PhoneViewController.xib */; }; 22D8F121147548E2008C97DB /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; }; @@ -218,6 +216,8 @@ 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; 340751971506459A00B89C47 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340751961506459A00B89C47 /* CoreTelephony.framework */; }; 34075199150645A300B89C47 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340751961506459A00B89C47 /* CoreTelephony.framework */; }; + 340751E7150F38FD00B89C47 /* UIToggleVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 340751E6150F38FD00B89C47 /* UIToggleVideoButton.m */; }; + 340751E8150F38FD00B89C47 /* UIToggleVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 340751E6150F38FD00B89C47 /* UIToggleVideoButton.m */; }; 340A75B014C0670B006AA708 /* ConferenceCallDetailView-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */; }; 340A75B114C0670B006AA708 /* ConferenceCallDetailView-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */; }; 3418843714C58BB100EA48C7 /* nowebcamCIF.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */; }; @@ -589,8 +589,6 @@ 22C7564A13265C6A007BC101 /* x509_vfy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x509_vfy.h; sourceTree = ""; }; 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; }; - 22D817AB147A9F33001CFB9C /* UIAddVideoButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIAddVideoButton.h; sourceTree = ""; }; - 22D817AC147A9F33001CFB9C /* UIAddVideoButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIAddVideoButton.m; sourceTree = ""; }; 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 = ""; }; @@ -614,6 +612,9 @@ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = ""; }; 340751961506459A00B89C47 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; + 340751E4150E4D0200B89C47 /* CallDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallDelegate.h; sourceTree = ""; }; + 340751E5150F38FC00B89C47 /* UIToggleVideoButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIToggleVideoButton.h; sourceTree = ""; }; + 340751E6150F38FD00B89C47 /* UIToggleVideoButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIToggleVideoButton.m; sourceTree = ""; }; 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ConferenceCallDetailView-ipad.xib"; sourceTree = ""; }; 3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = nowebcamCIF.jpg; path = submodules/linphone/mediastreamer2/src/nowebcamCIF.jpg; sourceTree = ""; }; 3418844514C6CAD300EA48C7 /* StatusSubViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatusSubViewController.h; sourceTree = ""; }; @@ -752,6 +753,7 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + 340751E4150E4D0200B89C47 /* CallDelegate.h */, 2211DBBB14769C8200DEE054 /* CallDelegate.m */, 2214EB7012F84668002A5394 /* LinphoneUI */, 2218A92212FBE1340088A667 /* FirstLoginViewController.h */, @@ -1007,6 +1009,8 @@ 2214EB7012F84668002A5394 /* LinphoneUI */ = { isa = PBXGroup; children = ( + 340751E5150F38FC00B89C47 /* UIToggleVideoButton.h */, + 340751E6150F38FD00B89C47 /* UIToggleVideoButton.m */, 2248E90C12F7E4CF00220D9C /* UIDigitButton.h */, 2248E90D12F7E4CF00220D9C /* UIDigitButton.m */, 2248E99D12F801C200220D9C /* LinphoneManager.h */, @@ -1034,8 +1038,6 @@ 223963161393CFAF001DE689 /* FastAddressBook.m */, 22AA8AFF13D83F6300B30535 /* UICamSwitch.h */, 22AA8B0013D83F6300B30535 /* UICamSwitch.m */, - 22D817AB147A9F33001CFB9C /* UIAddVideoButton.h */, - 22D817AC147A9F33001CFB9C /* UIAddVideoButton.m */, ); path = LinphoneUI; sourceTree = ""; @@ -1497,10 +1499,10 @@ 22AA8B0113D83F6300B30535 /* UICamSwitch.m in Sources */, 2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */, 2211DBC014769CB200DEE054 /* IncallViewController.m in Sources */, - 22D817AD147A9F33001CFB9C /* UIAddVideoButton.m in Sources */, 344ABD77147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */, 34CA8539148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */, 3418844814C6CAD300EA48C7 /* StatusSubViewController.m in Sources */, + 340751E7150F38FD00B89C47 /* UIToggleVideoButton.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1532,10 +1534,10 @@ 22D8F159147548E2008C97DB /* UICamSwitch.m in Sources */, 2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */, 2211DBC114769CB300DEE054 /* IncallViewController.m in Sources */, - 22D817AE147A9F33001CFB9C /* UIAddVideoButton.m in Sources */, 344ABD78147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */, 34CA853A148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */, 3418844914C6CAD300EA48C7 /* StatusSubViewController.m in Sources */, + 340751E8150F38FD00B89C47 /* UIToggleVideoButton.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1574,7 +1576,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = com.apple.compilers.llvmgcc42; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1640,7 +1642,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = com.apple.compilers.llvmgcc42; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1916,7 +1918,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = com.apple.compilers.llvmgcc42; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, @@ -1983,7 +1985,7 @@ HAVE_SILK, ); GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = com.apple.compilers.llvmgcc42; HEADER_SEARCH_PATHS = ( submodules/linphone/coreapi, submodules/linphone/mediastreamer2/include, diff --git a/submodules/externals/exosip b/submodules/externals/exosip index b3e55a3c9..8483ca292 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit b3e55a3c93b39af43666acec45191b41f2016fa0 +Subproject commit 8483ca292c10e4bca3331040dd9babf8431d0393 diff --git a/submodules/linphone b/submodules/linphone index 4006baf28..86cb50783 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 4006baf2895166f78b8fe4c2721fa77656607988 +Subproject commit 86cb50783bf6923fc812219066d4aefd656ee80a