enhanced gui

This commit is contained in:
Jehan Monnier 2010-01-22 11:50:14 +01:00
parent dc6d630cda
commit 3ec148068f
22 changed files with 4394 additions and 773 deletions

View file

@ -0,0 +1,27 @@
/* CallHistoryTableViewController.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
#import "GenericTabViewController.h"
@interface CallHistoryTableViewController : GenericTabViewController {
}
@end

View file

@ -0,0 +1,198 @@
/* CallHistoryTableViewController.m
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "CallHistoryTableViewController.h"
@implementation CallHistoryTableViewController
/*
- (id)initWithStyle:(UITableViewStyle)style {
// Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
if (self = [super initWithStyle:style]) {
}
return self;
}
*/
/*
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
*/
/*
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
*/
/*
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}
*/
/*
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
}
*/
/*
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
}
*/
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
#pragma mark Table view methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
const MSList * logs = linphone_core_get_call_logs(myLinphoneCore);
return ms_list_size(logs);
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
LinphoneCallLog* callLogs = ms_list_nth_data(linphone_core_get_call_logs(myLinphoneCore), indexPath.row) ;
const char* username = linphone_address_get_username(callLogs->to)!=0?linphone_address_get_username(callLogs->to):"";
[cell.textLabel setText:[[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]]];
NSString *path;
if (callLogs->dir == LinphoneCallIncoming) {
path = [[NSBundle mainBundle] pathForResource:@"in_call" ofType:@"png"];
} else {
path = [[NSBundle mainBundle] pathForResource:@"out_call" ofType:@"png"];
}
UIImage *image = [UIImage imageWithContentsOfFile:path];
cell.imageView.image = image;
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Navigation logic may go here. Create and push another view controller.
// AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
// [self.navigationController pushViewController:anotherViewController];
// [anotherViewController release];
[tableView deselectRowAtIndexPath:indexPath animated:NO];
LinphoneCallLog* callLogs = ms_list_nth_data(linphone_core_get_call_logs(myLinphoneCore), indexPath.row) ;
const char* username = linphone_address_get_username(callLogs->to)!=0?linphone_address_get_username(callLogs->to):"";
[self.phoneControllerDelegate setPhoneNumber:[[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]]];
[self.linphoneDelegate selectDialerTab];
}
/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
return YES;
}
*/
/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
*/
/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/
/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the item to be re-orderable.
return YES;
}
*/
- (void)dealloc {
[super dealloc];
}
@end

View file

@ -0,0 +1,289 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">784</int>
<string key="IBDocument.SystemVersion">9L31a</string>
<string key="IBDocument.InterfaceBuilderVersion">680</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="4"/>
<integer value="8"/>
</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">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
</object>
<object class="IBUITableView" id="873029372">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor" id="993965549">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<bool key="IBUIBouncesZoom">NO</bool>
<int key="IBUISeparatorStyle">1</int>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
<float key="IBUIRowHeight">4.400000e+01</float>
<float key="IBUISectionHeaderHeight">4.400000e+01</float>
<float key="IBUISectionFooterHeight">2.200000e+01</float>
</object>
<object class="IBUIView" id="646889387">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="194030556">
<reference key="NSNextResponder" ref="646889387"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{314, 44}</string>
<reference key="NSSuperview" ref="646889387"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Rencent Calls</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
<int key="IBUITextAlignment">1</int>
</object>
<object class="IBUIButton" id="292237329">
<reference key="NSNextResponder" ref="646889387"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{238, 0}, {72, 37}}</string>
<reference key="NSSuperview" ref="646889387"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">1.500000e+01</double>
<int key="NSfFlags">16</int>
</object>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Clear</string>
<reference key="IBUIHighlightedTitleColor" ref="993965549"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
</object>
</object>
<string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC40OTgwMzkyMiAwLjQ5ODAzOTIyIDAuNDk4MDM5MjIAA</bytes>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="873029372"/>
</object>
<int key="connectionID">5</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="873029372"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">6</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="873029372"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">header</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="646889387"/>
</object>
<int key="connectionID">11</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="829125109">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="829125109"/>
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="975951072"/>
<reference key="parent" ref="829125109"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="873029372"/>
<reference key="parent" ref="829125109"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="646889387"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="194030556"/>
<reference ref="292237329"/>
</object>
<reference key="parent" ref="829125109"/>
<string key="objectName">Header</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="194030556"/>
<reference key="parent" ref="646889387"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="292237329"/>
<reference key="parent" ref="646889387"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>10.IBPluginDependency</string>
<string>4.IBEditorWindowLastContentRect</string>
<string>4.IBPluginDependency</string>
<string>8.IBEditorWindowLastContentRect</string>
<string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>CallHistoryTableViewController</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{393, 486}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{520, 620}, {320, 44}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">11</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="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="NSMutableArray" 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>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.LastKnownRelativeProjectPath">../linphone.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">3.1</string>
</data>
</archive>

View file

@ -0,0 +1,33 @@
/* ContactPickerDelegate.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <Foundation/Foundation.h>
#import <AddressBookUI/ABPeoplePickerNavigationController.h>
#import "PhoneViewController.h"
#import "linphoneAppDelegate.h"
@interface ContactPickerDelegate : NSObject<ABPeoplePickerNavigationControllerDelegate> {
id<PhoneViewControllerDelegate> phoneControllerDelegate;
id<LinphoneTabManagerDelegate> linphoneDelegate;
}
@property (nonatomic, retain) id<PhoneViewControllerDelegate> phoneControllerDelegate;
@property (nonatomic, retain) id<LinphoneTabManagerDelegate> linphoneDelegate;
@end

View file

@ -0,0 +1,51 @@
/* ContactPickerDelegate.m
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "ContactPickerDelegate.h"
@implementation ContactPickerDelegate
@synthesize phoneControllerDelegate;
@synthesize linphoneDelegate;
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
return true;
}
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier {
CFTypeRef multiValue = ABRecordCopyValue(person, property);
CFIndex valueIdx = ABMultiValueGetIndexForIdentifier(multiValue,identifier);
NSString *phoneNumber = (NSString *)ABMultiValueCopyValueAtIndex(multiValue, valueIdx);
[phoneControllerDelegate setPhoneNumber:phoneNumber];
[linphoneDelegate selectDialerTab];
return false;
}
- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
[linphoneDelegate selectDialerTab];
}
@end

View file

@ -0,0 +1,36 @@
/* FavoriteTableViewController.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
#import "GenericTabViewController.h"
@interface FavoriteTableViewController : GenericTabViewController<ABPeoplePickerNavigationControllerDelegate> {
UIButton* add;
UIButton* edit;
}
- (IBAction)doAddFavorite:(id)sender;
- (IBAction)doEditFavorite:(id)sender;
@property (nonatomic, retain) IBOutlet UIButton* add;
@property (nonatomic, retain) IBOutlet UIButton* edit;
@end

View file

@ -0,0 +1,242 @@
/* FavoriteTableViewController.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "FavoriteTableViewController.h"
@implementation FavoriteTableViewController
@synthesize add;
@synthesize edit;
/*
- (id)initWithStyle:(UITableViewStyle)style {
// Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
if (self = [super initWithStyle:style]) {
}
return self;
}
*/
/*
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
*/
/*
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
*/
/*
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}
*/
/*
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
}
*/
/*
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
}
*/
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (IBAction)doAddFavorite:(id)sender {
ABPeoplePickerNavigationController* peoplePickerController = [[[ABPeoplePickerNavigationController alloc] init] autorelease];
[peoplePickerController setPeoplePickerDelegate:self];
[self presentModalViewController: peoplePickerController animated:true];
}
- (IBAction)doEditFavorite:(id)sender {
if ([ self tableView:self.tableView numberOfRowsInSection:0] <= 0) {
return;
}
if (self.tableView.editing) {
[self.tableView setEditing:false animated:true];
[self.edit setTitle:@"Edit" forState: UIControlStateNormal];
} else {
[self.tableView setEditing:true animated:true];
[self.edit setTitle:@"Ok" forState: UIControlStateNormal];
}
}
#pragma mark Table view methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
const MSList * friends =linphone_core_get_friend_list(myLinphoneCore);
return ms_list_size(friends);
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
LinphoneFriend* friend = ms_list_nth_data(linphone_core_get_friend_list(myLinphoneCore), indexPath.row);
const char* name = linphone_address_get_username(linphone_friend_get_uri(friend));
[cell.textLabel setText:[[NSString alloc] initWithCString:name encoding:[NSString defaultCStringEncoding]]];
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
return cell;
}
/*
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
if (isEditing) {
} else {
[super tableView:tableView accessoryButtonTappedForRowWithIndexPath:indexPath];
}
}
*/
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Navigation logic may go here. Create and push another view controller.
// AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
// [self.navigationController pushViewController:anotherViewController];
// [anotherViewController release];
LinphoneFriend* friend = ms_list_nth_data(linphone_core_get_friend_list(myLinphoneCore), indexPath.row);
const char* name = linphone_address_get_username(linphone_friend_get_uri(friend));
[phoneControllerDelegate setPhoneNumber:[[NSString alloc] initWithCString:name encoding:[NSString defaultCStringEncoding]]];
[linphoneDelegate selectDialerTab];
}
/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
return YES;
}
*/
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
LinphoneFriend* friend = ms_list_nth_data(linphone_core_get_friend_list(myLinphoneCore), indexPath.row);
linphone_core_remove_friend(myLinphoneCore, friend);
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
if ([ self tableView:self.tableView numberOfRowsInSection:0] <= 0) {
[self.tableView setEditing:false animated:true];
[self.edit setTitle:@"Edit" forState: UIControlStateNormal];
}
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/
/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the item to be re-orderable.
return YES;
}
*/
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
return true;
}
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier {
CFTypeRef multiValue = ABRecordCopyValue(person, property);
CFIndex valueIdx = ABMultiValueGetIndexForIdentifier(multiValue,identifier);
NSString *phone = (NSString *)ABMultiValueCopyValueAtIndex(multiValue, valueIdx);
NSString *phoneUri = [NSString stringWithFormat:@"sip:%s@dummy.net",[phone cStringUsingEncoding:[NSString defaultCStringEncoding]]];
NSString* compositeName = ABRecordCopyCompositeName(person);
LinphoneFriend * newFriend = linphone_friend_new_with_addr([phoneUri cStringUsingEncoding:[NSString defaultCStringEncoding]]);
linphone_friend_set_name(newFriend,[compositeName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
linphone_friend_send_subscribe(newFriend, false);
//linphone_friend_set_sip_addr(newFriend, const char *uri);
linphone_core_add_friend(myLinphoneCore, newFriend);
[self dismissModalViewControllerAnimated:true];
return false;
}
- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
[self dismissModalViewControllerAnimated:true];
}
- (void)dealloc {
[super dealloc];
}
@end

View file

@ -0,0 +1,382 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">784</int>
<string key="IBDocument.SystemVersion">9L31a</string>
<string key="IBDocument.InterfaceBuilderVersion">680</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="4"/>
<integer value="9"/>
</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">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
</object>
<object class="IBUITableView" id="873029372">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor" id="855852336">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<bool key="IBUIBouncesZoom">NO</bool>
<int key="IBUISeparatorStyle">1</int>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
<float key="IBUIRowHeight">4.400000e+01</float>
<float key="IBUISectionHeaderHeight">2.200000e+01</float>
<float key="IBUISectionFooterHeight">2.200000e+01</float>
</object>
<object class="IBUIView" id="789622983">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="265048111">
<reference key="NSNextResponder" ref="789622983"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview" ref="789622983"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Favorites</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<object class="NSColor" key="IBUIShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwLjAwOTk5OTk5OTgAA</bytes>
</object>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
<int key="IBUITextAlignment">1</int>
</object>
<object class="IBUIButton" id="904182832">
<reference key="NSNextResponder" ref="789622983"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{264, 3}, {44, 37}}</string>
<reference key="NSSuperview" ref="789622983"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<object class="NSFont" key="IBUIFont" id="303503024">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">1.500000e+01</double>
<int key="NSfFlags">16</int>
</object>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">+</string>
<reference key="IBUIHighlightedTitleColor" ref="855852336"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor" id="186894792">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
</object>
<object class="IBUIButton" id="162202316">
<reference key="NSNextResponder" ref="789622983"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{6, 3}, {61, 37}}</string>
<reference key="NSSuperview" ref="789622983"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<reference key="IBUIFont" ref="303503024"/>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Edit</string>
<reference key="IBUIHighlightedTitleColor" ref="855852336"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
</object>
<reference key="IBUINormalTitleShadowColor" ref="186894792"/>
</object>
</object>
<string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42OTcwODAzMSAwLjk5MDAwMDAxAA</bytes>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="873029372"/>
</object>
<int key="connectionID">5</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="873029372"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">6</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="873029372"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">header</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="789622983"/>
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">add</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="904182832"/>
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">doAddFavorite:</string>
<reference key="source" ref="904182832"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">14</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">edit</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="162202316"/>
</object>
<int key="connectionID">15</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">doEditFavorite:</string>
<reference key="source" ref="162202316"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">16</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="766671930">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="766671930"/>
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="975951072"/>
<reference key="parent" ref="766671930"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="873029372"/>
<reference key="parent" ref="766671930"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="789622983"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="265048111"/>
<reference ref="904182832"/>
<reference ref="162202316"/>
</object>
<reference key="parent" ref="766671930"/>
<string key="objectName">header</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="265048111"/>
<reference key="parent" ref="789622983"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="904182832"/>
<reference key="parent" ref="789622983"/>
<string key="objectName">add</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="162202316"/>
<reference key="parent" ref="789622983"/>
<string key="objectName">edit</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
<string>10.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>4.IBEditorWindowLastContentRect</string>
<string>4.IBPluginDependency</string>
<string>8.IBEditorWindowLastContentRect</string>
<string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>FavoriteTableViewController</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{441, 269}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{312, 742}, {320, 44}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">16</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">FavoriteTableViewController</string>
<string key="superclassName">GenericTabViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doAddFavorite:</string>
<string>doEditFavorite:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>add</string>
<string>edit</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIButton</string>
<string>UIButton</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/FavoriteTableViewController.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="NSMutableArray" 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>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.LastKnownRelativeProjectPath">../linphone.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">3.1</string>
</data>
</archive>

View file

@ -0,0 +1,36 @@
/* GenericTabViewController.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
#include "linphonecore.h"
#import "PhoneViewController.h"
#import "linphoneAppDelegate.h"
@interface GenericTabViewController : UITableViewController {
LinphoneCore* myLinphoneCore;
id<PhoneViewControllerDelegate> phoneControllerDelegate;
id<LinphoneTabManagerDelegate> linphoneDelegate;
IBOutlet UIView* header;
}
-(void) setLinphoneCore:(LinphoneCore*) lc;
@property (nonatomic, retain) id<PhoneViewControllerDelegate> phoneControllerDelegate;
@property (nonatomic, retain) id<LinphoneTabManagerDelegate> linphoneDelegate;
@property (nonatomic, retain) IBOutlet UIView* header;
@end

View file

@ -0,0 +1,49 @@
/* GenericTabViewController.c
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "GenericTabViewController.h"
@implementation GenericTabViewController
@synthesize phoneControllerDelegate;
@synthesize linphoneDelegate;
@synthesize header;
- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.tableHeaderView=header;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.tableView reloadData];
}
-(void) setLinphoneCore:(LinphoneCore*) lc {
myLinphoneCore = lc;
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
[self tableView:tableView didSelectRowAtIndexPath:indexPath];
}
@end

View file

@ -0,0 +1,102 @@
/* IncallViewController.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
#import "linphonecore.h"
#import "PhoneViewController.h"
#import <AddressBookUI/ABPeoplePickerNavigationController.h>
@interface IncallViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate> {
LinphoneCore* myLinphoneCore;
id<PhoneViewControllerDelegate> phoneviewDelegate;
NSTimer *durationRefreasher;
UIView* controlSubView;
UIView* padSubView;
UILabel* peerName;
UILabel* peerNumber;
UILabel* callDuration;
UILabel* status;
UIButton* end;
UIButton* dialer;
UIButton* mute;
UIButton* speaker;
UIButton* contacts;
//key pad
UIButton* one;
UIButton* two;
UIButton* three;
UIButton* four;
UIButton* five;
UIButton* six;
UIButton* seven;
UIButton* eight;
UIButton* nine;
UIButton* star;
UIButton* zero;
UIButton* hash;
UIButton* close;
bool isMuted;
bool isSpeaker;
ABPeoplePickerNavigationController* myPeoplePickerController;
}
-(void) setLinphoneCore:(LinphoneCore*) lc;
-(void) startCall;
-(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 UIButton* end;
@property (nonatomic, retain) IBOutlet UIButton* dialer;
@property (nonatomic, retain) IBOutlet UIButton* mute;
@property (nonatomic, retain) IBOutlet UIButton* speaker;
@property (nonatomic, retain) IBOutlet UIButton* contacts;
@property (nonatomic, retain) IBOutlet UIButton* one;
@property (nonatomic, retain) IBOutlet UIButton* two;
@property (nonatomic, retain) IBOutlet UIButton* three;
@property (nonatomic, retain) IBOutlet UIButton* four;
@property (nonatomic, retain) IBOutlet UIButton* five;
@property (nonatomic, retain) IBOutlet UIButton* six;
@property (nonatomic, retain) IBOutlet UIButton* seven;
@property (nonatomic, retain) IBOutlet UIButton* eight;
@property (nonatomic, retain) IBOutlet UIButton* nine;
@property (nonatomic, retain) IBOutlet UIButton* star;
@property (nonatomic, retain) IBOutlet UIButton* zero;
@property (nonatomic, retain) IBOutlet UIButton* hash;
@property (nonatomic, retain) IBOutlet UIButton* close;
@property (nonatomic, retain) id<PhoneViewControllerDelegate> phoneviewDelegate;
@end

View file

@ -0,0 +1,243 @@
/* IncallViewController.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "IncallViewController.h"
#import <AudioToolbox/AudioToolbox.h>
#import "linphonecore.h"
@implementation IncallViewController
@synthesize phoneviewDelegate;
@synthesize controlSubView;
@synthesize padSubView;
@synthesize peerName;
@synthesize peerNumber;
@synthesize callDuration;
@synthesize status;
@synthesize end;
@synthesize close;
@synthesize mute;
@synthesize dialer;
@synthesize speaker;
@synthesize contacts;
@synthesize one;
@synthesize two;
@synthesize three;
@synthesize four;
@synthesize five;
@synthesize six;
@synthesize seven;
@synthesize eight;
@synthesize nine;
@synthesize star;
@synthesize zero;
@synthesize hash;
/*
// 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]) {
// Custom initialization
}
return self;
}
*/
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
isMuted = false;
isSpeaker = false;
}
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
if (durationRefreasher != nil) {
[ durationRefreasher invalidate];
}
}
-(void) setLinphoneCore:(LinphoneCore*) lc {
myLinphoneCore = lc;
}
-(void)displayStatus:(NSString*) message {
[status setText:message];
}
-(void) startCall {
const LinphoneAddress* address = linphone_core_get_remote_uri(myLinphoneCore);
const char* displayName = linphone_address_get_display_name(address)?linphone_address_get_display_name(address):"";
[peerName setText:[NSString stringWithCString:displayName length:strlen(displayName)]];
const char* username = linphone_address_get_username(address)!=0?linphone_address_get_username(address):"";
[peerNumber setText:[NSString stringWithCString:username length:strlen(username)]];
// start scheduler
durationRefreasher = [NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(updateCallDuration)
userInfo:nil
repeats:YES];
}
-(void)updateCallDuration {
int lDuration = linphone_core_get_current_call_duration(myLinphoneCore);
if (lDuration < 60) {
[callDuration setText:[NSString stringWithFormat: @"%i s", lDuration]];
} else {
[callDuration setText:[NSString stringWithFormat: @"%i:%i", lDuration/60,lDuration - 60 *(lDuration/60)]];
}
}
- (IBAction)doAction:(id)sender {
if (linphone_core_in_call(myLinphoneCore)) {
//incall behavior
if (sender == one) {
linphone_core_send_dtmf(myLinphoneCore,'1');
} else if (sender == two) {
linphone_core_send_dtmf(myLinphoneCore,'2');
} else if (sender == three) {
linphone_core_send_dtmf(myLinphoneCore,'3');
} else if (sender == four) {
linphone_core_send_dtmf(myLinphoneCore,'4');
} else if (sender == five) {
linphone_core_send_dtmf(myLinphoneCore,'5');
} else if (sender == six) {
linphone_core_send_dtmf(myLinphoneCore,'6');
} else if (sender == seven) {
linphone_core_send_dtmf(myLinphoneCore,'7');
} else if (sender == eight) {
linphone_core_send_dtmf(myLinphoneCore,'8');
} else if (sender == nine) {
linphone_core_send_dtmf(myLinphoneCore,'9');
} else if (sender == star) {
linphone_core_send_dtmf(myLinphoneCore,'*');
} else if (sender == zero) {
linphone_core_send_dtmf(myLinphoneCore,'0');
} else if (sender == hash) {
linphone_core_send_dtmf(myLinphoneCore,'#');
}
}
if (sender == end) {
linphone_core_terminate_call(myLinphoneCore,NULL);
} else if (sender == dialer) {
[controlSubView setHidden:true];
[padSubView setHidden:false];
} else if (sender == contacts) {
// start people picker
myPeoplePickerController = [[[ABPeoplePickerNavigationController alloc] init] autorelease];
[myPeoplePickerController setPeoplePickerDelegate:self];
[self presentModalViewController: myPeoplePickerController animated:true];
} else if (sender == close) {
[controlSubView setHidden:false];
[padSubView setHidden:true];
} else if (sender == mute) {
isMuted = isMuted?false:true;
linphone_core_mute_mic(myLinphoneCore,isMuted);
// swithc buttun state
UIImage * tmpImage = [mute backgroundImageForState: UIControlStateNormal];
[mute setBackgroundImage:[mute backgroundImageForState: UIControlStateHighlighted] forState:UIControlStateNormal];
[mute setBackgroundImage:tmpImage forState:UIControlStateHighlighted];
} else if (sender == speaker) {
isSpeaker = isSpeaker?false:true;
if (isSpeaker) {
//redirect audio to speaker
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
, sizeof (audioRouteOverride)
, &audioRouteOverride);
} else {
//Cancel audio route redirection
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_None;
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
, sizeof (audioRouteOverride)
, &audioRouteOverride);
}
// switch button state
UIImage * tmpImage = [speaker backgroundImageForState: UIControlStateNormal];
[speaker setBackgroundImage:[speaker backgroundImageForState: UIControlStateHighlighted] forState:UIControlStateNormal];
[speaker setBackgroundImage:tmpImage forState:UIControlStateHighlighted];
}else {
NSLog(@"unknown event from incall view");
}
}
// handle people picker behavior
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
return true;
}
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier {
return false;
}
- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
[self dismissModalViewControllerAnimated:true];
}
- (void)dealloc {
[super dealloc];
}
@end

File diff suppressed because it is too large Load diff

View file

@ -20,15 +20,21 @@
#import <Foundation/Foundation.h>
#import "linphonecore.h"
@protocol PhoneViewControllerDelegate
-(void)setPhoneNumber:(NSString*)number;
-(void)dismissIncallView;
-(void)displayStatus:(NSString*) message;
@end
@class IncallViewController;
@interface PhoneViewController : UIViewController <UITextFieldDelegate> {
@interface PhoneViewController : UIViewController <UITextFieldDelegate,PhoneViewControllerDelegate> {
@private
//UI definition
UITextField* address;
UIButton* call;
UIButton* cancel;
UILabel* status;
//key pad
@ -45,16 +51,16 @@
UIButton* zero;
UIButton* hash;
UIButton* back;
/*
* lib linphone main context
*/
LinphoneCore* mCore;
int traceLevel;
IncallViewController *myIncallViewController;
}
@property (nonatomic, retain) IBOutlet UITextField* address;
@property (nonatomic, retain) IBOutlet UIButton* call;
@property (nonatomic, retain) IBOutlet UIButton* cancel;
@property (nonatomic, retain) IBOutlet UILabel* status;
@property (nonatomic, retain) IBOutlet UIButton* one;
@ -70,19 +76,21 @@
@property (nonatomic, retain) IBOutlet UIButton* zero;
@property (nonatomic, retain) IBOutlet UIButton* hash;
/**********************************
* liblinphone initialization method
**********************************/
-(void) startlibLinphone;
@property (nonatomic, retain) IBOutlet UIButton* back;
/*
* liblinphone scheduling method;
* Handle call state change from linphone
*/
-(void) iterate;
-(void) callStateChange:(LinphoneGeneralState*) state;
-(void) setLinphoneCore:(LinphoneCore*) lc;
/********************
* UI method handlers
********************/
-(void)doKeyZeroLongPress;
//method to handle cal/hangup events
- (IBAction)doAction:(id)sender;
@ -90,6 +98,9 @@
// method to handle keypad event
- (IBAction)doKeyPad:(id)sender;
- (IBAction)doKeyPadUp:(id)sender;
-(void) dismissAlertDialog:(UIAlertView*)alertView;
-(PayloadType*) findPayload:(NSString*)type withRate:(int)rate from:(const MSList*)list;
@end

View file

@ -23,58 +23,11 @@
#import <AudioToolbox/AudioToolbox.h>
//generic log handler for debug version
void linphone_iphone_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
NSString* format = [[NSString alloc] initWithCString:fmt encoding:[NSString defaultCStringEncoding]];
NSLogv(format,args);
[format release];
}
//Error/warning log handler
void linphone_iphone_log(struct _LinphoneCore * lc, const char * message) {
NSLog([NSString stringWithCString:message length:strlen(message)]);
}
//status
void linphone_iphone_display_status(struct _LinphoneCore * lc, const char * message) {
PhoneViewController* lPhone = linphone_core_get_user_data(lc);
[lPhone.status setText:[NSString stringWithCString:message length:strlen(message)]];
}
void linphone_iphone_show(struct _LinphoneCore * lc) {
//nop
}
void linphone_iphone_call_received(LinphoneCore *lc, const char *from){
//redirect audio to speaker
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
, sizeof (audioRouteOverride)
, &audioRouteOverride);
};
LinphoneCoreVTable linphonec_vtable = {
.show =(ShowInterfaceCb) linphone_iphone_show,
.inv_recv = linphone_iphone_call_received,
.bye_recv = NULL,
.notify_recv = NULL,
.new_unknown_subscriber = NULL,
.auth_info_requested = NULL,
.display_status = linphone_iphone_display_status,
.display_message=linphone_iphone_log,
.display_warning=linphone_iphone_log,
.display_url=NULL,
.display_question=(DisplayQuestionCb)NULL,
.text_received=NULL,
.general_state=NULL,
.dtmf_received=NULL
};
@implementation PhoneViewController
@synthesize address ;
@synthesize call;
@synthesize cancel;
@synthesize status;
@synthesize one;
@ -90,6 +43,15 @@ LinphoneCoreVTable linphonec_vtable = {
@synthesize zero;
@synthesize hash;
@synthesize back;
-(void)setPhoneNumber:(NSString*)number {
[address setText:number];
}
-(void)dismissIncallView {
[self dismissModalViewControllerAnimated:true];
}
//implements call/cancel button behavior
-(IBAction) doAction:(id)sender {
@ -108,44 +70,15 @@ LinphoneCoreVTable linphonec_vtable = {
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
, sizeof (audioRouteOverride)
, &audioRouteOverride);
} else if (sender == cancel) {
linphone_core_terminate_call(mCore,NULL);
}
}
//implements keypad behavior
-(IBAction) doKeyPad:(id)sender {
if (linphone_core_in_call(mCore)) {
//incall behavior
if (sender == one) {
linphone_core_send_dtmf(mCore,'1');
} else if (sender == two) {
linphone_core_send_dtmf(mCore,'2');
} else if (sender == three) {
linphone_core_send_dtmf(mCore,'3');
} else if (sender == four) {
linphone_core_send_dtmf(mCore,'4');
} else if (sender == five) {
linphone_core_send_dtmf(mCore,'5');
} else if (sender == six) {
linphone_core_send_dtmf(mCore,'6');
} else if (sender == seven) {
linphone_core_send_dtmf(mCore,'7');
} else if (sender == eight) {
linphone_core_send_dtmf(mCore,'8');
} else if (sender == nine) {
linphone_core_send_dtmf(mCore,'9');
} else if (sender == star) {
linphone_core_send_dtmf(mCore,'*');
} else if (sender == zero) {
linphone_core_send_dtmf(mCore,'0');
} else if (sender == hash) {
linphone_core_send_dtmf(mCore,'#');
} else {
NSLog(@"unknown event from dial pad");
}
} else {
if (!linphone_core_in_call(mCore)) {
//outcall behavior
//remove sip: if first digits
if ([address.text isEqualToString:@"sip:"]) {
@ -174,15 +107,52 @@ LinphoneCoreVTable linphonec_vtable = {
newAddress = [address.text stringByAppendingString:@"*"];
} else if (sender == zero) {
newAddress = [address.text stringByAppendingString:@"0"];
//start timer for +
[self performSelector:@selector(doKeyZeroLongPress) withObject:nil afterDelay:0.5];
} else if (sender == hash) {
newAddress = [address.text stringByAppendingString:@"#"];
} else if (sender == back) {
if ([address.text length] >0) {
newAddress = [address.text substringToIndex: [address.text length]-1];
}
} else {
NSLog(@"unknown event from diad pad");
NSLog(@"unknown event from diad pad");
return;
}
if (newAddress != nil) {
[address setText:newAddress];
}
[address setText:newAddress];
}
}
//implements keypad up
-(IBAction) doKeyPadUp:(id)sender {
if (sender == zero) {
//cancel timer for +
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(doKeyZeroLongPress)
object:nil];
} else {
NSLog(@"unknown up event from dial pad");
}
}
-(void)doKeyZeroLongPress {
NSString* newAddress = [[address.text substringToIndex: [address.text length]-1] stringByAppendingString:@"+"];
[address setText:newAddress];
}
-(void) setLinphoneCore:(LinphoneCore*) lc {
mCore = lc;
[myIncallViewController setLinphoneCore:mCore];
}
-(void)displayStatus:(NSString*) message {
[status setText:message];
if (myIncallViewController != nil) {
[myIncallViewController displayStatus:message];
}
}
/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
@ -194,12 +164,20 @@ LinphoneCoreVTable linphonec_vtable = {
}
*/
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
if (myIncallViewController == nil) {
myIncallViewController = [[IncallViewController alloc] initWithNibName:@"IncallViewController" bundle:[NSBundle mainBundle]];
[myIncallViewController setPhoneviewDelegate:self];
}
}
*/
/*
// Override to allow orientations other than the default portrait orientation.
@ -230,186 +208,77 @@ LinphoneCoreVTable linphonec_vtable = {
}
/*************
*lib linphone init method
*/
-(void)startlibLinphone {
//init audio session
NSError *setError = nil;
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: &setError]; //must be call before linphone_core_init
//get default config from bundle
NSBundle* myBundle = [NSBundle mainBundle];
NSString* defaultConfigFile = [myBundle pathForResource:@"linphonerc"ofType:nil] ;
#if TARGET_IPHONE_SIMULATOR
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:NSFileImmutable];
[[NSFileManager defaultManager] setAttributes:dictionary ofItemAtPath:defaultConfigFile error:nil];
#endif
//log management
traceLevel = 9;
if (traceLevel > 0) {
//redirect all traces to the iphone log framework
linphone_core_enable_logs_with_cb(linphone_iphone_log_handler);
}
else {
linphone_core_disable_logs();
}
//register audio queue sound card
ms_au_register_card();
/*
* Initialize linphone core
*/
mCore = linphone_core_new (&linphonec_vtable, [defaultConfigFile cStringUsingEncoding:[NSString defaultCStringEncoding]],self);
// Set audio assets
const char* lRing = [[myBundle pathForResource:@"oldphone-mono"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ring(mCore, lRing );
const char* lRingBack = [[myBundle pathForResource:@"ringback"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ringback(mCore, lRingBack);
//configure sip account
//get data from Settings bundle
NSString* accountNameUri = [[NSUserDefaults standardUserDefaults] stringForKey:@"account_preference"];
const char* identity = [accountNameUri cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* accountPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"];
const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* proxyUri = [[NSUserDefaults standardUserDefaults] stringForKey:@"proxy_preference"];
const char* proxy = [proxyUri cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* routeUri = [[NSUserDefaults standardUserDefaults] stringForKey:@"route_preference"];
const char* route = [routeUri cStringUsingEncoding:[NSString defaultCStringEncoding]];
if (([accountNameUri length] + [proxyUri length]) >8 ) {
//possible valid config detected
LinphoneProxyConfig* proxyCfg;
//clear auth info list
linphone_core_clear_all_auth_info(mCore);
//get default proxy
linphone_core_get_default_proxy(mCore,&proxyCfg);
boolean_t addProxy=false;
if (proxyCfg == NULL) {
//create new proxy
proxyCfg = linphone_proxy_config_new();
addProxy = true;
} else {
linphone_proxy_config_edit(proxyCfg);
}
// add username password
osip_from_t *from;
LinphoneAuthInfo *info;
osip_from_init(&from);
if (osip_from_parse(from,identity)==0){
info=linphone_auth_info_new(from->url->username,NULL,password,NULL,NULL);
linphone_core_add_auth_info(mCore,info);
}
osip_from_free(from);
// configure proxy entries
linphone_proxy_config_set_identity(proxyCfg,identity);
linphone_proxy_config_set_server_addr(proxyCfg,proxy);
if ([routeUri length] > 4) {
linphone_proxy_config_set_route(proxyCfg,route);
}
linphone_proxy_config_enable_register(proxyCfg,TRUE);
if (addProxy) {
linphone_core_add_proxy_config(mCore,proxyCfg);
//set to default proxy
linphone_core_set_default_proxy(mCore,proxyCfg);
} else {
linphone_proxy_config_done(proxyCfg);
}
}
//Configure Codecs
PayloadType *pt;
//get codecs from linphonerc
const MSList *audioCodecs=linphone_core_get_audio_codecs(mCore);
//read from setting bundle
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"speex_32k_preference"]) {
if(pt = [self findPayload:@"speex"withRate:32000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"speex_16k_preference"]) {
if(pt = [self findPayload:@"speex"withRate:16000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"speex_8k_preference"]) {
if(pt = [self findPayload:@"speex"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"gsm_22k_preference"]) {
if(pt = [self findPayload:@"GSM"withRate:22050 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"gsm_11k_preference"]) {
if(pt = [self findPayload:@"GSM"withRate:11025 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"gsm_8k_preference"]) {
if(pt = [self findPayload:@"GSM"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"pcmu_preference"]) {
if(pt = [self findPayload:@"PCMU"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"pcma_preference"]) {
if(pt = [self findPayload:@"PCMA"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
// start scheduler
[NSTimer scheduledTimerWithTimeInterval:0.1
target:self
selector:@selector(iterate)
userInfo:nil
repeats:YES];
-(void) dismissAlertDialog:(UIAlertView*) alertView{
[alertView dismissWithClickedButtonIndex:0 animated:TRUE];
}
//scheduling loop
-(void) iterate {
linphone_core_iterate(mCore);
}
- (void)dealloc {
[address dealloc];
[call dealloc];
[cancel dealloc];
[status dealloc];
[super dealloc];
}
-(PayloadType*) findPayload:(NSString*)type withRate:(int)rate from:(const MSList*)list {
const MSList *elem;
for(elem=list;elem!=NULL;elem=elem->next){
PayloadType *pt=(PayloadType*)elem->data;
if ([type isEqualToString:[NSString stringWithCString:payload_type_get_mime(pt) length:strlen(payload_type_get_mime(pt))]] && rate==pt->clock_rate) {
return pt;
-(void) callStateChange:(LinphoneGeneralState*) state {
// /* states for GSTATE_GROUP_POWER */
// GSTATE_POWER_OFF = 0, /* initial state */
// GSTATE_POWER_STARTUP,
// GSTATE_POWER_ON,
// GSTATE_POWER_SHUTDOWN,
// /* states for GSTATE_GROUP_REG */
// GSTATE_REG_NONE = 10, /* initial state */
// GSTATE_REG_OK,
// GSTATE_REG_FAILED,
// /* states for GSTATE_GROUP_CALL */
// GSTATE_CALL_IDLE = 20, /* initial state */
// GSTATE_CALL_OUT_INVITE,
// GSTATE_CALL_OUT_CONNECTED,
// GSTATE_CALL_IN_INVITE,
// GSTATE_CALL_IN_CONNECTED,
// GSTATE_CALL_END,
// GSTATE_CALL_ERROR,
// GSTATE_INVALID
switch (state->new_state) {
case GSTATE_CALL_IN_INVITE:
case GSTATE_CALL_OUT_INVITE: {
//[myIncallViewController startCall];
[self presentModalViewController: myIncallViewController animated:true];
break;
}
case GSTATE_CALL_ERROR: {
NSString* lTitle= state->message!=nil?[NSString stringWithCString:state->message length:strlen(state->message)]: @"Error";
NSString* lMessage=lTitle;
UIAlertView* error = [[UIAlertView alloc] initWithTitle:lTitle
message:lMessage
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:nil];
[error show];
[self performSelector:@selector(dismissAlertDialog:) withObject:error afterDelay:1];
[self performSelector:@selector(dismissIncallView) withObject:nil afterDelay:1];
}
break;
case GSTATE_CALL_IN_CONNECTED:
case GSTATE_CALL_OUT_CONNECTED: {
[myIncallViewController startCall];
break;
}
case GSTATE_CALL_END: {
//end off call, just dismiss Incall view
[self dismissIncallView];
break;
}
default:
break;
}
return nil;
}
@end

File diff suppressed because it is too large Load diff

View file

@ -17,21 +17,60 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
@class linphone;
#import <AddressBookUI/ABPeoplePickerNavigationController.h>
#include"linphonecore.h"
@class PhoneViewController;
@protocol LinphoneTabManagerDelegate
-(void)selectDialerTab;
@end
@class ContactPickerDelegate;
@class IncallViewController;
@class PhoneViewController;
@class CallHistoryTableViewController;
@class FavoriteTableViewController;
@interface linphoneAppDelegate : NSObject <UIApplicationDelegate,LinphoneTabManagerDelegate,UIActionSheetDelegate> {
UIWindow *window;
IBOutlet UITabBarController* myTabBarController;
IBOutlet ABPeoplePickerNavigationController* myPeoplePickerController;
IBOutlet PhoneViewController* myPhoneViewController;
CallHistoryTableViewController* myCallHistoryTableViewController;
FavoriteTableViewController* myFavoriteTableViewController;
ContactPickerDelegate* myContactPickerDelegate;
int traceLevel;
LinphoneCore* myLinphoneCore;
}
/**********************************
* liblinphone initialization method
**********************************/
-(void) startlibLinphone;
/*
* liblinphone scheduling method;
*/
-(void) iterate;
-(void) newIncomingCall:(NSString*) from;
-(PayloadType*) findPayload:(NSString*)type withRate:(int)rate from:(const MSList*)list;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController* myTabBarController;
@property (nonatomic, retain) ABPeoplePickerNavigationController* myPeoplePickerController;
@property (nonatomic, retain) IBOutlet PhoneViewController* myPhoneViewController;
@interface linphoneAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
PhoneViewController *myViewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet PhoneViewController *myViewController;
@end

View file

@ -19,42 +19,332 @@
#import "PhoneViewController.h"
#import "linphoneAppDelegate.h"
#import "ContactPickerDelegate.h"
#import "IncallViewController.h"
#import "AddressBook/ABPerson.h"
#import <AVFoundation/AVAudioSession.h>
#import <AudioToolbox/AudioToolbox.h>
#import "osip2/osip.h"
#import "FavoriteTableViewController.h"
extern void ms_au_register_card();
//generic log handler for debug version
void linphone_iphone_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
NSString* format = [[NSString alloc] initWithCString:fmt encoding:[NSString defaultCStringEncoding]];
NSLogv(format,args);
[format release];
}
//Error/warning log handler
void linphone_iphone_log(struct _LinphoneCore * lc, const char * message) {
NSLog([NSString stringWithCString:message length:strlen(message)]);
}
//status
void linphone_iphone_display_status(struct _LinphoneCore * lc, const char * message) {
PhoneViewController* lPhone = ((linphoneAppDelegate*) linphone_core_get_user_data(lc)).myPhoneViewController;
[lPhone displayStatus:[NSString stringWithCString:message length:strlen(message)]];
}
void linphone_iphone_show(struct _LinphoneCore * lc) {
//nop
}
void linphone_iphone_call_received(LinphoneCore *lc, const char *from){
[((linphoneAppDelegate*) linphone_core_get_user_data(lc)) newIncomingCall:[[NSString alloc] initWithCString:from encoding:[NSString defaultCStringEncoding]]];
};
void linphone_iphone_general_state(LinphoneCore *lc, LinphoneGeneralState *gstate) {
PhoneViewController* lPhone = ((linphoneAppDelegate*) linphone_core_get_user_data(lc)).myPhoneViewController;
[lPhone callStateChange:gstate];
}
LinphoneCoreVTable linphonec_vtable = {
.show =(ShowInterfaceCb) linphone_iphone_show,
.inv_recv = linphone_iphone_call_received,
.bye_recv = NULL,
.notify_recv = NULL,
.new_unknown_subscriber = NULL,
.auth_info_requested = NULL,
.display_status = linphone_iphone_display_status,
.display_message=linphone_iphone_log,
.display_warning=linphone_iphone_log,
.display_url=NULL,
.display_question=(DisplayQuestionCb)NULL,
.text_received=NULL,
.general_state=(GeneralStateChange)linphone_iphone_general_state,
.dtmf_received=NULL
};
@implementation linphoneAppDelegate
@synthesize window;
@synthesize myViewController;
@synthesize myTabBarController;
@synthesize myPeoplePickerController;
@synthesize myPhoneViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
PhoneViewController *aViewController = [[PhoneViewController alloc]
initWithNibName:@"PhoneViewController" bundle:[NSBundle mainBundle]];
//as defined in PhoneMainView.xib
#define DIALER_TAB_INDEX 2
#define CONTACTS_TAB_INDEX 3
#define HISTORY_TAB_INDEX 1
#define FAVORITE_TAB_INDEX 0
#define MORE_TAB_INDEX 4
[self setMyViewController:aViewController];
[aViewController release];
//offset the status bar
CGRect rect = myViewController.view.frame;
rect = CGRectOffset(rect, 0.0, 20.0);
myViewController.view.frame = rect;
[window addSubview:[myViewController view]];
myPhoneViewController = (PhoneViewController*) [myTabBarController.viewControllers objectAtIndex: DIALER_TAB_INDEX];
myCallHistoryTableViewController = (CallHistoryTableViewController*)[myTabBarController.viewControllers objectAtIndex: HISTORY_TAB_INDEX];
[myCallHistoryTableViewController setPhoneControllerDelegate:myPhoneViewController];
[myCallHistoryTableViewController setLinphoneDelegate:self];
myFavoriteTableViewController = (FavoriteTableViewController*)[myTabBarController.viewControllers objectAtIndex: FAVORITE_TAB_INDEX];
[myFavoriteTableViewController setPhoneControllerDelegate:myPhoneViewController];
[myFavoriteTableViewController setLinphoneDelegate:self];
//init lib linphone
[aViewController startlibLinphone] ;
//people picker delegates
myContactPickerDelegate = [[ContactPickerDelegate alloc] init];
myContactPickerDelegate.phoneControllerDelegate=myPhoneViewController;
myContactPickerDelegate.linphoneDelegate=self;
//people picker
myPeoplePickerController = [[[ABPeoplePickerNavigationController alloc] init] autorelease];
[myPeoplePickerController setDisplayedProperties:[NSArray arrayWithObject:[NSNumber numberWithInt:kABPersonPhoneProperty]]];
[myPeoplePickerController setPeoplePickerDelegate:myContactPickerDelegate];
//copy tab bar item
myPeoplePickerController.tabBarItem = [(UIViewController*)[myTabBarController.viewControllers objectAtIndex:CONTACTS_TAB_INDEX] tabBarItem];
//insert contact controller
NSMutableArray* newArray = [NSMutableArray arrayWithArray:self.myTabBarController.viewControllers];
[newArray replaceObjectAtIndex:CONTACTS_TAB_INDEX withObject:myPeoplePickerController];
[myTabBarController setSelectedIndex:DIALER_TAB_INDEX];
[myTabBarController setViewControllers:newArray animated:NO];
[window addSubview:myTabBarController.view];
[window makeKeyAndVisible];
[self startlibLinphone];
[myCallHistoryTableViewController setLinphoneCore: myLinphoneCore];
[myFavoriteTableViewController setLinphoneCore: myLinphoneCore];
[myPhoneViewController setLinphoneCore: myLinphoneCore];
}
-(void)selectDialerTab {
[myTabBarController setSelectedIndex:DIALER_TAB_INDEX];
}
[window makeKeyAndVisible];
- (void)applicationWillTerminate:(UIApplication *)application {
linphone_core_destroy(myLinphoneCore);
}
- (void)dealloc {
[window release];
[myPeoplePickerController release];
[super dealloc];
}
/*************
*lib linphone init method
*/
-(void)startlibLinphone {
//init audio session
NSError *setError = nil;
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: &setError]; //must be call before linphone_core_init
//get default config from bundle
NSBundle* myBundle = [NSBundle mainBundle];
NSString* defaultConfigFile = [myBundle pathForResource:@"linphonerc"ofType:nil] ;
#if TARGET_IPHONE_SIMULATOR
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:NSFileImmutable];
[[NSFileManager defaultManager] setAttributes:dictionary ofItemAtPath:defaultConfigFile error:nil];
#endif
//log management
traceLevel = 9;
if (traceLevel > 0) {
//redirect all traces to the iphone log framework
linphone_core_enable_logs_with_cb(linphone_iphone_log_handler);
}
else {
linphone_core_disable_logs();
}
//register audio queue sound card
ms_au_register_card();
/*
* Initialize linphone core
*/
myLinphoneCore = linphone_core_new (&linphonec_vtable, [defaultConfigFile cStringUsingEncoding:[NSString defaultCStringEncoding]],self);
// Set audio assets
const char* lRing = [[myBundle pathForResource:@"oldphone-mono"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ring(myLinphoneCore, lRing );
const char* lRingBack = [[myBundle pathForResource:@"ringback"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
linphone_core_set_ringback(myLinphoneCore, lRingBack);
//configure sip account
//get data from Settings bundle
NSString* accountNameUri = [[NSUserDefaults standardUserDefaults] stringForKey:@"account_preference"];
const char* identity = [accountNameUri cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* accountPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"];
const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* proxyUri = [[NSUserDefaults standardUserDefaults] stringForKey:@"proxy_preference"];
const char* proxy = [proxyUri cStringUsingEncoding:[NSString defaultCStringEncoding]];
NSString* routeUri = [[NSUserDefaults standardUserDefaults] stringForKey:@"route_preference"];
const char* route = [routeUri cStringUsingEncoding:[NSString defaultCStringEncoding]];
if (([accountNameUri length] + [proxyUri length]) >8 ) {
//possible valid config detected
LinphoneProxyConfig* proxyCfg;
//clear auth info list
linphone_core_clear_all_auth_info(myLinphoneCore);
//get default proxy
linphone_core_get_default_proxy(myLinphoneCore,&proxyCfg);
boolean_t addProxy=false;
if (proxyCfg == NULL) {
//create new proxy
proxyCfg = linphone_proxy_config_new();
addProxy = true;
} else {
linphone_proxy_config_edit(proxyCfg);
}
// add username password
osip_from_t *from;
LinphoneAuthInfo *info;
osip_from_init(&from);
if (osip_from_parse(from,identity)==0){
info=linphone_auth_info_new(from->url->username,NULL,password,NULL,NULL);
linphone_core_add_auth_info(myLinphoneCore,info);
}
osip_from_free(from);
// configure proxy entries
linphone_proxy_config_set_identity(proxyCfg,identity);
linphone_proxy_config_set_server_addr(proxyCfg,proxy);
if ([routeUri length] > 4) {
linphone_proxy_config_set_route(proxyCfg,route);
}
linphone_proxy_config_enable_register(proxyCfg,TRUE);
if (addProxy) {
linphone_core_add_proxy_config(myLinphoneCore,proxyCfg);
//set to default proxy
linphone_core_set_default_proxy(myLinphoneCore,proxyCfg);
} else {
linphone_proxy_config_done(proxyCfg);
}
}
//Configure Codecs
PayloadType *pt;
//get codecs from linphonerc
const MSList *audioCodecs=linphone_core_get_audio_codecs(myLinphoneCore);
//read from setting bundle
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"speex_32k_preference"]) {
if(pt = [self findPayload:@"speex"withRate:32000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"speex_16k_preference"]) {
if(pt = [self findPayload:@"speex"withRate:16000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"speex_8k_preference"]) {
if(pt = [self findPayload:@"speex"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"gsm_22k_preference"]) {
if(pt = [self findPayload:@"GSM"withRate:22050 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"gsm_11k_preference"]) {
if(pt = [self findPayload:@"GSM"withRate:11025 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"gsm_8k_preference"]) {
if(pt = [self findPayload:@"GSM"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"pcmu_preference"]) {
if(pt = [self findPayload:@"PCMU"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"pcma_preference"]) {
if(pt = [self findPayload:@"PCMA"withRate:8000 from:audioCodecs]) {
payload_type_set_enable(pt,TRUE);
}
}
// start scheduler
[NSTimer scheduledTimerWithTimeInterval:0.1
target:self
selector:@selector(iterate)
userInfo:nil
repeats:YES];
}
-(void) newIncomingCall:(NSString*) from {
//redirect audio to speaker
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
, sizeof (audioRouteOverride)
, &audioRouteOverride);
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:@" %@ is calling you",from]
delegate:self cancelButtonTitle:@"Decline" destructiveButtonTitle:@"Answer" otherButtonTitles:nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showFromTabBar:myTabBarController.tabBar];
[actionSheet release];
}
- (void)dealloc {
[window release];
[myViewController release];
[super dealloc];
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0 ) {
linphone_core_accept_call(myLinphoneCore,NULL);
} else {
linphone_core_terminate_call (myLinphoneCore,NULL);
}
}
//scheduling loop
-(void) iterate {
linphone_core_iterate(myLinphoneCore);
}
-(PayloadType*) findPayload:(NSString*)type withRate:(int)rate from:(const MSList*)list {
const MSList *elem;
for(elem=list;elem!=NULL;elem=elem->next){
PayloadType *pt=(PayloadType*)elem->data;
if ([type isEqualToString:[NSString stringWithCString:payload_type_get_mime(pt) length:strlen(payload_type_get_mime(pt))]] && rate==pt->clock_rate) {
return pt;
}
}
return nil;
}

View file

@ -8,6 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="8"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -44,6 +45,71 @@
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
<object class="IBUITabBarController" id="952473143">
<object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUIViewController" key="IBUISelectedViewController" id="258574391">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="64474689">
<string key="IBUITitle">Dialer</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">linphone2.png</string>
</object>
<reference key="IBUITabBar"/>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<string key="IBUINibName">PhoneViewController</string>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIViewController" id="947197904">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="654208500">
<string key="IBUITitle">Favorites</string>
<reference key="IBUITabBar"/>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<string key="IBUINibName">FavoriteTableViewController</string>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
<object class="IBUIViewController" id="156830991">
<string key="IBUITitle">History</string>
<object class="IBUITabBarItem" key="IBUITabBarItem" id="1041279701">
<string key="IBUITitle">history</string>
<reference key="IBUITabBar"/>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<string key="IBUINibName">CallHistoryTableViewController</string>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
<reference ref="258574391"/>
<object class="IBUIViewController" id="383050823">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="672878446">
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">5</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
</object>
<object class="IBUIViewController" id="555899988">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="534357631">
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">0</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
</object>
<object class="IBUITabBar" key="IBUITabBar" id="995238651">
<nil key="NSNextResponder"/>
<int key="NSvFlags">266</int>
<string key="NSFrame">{{129, 330}, {163, 49}}</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
</object>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
@ -64,6 +130,14 @@
</object>
<int key="connectionID">7</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">myTabBarController</string>
<reference key="source" ref="987256611"/>
<reference key="destination" ref="952473143"/>
</object>
<int key="connectionID">14</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -98,6 +172,99 @@
<reference key="object" ref="450319686"/>
<reference key="parent" ref="115694044"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="952473143"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="995238651"/>
<reference ref="383050823"/>
<reference ref="555899988"/>
<reference ref="947197904"/>
<reference ref="156830991"/>
<reference ref="258574391"/>
</object>
<reference key="parent" ref="115694044"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="995238651"/>
<reference key="parent" ref="952473143"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="383050823"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="672878446"/>
</object>
<reference key="parent" ref="952473143"/>
<string key="objectName">Contacts</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="672878446"/>
<reference key="parent" ref="383050823"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">38</int>
<reference key="object" ref="258574391"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="64474689"/>
</object>
<reference key="parent" ref="952473143"/>
<string key="objectName">dialer</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">39</int>
<reference key="object" ref="64474689"/>
<reference key="parent" ref="258574391"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">41</int>
<reference key="object" ref="156830991"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1041279701"/>
</object>
<reference key="parent" ref="952473143"/>
<string key="objectName">history</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">42</int>
<reference key="object" ref="1041279701"/>
<reference key="parent" ref="156830991"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">43</int>
<reference key="object" ref="555899988"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="534357631"/>
</object>
<reference key="parent" ref="952473143"/>
<string key="objectName">more</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">44</int>
<reference key="object" ref="534357631"/>
<reference key="parent" ref="555899988"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">46</int>
<reference key="object" ref="947197904"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="654208500"/>
</object>
<reference key="parent" ref="952473143"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">47</int>
<reference key="object" ref="654208500"/>
<reference key="parent" ref="947197904"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -106,17 +273,32 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</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>4.CustomClassName</string>
<string>4.IBPluginDependency</string>
<string>41.CustomClassName</string>
<string>41.IBPluginDependency</string>
<string>43.IBPluginDependency</string>
<string>46.CustomClassName</string>
<string>46.IBPluginDependency</string>
<string>8.IBEditorWindowLastContentRect</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>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSMutableDictionary">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
@ -129,8 +311,19 @@
<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>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>FavoriteTableViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{11, 205}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@ -153,33 +346,126 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">7</int>
<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="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/CallHistoryTableViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FavoriteTableViewController</string>
<string key="superclassName">GenericTabViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>doAddFavorite:</string>
<string>doEditFavorite:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">add</string>
<string key="NS.object.0">UIButton</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/FavoriteTableViewController.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="NSMutableArray" 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">PhoneViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doAction:</string>
<string key="NS.object.0">id</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" 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="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>address</string>
<string>back</string>
<string>call</string>
<string>cancel</string>
<string>eight</string>
<string>five</string>
<string>four</string>
<string>hash</string>
<string>nine</string>
<string>one</string>
<string>seven</string>
<string>six</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>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</string>
<string>UIButton</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">
@ -194,12 +480,16 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>myViewController</string>
<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>

BIN
in_call.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -22,6 +22,13 @@
220FAD3910765B400068D98F /* libspeexdsp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD3010765B400068D98F /* libspeexdsp.a */; };
220FAE4B10767A6A0068D98F /* PhoneMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 220FAE4A10767A6A0068D98F /* PhoneMainView.xib */; };
2237D4091084D7A9001383EE /* oldphone-mono.wav in Resources */ = {isa = PBXBuildFile; fileRef = 2237D4081084D7A9001383EE /* oldphone-mono.wav */; };
2242D91610D66BF300E9963F /* in_call.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91410D66BF300E9963F /* in_call.png */; };
2242D91710D66BF300E9963F /* out_call.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91510D66BF300E9963F /* out_call.png */; };
2242D91A10D66C2100E9963F /* mic_active.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91810D66C2100E9963F /* mic_active.png */; };
2242D91B10D66C2100E9963F /* mic_muted.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91910D66C2100E9963F /* mic_muted.png */; };
2242D9C310D68DFD00E9963F /* FavoriteTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2242D9C110D68DFD00E9963F /* FavoriteTableViewController.m */; };
2242D9C410D68DFD00E9963F /* FavoriteTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2242D9C210D68DFD00E9963F /* FavoriteTableViewController.xib */; };
2242D9C910D691F900E9963F /* GenericTabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2242D9C810D691F900E9963F /* GenericTabViewController.m */; };
2245667810768B7300F10948 /* linphone2.png in Resources */ = {isa = PBXBuildFile; fileRef = 2245667710768B7300F10948 /* linphone2.png */; };
2245667A10768B9000F10948 /* linphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 2245667910768B9000F10948 /* linphone.png */; };
2245671D107699F700F10948 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2245671C107699F700F10948 /* Settings.bundle */; };
@ -31,6 +38,13 @@
2274401A106F31BD006EC466 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22744019106F31BD006EC466 /* CoreAudio.framework */; };
2274402F106F335E006EC466 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2274402E106F335E006EC466 /* AudioToolbox.framework */; };
2274550810700509006EC466 /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 2274550710700509006EC466 /* linphonerc */; };
227BCDC210D4004600FBFD76 /* CallHistoryTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 227BCDC010D4004600FBFD76 /* CallHistoryTableViewController.m */; };
227BCDC310D4004600FBFD76 /* CallHistoryTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 227BCDC110D4004600FBFD76 /* CallHistoryTableViewController.xib */; };
22B5EFA310CE50BD00777D97 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22B5EFA210CE50BD00777D97 /* AddressBookUI.framework */; };
22B5EFE510CE5E5800777D97 /* ContactPickerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 22B5EFE410CE5E5800777D97 /* ContactPickerDelegate.m */; };
22B5F03510CE6B2F00777D97 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22B5F03410CE6B2F00777D97 /* AddressBook.framework */; };
22B5F1E110CFA3C700777D97 /* IncallViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22B5F1E010CFA3C700777D97 /* IncallViewController.xib */; };
22B5F1EA10CFD55A00777D97 /* IncallViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22B5F1E810CFD55A00777D97 /* IncallViewController.m */; };
22F2508E107141E100AC9B3F /* PhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F2508C107141E100AC9B3F /* PhoneViewController.m */; };
22F2508F107141E100AC9B3F /* PhoneViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F2508D107141E100AC9B3F /* PhoneViewController.xib */; };
22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; };
@ -174,6 +188,15 @@
220FAD3010765B400068D98F /* libspeexdsp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libspeexdsp.a; path = "../../liblinphone-sdk/armv6-apple-darwin/lib/libspeexdsp.a"; sourceTree = SOURCE_ROOT; };
220FAE4A10767A6A0068D98F /* PhoneMainView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhoneMainView.xib; sourceTree = "<group>"; };
2237D4081084D7A9001383EE /* oldphone-mono.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = "oldphone-mono.wav"; sourceTree = "<group>"; };
2242D91410D66BF300E9963F /* in_call.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = in_call.png; sourceTree = "<group>"; };
2242D91510D66BF300E9963F /* out_call.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = out_call.png; sourceTree = "<group>"; };
2242D91810D66C2100E9963F /* mic_active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mic_active.png; path = ../../pixmaps/mic_active.png; sourceTree = SOURCE_ROOT; };
2242D91910D66C2100E9963F /* mic_muted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mic_muted.png; path = ../../pixmaps/mic_muted.png; sourceTree = SOURCE_ROOT; };
2242D9C010D68DFD00E9963F /* FavoriteTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FavoriteTableViewController.h; sourceTree = "<group>"; };
2242D9C110D68DFD00E9963F /* FavoriteTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FavoriteTableViewController.m; sourceTree = "<group>"; };
2242D9C210D68DFD00E9963F /* FavoriteTableViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FavoriteTableViewController.xib; sourceTree = "<group>"; };
2242D9C710D691F900E9963F /* GenericTabViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericTabViewController.h; sourceTree = "<group>"; };
2242D9C810D691F900E9963F /* GenericTabViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GenericTabViewController.m; sourceTree = "<group>"; };
2245667710768B7300F10948 /* linphone2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = linphone2.png; path = ../../pixmaps/linphone2.png; sourceTree = SOURCE_ROOT; };
2245667910768B9000F10948 /* linphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = linphone.png; path = ../../pixmaps/linphone.png; sourceTree = SOURCE_ROOT; };
2245671C107699F700F10948 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
@ -185,9 +208,19 @@
22744043106F33FC006EC466 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
22744056106F9BC9006EC466 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
2274550710700509006EC466 /* linphonerc */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = linphonerc; sourceTree = "<group>"; };
227BCDBF10D4004600FBFD76 /* CallHistoryTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallHistoryTableViewController.h; sourceTree = "<group>"; };
227BCDC010D4004600FBFD76 /* CallHistoryTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallHistoryTableViewController.m; sourceTree = "<group>"; };
227BCDC110D4004600FBFD76 /* CallHistoryTableViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CallHistoryTableViewController.xib; sourceTree = "<group>"; };
22B5EFA210CE50BD00777D97 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
22B5EFE310CE5E5800777D97 /* ContactPickerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactPickerDelegate.h; sourceTree = "<group>"; };
22B5EFE410CE5E5800777D97 /* ContactPickerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactPickerDelegate.m; sourceTree = "<group>"; };
22B5F03410CE6B2F00777D97 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
22B5F1E010CFA3C700777D97 /* IncallViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IncallViewController.xib; sourceTree = "<group>"; };
22B5F1E710CFD55A00777D97 /* IncallViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncallViewController.h; sourceTree = "<group>"; };
22B5F1E810CFD55A00777D97 /* IncallViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IncallViewController.m; sourceTree = "<group>"; };
22F2508B107141E100AC9B3F /* PhoneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhoneViewController.h; sourceTree = "<group>"; };
22F2508C107141E100AC9B3F /* PhoneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhoneViewController.m; sourceTree = "<group>"; };
22F2508D107141E100AC9B3F /* PhoneViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = PhoneViewController.xib; path = Classes/PhoneViewController.xib; sourceTree = "<group>"; };
22F2508D107141E100AC9B3F /* PhoneViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhoneViewController.xib; sourceTree = "<group>"; };
22F254801073D99800AC9B3F /* ringback.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ringback.wav; path = ../../share/ringback.wav; sourceTree = SOURCE_ROOT; };
22F255131073EEE600AC9B3F /* green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = green.png; path = ../../pixmaps/green.png; sourceTree = SOURCE_ROOT; };
22F255141073EEE600AC9B3F /* red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = red.png; path = ../../pixmaps/red.png; sourceTree = SOURCE_ROOT; };
@ -219,6 +252,8 @@
220FAD3910765B400068D98F /* libspeexdsp.a in Frameworks */,
224567C2107B968500F10948 /* AVFoundation.framework in Frameworks */,
2273785E10A3703300526073 /* libmsiounit.a in Frameworks */,
22B5EFA310CE50BD00777D97 /* AddressBookUI.framework in Frameworks */,
22B5F03510CE6B2F00777D97 /* AddressBook.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -232,6 +267,20 @@
1D3623250D0F684500981E51 /* linphoneAppDelegate.m */,
22F2508B107141E100AC9B3F /* PhoneViewController.h */,
22F2508C107141E100AC9B3F /* PhoneViewController.m */,
22F2508D107141E100AC9B3F /* PhoneViewController.xib */,
22B5EFE310CE5E5800777D97 /* ContactPickerDelegate.h */,
22B5EFE410CE5E5800777D97 /* ContactPickerDelegate.m */,
22B5F1E710CFD55A00777D97 /* IncallViewController.h */,
22B5F1E810CFD55A00777D97 /* IncallViewController.m */,
22B5F1E010CFA3C700777D97 /* IncallViewController.xib */,
227BCDBF10D4004600FBFD76 /* CallHistoryTableViewController.h */,
227BCDC010D4004600FBFD76 /* CallHistoryTableViewController.m */,
227BCDC110D4004600FBFD76 /* CallHistoryTableViewController.xib */,
2242D9C010D68DFD00E9963F /* FavoriteTableViewController.h */,
2242D9C110D68DFD00E9963F /* FavoriteTableViewController.m */,
2242D9C210D68DFD00E9963F /* FavoriteTableViewController.xib */,
2242D9C710D691F900E9963F /* GenericTabViewController.h */,
2242D9C810D691F900E9963F /* GenericTabViewController.m */,
);
path = Classes;
sourceTree = "<group>";
@ -477,6 +526,8 @@
2245671C107699F700F10948 /* Settings.bundle */,
224567C1107B968500F10948 /* AVFoundation.framework */,
22F51EF5107FA66500F98953 /* untitled.plist */,
22B5EFA210CE50BD00777D97 /* AddressBookUI.framework */,
22B5F03410CE6B2F00777D97 /* AddressBook.framework */,
);
name = CustomTemplate;
sourceTree = "<group>";
@ -493,13 +544,16 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
2242D91810D66C2100E9963F /* mic_active.png */,
2242D91910D66C2100E9963F /* mic_muted.png */,
2242D91410D66BF300E9963F /* in_call.png */,
2242D91510D66BF300E9963F /* out_call.png */,
2245667910768B9000F10948 /* linphone.png */,
2245667710768B7300F10948 /* linphone2.png */,
22F255131073EEE600AC9B3F /* green.png */,
22F255141073EEE600AC9B3F /* red.png */,
22F254801073D99800AC9B3F /* ringback.wav */,
22F2546F1073D95B00AC9B3F /* rings */,
22F2508D107141E100AC9B3F /* PhoneViewController.xib */,
8D1107310486CEB800E47090 /* linphone-Info.plist */,
2274550710700509006EC466 /* linphonerc */,
220FAE4A10767A6A0068D98F /* PhoneMainView.xib */,
@ -571,6 +625,13 @@
22F51EF6107FA66500F98953 /* untitled.plist in Resources */,
2237D4091084D7A9001383EE /* oldphone-mono.wav in Resources */,
2273798810A48EF000526073 /* oldphone.wav in Resources */,
22B5F1E110CFA3C700777D97 /* IncallViewController.xib in Resources */,
227BCDC310D4004600FBFD76 /* CallHistoryTableViewController.xib in Resources */,
2242D91610D66BF300E9963F /* in_call.png in Resources */,
2242D91710D66BF300E9963F /* out_call.png in Resources */,
2242D91A10D66C2100E9963F /* mic_active.png in Resources */,
2242D91B10D66C2100E9963F /* mic_muted.png in Resources */,
2242D9C410D68DFD00E9963F /* FavoriteTableViewController.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -584,6 +645,11 @@
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
1D3623260D0F684500981E51 /* linphoneAppDelegate.m in Sources */,
22F2508E107141E100AC9B3F /* PhoneViewController.m in Sources */,
22B5EFE510CE5E5800777D97 /* ContactPickerDelegate.m in Sources */,
22B5F1EA10CFD55A00777D97 /* IncallViewController.m in Sources */,
227BCDC210D4004600FBFD76 /* CallHistoryTableViewController.m in Sources */,
2242D9C310D68DFD00E9963F /* FavoriteTableViewController.m in Sources */,
2242D9C910D691F900E9963F /* GenericTabViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -606,10 +672,9 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/../../liblinphone-sdk/armv6-apple-darwin/lib/mediastreamer/plugins\"",
);
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/armv6-apple-darwin/lib\"/**";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/i386-apple-darwin/lib\"";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/i386-apple-darwin/lib\"/**";
PRODUCT_NAME = linphone;
SDKROOT = iphoneos3.0;
STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic;
@ -629,10 +694,9 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/../../liblinphone-sdk/armv6-apple-darwin/lib/mediastreamer/plugins\"",
);
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/armv6-apple-darwin/lib\"/**";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/i386-apple-darwin/lib\"";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/i386-apple-darwin/lib\"/**";
PRODUCT_NAME = linphone;
};
name = Release;
@ -671,10 +735,9 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/../../liblinphone-sdk/armv6-apple-darwin/lib/mediastreamer/plugins\"",
);
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/armv6-apple-darwin/lib\"/**";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/i386-apple-darwin/lib\"";
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "\"$(SRCROOT)/../../liblinphone-sdk/i386-apple-darwin/lib\"/**";
PRODUCT_NAME = linphone;
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SDKROOT = iphoneos3.0;

BIN
out_call.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB