code complete, ready for FAT

This commit is contained in:
Jehan Monnier 2010-02-05 17:17:35 +01:00
parent 38c6aa938f
commit 2e8e74bdd7
14 changed files with 1088 additions and 135 deletions

View file

@ -33,15 +33,16 @@
}
*/
/*
- (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;
UIBarButtonItem* clear = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemTrash
target:self
action:@selector(doAction:)];
[self.navigationItem setRightBarButtonItem:clear];
}
*/
/*
- (void)viewWillAppear:(BOOL)animated {
@ -87,10 +88,8 @@
-(void) doAction:(id)sender {
if (sender==clear) {
linphone_core_clear_call_logs(myLinphoneCore);
[self.tableView reloadData];
}
linphone_core_clear_call_logs(myLinphoneCore);
[self.tableView reloadData];
}
#pragma mark Table view methods

View file

@ -9,7 +9,6 @@
<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>
@ -37,7 +36,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor" id="993965549">
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
@ -53,64 +52,6 @@
<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, 4}, {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">
@ -139,31 +80,6 @@
</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 class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">clear</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="292237329"/>
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">doAction:</string>
<reference key="source" ref="292237329"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">13</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -192,27 +108,6 @@
<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">
@ -221,22 +116,14 @@
<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>{{625, 616}, {320, 44}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{163, 500}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>

View file

@ -0,0 +1,32 @@
/*
* ConsoleViewController.h
*
* Description:
*
*
* Belledonne Communications (C) 2010
*
* Copyright: See COPYING file that comes with this distribution
*
*/
#import <UIKit/UIKit.h>
@protocol LogView
+(void) addLog:(NSString*) log;
@end
@interface ConsoleViewController : UIViewController <LogView> {
UITextView* logs;
UIView* logsView;
}
-(void) doAction;
@property (nonatomic, retain) IBOutlet UITextView* logs;
@property (nonatomic, retain) IBOutlet UIView* logsView;
@end

View file

@ -0,0 +1,98 @@
/*
* ConsoleViewController.h
*
* Description:
*
*
* Belledonne Communications (C) 2010
*
* Copyright: See COPYING file that comes with this distribution
*
*/
#import "ConsoleViewController.h"
@implementation ConsoleViewController
NSMutableString* MoreViewController_logs;
@synthesize logs;
@synthesize logsView;
/*
// 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];
UIBarButtonItem* clear = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemTrash
target:self
action:@selector(doAction)];
[self.navigationItem setRightBarButtonItem:clear];
}
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
-(void) viewWillAppear:(BOOL)animated {
[logs setText:MoreViewController_logs];
}
- (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;
}
+(void) addLog:(NSString*) log {
@synchronized(self) {
if (!MoreViewController_logs) {
MoreViewController_logs = [[NSMutableString alloc] init];
}
[MoreViewController_logs appendString:log];
if (MoreViewController_logs.length > 50000) {
NSRange range = {0,log.length};
[MoreViewController_logs deleteCharactersInRange:range];
}
}
}
-(void) doAction{
@synchronized(self) {
NSMutableString* oldString = MoreViewController_logs;
MoreViewController_logs = [[NSMutableString alloc] init];
[oldString release];
[logs setText:@""];
}
}
- (void)dealloc {
[super dealloc];
}
@end

View file

@ -0,0 +1,228 @@
<?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="10"/>
</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="IBUIViewController" id="962557183">
<object class="IBUIView" key="IBUIView" id="679133499">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUITextView" id="249557632">
<reference key="NSNextResponder" ref="679133499"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{320, 450}</string>
<reference key="NSSuperview" ref="679133499"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
<bool key="IBUIDelaysContentTouches">NO</bool>
<bool key="IBUICanCancelContentTouches">NO</bool>
<bool key="IBUIBouncesZoom">NO</bool>
<bool key="IBUIEditable">NO</bool>
<string key="IBUIText"/>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIAutocapitalizationType">2</int>
</object>
</object>
</object>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
</object>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</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">logs</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="249557632"/>
</object>
<int key="connectionID">9</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">logsView</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="679133499"/>
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="679133499"/>
</object>
<int key="connectionID">14</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="732835941">
<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="732835941"/>
<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="732835941"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="962557183"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="679133499"/>
</object>
<reference key="parent" ref="732835941"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="679133499"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="249557632"/>
</object>
<reference key="parent" ref="962557183"/>
<string key="objectName">logView</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="249557632"/>
<reference key="parent" ref="679133499"/>
</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.CustomClassName</string>
<string>10.IBEditorWindowLastContentRect</string>
<string>10.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
<string>7.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>ConsoleViewController</string>
<string>UIResponder</string>
<string>ConsoleViewController</string>
<string>{{807, 300}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</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">14</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">ConsoleViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>logs</string>
<string>logsView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITextView</string>
<string>UIView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/ConsoleViewController.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,46 @@
/* MoreViewController.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 "linphoneAppDelegate.h"
@class ConsoleViewController;
@interface MoreViewController : UITableViewController {
bool isLogViewEnabled;
UITableViewCell *credit;
UITextView *creditText;
UITableViewCell *web;
UITableViewCell *console;
ConsoleViewController *consoleViewController;
bool isDebug;
}
@property (nonatomic, retain) IBOutlet UITableViewCell* web;
@property (nonatomic, retain) IBOutlet UITableViewCell* credit;
@property (nonatomic, retain) IBOutlet UITableViewCell* console;
@property (nonatomic, retain) IBOutlet UITextView *creditText;
@end

View file

@ -0,0 +1,140 @@
/* MoreViewController.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 "MoreViewController.h"
#include "ConsoleViewController.h"
@implementation MoreViewController
@synthesize web;
@synthesize credit;
@synthesize console;
@synthesize creditText;
//Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
[creditText setText: [NSString stringWithFormat:creditText.text,@"3.1.2"]];
consoleViewController = [[ConsoleViewController alloc] initWithNibName:@"ConsoleViewController" bundle:[NSBundle mainBundle]];
isDebug = [[NSUserDefaults standardUserDefaults] boolForKey:@"debugenable_preference"];
}
/*
// 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;
}
- (void)dealloc {
[super dealloc];
}
-(void) enableLogView {
isLogViewEnabled = true;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return 230;
} else {
return 44;
}
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return 1;
} else {
if (isDebug) {
return 2;
} else {
return 1;
}
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return credit;
} else {
switch (indexPath.row) {
case 0: return web;
case 1: return console;
}
}
return nil;
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
[self tableView:tableView didSelectRowAtIndexPath:indexPath];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:NO];
switch (indexPath.row) {
case 0: {
NSString *stringURL = @"http://www.linphone.org";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
break;
};
case 1: {
[self.navigationController pushViewController:consoleViewController animated:true];
break;
}
}
}
@end

View file

@ -0,0 +1,445 @@
<?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="38"/>
<integer value="4"/>
<integer value="25"/>
<integer value="42"/>
</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="IBUIViewController" id="404009698">
<object class="IBUITableView" key="IBUIView" id="1023241257">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 106}, {320, 247}}</string>
<reference key="NSSuperview"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<bool key="IBUIBouncesZoom">NO</bool>
<int key="IBUIStyle">1</int>
<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">1.000000e+01</float>
<float key="IBUISectionFooterHeight">1.000000e+01</float>
</object>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
<object class="IBUITableViewCell" id="616126654">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIView" id="958135278">
<reference key="NSNextResponder" ref="616126654"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="409894174">
<reference key="NSNextResponder" ref="958135278"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 0}, {300, 44}}</string>
<reference key="NSSuperview" ref="958135278"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">http://www.linphone.org</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwLjUwMTk2MDgxIDEAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
</object>
</object>
<string key="NSFrameSize">{300, 43}</string>
<reference key="NSSuperview" ref="616126654"/>
<object class="NSColor" key="IBUIBackgroundColor" id="852365409">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
</object>
</object>
<string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor" id="505875399">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUISeparatorStyle">1</int>
<int key="IBUIAccessoryType">1</int>
<reference key="IBUIContentView" ref="958135278"/>
</object>
<object class="IBUITableViewCell" id="135715970">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIView" id="804504498">
<reference key="NSNextResponder" ref="135715970"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="915917531">
<reference key="NSNextResponder" ref="804504498"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 0}, {300, 44}}</string>
<reference key="NSSuperview" ref="804504498"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Console</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>
</object>
</object>
<string key="NSFrameSize">{300, 43}</string>
<reference key="NSSuperview" ref="135715970"/>
<reference key="IBUIBackgroundColor" ref="852365409"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
</object>
</object>
<string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview"/>
<reference key="IBUIBackgroundColor" ref="505875399"/>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUISeparatorStyle">1</int>
<int key="IBUIAccessoryType">1</int>
<reference key="IBUIContentView" ref="804504498"/>
</object>
<object class="IBUITableViewCell" id="345316828">
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIView" id="869038871">
<reference key="NSNextResponder" ref="345316828"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUIImageView" id="457821340">
<reference key="NSNextResponder" ref="869038871"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{23, 7}, {263, 154}}</string>
<reference key="NSSuperview" ref="869038871"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">linphone.png</string>
</object>
</object>
<object class="IBUITextView" id="432332592">
<reference key="NSNextResponder" ref="869038871"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{34, 175}, {240, 106}}</string>
<reference key="NSSuperview" ref="869038871"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
<bool key="IBUIDelaysContentTouches">NO</bool>
<bool key="IBUICanCancelContentTouches">NO</bool>
<bool key="IBUIBouncesZoom">NO</bool>
<string type="base64-UTF8" key="IBUIText">TGlucGhvbmUgJUAg4oCoU0lQIChyZmMzMjYxKSBjb21wYXRpYmxlICBJbnRlcm5ldCBwaG9uZSAgIA</string>
<int key="IBUITextAlignment">1</int>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIAutocapitalizationType">2</int>
</object>
</object>
</object>
<string key="NSFrameSize">{322, 229}</string>
<reference key="NSSuperview" ref="345316828"/>
<reference key="IBUIBackgroundColor" ref="852365409"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
</object>
</object>
<string key="NSFrameSize">{322, 230}</string>
<reference key="NSSuperview"/>
<reference key="IBUIBackgroundColor" ref="505875399"/>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<int key="IBUISeparatorStyle">1</int>
<reference key="IBUIContentView" ref="869038871"/>
</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">web</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="616126654"/>
</object>
<int key="connectionID">32</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">console</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="135715970"/>
</object>
<int key="connectionID">40</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">credit</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="345316828"/>
</object>
<int key="connectionID">46</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="1023241257"/>
</object>
<int key="connectionID">47</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">creditText</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="432332592"/>
</object>
<int key="connectionID">48</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="941338986">
<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="941338986"/>
<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="941338986"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="404009698"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1023241257"/>
</object>
<reference key="parent" ref="941338986"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">25</int>
<reference key="object" ref="616126654"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="409894174"/>
</object>
<reference key="parent" ref="941338986"/>
<string key="objectName">web</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">34</int>
<reference key="object" ref="409894174"/>
<reference key="parent" ref="616126654"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">38</int>
<reference key="object" ref="135715970"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="915917531"/>
</object>
<reference key="parent" ref="941338986"/>
<string key="objectName">console</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">39</int>
<reference key="object" ref="915917531"/>
<reference key="parent" ref="135715970"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">42</int>
<reference key="object" ref="345316828"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="457821340"/>
<reference ref="432332592"/>
</object>
<reference key="parent" ref="941338986"/>
<string key="objectName">about</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">43</int>
<reference key="object" ref="457821340"/>
<reference key="parent" ref="345316828"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">45</int>
<reference key="object" ref="432332592"/>
<reference key="parent" ref="345316828"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">18</int>
<reference key="object" ref="1023241257"/>
<reference key="parent" ref="404009698"/>
</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>18.IBEditorWindowLastContentRect</string>
<string>18.IBPluginDependency</string>
<string>25.IBEditorWindowLastContentRect</string>
<string>25.IBPluginDependency</string>
<string>34.IBPluginDependency</string>
<string>38.IBEditorWindowLastContentRect</string>
<string>38.IBPluginDependency</string>
<string>39.IBPluginDependency</string>
<string>4.IBEditorWindowLastContentRect</string>
<string>4.IBPluginDependency</string>
<string>42.IBEditorWindowLastContentRect</string>
<string>42.IBPluginDependency</string>
<string>43.IBPluginDependency</string>
<string>45.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>MoreViewController</string>
<string>UIResponder</string>
<string>{{138, 864}, {320, 247}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{251, 502}, {320, 44}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{252, 1012}, {320, 44}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{79, 106}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{462, 709}, {322, 230}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</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">48</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">MoreViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>console</string>
<string>credit</string>
<string>creditText</string>
<string>web</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITableViewCell</string>
<string>UITableViewCell</string>
<string>UITextView</string>
<string>UITableViewCell</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/MoreViewController.h</string>
</object>
</object>
</object>
</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

@ -308,6 +308,7 @@
switch (state->new_state) {
case GSTATE_CALL_IN_INVITE:
case GSTATE_CALL_OUT_INVITE: {
[hangup setEnabled:true];
break;
}
@ -358,6 +359,7 @@
[address setHidden:false];
[incallView setHidden:true];
[call setEnabled:true];
[hangup setEnabled:false];
if (durationRefreasher != nil) {
[ durationRefreasher invalidate];

View file

@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="1"/>
<integer value="80"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -411,6 +411,7 @@
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<bool key="IBUIEnabled">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<reference key="IBUIFont" ref="551268947"/>
@ -446,12 +447,15 @@
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">1.800000e+01</double>
<double key="NSSize">2.400000e+01</double>
<int key="NSfFlags">16</int>
</object>
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
<float key="IBUIMinimumFontSize">1.700000e+01</float>
<object class="IBUITextInputTraits" key="IBUITextInputTraits"/>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIAutocorrectionType">1</int>
<int key="IBUIKeyboardType">3</int>
</object>
<int key="IBUIClearButtonMode">3</int>
</object>
</object>

View file

@ -24,18 +24,27 @@
#import <AVFoundation/AVAudioSession.h>
#import <AudioToolbox/AudioToolbox.h>
#import "osip2/osip.h"
#import "ConsoleViewController.h"
#import "MoreViewController.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){
void linphone_iphone_log_handler(int lev, const char *fmt, va_list args){
NSString* format = [[NSString alloc] initWithCString:fmt encoding:[NSString defaultCStringEncoding]];
NSLogv(format,args);
NSString* formatedString = [[NSString alloc] initWithFormat:format arguments:args];
[ConsoleViewController addLog:formatedString];
[format release];
[formatedString release];
}
//Error/warning log handler
void linphone_iphone_log(struct _LinphoneCore * lc, const char * message) {
NSLog([NSString stringWithCString:message length:strlen(message)]);
NSString* log = [NSString stringWithCString:message length:strlen(message)];
NSLog(log);
[ConsoleViewController addLog:log];
}
//status
void linphone_iphone_display_status(struct _LinphoneCore * lc, const char * message) {
PhoneViewController* lPhone = ((linphoneAppDelegate*) linphone_core_get_user_data(lc)).myPhoneViewController;
@ -96,7 +105,10 @@ LinphoneCoreVTable linphonec_vtable = {
myPhoneViewController = (PhoneViewController*) [myTabBarController.viewControllers objectAtIndex: DIALER_TAB_INDEX];
myCallHistoryTableViewController = (CallHistoryTableViewController*)[myTabBarController.viewControllers objectAtIndex: HISTORY_TAB_INDEX];
//Call history
myCallHistoryTableViewController = [[CallHistoryTableViewController alloc] initWithNibName:@"CallHistoryTableViewController" bundle:[NSBundle mainBundle]];
UINavigationController *aCallHistNavigationController = [[UINavigationController alloc] initWithRootViewController:myCallHistoryTableViewController];
aCallHistNavigationController.tabBarItem = [(UIViewController*)[myTabBarController.viewControllers objectAtIndex:HISTORY_TAB_INDEX] tabBarItem];
[myCallHistoryTableViewController setPhoneControllerDelegate:myPhoneViewController];
[myCallHistoryTableViewController setLinphoneDelegate:self];
@ -111,9 +123,20 @@ LinphoneCoreVTable linphonec_vtable = {
[myPeoplePickerController setPeoplePickerDelegate:myContactPickerDelegate];
//copy tab bar item
myPeoplePickerController.tabBarItem = [(UIViewController*)[myTabBarController.viewControllers objectAtIndex:CONTACTS_TAB_INDEX] tabBarItem];
//more tab
MoreViewController *moreViewController = [[MoreViewController alloc] initWithNibName:@"MoreViewController" bundle:[NSBundle mainBundle]];
UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:moreViewController];
//copy tab bar item
aNavigationController.tabBarItem = [(UIViewController*)[myTabBarController.viewControllers objectAtIndex:MORE_TAB_INDEX] tabBarItem];
//insert contact controller
NSMutableArray* newArray = [NSMutableArray arrayWithArray:self.myTabBarController.viewControllers];
[newArray replaceObjectAtIndex:CONTACTS_TAB_INDEX withObject:myPeoplePickerController];
[newArray replaceObjectAtIndex:MORE_TAB_INDEX withObject:aNavigationController];
[newArray replaceObjectAtIndex:HISTORY_TAB_INDEX withObject:aCallHistNavigationController];
[myTabBarController setSelectedIndex:DIALER_TAB_INDEX];
[myTabBarController setViewControllers:newArray animated:NO];

View file

@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="8"/>
<integer value="41"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -51,11 +51,10 @@
<object class="IBUIViewController" key="IBUISelectedViewController" id="156830991">
<string key="IBUITitle">History</string>
<object class="IBUITabBarItem" key="IBUITabBarItem" id="1041279701">
<string key="IBUITitle">History</string>
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">6</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<string key="IBUINibName">CallHistoryTableViewController</string>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
</object>
<object class="NSMutableArray" key="IBUIViewControllers">
@ -79,8 +78,9 @@
</object>
<object class="IBUIViewController" id="555899988">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="534357631">
<string key="IBUITitle">About</string>
<string key="IBUITitle"/>
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">0</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
@ -258,6 +258,7 @@
<string>4.IBPluginDependency</string>
<string>41.CustomClassName</string>
<string>41.IBPluginDependency</string>
<string>43.CustomClassName</string>
<string>43.IBPluginDependency</string>
<string>8.IBEditorWindowLastContentRect</string>
<string>8.IBPluginDependency</string>
@ -288,8 +289,9 @@
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>CallHistoryTableViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>MoreViewController</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{11, 205}, {320, 480}}</string>
<string>{{227, 205}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
@ -358,6 +360,31 @@
<string key="minorKey">Classes/GenericTabViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MoreViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>console</string>
<string>credit</string>
<string>creditText</string>
<string>web</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITableViewCell</string>
<string>UITableViewCell</string>
<string>UITextView</string>
<string>UITableViewCell</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/MoreViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PhoneViewController</string>
<string key="superclassName">UIViewController</string>

View file

@ -22,6 +22,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleShortVersionString</key>
<string>3.1.2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>

View file

@ -43,6 +43,10 @@
22B5F03510CE6B2F00777D97 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22B5F03410CE6B2F00777D97 /* AddressBook.framework */; };
22E0A785111C1BA800B04932 /* Speaker-32-on.png in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A783111C1BA800B04932 /* Speaker-32-on.png */; };
22E0A786111C1BA800B04932 /* Speaker-32-off.png in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A784111C1BA800B04932 /* Speaker-32-off.png */; };
22E0A821111C44E100B04932 /* MoreViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81B111C44E100B04932 /* MoreViewController.xib */; };
22E0A822111C44E100B04932 /* MoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81C111C44E100B04932 /* MoreViewController.m */; };
22E0A823111C44E100B04932 /* ConsoleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81E111C44E100B04932 /* ConsoleViewController.xib */; };
22E0A824111C44E100B04932 /* ConsoleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81F111C44E100B04932 /* ConsoleViewController.m */; };
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 */; };
@ -212,6 +216,12 @@
22B5F03410CE6B2F00777D97 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
22E0A783111C1BA800B04932 /* Speaker-32-on.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Speaker-32-on.png"; path = "Resources/Speaker-32-on.png"; sourceTree = "<group>"; };
22E0A784111C1BA800B04932 /* Speaker-32-off.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Speaker-32-off.png"; path = "Resources/Speaker-32-off.png"; sourceTree = "<group>"; };
22E0A81B111C44E100B04932 /* MoreViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MoreViewController.xib; sourceTree = "<group>"; };
22E0A81C111C44E100B04932 /* MoreViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoreViewController.m; sourceTree = "<group>"; };
22E0A81D111C44E100B04932 /* MoreViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoreViewController.h; sourceTree = "<group>"; };
22E0A81E111C44E100B04932 /* ConsoleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ConsoleViewController.xib; sourceTree = "<group>"; };
22E0A81F111C44E100B04932 /* ConsoleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConsoleViewController.m; sourceTree = "<group>"; };
22E0A820111C44E100B04932 /* ConsoleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleViewController.h; 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; path = PhoneViewController.xib; sourceTree = "<group>"; };
@ -257,6 +267,12 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
22E0A81B111C44E100B04932 /* MoreViewController.xib */,
22E0A81C111C44E100B04932 /* MoreViewController.m */,
22E0A81D111C44E100B04932 /* MoreViewController.h */,
22E0A81E111C44E100B04932 /* ConsoleViewController.xib */,
22E0A81F111C44E100B04932 /* ConsoleViewController.m */,
22E0A820111C44E100B04932 /* ConsoleViewController.h */,
1D3623240D0F684500981E51 /* linphoneAppDelegate.h */,
1D3623250D0F684500981E51 /* linphoneAppDelegate.m */,
22F2508B107141E100AC9B3F /* PhoneViewController.h */,
@ -622,6 +638,8 @@
2242D91B10D66C2100E9963F /* mic_muted.png in Resources */,
22E0A785111C1BA800B04932 /* Speaker-32-on.png in Resources */,
22E0A786111C1BA800B04932 /* Speaker-32-off.png in Resources */,
22E0A821111C44E100B04932 /* MoreViewController.xib in Resources */,
22E0A823111C44E100B04932 /* ConsoleViewController.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -638,6 +656,8 @@
22B5EFE510CE5E5800777D97 /* ContactPickerDelegate.m in Sources */,
227BCDC210D4004600FBFD76 /* CallHistoryTableViewController.m in Sources */,
2242D9C910D691F900E9963F /* GenericTabViewController.m in Sources */,
22E0A822111C44E100B04932 /* MoreViewController.m in Sources */,
22E0A824111C44E100B04932 /* ConsoleViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};