Merge remote-tracking branch 'origin/conference'

Conflicts:
	Classes/LinphoneUI/LinphoneUIDelegates.h
	Classes/PhoneViewController.h
	Classes/PhoneViewController.m
	linphone.xcodeproj/project.pbxproj
	linphonerc
	submodules/liblinphone.xcodeproj/project.pbxproj
This commit is contained in:
Jehan Monnier 2011-11-18 17:18:49 +01:00
commit 6e1ae646b5
36 changed files with 1645 additions and 1881 deletions

View file

@ -18,7 +18,7 @@
*/
#import "AdvancedPhoneViewController.h"
#import "IncallViewController.h"
@implementation AdvancedPhoneViewController
@ -38,29 +38,30 @@
withDisplayName:displayName];
}
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
-(void) displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
/*[super displayCallInProgressFromUI:viewCtrl
forUser:username
withDisplayName:displayName];*/
[self presentModalViewController:mIncallViewController animated:true];
[mIncallViewController displayCallInProgressFromUI:viewCtrl
[mIncallViewController displayCall:call InProgressFromUI:viewCtrl
forUser:username
withDisplayName:displayName];
}
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
if (linphone_call_get_dir(currentCall)==LinphoneCallIncoming){
[self presentModalViewController:mIncallViewController animated:true];
}
[super displayIncallFromUI:viewCtrl
-(void) displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
if (self.presentedViewController != mIncallViewController && (call == 0x0 ||
linphone_call_get_dir(call)==LinphoneCallIncoming)){
[self presentModalViewController:mIncallViewController animated:true];
}
[super displayInCall:call FromUI:viewCtrl
forUser:username
withDisplayName:displayName];
[mIncallViewController displayIncallFromUI:viewCtrl
[mIncallViewController displayInCall:call FromUI:viewCtrl
forUser:username
withDisplayName:displayName];
@ -76,6 +77,11 @@
[mIncallViewController updateUIFromLinphoneState:viewCtrl];
}
-(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
[mIncallViewController displayVideoCall:call FromUI:viewCtrl
forUser:username
withDisplayName:displayName];
}
- (void)dealloc {
[mIncallViewController release];
[super dealloc];

27
Classes/CallDelegate.h Normal file
View file

@ -0,0 +1,27 @@
//
// CallDelegate.h
// linphone
//
// Created by Pierre-Eric Pelloux-Prayer on 03/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#include "linphonecore.h"
@protocol UIActionSheetCustomDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void*) datas;
@end
@interface CallDelegate : NSObject<UIActionSheetDelegate> {
LinphoneCall* call;
id<UIActionSheetCustomDelegate> delegate;
}
@property (nonatomic) LinphoneCall* call;
@property (nonatomic, retain) id delegate;
@end

20
Classes/CallDelegate.m Normal file
View file

@ -0,0 +1,20 @@
//
// CallDelegate.m
// linphone
//
// Created by Pierre-Eric Pelloux-Prayer on 03/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "CallDelegate.h"
@implementation CallDelegate
@synthesize call;
@synthesize delegate;
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
[delegate actionSheet:actionSheet clickedButtonAtIndex:buttonIndex withUserDatas:call];
}
@end

View file

@ -21,23 +21,21 @@
#import "PhoneViewController.h"
#import <AddressBookUI/ABPeoplePickerNavigationController.h>
#include "UILinphone.h"
@class VideoViewController;
@interface IncallViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate,LinphoneUICallDelegate> {
@interface IncallViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate,LinphoneUICallDelegate, UITableViewDelegate, UITableViewDataSource> {
UIView* controlSubView;
UIView* controlSubView, *callControlSubView, *hangUpView;
UILabel* peerName;
UILabel* peerNumber;
UIDuration* callDuration;
UILabel* status;
UIHangUpButton* endCtrl;
UIButton* endCtrl;
UIButton* dialer;
UIMuteButton* mute;
UIPauseResumeButton* pause;
UIButton* pause;
UISpeakerButton* speaker;
UIButton* contacts;
UITableView* callTableView;
UIButton* addCall, *mergeCalls, *addToConf;
//key pad
@ -55,30 +53,46 @@
UIDigitButton* star;
UIDigitButton* zero;
UIDigitButton* hash;
UIHangUpButton* endPad;
UIButton* close;
bool dismissed;
NSTimer *durationRefreasher;
NSTimer * glowingTimer;
float glow;
NSIndexPath* activePath;
ABPeoplePickerNavigationController* myPeoplePickerController;
LinphoneCall* selectedCall;
VideoViewController* mVideoViewController;
BOOL mVideoShown;
BOOL mVideoIsPending;
BOOL mIncallViewIsReady;
}
-(void)displayStatus:(NSString*) message;
- (IBAction)doAction:(id)sender;
@property (nonatomic, retain) IBOutlet UIView* controlSubView;
@property (nonatomic, retain) IBOutlet UIView* padSubView;
@property (nonatomic, retain) IBOutlet UILabel* peerName;
@property (nonatomic, retain) IBOutlet UILabel* peerNumber;
@property (nonatomic, retain) IBOutlet UILabel* callDuration;
@property (nonatomic, retain) IBOutlet UILabel* status;
@property (nonatomic, retain) IBOutlet UIView* controlSubView;
@property (nonatomic, retain) IBOutlet UIView* callControlSubView;
@property (nonatomic, retain) IBOutlet UIView* padSubView;
@property (nonatomic, retain) IBOutlet UIView* hangUpView;
@property (nonatomic, retain) IBOutlet UIButton* endCtrl;
@property (nonatomic, retain) IBOutlet UIButton* dialer;
@property (nonatomic, retain) IBOutlet UIButton* mute;
@property (nonatomic, retain) IBOutlet UIButton* pause;
@property (nonatomic, retain) IBOutlet UIButton* speaker;
@property (nonatomic, retain) IBOutlet UIButton* contacts;
@property (nonatomic, retain) IBOutlet UITableView* callTableView;
@property (nonatomic, retain) IBOutlet UIButton* addCall;
@property (nonatomic, retain) IBOutlet UIButton* mergeCalls;
@property (nonatomic, retain) IBOutlet UIButton* addToConf;
@property (nonatomic, retain) IBOutlet UIButton* one;
@property (nonatomic, retain) IBOutlet UIButton* two;
@ -93,5 +107,5 @@
@property (nonatomic, retain) IBOutlet UIButton* zero;
@property (nonatomic, retain) IBOutlet UIButton* hash;
@property (nonatomic, retain) IBOutlet UIButton* close;
@property (nonatomic, retain) IBOutlet UIButton* endPad;
@property (nonatomic, retain) IBOutlet VideoViewController* videoViewController;
@end

View file

@ -19,19 +19,18 @@
#import "IncallViewController.h"
#import <AudioToolbox/AudioToolbox.h>
#import "linphonecore.h"
#include "LinphoneManager.h"
#include "private.h"
@implementation IncallViewController
@synthesize controlSubView;
@synthesize callControlSubView;
@synthesize padSubView;
@synthesize hangUpView;
@synthesize peerName;
@synthesize peerNumber;
@synthesize callDuration;
@synthesize status;
@synthesize addToConf;
@synthesize endCtrl;
@synthesize close;
@synthesize mute;
@ -39,6 +38,9 @@
@synthesize dialer;
@synthesize speaker;
@synthesize contacts;
@synthesize callTableView;
@synthesize addCall;
@synthesize mergeCalls;
@synthesize one;
@synthesize two;
@ -52,7 +54,7 @@
@synthesize star;
@synthesize zero;
@synthesize hash;
@synthesize endPad;
@synthesize videoViewController;
/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
@ -66,13 +68,31 @@
*/
bool isInConference(LinphoneCall* call) {
if (!call)
return false;
return linphone_call_get_current_params(call)->in_conference;
}
int callCount(LinphoneCore* lc) {
int count = 0;
const MSList* calls = linphone_core_get_calls(lc);
while (calls != 0) {
if (!isInConference((LinphoneCall*)calls->data)) {
count++;
}
calls = calls->next;
}
return count;
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
//Controls
[mute initWithOnImage:[UIImage imageNamed:@"mic_muted.png"] offImage:[UIImage imageNamed:@"mic_active.png"] ];
[pause initWithOnImage:[UIImage imageNamed:@"resumecall.png"] offImage:[UIImage imageNamed:@"pausecall.png"] ];
[speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ];
[speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ];
//Dialer init
@ -88,50 +108,211 @@
[nine initWithNumber:'9'];
[star initWithNumber:'*'];
[hash initWithNumber:'#'];
[addCall addTarget:self action:@selector(addCallPressed) forControlEvents:UIControlEventTouchDown];
[mergeCalls addTarget:self action:@selector(mergeCallsPressed) forControlEvents:UIControlEventTouchDown];
[endCtrl addTarget:self action:@selector(endCallPressed) forControlEvents:UIControlEventTouchUpInside];
[addToConf addTarget:self action:@selector(addToConfCallPressed) forControlEvents:UIControlEventTouchUpInside];
[pause addTarget:self action:@selector(pauseCallPressed) forControlEvents:UIControlEventTouchUpInside];
[mergeCalls setHidden:YES];
mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
bundle:[NSBundle mainBundle]];
mVideoShown=FALSE;
mIncallViewIsReady=FALSE;
mVideoIsPending=FALSE;
//selectedCall = nil;
}
-(void) addCallPressed {
[self dismissModalViewControllerAnimated:true];
}
-(void) mergeCallsPressed {
LinphoneCore* lc = [LinphoneManager getLc];
linphone_core_add_all_to_conference(lc);
}
-(void) addToConfCallPressed {
if (!selectedCall)
return;
linphone_core_add_to_conference([LinphoneManager getLc], selectedCall);
}
-(void) pauseCallPressed {
if (!selectedCall)
return;
if (linphone_call_get_state(selectedCall) == LinphoneCallPaused)
linphone_core_resume_call([LinphoneManager getLc], selectedCall);
else
linphone_core_pause_call([LinphoneManager getLc], selectedCall);
}
-(void)updateCallsDurations {
[self updateUIFromLinphoneState: nil];
}
-(void) viewWillAppear:(BOOL)animated {
}
-(void)viewDidAppear:(BOOL)animated {
if (dismissed) {
[self dismissModalViewControllerAnimated:true];
} else {
[self updateCallsDurations];
durationRefreasher = [NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(updateCallsDurations)
userInfo:nil
repeats:YES];
glowingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
target:self
selector:@selector(updateGlow)
userInfo:nil
repeats:YES];
glow = 0;
mIncallViewIsReady=TRUE;
if (mVideoIsPending) {
mVideoIsPending=FALSE;
[self displayVideoCall:nil FromUI:self
forUser:nil
withDisplayName:nil];
}
}
}
- (void) viewDidDisappear:(BOOL)animated {
if (durationRefreasher != nil) {
[durationRefreasher invalidate];
durationRefreasher=nil;
[glowingTimer invalidate];
glowingTimer = nil;
}
if (!mVideoShown) [[UIApplication sharedApplication] setIdleTimerDisabled:false];
}
- (void)viewDidUnload {
}
-(void) displayStatus:(NSString*) message; {
[status setText:message];
[self updateUIFromLinphoneState: nil];
}
-(void) displayPad:(bool) enable {
[callTableView setHidden:enable];
[hangUpView setHidden:enable];
[controlSubView setHidden:enable];
[padSubView setHidden:!enable];
}
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
-(void) displayCall:(LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
//restaure view
[self displayPad:false];
if (displayName && [displayName length]>0) {
[peerName setText:displayName];
[peerNumber setText:username];
} else {
[peerName setText:username];
[peerNumber setText:@""];
}
[callDuration setText:@"Calling"];
dismissed = false;
if (call)
selectedCall = call;
[self updateUIFromLinphoneState: nil];
}
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
[callDuration start];
-(void) displayIncomingCall:(LinphoneCall *)call NotificationFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
}
-(void) displayInCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
dismissed = false;
if (call)
selectedCall = call;
[self updateUIFromLinphoneState: nil];
}
-(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
[callDuration stop];
UIViewController* modalVC = self.modalViewController;
if (modalVC != nil) {
// clear previous native window ids
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 animated:NO];
[self dismissModalViewControllerAnimated:FALSE];//just in case
}
[self dismissModalViewControllerAnimated:true];
dismissed = true;
[self updateUIFromLinphoneState: nil];
}
-(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
if (mIncallViewIsReady) {
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
mVideoShown=TRUE;
[self presentModalViewController:mVideoViewController animated:true];
} else {
//postepone presentation
mVideoIsPending=TRUE;
}
}
-(void) updateUIFromLinphoneState:(UIViewController *)viewCtrl {
[mute reset];
[pause reset];
// if (
// [pause reset];
LinphoneCore* lc;
@try {
lc = [LinphoneManager getLc];
if (callCount([LinphoneManager getLc]) > 1) {
[pause setHidden:YES];
[mergeCalls setHidden:NO];
} else {
[pause setHidden:NO];
[mergeCalls setHidden:YES];
}
[callTableView reloadData];
} @catch (NSException* exc) {
return;
}
// hide call control subview if no call selected
[callControlSubView setHidden:(selectedCall == NULL)];
// hide add to conf if no conf exist
if (!callControlSubView.hidden) {
[addToConf setHidden:(linphone_core_get_conference_size(lc) == 0 ||
isInConference(selectedCall))];
}
int callsCount = linphone_core_get_calls_nb(lc);
// hide pause/resume if in conference
if (selectedCall) {
if (linphone_core_is_in_conference(lc))
[pause setHidden:YES];
else if (linphone_call_get_state(selectedCall)==LinphoneCallPaused) {
[pause setHidden:NO];
//[pause setTitle:@"Resume" forState:UIControlStateNormal];
pause.selected = YES;
pause.highlighted = NO;
} else if (callCount(lc) == callsCount && callsCount == 1) {
[pause setHidden:NO];
//[pause setTitle:@"Pause" forState:UIControlStateNormal];
pause.selected = NO;
pause.highlighted = NO;
} else {
[pause setHidden:YES];
}
} else {
[pause setHidden:callsCount > 0];
}
[mergeCalls setHidden:!pause.hidden];
}
- (IBAction)doAction:(id)sender {
@ -174,8 +355,292 @@
- (void)dealloc {
[super dealloc];
[super dealloc];
}
-(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf{
const MSList* calls = linphone_core_get_calls([LinphoneManager getLc]);
if (!conf && linphone_core_get_conference_size([LinphoneManager getLc]))
index--;
while (calls != 0) {
if (isInConference((LinphoneCall*)calls->data) == conf) {
if (index == 0)
break;
index--;
}
calls = calls->next;
}
if (calls == 0) {
ms_error("Cannot find call with index %d (in conf: %d)", index, conf);
return nil;
} else {
return (LinphoneCall*)calls->data;
}
}
-(void) updateActive:(bool_t)active cell:(UITableViewCell*) cell {
if (!active) {
cell.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.2];
UIColor* c = [[UIColor blackColor] colorWithAlphaComponent:0.5];
[cell.textLabel setTextColor:c];
[cell.detailTextLabel setTextColor:c];
} else {
cell.backgroundColor = [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:(0.7+sin(2*glow)*0.3)];
[cell.textLabel setTextColor:[UIColor whiteColor]];
[cell.detailTextLabel setTextColor:[UIColor whiteColor]];
}
[cell.textLabel setBackgroundColor:[UIColor clearColor]];
[cell.detailTextLabel setBackgroundColor:[UIColor clearColor]];
[cell.accessoryView setHidden:YES];
//[cell.backgroundView setBackgroundColor:cell.backgroundColor];
}
-(void) updateGlow {
glow += 0.1;
NSIndexPath* path = [callTableView indexPathForSelectedRow];
if (path) {
UITableViewCell* cell = [callTableView cellForRowAtIndexPath:path];
[self updateActive:YES cell:cell];
[cell.backgroundView setNeedsDisplay];
[cell setNeedsDisplay];
[callTableView setNeedsDisplay];
}
}
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
[self updateActive:(cell.accessoryType == UITableViewCellAccessoryCheckmark) cell:cell];
//cell.accessoryType = UITableViewCellAccessoryNone;
}
- (void) updateCell:(UITableViewCell*)cell at:(NSIndexPath*) path withCall:(LinphoneCall*) call conferenceActive:(bool)confActive{
if (call == NULL) {
ms_warning("UpdateCell called with null call");
[cell.textLabel setText:@""];
return;
}
const LinphoneAddress* addr = linphone_call_get_remote_address(call);
if (addr) {
NSMutableString* mss = [[NSMutableString alloc] init];
const char* n = linphone_address_get_display_name(addr);
if (n)
[mss appendFormat:@"%s", n, nil];
else
[mss appendFormat:@"%s", linphone_address_get_username(addr), nil];
[cell.textLabel setText:mss];
} else
[cell.textLabel setText:@"plop"];
NSMutableString* ms = [[NSMutableString alloc] init ];
if (linphone_call_get_state(call) == LinphoneCallStreamsRunning) {
int duration = linphone_call_get_duration(call);
if (duration >= 60)
[ms appendFormat:@"%02i:%02i", (duration/60), duration - 60*(duration/60), nil];
else
[ms appendFormat:@"%02i sec", duration, nil];
} else {
[ms appendFormat:@"%s", linphone_call_state_to_string(linphone_call_get_state(call)), nil];
}
[cell.detailTextLabel setText:ms];
/*
if (linphone_core_get_current_call([LinphoneManager getLc]) == call) {
cell.backgroundColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:1];
} else if (confActive && isInConference(call)) {
cell.backgroundColor = [UIColor colorWithRed:0 green:0 blue:1 alpha:1];
} else{
cell.backgroundColor = [UIColor colorWithRed:1 green:0.5 blue:0 alpha:1];
}*/
if (call == selectedCall) {
[cell setSelected:YES animated:NO];
[callTableView selectRowAtIndexPath:path animated:NO scrollPosition:UITableViewScrollPositionNone];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}else{
[cell setSelected:NO animated:NO];
[callTableView deselectRowAtIndexPath:path animated:NO];
cell.accessoryType = UITableViewCellAccessoryNone;
}
}
-(void) updateConferenceCell:(UITableViewCell*) cell at:(NSIndexPath*)indexPath {
[cell.textLabel setText:@"Conference"];
LinphoneCore* lc = [LinphoneManager getLc];
cell.accessoryType = UITableViewCellAccessoryNone;
[self updateActive:NO cell:cell];
cell.selected = NO;
[callTableView deselectRowAtIndexPath:indexPath animated:NO];
NSMutableString* ms = [[NSMutableString alloc] init ];
const MSList* calls = linphone_core_get_calls(lc);
while (calls) {
LinphoneCall* call = (LinphoneCall*)calls->data;
if (isInConference(call)) {
const LinphoneAddress* addr = linphone_call_get_remote_address(call);
const char* n = linphone_address_get_display_name(addr);
if (n)
[ms appendFormat:@"%s ", n, nil];
else
[ms appendFormat:@"%s ", linphone_address_get_username(addr), nil];
//if (call == selectedCall)
// [self updateActive:YES cell:cell];
if (call == selectedCall) {
[callTableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
cell.selected = YES;
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
calls = calls->next;
}
[cell.detailTextLabel setText:ms];
/*if (linphone_core_is_in_conference(lc))
cell.backgroundColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:1];
else
cell.backgroundColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];*/
}
// UITableViewDataSource (required)
- (UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [callTableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
LinphoneCore* lc = [LinphoneManager getLc];
if (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0)
[self updateConferenceCell:cell at:indexPath];
else
[self updateCell:cell at:indexPath withCall: [self retrieveCallAtIndex:indexPath.row inConference:NO]
conferenceActive:linphone_core_is_in_conference(lc)];
cell.userInteractionEnabled = YES;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
//cell.selectionStyle = UITableViewCellSelectionStyleBlue;
/*NSString *path = [[NSBundle mainBundle] pathForResource:[item objectForKey:@"imageKey"] ofType:@"png"];
UIImage *theImage = [UIImage imageWithContentsOfFile:path];
cell.imageView.image = theImage;*/
return cell;
}
// UITableViewDataSource (required)
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
LinphoneCore* lc = [LinphoneManager getLc];
return callCount(lc) + (int)(linphone_core_get_conference_size(lc) > 0);
if (section == 0 && linphone_core_get_conference_size(lc) > 0)
return linphone_core_get_conference_size(lc) - linphone_core_is_in_conference(lc);
return callCount(lc);
}
// UITableViewDataSource
- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
LinphoneCore* lc = [LinphoneManager getLc];
int count = 0;
if (callCount(lc) > 0)
count++;
if (linphone_core_get_conference_size([LinphoneManager getLc]) > 0)
count ++;
return count;
}
// UITableViewDataSource
//- (NSArray*) sectionIndexTitlesForTableView:(UITableView *)tableView {
// return [NSArray arrayWithObjects:@"Conf", @"Calls", nil ];
//}
// UITableViewDataSource
- (NSString*) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return nil;
return @"Calls";
if (section == 0 && linphone_core_get_conference_size([LinphoneManager getLc]) > 0)
return @"Conference";
else
return @"Calls";
}
// UITableViewDataSource
- (NSString*) tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
{
return nil;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:NO];
LinphoneCore* lc = [LinphoneManager getLc];
[[callTableView cellForRowAtIndexPath:indexPath] setSelected:YES animated:NO];
bool inConf = (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0);
selectedCall = [self retrieveCallAtIndex:indexPath.row inConference:inConf];
if (inConf) {
if (linphone_core_is_in_conference(lc))
return;
LinphoneCall* current = linphone_core_get_current_call(lc);
if (current)
linphone_core_pause_call(lc, current);
linphone_core_enter_conference([LinphoneManager getLc]);
} else if (selectedCall) {
if (linphone_core_is_in_conference(lc)) {
linphone_core_leave_conference(lc);
}
linphone_core_resume_call([LinphoneManager getLc], selectedCall);
}
[self updateUIFromLinphoneState: nil];
}
-(void) endCallPressed {
if (selectedCall == NULL) {
ms_error("No selected call");
return;
}
LinphoneCore* lc = [LinphoneManager getLc];
if (isInConference(selectedCall)) {
linphone_core_terminate_conference(lc);
/*
linphone_core_remove_from_conference(lc, selectedCall);
if ((linphone_core_get_conference_size(lc) - (int)linphone_core_is_in_conference(lc)) == 0)
linphone_core_terminate_conference(lc);
*/
} else {
linphone_core_terminate_call(lc, selectedCall);
}
selectedCall = NULL;
}
@end

File diff suppressed because it is too large Load diff

View file

@ -24,6 +24,7 @@
#import "ConsoleViewController.h"
#import "MoreViewController.h"
#include "CallHistoryTableViewController.h"
#include "LinphoneManager.h"
@ -149,9 +150,14 @@
[super dealloc];
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
LinphoneCall* call;
[(NSData*)([notification.userInfo objectForKey:@"call"]) getBytes:&call];
if (!call) {
ms_warning("Local notification received with nil call");
return;
}
linphone_core_accept_call([LinphoneManager getLc], call);
}

View file

@ -123,40 +123,45 @@ extern void libmssilk_init();
}
return;
}
-(void) onCall:(LinphoneCall*) currentCall StateChanged: (LinphoneCallState) new_state withMessage: (const char *) message {
const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(currentCall));
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithCString:lUserNameChars]:NSLocalizedString(@"Unknown",nil);
-(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]:NSLocalizedString(@"Unknown",nil);
if (new_state == LinphoneCallIncomingReceived) {
[self updateCallWithAddressBookData:currentCall]; // display name is updated
[self updateCallWithAddressBookData:call]; // display name is updated
}
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(currentCall));
NSString* lDisplayName = lDisplayNameChars?[[NSString alloc] initWithCString:lDisplayNameChars]:@"";
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(call));
NSString* lDisplayName = lDisplayNameChars?[[NSString alloc] initWithUTF8String:lDisplayNameChars]:@"";
bool canHideInCallView = (linphone_core_get_calls([LinphoneManager getLc]) == NULL);
switch (new_state) {
case LinphoneCallStreamsRunning:
//check video
if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
[callDelegate displayVideoCallFromUI:mCurrentViewController
if (linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
[callDelegate displayVideoCall:call FromUI:mCurrentViewController
forUser:lUserName
withDisplayName:lDisplayName];
}
break;
case LinphoneCallIncomingReceived:
[callDelegate displayIncomingCallNotigicationFromUI:mCurrentViewController
[callDelegate displayIncomingCall:call
NotificationFromUI:mCurrentViewController
forUser:lUserName
withDisplayName:lDisplayName];
break;
case LinphoneCallOutgoingInit:
[callDelegate displayCallInProgressFromUI:mCurrentViewController
[callDelegate displayCall:call
InProgressFromUI:mCurrentViewController
forUser:lUserName
withDisplayName:lDisplayName];
break;
case LinphoneCallConnected:
[callDelegate displayIncallFromUI:mCurrentViewController
[callDelegate displayInCall: call
FromUI:mCurrentViewController
forUser:lUserName
withDisplayName:lDisplayName];
break;
@ -189,15 +194,19 @@ extern void libmssilk_init();
cancelButtonTitle:NSLocalizedString(@"Dismiss",nil)
otherButtonTitles:nil];
[error show];
[callDelegate displayDialerFromUI:mCurrentViewController
if (canHideInCallView) {
[callDelegate displayDialerFromUI:mCurrentViewController
forUser:@""
withDisplayName:@""];
}
break;
}
case LinphoneCallEnd:
[callDelegate displayDialerFromUI:mCurrentViewController
case LinphoneCallEnd:
if (canHideInCallView) {
[callDelegate displayDialerFromUI:mCurrentViewController
forUser:@""
withDisplayName:@""];
}
break;
default:
break;
@ -264,9 +273,9 @@ static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, Lin
-(void) onRegister:(LinphoneCore *)lc cfg:(LinphoneProxyConfig*) cfg state:(LinphoneRegistrationState) state message:(const char*) message {
LinphoneAddress* lAddress = linphone_address_new(linphone_proxy_config_get_identity(cfg));
NSString* lUserName = linphone_address_get_username(lAddress)? [[NSString alloc] initWithCString:linphone_address_get_username(lAddress) ]:@"";
NSString* lDisplayName = linphone_address_get_display_name(lAddress)? [[NSString alloc] initWithCString:linphone_address_get_display_name(lAddress) ]:@"";
NSString* lDomain = [[NSString alloc] initWithCString:linphone_address_get_domain(lAddress)];
NSString* lUserName = linphone_address_get_username(lAddress)? [[NSString alloc] initWithUTF8String:linphone_address_get_username(lAddress) ]:@"";
NSString* lDisplayName = linphone_address_get_display_name(lAddress)? [[NSString alloc] initWithUTF8String:linphone_address_get_display_name(lAddress) ]:@"";
NSString* lDomain = [[NSString alloc] initWithUTF8String:linphone_address_get_domain(lAddress)];
linphone_address_destroy(lAddress);
if (state == LinphoneRegistrationOk) {
@ -456,7 +465,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* proxyAddress = [[NSUserDefaults standardUserDefaults] stringForKey:@"proxy_preference"];
if ((!proxyAddress | [proxyAddress length] <1 ) && domain) {
if ((!proxyAddress || [proxyAddress length] <1 ) && domain) {
proxyAddress = [NSString stringWithFormat:@"sip:%@",domain] ;
} else {
proxyAddress = [NSString stringWithFormat:@"sip:%@",proxyAddress] ;
@ -572,7 +581,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithCString:machine];
NSString *platform = [[NSString alloc ] initWithUTF8String:machine];
free(machine);
return ![platform isEqualToString:@"iPhone1,2"];
@ -586,6 +595,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
-(void) destroyLibLinphone {
[mIterateTimer invalidate];
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setDelegate:nil];
if (theLinphoneCore != nil) { //just in case application terminate before linphone core initialization
linphone_core_destroy(theLinphoneCore);
theLinphoneCore = nil;
@ -599,13 +610,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
//**********************BG mode management*************************///////////
-(void) enterBackgroundMode {
struct addrinfo hints;
struct addrinfo *res=NULL;
int err;
LinphoneProxyConfig* proxyCfg;
LinphoneAddress *addr;
linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg);
linphone_core_stop_dtmf_stream(theLinphoneCore);
@ -648,8 +653,6 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
else {
ms_warning("Entering lite bg mode");
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setDelegate:nil];
[self destroyLibLinphone];
}

View file

@ -17,15 +17,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
#include "linphonecore.h"
@protocol LinphoneUICallDelegate
// UI changes
-(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayIncomingCallNotigicationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayVideoCallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayIncomingCall: (LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-(void) updateUIFromLinphoneState:(UIViewController*) viewCtrl;
//status reporting
-(void) displayStatus:(NSString*) message;

View file

@ -23,14 +23,14 @@
@implementation UIBluetoothButton
#define check_auresult(au,method) \
if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%i",method,au)
if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%ld",method,au)
-(void) onOn {
//redirect audio to bluetooth
UInt32 size = sizeof(CFStringRef);
CFStringRef route="HeadsetBT";
OSStatus result = AudioSessionSetProperty(kAudioSessionProperty_AudioRoute, &size, &route);
OSStatus result = AudioSessionSetProperty(kAudioSessionProperty_AudioRoute, size, &route);
check_auresult(result,"set kAudioSessionProperty_AudioRoute HeadsetBT");
int allowBluetoothInput = 1;

View file

@ -32,7 +32,7 @@
[error show];
return;
}
if (!linphone_core_in_call([LinphoneManager getLc])) {
if (TRUE /*!linphone_core_in_call([LinphoneManager getLc])*/) {
LinphoneProxyConfig* proxyCfg;
//get default proxy
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);

View file

@ -23,9 +23,14 @@
@private
char mDigit;
UITextField* mAddress;
bool_t sendDtmfDuringCall;
}
-(void) initWithNumber:(char)digit ;
-(void) initWithNumber:(char)digit addressField:(UITextField*) address;
-(void) initWithNumber:(char)digit addressField:(UITextField*) address dtmf:(bool_t)send;
@property bool_t sendDtmfDuringCall;
@end

View file

@ -23,11 +23,12 @@
@implementation UIDigitButton
@synthesize sendDtmfDuringCall;
-(void) touchDown:(id) sender {
if (mAddress && !linphone_core_in_call([LinphoneManager getLc])) {
if (mAddress && (!sendDtmfDuringCall || !linphone_core_in_call([LinphoneManager getLc]))) {
NSString* newAddress = [NSString stringWithFormat:@"%@%c",mAddress.text,mDigit];
[mAddress setText:newAddress];
linphone_core_play_dtmf([LinphoneManager getLc], mDigit, -1);
@ -60,9 +61,10 @@
}
-(void) initWithNumber:(char)digit {
[self initWithNumber:digit addressField:nil];
[self initWithNumber:digit addressField:nil dtmf:true];
}
-(void) initWithNumber:(char)digit addressField:(UITextField*) address{
-(void) initWithNumber:(char)digit addressField:(UITextField*) address dtmf:(bool_t)sendDtmf{
sendDtmfDuringCall = sendDtmf;
mDigit=digit ;
mAddress=address?[address retain]:nil;
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];

View file

@ -23,7 +23,13 @@
@implementation UIHangUpButton
-(void) touchUp:(id) sender {
linphone_core_terminate_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
LinphoneCore* lc = [LinphoneManager getLc];
if (!lc)
return;
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
if (call)
linphone_core_terminate_call(lc,call);
}
- (id)initWithFrame:(CGRect)frame {

View file

@ -38,13 +38,13 @@
}
-(bool) isInitialStateOn {
@try {
const MSList* c = linphone_core_get_calls([LinphoneManager getLc]);
LinphoneCall* c = linphone_core_get_current_call([LinphoneManager getLc]);
if (c) {
return linphone_call_get_state((LinphoneCall*)c->data) == LinphoneCallPaused;
return linphone_call_get_state(c) == LinphoneCallPaused;
} else {
return false;
/* if current call is paused -> c == null */
return true;
}
} @catch(NSException* e) {
//not ready yet

View file

@ -40,7 +40,7 @@ static void audioRouteChangeListenerCallback (
AudioSessionInitialize(NULL, NULL, NULL, NULL);
OSStatus lStatus = AudioSessionAddPropertyListener(routeChangeID, audioRouteChangeListenerCallback, self);
if (lStatus) {
ms_error ("cannot register route change handler [%i]",lStatus);
ms_error ("cannot register route change handler [%ld]",lStatus);
}
}

View file

@ -24,6 +24,7 @@
-(void) onOff;
-(bool) isInitialStateOn;
@end
@interface UIToggleButton : UIButton <UIToggleButtonDelegate> {
@private
UIImage* mOnImage;

View file

@ -47,9 +47,9 @@
}
-(void) initWithOnImage:(UIImage*) onImage offImage:(UIImage*) offImage {
mOnImage = [onImage retain];
mOffImage = [offImage retain];
mIsOn=false;
mOnImage = [onImage retain];
mOffImage = [offImage retain];
mIsOn=false;
[self reset];
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
@ -69,5 +69,19 @@
[mOffImage release];
}
-(void) onOn {
[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
}
-(void) onOff {
[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
}
-(bool) isInitialStateOn {
[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
return false;
}
@end

View file

@ -20,12 +20,14 @@
#import <Foundation/Foundation.h>
#import "linphonecore.h"
#import "UILinphone.h"
#import "CallDelegate.h"
@class IncallViewController;
@class FirstLoginViewController;
@class VideoViewController;
@interface PhoneViewController : UIViewController <UITextFieldDelegate,UIActionSheetDelegate,LinphoneUICallDelegate> {
@interface PhoneViewController : UIViewController <UITextFieldDelegate,LinphoneUICallDelegate, UIActionSheetCustomDelegate> {
@private
//UI definition
@ -35,13 +37,14 @@
UIEraseButton* erase;
UIView* incallView;
UIButton* backToCallView;
UIDuration* callDuration;
UIMuteButton* mute;
UISpeakerButton* speaker;
UILabel* peerLabel;
UICallButton* call;
UICallButton* __call;
UIHangUpButton* hangup;
UILabel* status;
@ -66,14 +69,13 @@
UIActionSheet *mIncomingCallActionSheet;
FirstLoginViewController* myFirstLoginViewController;
VideoViewController* mVideoViewController;
BOOL mVideoShown;
}
@property (nonatomic, retain) IBOutlet UIView* dialerView;
@property (nonatomic, retain) IBOutlet UIViewController* videoViewController;
@property (nonatomic, retain) IBOutlet UITextField* address;
@property (nonatomic, retain) IBOutlet UIButton* call;
@property (nonatomic, retain) IBOutlet UIButton* __call;
@property (nonatomic, retain) IBOutlet UIButton* hangup;
@property (nonatomic, retain) IBOutlet UILabel* status;
@property (nonatomic, retain) IBOutlet UIEraseButton* erase;
@ -84,6 +86,7 @@
@property (nonatomic, retain) IBOutlet UIButton* speaker;
@property (nonatomic, retain) IBOutlet UILabel* peerLabel;
@property (nonatomic, retain) IBOutlet UIButton* backToCallView;
@property (nonatomic, retain) IBOutlet UIButton* one;
@property (nonatomic, retain) IBOutlet UIButton* two;

View file

@ -22,17 +22,17 @@
#import <AVFoundation/AVAudioSession.h>
#import <AudioToolbox/AudioToolbox.h>
#import "LinphoneManager.h"
#import "VideoViewController.h"
#include "FirstLoginViewController.h"
@implementation PhoneViewController
@synthesize dialerView ;
@synthesize address ;
@synthesize call;
@synthesize __call;
@synthesize hangup;
@synthesize status;
@synthesize erase;
@synthesize backToCallView;
@synthesize incallView;
@synthesize callDuration;
@ -55,7 +55,7 @@
@synthesize back;
@synthesize myTabBarController;
@synthesize videoViewController;
//implements keypad behavior
@ -70,21 +70,6 @@
}
/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
}
return self;
}
*/
- (void)viewDidAppear:(BOOL)animated {
[[UIApplication sharedApplication] setIdleTimerDisabled:true];
[mute reset];
@ -97,7 +82,7 @@
}
- (void)viewDidDisappear:(BOOL)animated {
if (!mVideoShown) [[UIApplication sharedApplication] setIdleTimerDisabled:false];
}
@ -106,25 +91,32 @@
[super viewDidLoad];
mDisplayName = [UILabel alloc];
[zero initWithNumber:'0' addressField:address ];
[one initWithNumber:'1' addressField:address ];
[two initWithNumber:'2' addressField:address ];
[three initWithNumber:'3' addressField:address ];
[four initWithNumber:'4' addressField:address ];
[five initWithNumber:'5' addressField:address ];
[six initWithNumber:'6' addressField:address ];
[seven initWithNumber:'7' addressField:address ];
[eight initWithNumber:'8' addressField:address ];
[nine initWithNumber:'9' addressField:address ];
[star initWithNumber:'*' addressField:address ];
[hash initWithNumber:'#' addressField:address ];
[call initWithAddress:address withDisplayName:mDisplayName];
[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];
[__call initWithAddress:address withDisplayName:mDisplayName];
[mute initWithOnImage:[UIImage imageNamed:@"mic_muted.png"] offImage:[UIImage imageNamed:@"mic_active.png"] ];
[speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ];
[erase initWithAddressField:address];
self.videoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
bundle:[NSBundle mainBundle]];
mVideoShown=FALSE;
[backToCallView addTarget:self action:@selector(backToCallViewPressed) forControlEvents:UIControlEventTouchUpInside];
}
-(void) backToCallViewPressed {
[self displayInCall: nil
FromUI:nil
forUser:nil
withDisplayName:nil];
}
@ -174,18 +166,6 @@
mIncomingCallActionSheet=nil;
}
}
UIViewController* modalVC = self.modalViewController;
if (modalVC != nil) {
// clear previous native window ids
if (modalVC == self.videoViewController) {
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 animated:NO];
[self dismissModalViewControllerAnimated:FALSE];//just in case
}
[address setHidden:false];
if (username) {
@ -196,7 +176,7 @@
[incallView setHidden:true];
[dialerView setHidden:false];
[call setEnabled:true];
[__call setEnabled:true];
[hangup setEnabled:false];
[callDuration stop];
@ -212,7 +192,7 @@
[myTabBarController setSelectedIndex:DIALER_TAB_INDEX];
}
-(void) displayIncalViewforUser:(NSString*) username withDisplayName:(NSString*) displayName {
-(void) displayInCall: (LinphoneCall*) call ViewforUser:(NSString*) username withDisplayName:(NSString*) displayName {
UIDevice *device = [UIDevice currentDevice];
device.proximityMonitoringEnabled = YES;
if (device.proximityMonitoringEnabled == YES) {
@ -225,34 +205,33 @@
} else {
[peerLabel setText:username?username:@""];
}
[address setHidden:true];
[incallView setHidden:false];
[dialerView setHidden:true];
[incallView setHidden:NO];
}
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
[self displayIncalViewforUser:username
-(void) displayCall:(LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
[self displayInCall: call ViewforUser:username
withDisplayName:displayName];
[call setEnabled:false];
//[__call setEnabled:false];
[callDuration setText:NSLocalizedString(@"Calling...",nil)];
if ([speaker isOn]) [speaker toggle] ; //preset to off
[incallView setHidden:NO];
}
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
-(void) displayInCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
[callDuration start];
[callDuration setHidden:false];
if (linphone_call_get_dir(linphone_core_get_current_call([LinphoneManager getLc])) == LinphoneCallIncoming) {
[self displayIncalViewforUser:username
[self displayInCall: call ViewforUser:username
withDisplayName:displayName];
if ([speaker isOn]) [speaker toggle] ; //preset to off;
}
[incallView setHidden:NO];
}
-(void) displayVideoCallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
mVideoShown=TRUE;
[self presentModalViewController:self.videoViewController animated:true];
-(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
ms_message("basic phone view does not support video");
}
//status reporting
-(void) displayStatus:(NSString*) message {
@ -264,8 +243,8 @@
}
-(void) displayIncomingCallNotigicationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
-(void) displayIncomingCall:(LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
&& [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
// Create a new notification
@ -276,26 +255,34 @@
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.delegate = self;
cd.call = call;
mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username]
delegate:self
delegate:cd
cancelButtonTitle:NSLocalizedString(@"Decline",nil)
destructiveButtonTitle:NSLocalizedString(@"Answer",nil)
otherButtonTitles:nil];
mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[mIncomingCallActionSheet showInView:self.view];
[mIncomingCallActionSheet release];
}
}
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas{
LinphoneCall* call = (LinphoneCall*)datas;
if (buttonIndex == 0 ) {
linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
linphone_core_accept_call([LinphoneManager getLc],call);
} else {
linphone_core_terminate_call ([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
linphone_core_terminate_call ([LinphoneManager getLc], call);
}
mIncomingCallActionSheet = nil;
}
@ -309,7 +296,7 @@
[mute dealloc];
[speaker dealloc];
[peerLabel dealloc];
[call dealloc];
[__call dealloc];
[hangup dealloc];
[status dealloc];
[one dealloc];

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,7 @@
UIHangUpButton* mHangUpLand;
UICamSwitch* mCamSwitchLand;
BOOL isFirst;
int maxCall;
}

View file

@ -109,6 +109,7 @@
-(void) viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
linphone_core_set_max_calls([LinphoneManager getLc], maxCall);
}
-(void) viewWillAppear:(BOOL)animated {
@ -126,6 +127,8 @@
waitUntilDone:YES];
[mMute reset];
[mMuteLand reset];
maxCall = linphone_core_get_max_calls([LinphoneManager getLc]);
linphone_core_set_max_calls([LinphoneManager getLc], 1);
}
- (void) viewDidAppear:(BOOL)animated{

View file

@ -2,30 +2,31 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">784</int>
<string key="IBDocument.SystemVersion">10D573</string>
<string key="IBDocument.InterfaceBuilderVersion">762</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
<string key="IBDocument.SystemVersion">11C74</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1138.23</string>
<string key="IBDocument.HIToolboxVersion">567.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">87</string>
<string key="NS.object.0">933</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="41"/>
<string>IBProxyObject</string>
<string>IBUITabBarItem</string>
<string>IBUIViewController</string>
<string>IBUICustomObject</string>
<string>IBUITabBarController</string>
<string>IBUIWindow</string>
<string>IBUITabBar</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -41,10 +42,11 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIWindow" id="380026005">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">1316</int>
<object class="NSPSMatrix" key="NSFrameMatrix"/>
<string key="NSFrameSize">{320, 480}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
@ -58,24 +60,19 @@
<object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
<object class="IBUIViewController" key="IBUISelectedViewController" id="156830991">
<string key="IBUITitle">History</string>
<object class="IBUITabBarItem" key="IBUITabBarItem" id="1041279701">
<string key="IBUITitle">History</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">history-orange.png</string>
</object>
<object class="IBUIViewController" key="IBUISelectedViewController" id="383050823">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="672878446">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">5</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -83,7 +80,25 @@
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="156830991"/>
<object class="IBUIViewController" id="156830991">
<string key="IBUITitle">History</string>
<object class="IBUITabBarItem" key="IBUITabBarItem" id="1041279701">
<string key="IBUITitle">History</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">history-orange.png</string>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUIViewController" id="258574391">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="64474689">
<string key="IBUITitle">Dialer</string>
@ -92,40 +107,28 @@
<string key="NSResourceName">dialer-orange.png</string>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<reference key="IBUITabBar"/>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<string key="IBUINibName">PhoneViewController</string>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUIViewController" id="383050823">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="672878446">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">5</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<reference ref="383050823"/>
<object class="IBUIViewController" id="555899988">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="534357631">
<string key="IBUITitle"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">0</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">1</int>
<int key="interfaceOrientation">1</int>
</object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -133,9 +136,10 @@
</object>
</object>
<object class="IBUITabBar" key="IBUITabBar" id="995238651">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">266</int>
<string key="NSFrame">{{129, 330}, {163, 49}}</string>
<string key="NSFrame">{{0, 431}, {320, 49}}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
@ -178,7 +182,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@ -289,52 +295,52 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-1.IBPluginDependency</string>
<string>-2.CustomClassName</string>
<string>-2.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>2.IBAttributePlaceholdersKey</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>2.UIWindow.visibleAtLaunch</string>
<string>38.CustomClassName</string>
<string>38.IBEditorWindowLastContentRect</string>
<string>38.IBPluginDependency</string>
<string>39.IBPluginDependency</string>
<string>4.CustomClassName</string>
<string>4.IBPluginDependency</string>
<string>41.CustomClassName</string>
<string>41.IBPluginDependency</string>
<string>42.IBPluginDependency</string>
<string>43.CustomClassName</string>
<string>43.IBPluginDependency</string>
<string>8.IBEditorWindowLastContentRect</string>
<string>44.IBPluginDependency</string>
<string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSMutableDictionary">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
</object>
<string>{{190, 156}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<integer value="1"/>
<string>PhoneViewController</string>
<string>{{343, 544}, {320, 480}}</string>
<string>AdvancedPhoneViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>linphoneAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>CallHistoryTableViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>MoreViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{623, 298}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
@ -342,490 +348,18 @@
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">47</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">CallHistoryTableViewController</string>
<string key="superclassName">GenericTabViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doAction:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">clear</string>
<string key="NS.object.0">UIButton</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/CallHistoryTableViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">GenericTabViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>header</string>
<string>linphoneDelegate</string>
<string>phoneControllerDelegate</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIView</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/GenericTabViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MoreViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>console</string>
<string>credit</string>
<string>creditText</string>
<string>web</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITableViewCell</string>
<string>UITableViewCell</string>
<string>UITextView</string>
<string>UITableViewCell</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/MoreViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PhoneViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doAction:</string>
<string>doKeyPad:</string>
<string>doKeyPadUp:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>address</string>
<string>back</string>
<string>call</string>
<string>callDuration</string>
<string>eight</string>
<string>five</string>
<string>four</string>
<string>hangup</string>
<string>hash</string>
<string>incallView</string>
<string>mute</string>
<string>nine</string>
<string>one</string>
<string>peerLabel</string>
<string>seven</string>
<string>six</string>
<string>speaker</string>
<string>star</string>
<string>status</string>
<string>three</string>
<string>two</string>
<string>zero</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITextField</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UILabel</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIView</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UILabel</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UILabel</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/PhoneViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">linphoneAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>myPeoplePickerController</string>
<string>myPhoneViewController</string>
<string>myTabBarController</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>ABPeoplePickerNavigationController</string>
<string>PhoneViewController</string>
<string>UITabBarController</string>
<string>UIWindow</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/linphoneAppDelegate.h</string>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">ABPeoplePickerNavigationController</string>
<string key="superclassName">UINavigationController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AddressBookUI.framework/Headers/ABPeoplePickerNavigationController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="864247238">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIApplication</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIBarItem</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIButton</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIControl</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UILabel</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UINavigationController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="507408314">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<reference key="sourceIdentifier" ref="864247238"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIScrollView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchDisplayController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITabBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITabBarController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="46659541">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITabBarItem</string>
<string key="superclassName">UIBarItem</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITabBarItem.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITableViewCell</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITableViewCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITableViewController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITableViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITextField</string>
<string key="superclassName">UIControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="1053502899">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITextView</string>
<string key="superclassName">UIScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UITextView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<reference key="sourceIdentifier" ref="1053502899"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<reference key="sourceIdentifier" ref="507408314"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<reference key="sourceIdentifier" ref="46659541"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIWindow</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
</object>
</object>
</object>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
@ -834,14 +368,13 @@
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<integer value="784" key="NS.object.0"/>
<real value="1280" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">linphone.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -856,6 +389,6 @@
<string>{25, 23}</string>
</object>
</object>
<string key="IBCocoaTouchPluginVersion">87</string>
<string key="IBCocoaTouchPluginVersion">933</string>
</data>
</archive>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
Resources/addcall-green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
Resources/conf_merge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
Resources/mic_active.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
Resources/mic_muted.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
Resources/numpad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
Resources/pausecall.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
Resources/resumecall.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -22,6 +22,12 @@
2211DB90147555C800DEE054 /* libmediastreamer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB8F147555C800DEE054 /* libmediastreamer.a */; };
2211DB921475562600DEE054 /* liblinphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB911475562600DEE054 /* liblinphone.a */; };
2211DB95147564B400DEE054 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2211DB94147564B400DEE054 /* Settings.bundle */; };
2211DBBC14769C8300DEE054 /* AdvancedPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBA14769C8200DEE054 /* AdvancedPhoneViewController.m */; };
2211DBBD14769C8300DEE054 /* AdvancedPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBA14769C8200DEE054 /* AdvancedPhoneViewController.m */; };
2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBB14769C8200DEE054 /* CallDelegate.m */; };
2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBB14769C8200DEE054 /* CallDelegate.m */; };
2211DBC014769CB200DEE054 /* IncallViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 222A483212F7176F0075F07F /* IncallViewController.m */; };
2211DBC114769CB300DEE054 /* IncallViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 222A483212F7176F0075F07F /* IncallViewController.m */; };
2214783D1386A2030020F8B8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2214783B1386A2030020F8B8 /* Localizable.strings */; };
2214EB7A12F846B1002A5394 /* UICallButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB7912F846B1002A5394 /* UICallButton.m */; };
2214EB8912F84EBB002A5394 /* UIHangUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB8812F84EBB002A5394 /* UIHangUpButton.m */; };
@ -349,6 +355,8 @@
2211DB8F147555C800DEE054 /* libmediastreamer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediastreamer.a; path = "liblinphone-sdk/apple-darwin/lib/libmediastreamer.a"; sourceTree = "<group>"; };
2211DB911475562600DEE054 /* liblinphone.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblinphone.a; path = "liblinphone-sdk/apple-darwin/lib/liblinphone.a"; sourceTree = "<group>"; };
2211DB94147564B400DEE054 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Settings.bundle; path = nogpl/Settings.bundle; sourceTree = "<group>"; };
2211DBBA14769C8200DEE054 /* AdvancedPhoneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdvancedPhoneViewController.m; sourceTree = "<group>"; };
2211DBBB14769C8200DEE054 /* CallDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallDelegate.m; sourceTree = "<group>"; };
2214783C1386A2030020F8B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
2214EB7812F846B1002A5394 /* UICallButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICallButton.h; sourceTree = "<group>"; };
2214EB7912F846B1002A5394 /* UICallButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICallButton.m; sourceTree = "<group>"; };
@ -637,6 +645,8 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
2211DBBA14769C8200DEE054 /* AdvancedPhoneViewController.m */,
2211DBBB14769C8200DEE054 /* CallDelegate.m */,
2214EB7012F84668002A5394 /* LinphoneUI */,
2218A92212FBE1340088A667 /* FirstLoginViewController.h */,
2218A92312FBE1340088A667 /* FirstLoginViewController.m */,
@ -1278,6 +1288,9 @@
223963171393CFAF001DE689 /* FastAddressBook.m in Sources */,
22E028B713B4CCBD0068A713 /* VideoViewController.m in Sources */,
22AA8B0113D83F6300B30535 /* UICamSwitch.m in Sources */,
2211DBBC14769C8300DEE054 /* AdvancedPhoneViewController.m in Sources */,
2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */,
2211DBC014769CB200DEE054 /* IncallViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1307,6 +1320,9 @@
22D8F157147548E2008C97DB /* FastAddressBook.m in Sources */,
22D8F158147548E2008C97DB /* VideoViewController.m in Sources */,
22D8F159147548E2008C97DB /* UICamSwitch.m in Sources */,
2211DBBD14769C8300DEE054 /* AdvancedPhoneViewController.m in Sources */,
2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */,
2211DBC114769CB300DEE054 /* IncallViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View file

@ -31,7 +31,7 @@ echocancellation=0
[misc]
history_max_size=30
max_calls=1
max_calls=3
[video]
display=1
@ -40,4 +40,3 @@ show_local=0
enabled=1
size=ios-medium