Merge branch 'master' into tunnel
not fully working Conflicts: Classes/LinphoneUI/LinphoneManager.h Classes/LinphoneUI/LinphoneManager.m linphone.xcodeproj/project.pbxproj submodules/build/Makefile submodules/build/builder-iphone-os.mk submodules/build/builders.d/openssl.mk submodules/liblinphone.xcodeproj/project.pbxproj
19
.gitmodules
vendored
|
|
@ -12,7 +12,7 @@
|
|||
url = git://git.linphone.org/gsm.git
|
||||
[submodule "submodules/externals/speex"]
|
||||
path = submodules/externals/speex
|
||||
url = http://git.xiph.org/speex.git
|
||||
url = git://git.linphone.org/speex.git
|
||||
[submodule "submodules/msilbc"]
|
||||
path = submodules/msilbc
|
||||
url = git://git.linphone.org/msilbc.git
|
||||
|
|
@ -28,9 +28,24 @@
|
|||
[submodule "submodules/msamr"]
|
||||
path = submodules/msamr
|
||||
url = git://git.linphone.org/msamr.git
|
||||
[submodule "submodules/externals/ffmpeg"]
|
||||
path = submodules/externals/ffmpeg
|
||||
url = git://git.videolan.org/ffmpeg
|
||||
[submodule "submodules/externals/x264"]
|
||||
path = submodules/externals/x264
|
||||
url = git://git.videolan.org/x264.git
|
||||
[submodule "submodules/msx264"]
|
||||
path = submodules/msx264
|
||||
url = git://git.linphone.org/msx264.git
|
||||
[submodule "submodules/externals/libvpx"]
|
||||
path = submodules/externals/libvpx
|
||||
url = http://git.chromium.org/webm/libvpx.git
|
||||
[submodule "submodules/externals/zrtpcpp"]
|
||||
path = submodules/externals/zrtpcpp
|
||||
url = git://github.com/wernerd/ZRTPCPP.git
|
||||
url = git://git.linphone.org/zrtpcpp.git
|
||||
[submodule "submodules/mssilk"]
|
||||
path = submodules/mssilk
|
||||
url = git://git.linphone.org/mssilk.git
|
||||
[submodule "submodules/externals/srtp"]
|
||||
path = submodules/externals/srtp
|
||||
url = git://git.linphone.org/srtp.git
|
||||
|
|
|
|||
|
|
@ -1,86 +0,0 @@
|
|||
/* AdvancedPhoneViewController.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 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 "AdvancedPhoneViewController.h"
|
||||
|
||||
|
||||
@implementation AdvancedPhoneViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
mIncallViewController = [[IncallViewController alloc] initWithNibName:@"IncallViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
-(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[super displayDialerFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
|
||||
[mIncallViewController displayDialerFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
|
||||
}
|
||||
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
/*[super displayCallInProgressFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];*/
|
||||
|
||||
[self presentModalViewController:mIncallViewController animated:true];
|
||||
|
||||
[mIncallViewController displayCallInProgressFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
|
||||
}
|
||||
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
|
||||
if (linphone_call_get_dir(currentCall)==LinphoneCallIncoming){
|
||||
[self presentModalViewController:mIncallViewController animated:true];
|
||||
}
|
||||
|
||||
[super displayIncallFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
|
||||
[mIncallViewController displayIncallFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
|
||||
}
|
||||
-(void) displayStatus:(NSString*) message {
|
||||
[super displayStatus:message];
|
||||
[mIncallViewController displayStatus:message];
|
||||
}
|
||||
|
||||
-(void) updateUIFromLinphoneState:(UIViewController*) viewCtrl {
|
||||
[super updateUIFromLinphoneState:viewCtrl];
|
||||
|
||||
[mIncallViewController updateUIFromLinphoneState:viewCtrl];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[mIncallViewController release];
|
||||
[super dealloc];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
27
Classes/CallDelegate.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// CallDelegate.h
|
||||
// linphone
|
||||
//
|
||||
// Created by Pierre-Eric Pelloux-Prayer on 03/11/11.
|
||||
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "linphonecore.h"
|
||||
|
||||
|
||||
@protocol UIActionSheetCustomDelegate
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void*) datas;
|
||||
@end
|
||||
|
||||
|
||||
@interface CallDelegate : NSObject<UIActionSheetDelegate> {
|
||||
|
||||
LinphoneCall* call;
|
||||
id<UIActionSheetCustomDelegate> delegate;
|
||||
}
|
||||
|
||||
@property (nonatomic) LinphoneCall* call;
|
||||
@property (nonatomic, retain) id delegate;
|
||||
|
||||
@end
|
||||
20
Classes/CallDelegate.m
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// CallDelegate.m
|
||||
// linphone
|
||||
//
|
||||
// Created by Pierre-Eric Pelloux-Prayer on 03/11/11.
|
||||
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "CallDelegate.h"
|
||||
|
||||
@implementation CallDelegate
|
||||
|
||||
@synthesize call;
|
||||
@synthesize delegate;
|
||||
|
||||
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
[delegate actionSheet:actionSheet clickedButtonAtIndex:buttonIndex withUserDatas:call];
|
||||
}
|
||||
|
||||
@end
|
||||
238
Classes/ConferenceCallDetailCell.xib
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1280</int>
|
||||
<string key="IBDocument.SystemVersion">11C74</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.23</string>
|
||||
<string key="IBDocument.HIToolboxVersion">567.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">933</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUITableViewCell</string>
|
||||
<string>IBUIImageView</string>
|
||||
<string>IBUILabel</string>
|
||||
<string>IBProxyObject</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUITableViewCell" id="592306609">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIView" id="203820029">
|
||||
<reference key="NSNextResponder" ref="592306609"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIImageView" id="565632536">
|
||||
<reference key="NSNextResponder" ref="203820029"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{0, -0.5}, {80, 80}}</string>
|
||||
<reference key="NSSuperview" ref="203820029"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="874623941"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:567</string>
|
||||
<int key="IBUITag">1</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUILabel" id="874623941">
|
||||
<reference key="NSNextResponder" ref="203820029"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{79, -0.5}, {241, 80}}</string>
|
||||
<reference key="NSSuperview" ref="203820029"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:328</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<int key="IBUIContentMode">7</int>
|
||||
<int key="IBUITag">2</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">Texte de test</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">10</float>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">1</int>
|
||||
<double key="pointSize">40</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">40</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 79}</string>
|
||||
<reference key="NSSuperview" ref="592306609"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="565632536"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:395</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<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>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 80}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="203820029"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:384</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<reference key="IBUIContentView" ref="203820029"/>
|
||||
<string key="IBUIReuseIdentifier">ConferenceDetailCellIdentifier</string>
|
||||
<real value="80" key="IBUIRowHeight"/>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">conferenceDetailCell</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="592306609"/>
|
||||
</object>
|
||||
<int key="connectionID">7</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<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="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="592306609"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="565632536"/>
|
||||
<reference ref="874623941"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="565632536"/>
|
||||
<reference key="parent" ref="592306609"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="874623941"/>
|
||||
<reference key="parent" ref="592306609"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ConferenceCallDetailView</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">7</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ConferenceCallDetailView</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="addCall">UIButton</string>
|
||||
<string key="back">UIButton</string>
|
||||
<string key="conferenceDetailCell">UITableViewCell</string>
|
||||
<string key="hangup">UIButton</string>
|
||||
<string key="mute">UIButton</string>
|
||||
<string key="speaker">UIButton</string>
|
||||
<string key="table">UITableView</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="addCall">
|
||||
<string key="name">addCall</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="back">
|
||||
<string key="name">back</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="conferenceDetailCell">
|
||||
<string key="name">conferenceDetailCell</string>
|
||||
<string key="candidateClassName">UITableViewCell</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="hangup">
|
||||
<string key="name">hangup</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="mute">
|
||||
<string key="name">mute</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="speaker">
|
||||
<string key="name">speaker</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="table">
|
||||
<string key="name">table</string>
|
||||
<string key="candidateClassName">UITableView</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ConferenceCallDetailView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">933</string>
|
||||
</data>
|
||||
</archive>
|
||||
32
Classes/ConferenceCallDetailView.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//
|
||||
// ConferenceCallDetailView.h
|
||||
// linphone
|
||||
//
|
||||
// Created by Pierre-Eric Pelloux-Prayer on 25/11/11.
|
||||
// Copyright (c) 2011 Belledonne Communications. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LinphoneUI/UIMuteButton.h"
|
||||
#import "LinphoneUI/UISpeakerButton.h"
|
||||
|
||||
@interface ConferenceCallDetailView : UIViewController<UITableViewDelegate, UITableViewDataSource> {
|
||||
|
||||
UIMuteButton* mute;
|
||||
UISpeakerButton* speaker;
|
||||
UIButton* back;
|
||||
UIButton* hangup;
|
||||
UITableView* table;
|
||||
|
||||
UITableViewCell* conferenceDetailCell;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* mute;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* speaker;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* addCall;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* back;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* hangup;
|
||||
@property (nonatomic, retain) IBOutlet UITableView* table;
|
||||
|
||||
@property (nonatomic, assign) IBOutlet UITableViewCell* conferenceDetailCell;
|
||||
@end
|
||||
114
Classes/ConferenceCallDetailView.m
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
//
|
||||
// ConferenceCallDetailView.m
|
||||
// linphone
|
||||
//
|
||||
// Created by Pierre-Eric Pelloux-Prayer on 25/11/11.
|
||||
// Copyright (c) 2011 Belledonne Communications. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ConferenceCallDetailView.h"
|
||||
#import "linphonecore.h"
|
||||
#import "LinphoneManager.h"
|
||||
#import "IncallViewController.h"
|
||||
|
||||
@implementation ConferenceCallDetailView
|
||||
|
||||
@synthesize mute;
|
||||
@synthesize speaker;
|
||||
@synthesize back;
|
||||
@synthesize hangup;
|
||||
@synthesize table;
|
||||
|
||||
@synthesize conferenceDetailCell;
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
#pragma mark - View lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[back addTarget:self action:@selector(backButtonPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
table.rowHeight = 80;
|
||||
|
||||
[mute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] ];
|
||||
[speaker initWithOnImage:[UIImage imageNamed:@"HP_inverse.png"] offImage:[UIImage imageNamed:@"HP.png"] ];
|
||||
}
|
||||
|
||||
-(void) backButtonPressed {
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)viewDidUnload
|
||||
{
|
||||
[super viewDidUnload];
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
// Return YES for supported orientations
|
||||
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
||||
}
|
||||
|
||||
-(void) viewWillAppear:(BOOL)animated {
|
||||
[table reloadData];
|
||||
[mute reset];
|
||||
[speaker reset];
|
||||
}
|
||||
|
||||
#pragma mark - UITableView delegates
|
||||
-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.row % 2)
|
||||
cell.backgroundColor = [UIColor lightGrayColor];
|
||||
else
|
||||
cell.backgroundColor = [UIColor darkGrayColor];
|
||||
}
|
||||
|
||||
-(UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
static NSString* identifier = @"ConferenceDetailCellIdentifier";
|
||||
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
||||
if (cell == nil) {
|
||||
[[NSBundle mainBundle] loadNibNamed:@"ConferenceCallDetailCell" owner:self options:nil];
|
||||
cell = conferenceDetailCell;
|
||||
self.conferenceDetailCell = nil;
|
||||
}
|
||||
|
||||
/* retrieve cell's fields using tags */
|
||||
UIImageView* image = (UIImageView*) [cell viewWithTag:1];
|
||||
UILabel* label = (UILabel*) [cell viewWithTag:2];
|
||||
|
||||
/* update cell content */
|
||||
LinphoneCall* call = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:YES];
|
||||
[IncallViewController updateCellImageView:image Label:label DetailLabel:nil AndAccessoryView:nil withCall:call];
|
||||
|
||||
tableView.rowHeight = 80;//cell.bounds.size.height;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
int result = linphone_core_get_conference_size(lc) - (int)linphone_core_is_in_conference(lc);
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
478
Classes/ConferenceCallDetailView.xib
Normal file
|
|
@ -0,0 +1,478 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1280</int>
|
||||
<string key="IBDocument.SystemVersion">11C74</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.23</string>
|
||||
<string key="IBDocument.HIToolboxVersion">567.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">933</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUITableView</string>
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBProxyObject</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUITableView" id="202949628">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrameSize">{320, 328}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="502975112"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:418</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor" id="508694975">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MCAwAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
<bool key="IBUIAllowsSelection">NO</bool>
|
||||
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
|
||||
<float key="IBUIRowHeight">44</float>
|
||||
<float key="IBUISectionHeaderHeight">22</float>
|
||||
<float key="IBUISectionFooterHeight">22</float>
|
||||
</object>
|
||||
<object class="IBUIButton" id="502975112">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{107, 328}, {106, 66}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<reference key="IBUIBackgroundColor" ref="508694975"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<object class="NSColor" key="IBUIHighlightedTitleColor" id="715364517">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleShadowColor" id="129151944">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUIDisabledImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">mic_active.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUISelectedImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">micro_inverse.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">micro.png</string>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription" id="246923771">
|
||||
<int key="type">2</int>
|
||||
<int key="size">2</int>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont" id="213214630">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">18</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIButton" id="305687417">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{213, 328}, {107, 66}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1019646602"/>
|
||||
<reference key="IBUIBackgroundColor" ref="508694975"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="715364517"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA</bytes>
|
||||
</object>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="129151944"/>
|
||||
<object class="NSCustomResource" key="IBUISelectedImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">HP_inverse.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">HP.png</string>
|
||||
</object>
|
||||
<reference key="IBUIFontDescription" ref="246923771"/>
|
||||
<reference key="IBUIFont" ref="213214630"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="874802963">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{0, 394}, {320, 66}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="715364517"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
|
||||
</object>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="129151944"/>
|
||||
<object class="NSCustomResource" key="IBUINormalImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">stopcall-red.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalBackgroundImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">clavier-01-106px.png</string>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription" id="645103076">
|
||||
<string key="name">Helvetica-Bold</string>
|
||||
<string key="family">Helvetica</string>
|
||||
<int key="traits">2</int>
|
||||
<double key="pointSize">15</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont" id="1042027645">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">15</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIButton" id="1019646602">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{0, 328}, {107, 66}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="874802963"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="715364517"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||
</object>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="129151944"/>
|
||||
<object class="NSCustomResource" key="IBUINormalBackgroundImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">effacer.png</string>
|
||||
</object>
|
||||
<reference key="IBUIFontDescription" ref="645103076"/>
|
||||
<reference key="IBUIFont" ref="1042027645"/>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="202949628"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">back</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="1019646602"/>
|
||||
</object>
|
||||
<int key="connectionID">16</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">hangup</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="874802963"/>
|
||||
</object>
|
||||
<int key="connectionID">17</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">mute</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="502975112"/>
|
||||
</object>
|
||||
<int key="connectionID">18</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">speaker</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="305687417"/>
|
||||
</object>
|
||||
<int key="connectionID">19</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">20</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">table</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="202949628"/>
|
||||
</object>
|
||||
<int key="connectionID">23</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="202949628"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">21</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="202949628"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
</object>
|
||||
<int key="connectionID">22</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="874802963"/>
|
||||
<reference ref="305687417"/>
|
||||
<reference ref="202949628"/>
|
||||
<reference ref="502975112"/>
|
||||
<reference ref="1019646602"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="202949628"/>
|
||||
<array class="NSMutableArray" key="children"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="502975112"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
<string key="objectName">mute</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">11</int>
|
||||
<reference key="object" ref="874802963"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
<string key="objectName">end</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">12</int>
|
||||
<reference key="object" ref="305687417"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
<string key="objectName">speaker</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">14</int>
|
||||
<reference key="object" ref="1019646602"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
<string key="objectName">Erase</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ConferenceCallDetailView</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="10.CustomClassName">UIMuteButton</string>
|
||||
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="2" key="10.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<string key="11.CustomClassName">UIHangUpButton</string>
|
||||
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="12.CustomClassName">UISpeakerButton</string>
|
||||
<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="1" key="12.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<string key="14.CustomClassName">UIEraseButton</string>
|
||||
<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">23</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ConferenceCallDetailView</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="addCall">UIButton</string>
|
||||
<string key="back">UIButton</string>
|
||||
<string key="conferenceDetailCell">UITableViewCell</string>
|
||||
<string key="hangup">UIButton</string>
|
||||
<string key="mute">UIButton</string>
|
||||
<string key="speaker">UIButton</string>
|
||||
<string key="table">UITableView</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="addCall">
|
||||
<string key="name">addCall</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="back">
|
||||
<string key="name">back</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="conferenceDetailCell">
|
||||
<string key="name">conferenceDetailCell</string>
|
||||
<string key="candidateClassName">UITableViewCell</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="hangup">
|
||||
<string key="name">hangup</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="mute">
|
||||
<string key="name">mute</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="speaker">
|
||||
<string key="name">speaker</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="table">
|
||||
<string key="name">table</string>
|
||||
<string key="candidateClassName">UITableView</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ConferenceCallDetailView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIEraseButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIEraseButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIHangUpButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIHangUpButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIMuteButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIMuteButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISpeakerButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UISpeakerButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIToggleButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIToggleButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="HP.png">{107, 67}</string>
|
||||
<string key="HP_inverse.png">{107, 67}</string>
|
||||
<string key="clavier-01-106px.png">{106, 60}</string>
|
||||
<string key="effacer.png">{66, 65}</string>
|
||||
<string key="mic_active.png">{20, 20}</string>
|
||||
<string key="micro.png">{107, 67}</string>
|
||||
<string key="micro_inverse.png">{107, 67}</string>
|
||||
<string key="stopcall-red.png">{62, 54}</string>
|
||||
</dictionary>
|
||||
<string key="IBCocoaTouchPluginVersion">933</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
@ -1,14 +1,21 @@
|
|||
/*
|
||||
* ConsoleViewController.h
|
||||
/*ConsoleViewController.h
|
||||
*
|
||||
* Description:
|
||||
* Copyright (C) 2010 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
*
|
||||
* Belledonne Communications (C) 2010
|
||||
*
|
||||
* Copyright: See COPYING file that comes with this distribution
|
||||
*
|
||||
*/
|
||||
* 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 "ConsoleViewController.h"
|
||||
|
|
|
|||
|
|
@ -19,25 +19,25 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import "linphonecore.h"
|
||||
#import "PhoneViewController.h"
|
||||
#import "ConferenceCallDetailView.h"
|
||||
#import <AddressBookUI/ABPeoplePickerNavigationController.h>
|
||||
#include "UILinphone.h"
|
||||
@class VideoViewController;
|
||||
|
||||
|
||||
@interface IncallViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate,LinphoneUICallDelegate> {
|
||||
@interface IncallViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate,LinphoneUICallDelegate, UITableViewDelegate, UITableViewDataSource, UIActionSheetCustomDelegate> {
|
||||
|
||||
|
||||
UIView* controlSubView;
|
||||
UIView* controlSubView, *callControlSubView, *hangUpView;
|
||||
|
||||
UILabel* peerName;
|
||||
UILabel* peerNumber;
|
||||
UIDuration* callDuration;
|
||||
UILabel* status;
|
||||
UIHangUpButton* endCtrl;
|
||||
UIButton* endCtrl;
|
||||
UIButton* dialer;
|
||||
UIMuteButton* mute;
|
||||
UIPauseResumeButton* pause;
|
||||
UIButton* pause;
|
||||
UISpeakerButton* speaker;
|
||||
UIButton* contacts;
|
||||
UIButton* addVideo;
|
||||
UITableView* callTableView;
|
||||
UIButton* addCall, *mergeCalls, *addToConf;
|
||||
|
||||
|
||||
//key pad
|
||||
|
|
@ -55,30 +55,55 @@
|
|||
UIDigitButton* star;
|
||||
UIDigitButton* zero;
|
||||
UIDigitButton* hash;
|
||||
UIHangUpButton* endPad;
|
||||
UIButton* close;
|
||||
|
||||
bool dismissed;
|
||||
|
||||
NSTimer *durationRefreasher;
|
||||
NSTimer * glowingTimer;
|
||||
|
||||
float glow;
|
||||
NSIndexPath* activePath;
|
||||
|
||||
ABPeoplePickerNavigationController* myPeoplePickerController;
|
||||
|
||||
UITableViewCell* activeCallCell;
|
||||
|
||||
VideoViewController* mVideoViewController;
|
||||
ConferenceCallDetailView* conferenceDetail;
|
||||
BOOL mVideoShown;
|
||||
BOOL mVideoIsPending;
|
||||
BOOL mIncallViewIsReady;
|
||||
|
||||
UIImage* verified, *unverified;
|
||||
UIActionSheet* zrtpVerificationSheet;
|
||||
}
|
||||
|
||||
-(void)displayStatus:(NSString*) message;
|
||||
|
||||
- (IBAction)doAction:(id)sender;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* controlSubView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* padSubView;
|
||||
+(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf;
|
||||
+ (void) updateCellImageView:(UIImageView*)imageView Label:(UILabel*)label DetailLabel:(UILabel*)detailLabel AndAccessoryView:(UIButton*)accessoryView withCall:(LinphoneCall*) call;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* controlSubView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* callControlSubView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* padSubView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* hangUpView;
|
||||
@property (nonatomic, retain) IBOutlet UIViewController* conferenceDetail;
|
||||
|
||||
|
||||
@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* endCtrl;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* dialer;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* mute;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* pause;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* speaker;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* contacts;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* addVideo;
|
||||
@property (nonatomic, retain) IBOutlet UITableView* callTableView;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* addCall;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* mergeCalls;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* addToConf;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* one;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* two;
|
||||
|
|
@ -93,5 +118,5 @@
|
|||
@property (nonatomic, retain) IBOutlet UIButton* zero;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* hash;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* close;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* endPad;
|
||||
@property (nonatomic, retain) IBOutlet VideoViewController* videoViewController;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -18,20 +18,22 @@
|
|||
*/
|
||||
#import "IncallViewController.h"
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <AddressBook/AddressBook.h>
|
||||
#import "linphonecore.h"
|
||||
|
||||
|
||||
#include "LinphoneManager.h"
|
||||
#include "private.h"
|
||||
#import "ContactPickerDelegate.h"
|
||||
|
||||
@implementation IncallViewController
|
||||
|
||||
|
||||
@synthesize controlSubView;
|
||||
@synthesize callControlSubView;
|
||||
@synthesize padSubView;
|
||||
@synthesize hangUpView;
|
||||
@synthesize conferenceDetail;
|
||||
|
||||
@synthesize peerName;
|
||||
@synthesize peerNumber;
|
||||
@synthesize callDuration;
|
||||
@synthesize status;
|
||||
@synthesize addToConf;
|
||||
@synthesize endCtrl;
|
||||
@synthesize close;
|
||||
@synthesize mute;
|
||||
|
|
@ -39,6 +41,9 @@
|
|||
@synthesize dialer;
|
||||
@synthesize speaker;
|
||||
@synthesize contacts;
|
||||
@synthesize callTableView;
|
||||
@synthesize addCall;
|
||||
@synthesize mergeCalls;
|
||||
|
||||
@synthesize one;
|
||||
@synthesize two;
|
||||
|
|
@ -52,7 +57,7 @@
|
|||
@synthesize star;
|
||||
@synthesize zero;
|
||||
@synthesize hash;
|
||||
@synthesize endPad;
|
||||
@synthesize videoViewController;
|
||||
|
||||
/*
|
||||
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
|
||||
|
|
@ -66,14 +71,34 @@
|
|||
*/
|
||||
|
||||
|
||||
bool isInConference(LinphoneCall* call) {
|
||||
if (!call)
|
||||
return false;
|
||||
return linphone_call_get_current_params(call)->in_conference;
|
||||
}
|
||||
|
||||
int callCount(LinphoneCore* lc) {
|
||||
int count = 0;
|
||||
const MSList* calls = linphone_core_get_calls(lc);
|
||||
|
||||
while (calls != 0) {
|
||||
if (!isInConference((LinphoneCall*)calls->data)) {
|
||||
count++;
|
||||
}
|
||||
calls = calls->next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
//Controls
|
||||
[mute initWithOnImage:[UIImage imageNamed:@"mic_muted.png"] offImage:[UIImage imageNamed:@"mic_active.png"] ];
|
||||
[pause initWithOnImage:[UIImage imageNamed:@"resumecall.png"] offImage:[UIImage imageNamed:@"pausecall.png"] ];
|
||||
[speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ];
|
||||
|
||||
[mute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] ];
|
||||
[speaker initWithOnImage:[UIImage imageNamed:@"HP_inverse.png"] offImage:[UIImage imageNamed:@"HP.png"] ];
|
||||
|
||||
verified = [[UIImage imageNamed:@"secured.png"] retain];
|
||||
unverified = [[UIImage imageNamed:@"unverified.png"] retain];
|
||||
|
||||
//Dialer init
|
||||
[zero initWithNumber:'0'];
|
||||
|
|
@ -88,50 +113,274 @@
|
|||
[nine initWithNumber:'9'];
|
||||
[star initWithNumber:'*'];
|
||||
[hash initWithNumber:'#'];
|
||||
|
||||
[addCall addTarget:self action:@selector(addCallPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
[mergeCalls addTarget:self action:@selector(mergeCallsPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
//[endCtrl addTarget:self action:@selector(endCallPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
[addToConf addTarget:self action:@selector(addToConfCallPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
[pause addTarget:self action:@selector(pauseCallPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
[mergeCalls setHidden:YES];
|
||||
mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
|
||||
|
||||
conferenceDetail = [[ConferenceCallDetailView alloc] initWithNibName:@"ConferenceCallDetailView"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
|
||||
mVideoShown=FALSE;
|
||||
mIncallViewIsReady=FALSE;
|
||||
mVideoIsPending=FALSE;
|
||||
//selectedCall = nil;
|
||||
|
||||
callTableView.rowHeight = 80;
|
||||
|
||||
}
|
||||
|
||||
-(void) addCallPressed {
|
||||
[self dismissModalViewControllerAnimated:true];
|
||||
}
|
||||
|
||||
|
||||
-(void) mergeCallsPressed {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
linphone_core_add_all_to_conference(lc);
|
||||
}
|
||||
|
||||
-(void) addToConfCallPressed {
|
||||
LinphoneCall* selectedCall = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
if (!selectedCall)
|
||||
return;
|
||||
linphone_core_add_to_conference([LinphoneManager getLc], selectedCall);
|
||||
}
|
||||
|
||||
-(void) pauseCallPressed {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
|
||||
LinphoneCall* currentCall = linphone_core_get_current_call(lc);
|
||||
if (currentCall) {
|
||||
if (linphone_call_get_state(currentCall) == LinphoneCallStreamsRunning) {
|
||||
[pause setSelected:NO];
|
||||
linphone_core_pause_call(lc, currentCall);
|
||||
}
|
||||
} else {
|
||||
if (linphone_core_get_calls_nb(lc) == 1) {
|
||||
LinphoneCall* c = (LinphoneCall*) linphone_core_get_calls(lc)->data;
|
||||
if (linphone_call_get_state(c) == LinphoneCallPaused) {
|
||||
linphone_core_resume_call(lc, c);
|
||||
[pause setSelected:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void)updateCallsDurations {
|
||||
[self updateUIFromLinphoneState: nil];
|
||||
}
|
||||
|
||||
-(void) viewWillAppear:(BOOL)animated {}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
if (dismissed) {
|
||||
[self dismissModalViewControllerAnimated:true];
|
||||
} else {
|
||||
[self updateCallsDurations];
|
||||
durationRefreasher = [NSTimer scheduledTimerWithTimeInterval:1
|
||||
target:self
|
||||
selector:@selector(updateCallsDurations)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
glowingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
|
||||
target:self
|
||||
selector:@selector(updateGlow)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
glow = 0;
|
||||
mIncallViewIsReady=TRUE;
|
||||
if (mVideoIsPending) {
|
||||
mVideoIsPending=FALSE;
|
||||
[self displayVideoCall:nil FromUI:self
|
||||
forUser:nil
|
||||
withDisplayName:nil];
|
||||
|
||||
}
|
||||
|
||||
|
||||
UIDevice* device = [UIDevice currentDevice];
|
||||
if ([device respondsToSelector:@selector(isMultitaskingSupported)]
|
||||
&& [device isMultitaskingSupported]) {
|
||||
bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"];
|
||||
bool startVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"];
|
||||
if (enableVideo && !startVideo) {
|
||||
[addVideo setHidden:FALSE];
|
||||
[contacts setHidden:TRUE];
|
||||
} else {
|
||||
[addVideo setHidden:TRUE];
|
||||
[contacts setHidden:FALSE];
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
-(void) viewWillDisappear:(BOOL)animated {
|
||||
if (zrtpVerificationSheet != nil) {
|
||||
[zrtpVerificationSheet dismissWithClickedButtonIndex:2 animated:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) viewDidDisappear:(BOOL)animated {
|
||||
if (durationRefreasher != nil) {
|
||||
[durationRefreasher invalidate];
|
||||
durationRefreasher=nil;
|
||||
[glowingTimer invalidate];
|
||||
glowingTimer = nil;
|
||||
}
|
||||
if (!mVideoShown) [[UIApplication sharedApplication] setIdleTimerDisabled:false];
|
||||
mIncallViewIsReady=FALSE;
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
|
||||
|
||||
[verified release];
|
||||
[unverified release];
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(void) displayStatus:(NSString*) message; {
|
||||
[status setText:message];
|
||||
|
||||
}
|
||||
|
||||
-(void) displayPad:(bool) enable {
|
||||
[callTableView setHidden:enable];
|
||||
[hangUpView setHidden:enable];
|
||||
[controlSubView setHidden:enable];
|
||||
[padSubView setHidden:!enable];
|
||||
}
|
||||
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
-(void) displayCall:(LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
//restaure view
|
||||
[self displayPad:false];
|
||||
|
||||
if (displayName && [displayName length]>0) {
|
||||
[peerName setText:displayName];
|
||||
[peerNumber setText:username];
|
||||
} else {
|
||||
[peerName setText:username];
|
||||
[peerNumber setText:@""];
|
||||
}
|
||||
[callDuration setText:@"Calling"];
|
||||
dismissed = false;
|
||||
UIDevice *device = [UIDevice currentDevice];
|
||||
device.proximityMonitoringEnabled = YES;
|
||||
if ([speaker isOn])
|
||||
[speaker toggle];
|
||||
[self updateUIFromLinphoneState: nil];
|
||||
}
|
||||
|
||||
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[callDuration start];
|
||||
-(void) displayIncomingCall:(LinphoneCall *)call NotificationFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
|
||||
|
||||
}
|
||||
|
||||
-(void) dismissVideoView {
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
|
||||
[self dismissModalViewControllerAnimated:FALSE];//just in case
|
||||
mVideoShown=FALSE;
|
||||
}
|
||||
-(void) displayInCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
dismissed = false;
|
||||
UIDevice *device = [UIDevice currentDevice];
|
||||
device.proximityMonitoringEnabled = YES;
|
||||
if (call !=nil && linphone_call_get_dir(call)==LinphoneCallIncoming) {
|
||||
if ([speaker isOn]) [speaker toggle];
|
||||
}
|
||||
[self updateUIFromLinphoneState: nil];
|
||||
if (self.presentedViewController == (UIViewController*)mVideoViewController) {
|
||||
[self dismissVideoView];
|
||||
}
|
||||
}
|
||||
-(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[callDuration stop];
|
||||
[self dismissModalViewControllerAnimated:true];
|
||||
UIViewController* modalVC = self.modalViewController;
|
||||
UIDevice *device = [UIDevice currentDevice];
|
||||
device.proximityMonitoringEnabled = NO;
|
||||
if (modalVC != nil) {
|
||||
// clear previous native window ids
|
||||
if (modalVC == mVideoViewController) {
|
||||
mVideoShown=FALSE;
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc],0);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],0);
|
||||
}
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
|
||||
[self dismissModalViewControllerAnimated:FALSE];//just in case
|
||||
}
|
||||
|
||||
[self dismissModalViewControllerAnimated:FALSE]; //disable animation to avoid blanc bar just below status bar*/
|
||||
dismissed = true;
|
||||
[self updateUIFromLinphoneState: nil];
|
||||
}
|
||||
-(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
if (mIncallViewIsReady) {
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
|
||||
mVideoShown=TRUE;
|
||||
[self presentModalViewController:mVideoViewController animated:true];
|
||||
} else {
|
||||
//postepone presentation
|
||||
mVideoIsPending=TRUE;
|
||||
}
|
||||
}
|
||||
-(void) updateUIFromLinphoneState:(UIViewController *)viewCtrl {
|
||||
activeCallCell = nil;
|
||||
[mute reset];
|
||||
[pause reset];
|
||||
// if (
|
||||
// [pause reset];
|
||||
|
||||
|
||||
LinphoneCore* lc;
|
||||
|
||||
@try {
|
||||
lc = [LinphoneManager getLc];
|
||||
|
||||
if (callCount([LinphoneManager getLc]) > 1) {
|
||||
[pause setHidden:YES];
|
||||
[mergeCalls setHidden:NO];
|
||||
} else {
|
||||
[pause setHidden:NO];
|
||||
[mergeCalls setHidden:YES];
|
||||
}
|
||||
|
||||
[callTableView reloadData];
|
||||
} @catch (NSException* exc) {
|
||||
return;
|
||||
}
|
||||
LinphoneCall* selectedCall = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
// hide call control subview if no call selected
|
||||
[callControlSubView setHidden:(selectedCall == NULL)];
|
||||
// hide add to conf if no conf exist
|
||||
if (!callControlSubView.hidden) {
|
||||
[addToConf setHidden:(linphone_core_get_conference_size(lc) == 0 ||
|
||||
isInConference(selectedCall))];
|
||||
}
|
||||
int callsCount = linphone_core_get_calls_nb(lc);
|
||||
// hide pause/resume if in conference
|
||||
if (selectedCall) {
|
||||
if (linphone_core_is_in_conference(lc))
|
||||
[pause setHidden:YES];
|
||||
else if (callCount(lc) == callsCount && callsCount == 1) {
|
||||
[pause setHidden:NO];
|
||||
pause.selected = NO;
|
||||
} else {
|
||||
[pause setHidden:YES];
|
||||
}
|
||||
} else {
|
||||
if (callsCount == 1) {
|
||||
LinphoneCall* c = (LinphoneCall*)linphone_core_get_calls(lc)->data;
|
||||
if (linphone_call_get_state(c) == LinphoneCallPaused ||
|
||||
linphone_call_get_state(c) == LinphoneCallPausing) {
|
||||
[pause setHidden:NO];
|
||||
pause.selected = YES;
|
||||
}
|
||||
[pause setHidden:NO];
|
||||
} else {
|
||||
[pause setHidden:YES];
|
||||
}
|
||||
}
|
||||
[mergeCalls setHidden:!pause.hidden];
|
||||
|
||||
// update conference details view if diaplsyed
|
||||
if (self.presentedViewController == conferenceDetail) {
|
||||
if (!linphone_core_is_in_conference(lc))
|
||||
[self dismissModalViewControllerAnimated:YES];
|
||||
else
|
||||
[conferenceDetail.table reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)doAction:(id)sender {
|
||||
|
|
@ -142,7 +391,7 @@
|
|||
} else if (sender == contacts) {
|
||||
// start people picker
|
||||
myPeoplePickerController = [[[ABPeoplePickerNavigationController alloc] init] autorelease];
|
||||
[myPeoplePickerController setPeoplePickerDelegate:self];
|
||||
[myPeoplePickerController setPeoplePickerDelegate:[[ContactPickerDelegate alloc] init] /*self*/];
|
||||
|
||||
[self presentModalViewController: myPeoplePickerController animated:true];
|
||||
} else if (sender == close) {
|
||||
|
|
@ -174,7 +423,342 @@
|
|||
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
+(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf{
|
||||
const MSList* calls = linphone_core_get_calls([LinphoneManager getLc]);
|
||||
|
||||
if (!conf && linphone_core_get_conference_size([LinphoneManager getLc]))
|
||||
index--;
|
||||
|
||||
while (calls != 0) {
|
||||
if (isInConference((LinphoneCall*)calls->data) == conf) {
|
||||
if (index == 0)
|
||||
break;
|
||||
index--;
|
||||
}
|
||||
calls = calls->next;
|
||||
}
|
||||
|
||||
if (calls == 0) {
|
||||
ms_error("Cannot find call with index %d (in conf: %d)", index, conf);
|
||||
return nil;
|
||||
} else {
|
||||
return (LinphoneCall*)calls->data;
|
||||
}
|
||||
}
|
||||
|
||||
-(void) updateActive:(bool_t)active cell:(UITableViewCell*) cell {
|
||||
if (!active) {
|
||||
|
||||
cell.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.2];
|
||||
|
||||
UIColor* c = [[UIColor blackColor] colorWithAlphaComponent:0.5];
|
||||
[cell.textLabel setTextColor:c];
|
||||
[cell.detailTextLabel setTextColor:c];
|
||||
} else {
|
||||
cell.backgroundColor = [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:(0.7+sin(2*glow)*0.3)];
|
||||
[cell.textLabel setTextColor:[UIColor whiteColor]];
|
||||
[cell.detailTextLabel setTextColor:[UIColor whiteColor]];
|
||||
}
|
||||
[cell.textLabel setBackgroundColor:[UIColor clearColor]];
|
||||
[cell.detailTextLabel setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
|
||||
-(void) updateGlow {
|
||||
if (!activeCallCell)
|
||||
return;
|
||||
|
||||
glow += 0.1;
|
||||
|
||||
[self updateActive:YES cell:activeCallCell];
|
||||
[activeCallCell.backgroundView setNeedsDisplay];
|
||||
[activeCallCell setNeedsDisplay];
|
||||
[callTableView setNeedsDisplay];
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[self updateActive:(cell == activeCallCell) cell:cell];
|
||||
}
|
||||
|
||||
+ (void) updateCellImageView:(UIImageView*)imageView Label:(UILabel*)label DetailLabel:(UILabel*)detailLabel AndAccessoryView:(UIButton*)accessoryView withCall:(LinphoneCall*) call {
|
||||
if (call == NULL) {
|
||||
ms_warning("UpdateCell called with null call");
|
||||
[label setText:@""];
|
||||
return;
|
||||
}
|
||||
const LinphoneAddress* addr = linphone_call_get_remote_address(call);
|
||||
|
||||
if (addr) {
|
||||
const char* lUserNameChars=linphone_address_get_username(addr);
|
||||
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithUTF8String:lUserNameChars]:NSLocalizedString(@"Unknown",nil);
|
||||
NSMutableString* mss = [[NSMutableString alloc] init];
|
||||
/* contact name */
|
||||
const char* n = linphone_address_get_display_name(addr);
|
||||
if (n)
|
||||
[mss appendFormat:@"%s", n, nil];
|
||||
else
|
||||
[mss appendFormat:@"%@",lUserName , nil];
|
||||
|
||||
if ([mss compare:label.text] != 0 || imageView.image == nil) {
|
||||
[label setText:mss];
|
||||
|
||||
imageView.image = [[LinphoneManager instance] getImageFromAddressBook:lUserName];
|
||||
}
|
||||
[mss release];
|
||||
[lUserName release];
|
||||
} else {
|
||||
[label setText:@"plop"];
|
||||
imageView.image = nil;
|
||||
}
|
||||
|
||||
if (detailLabel != nil) {
|
||||
NSMutableString* ms = [[NSMutableString alloc] init ];
|
||||
if (linphone_call_get_state(call) == LinphoneCallStreamsRunning) {
|
||||
int duration = linphone_call_get_duration(call);
|
||||
if (duration >= 60)
|
||||
[ms appendFormat:@"%02i:%02i", (duration/60), duration - 60*(duration/60), nil];
|
||||
else
|
||||
[ms appendFormat:@"%02i sec", duration, nil];
|
||||
} else {
|
||||
switch (linphone_call_get_state(call)) {
|
||||
case LinphoneCallPaused:
|
||||
[ms appendFormat:@"%@", NSLocalizedString(@"Paused (tap to resume)", nil), nil];
|
||||
break;
|
||||
case LinphoneCallOutgoingProgress:
|
||||
[ms appendFormat:@"%@...", NSLocalizedString(@"In progress", nil), nil];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
[detailLabel setText:ms];
|
||||
[ms release];
|
||||
}
|
||||
|
||||
if (accessoryView != nil) {
|
||||
/*
|
||||
LinphoneMediaEncryption enc = linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
|
||||
if (enc != LinphoneMediaEncryptionNone) {
|
||||
if (accessoryView.imageView.image == nil) {
|
||||
if (enc == LinphoneMediaEncryptionSRTP || linphone_call_get_authentication_token_verified(call)) {
|
||||
[accessoryView setImage: verified forState:UIControlStateNormal];
|
||||
} else {
|
||||
[accessoryView setImage: unverified forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
[accessoryView setImage: (UIImage*)nil forState:UIControlStateNormal];
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void) updateConferenceCell:(UITableViewCell*) cell at:(NSIndexPath*)indexPath {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
|
||||
NSString* t= [NSString stringWithFormat:
|
||||
NSLocalizedString(@"Conference", nil),
|
||||
linphone_core_get_conference_size(lc) - linphone_core_is_in_conference(lc)];
|
||||
[cell.textLabel setText:t];
|
||||
|
||||
[self updateActive:NO cell:cell];
|
||||
cell.selected = NO;
|
||||
|
||||
[callTableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
|
||||
if (!linphone_core_is_in_conference(lc)) {
|
||||
[cell.detailTextLabel setText:NSLocalizedString(@"(tap to enter conference)", nil)];
|
||||
} else {
|
||||
[cell.detailTextLabel setText:
|
||||
[NSString stringWithFormat:NSLocalizedString(@"(me + %d participants)", nil), linphone_core_get_conference_size(lc) - linphone_core_is_in_conference(lc)]];
|
||||
}
|
||||
cell.imageView.image = nil;
|
||||
}
|
||||
|
||||
-(void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
// show conference detail view
|
||||
[self presentModalViewController:conferenceDetail animated:true];
|
||||
|
||||
}
|
||||
|
||||
// UITableViewDataSource (required)
|
||||
- (UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UITableViewCell *cell = [callTableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
|
||||
if (cell == nil) {
|
||||
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"] autorelease];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
cell.textLabel.font = [UIFont systemFontOfSize:40];
|
||||
cell.textLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight;
|
||||
}
|
||||
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
if (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0) {
|
||||
[self updateConferenceCell:cell at:indexPath];
|
||||
if (linphone_core_is_in_conference(lc))
|
||||
activeCallCell = cell;
|
||||
cell.accessoryView = nil;
|
||||
if (linphone_core_is_in_conference(lc))
|
||||
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
|
||||
else
|
||||
cell.accessoryType = UITableViewCellAccessoryNone;
|
||||
} else {
|
||||
if (cell.accessoryView == nil) {
|
||||
UIButton* b = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[b setFrame:CGRectMake(0, 0, 28, 28)];
|
||||
[b setImage:nil forState:UIControlStateNormal];
|
||||
b.backgroundColor = [UIColor clearColor];
|
||||
b.userInteractionEnabled = YES;
|
||||
cell.accessoryView = b;
|
||||
}
|
||||
LinphoneCall* call = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:NO];
|
||||
if (call == nil)
|
||||
return nil;
|
||||
[IncallViewController updateCellImageView:cell.imageView Label:cell.textLabel DetailLabel:cell.detailTextLabel AndAccessoryView:(UIButton*)cell.accessoryView withCall:call];
|
||||
if (linphone_core_get_current_call(lc) == call)
|
||||
activeCallCell = cell;
|
||||
cell.accessoryType = UITableViewCellAccessoryNone;
|
||||
|
||||
LinphoneMediaEncryption enc = linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
|
||||
|
||||
UIButton* accessoryBtn = (UIButton*) cell.accessoryView;
|
||||
if (enc != LinphoneMediaEncryptionNone) {
|
||||
if (enc == LinphoneMediaEncryptionSRTP || linphone_call_get_authentication_token_verified(call)) {
|
||||
[accessoryBtn setImage: verified forState:UIControlStateNormal];
|
||||
} else {
|
||||
[accessoryBtn setImage: unverified forState:UIControlStateNormal];
|
||||
}
|
||||
} else {
|
||||
[accessoryBtn setImage: (UIImage*)nil forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
if (((UIButton*)cell.accessoryView).imageView.image != nil && linphone_call_params_get_media_encryption(linphone_call_get_current_params(call)) == LinphoneMediaEncryptionZRTP) {
|
||||
[((UIButton*)cell.accessoryView) addTarget:self action:@selector(secureIconPressed:withEvent:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
}
|
||||
|
||||
cell.userInteractionEnabled = YES;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void) secureIconPressed:(UIControl*) button withEvent: (UIEvent*) evt {
|
||||
NSSet* touches = [evt allTouches];
|
||||
UITouch* touch = [touches anyObject];
|
||||
CGPoint currentTouchPos = [touch locationInView:self.callTableView];
|
||||
NSIndexPath *path = [self.callTableView indexPathForRowAtPoint:currentTouchPos];
|
||||
if (path) {
|
||||
LinphoneCall* call = [IncallViewController retrieveCallAtIndex:path.row inConference:NO];
|
||||
// start action sheet to validate/unvalidate zrtp code
|
||||
CallDelegate* cd = [[CallDelegate alloc] init];
|
||||
cd.delegate = self;
|
||||
cd.call = call;
|
||||
|
||||
[(UIButton*)[callTableView cellForRowAtIndexPath:path].accessoryView setImage:nil forState:UIControlStateNormal];
|
||||
|
||||
zrtpVerificationSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" Mark auth token '%s' as:",nil),linphone_call_get_authentication_token(call)]
|
||||
delegate:cd
|
||||
cancelButtonTitle:NSLocalizedString(@"Unverified",nil)
|
||||
destructiveButtonTitle:NSLocalizedString(@"Verified",nil)
|
||||
otherButtonTitles:nil];
|
||||
|
||||
zrtpVerificationSheet.actionSheetStyle = UIActionSheetStyleDefault;
|
||||
[zrtpVerificationSheet showInView:self.view];
|
||||
[zrtpVerificationSheet release];
|
||||
}
|
||||
}
|
||||
|
||||
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas {
|
||||
LinphoneCall* call = (LinphoneCall*)datas;
|
||||
// maybe we could verify call validity
|
||||
|
||||
if (buttonIndex == 0)
|
||||
linphone_call_set_authentication_token_verified(call, YES);
|
||||
else if (buttonIndex == 1)
|
||||
linphone_call_set_authentication_token_verified(call, NO);
|
||||
zrtpVerificationSheet = nil;
|
||||
}
|
||||
|
||||
// UITableViewDataSource (required)
|
||||
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
|
||||
return callCount(lc) + (int)(linphone_core_get_conference_size(lc) > 0);
|
||||
|
||||
if (section == 0 && linphone_core_get_conference_size(lc) > 0)
|
||||
return linphone_core_get_conference_size(lc) - linphone_core_is_in_conference(lc);
|
||||
|
||||
return callCount(lc);
|
||||
}
|
||||
|
||||
// UITableViewDataSource
|
||||
- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
int count = 0;
|
||||
|
||||
if (callCount(lc) > 0)
|
||||
count++;
|
||||
|
||||
if (linphone_core_get_conference_size([LinphoneManager getLc]) > 0)
|
||||
count ++;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
// UITableViewDataSource
|
||||
//- (NSArray*) sectionIndexTitlesForTableView:(UITableView *)tableView {
|
||||
// return [NSArray arrayWithObjects:@"Conf", @"Calls", nil ];
|
||||
//}
|
||||
|
||||
// UITableViewDataSource
|
||||
- (NSString*) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return nil;
|
||||
return @"Calls";
|
||||
if (section == 0 && linphone_core_get_conference_size([LinphoneManager getLc]) > 0)
|
||||
return @"Conference";
|
||||
else
|
||||
return @"Calls";
|
||||
}
|
||||
|
||||
// UITableViewDataSource
|
||||
- (NSString*) tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
|
||||
//[[callTableView cellForRowAtIndexPath:indexPath] setSelected:YES animated:NO];
|
||||
|
||||
bool inConf = (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0);
|
||||
|
||||
LinphoneCall* selectedCall = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:inConf];
|
||||
|
||||
if (inConf) {
|
||||
if (linphone_core_is_in_conference(lc))
|
||||
return;
|
||||
LinphoneCall* current = linphone_core_get_current_call(lc);
|
||||
if (current)
|
||||
linphone_core_pause_call(lc, current);
|
||||
linphone_core_enter_conference([LinphoneManager getLc]);
|
||||
} else if (selectedCall) {
|
||||
if (linphone_core_is_in_conference(lc)) {
|
||||
linphone_core_leave_conference(lc);
|
||||
}
|
||||
linphone_core_resume_call([LinphoneManager getLc], selectedCall);
|
||||
}
|
||||
|
||||
[self updateUIFromLinphoneState: nil];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#import "ConsoleViewController.h"
|
||||
#import "MoreViewController.h"
|
||||
#include "CallHistoryTableViewController.h"
|
||||
|
||||
#include "LinphoneManager.h"
|
||||
|
||||
|
|
@ -51,10 +52,16 @@
|
|||
return;
|
||||
}
|
||||
|
||||
NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Root.plist"]];
|
||||
NSArray *preferences = [settings objectForKey:@"PreferenceSpecifiers"];
|
||||
|
||||
NSMutableDictionary *rootSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Root.plist"]];
|
||||
NSMutableDictionary *audioSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"audio.plist"]];
|
||||
NSMutableDictionary *videoSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"video.plist"]];
|
||||
|
||||
NSMutableArray *preferences = [rootSettings objectForKey:@"PreferenceSpecifiers"];
|
||||
[preferences addObjectsFromArray:[audioSettings objectForKey:@"PreferenceSpecifiers"]];
|
||||
[preferences addObjectsFromArray:[videoSettings objectForKey:@"PreferenceSpecifiers"]];
|
||||
|
||||
NSMutableDictionary *defaultsToRegister = [[NSMutableDictionary alloc] initWithCapacity:[preferences count]];
|
||||
|
||||
for(NSDictionary *prefSpecification in preferences) {
|
||||
NSString *key = [prefSpecification objectForKey:@"Key"];
|
||||
if(key && [prefSpecification objectForKey:@"DefaultValue"]) {
|
||||
|
|
@ -67,11 +74,8 @@
|
|||
#ifdef HAVE_AMR
|
||||
@"YES",@"amr_8k_preference", // enable amr by default if compiled with
|
||||
#endif
|
||||
#ifdef HAVE_SILK
|
||||
@"YES",@"silk_16k_preference", // enable amr by default if compiled with
|
||||
@"YES",@"silk_24k_preference", // enable amr by default if compiled with
|
||||
#endif
|
||||
//@"+33",@"countrycode_preference",
|
||||
@"NO",@"debugenable_preference",
|
||||
//@"+33",@"countrycode_preference",
|
||||
nil];
|
||||
|
||||
[defaultsToRegister addEntriesFromDictionary:appDefaults];
|
||||
|
|
@ -142,9 +146,14 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
|
||||
linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
|
||||
LinphoneCall* call;
|
||||
[(NSData*)([notification.userInfo objectForKey:@"call"]) getBytes:&call];
|
||||
if (!call) {
|
||||
ms_warning("Local notification received with nil call");
|
||||
return;
|
||||
}
|
||||
linphone_core_accept_call([LinphoneManager getLc], call);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@
|
|||
@end
|
||||
|
||||
@interface FastAddressBook : NSObject {
|
||||
NSMutableDictionary* mAddressBookMap;
|
||||
NSMutableDictionary* mAddressBookMap;
|
||||
|
||||
ABAddressBookRef addressBook;
|
||||
}
|
||||
|
||||
-(Contact*) getMatchingRecord:(NSString*) number ;
|
||||
|
|
@ -38,4 +40,6 @@
|
|||
+(NSString*) normalizePhoneNumber:(NSString*) number ;
|
||||
-(id) init ;
|
||||
|
||||
@property (nonatomic, readonly) ABAddressBookRef addressBook;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
#import "FastAddressBook.h"
|
||||
@implementation FastAddressBook
|
||||
|
||||
@synthesize addressBook;
|
||||
|
||||
-(Contact*) getMatchingRecord:(NSString*) number {
|
||||
@synchronized (mAddressBookMap){
|
||||
return (Contact*) [mAddressBookMap objectForKey:number];
|
||||
|
|
@ -71,9 +73,9 @@ void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void
|
|||
-(FastAddressBook*) init {
|
||||
if ((self = [super init])) {
|
||||
mAddressBookMap = [[NSMutableDictionary alloc] init];
|
||||
ABAddressBookRef lAddressBook = ABAddressBookCreate();
|
||||
ABAddressBookRegisterExternalChangeCallback (lAddressBook,sync_address_book,mAddressBookMap);
|
||||
sync_address_book(lAddressBook,nil,mAddressBookMap);
|
||||
addressBook = ABAddressBookCreate();
|
||||
ABAddressBookRegisterExternalChangeCallback (addressBook,sync_address_book,mAddressBookMap);
|
||||
sync_address_book(addressBook,nil,mAddressBookMap);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ typedef enum _TunnelMode {
|
|||
@private
|
||||
SCNetworkReachabilityContext proxyReachabilityContext;
|
||||
SCNetworkReachabilityRef proxyReachability;
|
||||
CFReadStreamRef mReadStream;
|
||||
NSTimer* mIterateTimer;
|
||||
id<LogView> mLogView;
|
||||
bool isbackgroundModeEnabled;
|
||||
|
|
@ -51,7 +50,8 @@ typedef enum _TunnelMode {
|
|||
Connectivity connectivity;
|
||||
FastAddressBook* mFastAddressBook;
|
||||
TunnelMode tunnelMode;
|
||||
|
||||
const char* frontCamId;
|
||||
const char* backCamId;
|
||||
}
|
||||
+(LinphoneManager*) instance;
|
||||
+(LinphoneCore*) getLc;
|
||||
|
|
@ -66,11 +66,17 @@ typedef enum _TunnelMode {
|
|||
-(void) becomeActive;
|
||||
-(void) kickOffNetworkConnection;
|
||||
-(NSString*) getDisplayNameFromAddressBook:(NSString*) number andUpdateCallLog:(LinphoneCallLog*)log;
|
||||
-(UIImage*) getImageFromAddressBook:(NSString*) number;
|
||||
|
||||
|
||||
|
||||
@property (nonatomic, retain) id<LinphoneUICallDelegate> callDelegate;
|
||||
@property (nonatomic, retain) id<LinphoneUIRegistrationDelegate> registrationDelegate;
|
||||
@property Connectivity connectivity;
|
||||
@property TunnelMode tunnelMode;
|
||||
@property (readonly) const char* frontCamId;
|
||||
@property (readonly) const char* backCamId;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,14 +42,24 @@ extern "C" void libmsilbc_init();
|
|||
#ifdef HAVE_AMR
|
||||
extern void libmsamr_init();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X264
|
||||
extern void libmsx264_init();
|
||||
#endif
|
||||
#define FRONT_CAM_NAME "AV Capture: Front Camera"
|
||||
#define BACK_CAM_NAME "AV Capture: Back Camera"
|
||||
|
||||
#if defined (HAVE_SILK)
|
||||
extern void libmssilk_init();
|
||||
#endif
|
||||
|
||||
@implementation LinphoneManager
|
||||
@synthesize callDelegate;
|
||||
@synthesize registrationDelegate;
|
||||
@synthesize connectivity;
|
||||
@synthesize tunnelMode;
|
||||
@synthesize frontCamId;
|
||||
@synthesize backCamId;
|
||||
|
||||
-(id) init {
|
||||
if ((self= [super init])) {
|
||||
|
|
@ -97,6 +107,28 @@ extern void libmssilk_init();
|
|||
|
||||
return nil;
|
||||
}
|
||||
|
||||
-(UIImage*) getImageFromAddressBook:(NSString *)number {
|
||||
NSString* lNormalizedNumber = [FastAddressBook normalizePhoneNumber:number];
|
||||
Contact* lContact = [mFastAddressBook getMatchingRecord:lNormalizedNumber];
|
||||
if (lContact) {
|
||||
ABRecordRef person = ABAddressBookGetPersonWithRecordID(mFastAddressBook.addressBook, ABRecordGetRecordID(lContact.record));
|
||||
if (ABPersonHasImageData(person)) {
|
||||
NSData* d;
|
||||
// ios 4.1+
|
||||
if ( &ABPersonCopyImageDataWithFormat != nil) {
|
||||
d = (NSData*)ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatThumbnail);
|
||||
} else {
|
||||
d = (NSData*)ABPersonCopyImageData(person);
|
||||
}
|
||||
return [UIImage imageWithData:d];
|
||||
}
|
||||
}
|
||||
/* return default image */
|
||||
return [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"contact_vide" ofType:@"png"]];
|
||||
//return nil;
|
||||
}
|
||||
|
||||
-(void) updateCallWithAddressBookData:(LinphoneCall*) call {
|
||||
//1 copy adress book
|
||||
LinphoneCallLog* lLog = linphone_call_get_call_log(call);
|
||||
|
|
@ -122,31 +154,45 @@ extern void libmssilk_init();
|
|||
}
|
||||
return;
|
||||
}
|
||||
-(void) onCall:(LinphoneCall*) currentCall StateChanged: (LinphoneCallState) new_state withMessage: (const char *) message {
|
||||
const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(currentCall));
|
||||
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithCString:lUserNameChars]:NSLocalizedString(@"Unknown",nil);
|
||||
-(void) onCall:(LinphoneCall*) call StateChanged: (LinphoneCallState) new_state withMessage: (const char *) message {
|
||||
const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(call));
|
||||
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithUTF8String:lUserNameChars]:NSLocalizedString(@"Unknown",nil);
|
||||
if (new_state == LinphoneCallIncomingReceived) {
|
||||
[self updateCallWithAddressBookData:currentCall]; // display name is updated
|
||||
[self updateCallWithAddressBookData:call]; // display name is updated
|
||||
}
|
||||
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(currentCall));
|
||||
NSString* lDisplayName = lDisplayNameChars?[[NSString alloc] initWithCString:lDisplayNameChars]:@"";
|
||||
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(call));
|
||||
NSString* lDisplayName = lDisplayNameChars?[[NSString alloc] initWithUTF8String:lDisplayNameChars]:@"";
|
||||
|
||||
bool canHideInCallView = (linphone_core_get_calls([LinphoneManager getLc]) == NULL);
|
||||
|
||||
switch (new_state) {
|
||||
|
||||
case LinphoneCallStreamsRunning:
|
||||
//check video
|
||||
if (linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
|
||||
[callDelegate displayVideoCall:call FromUI:mCurrentViewController
|
||||
forUser:lUserName
|
||||
withDisplayName:lDisplayName];
|
||||
}
|
||||
break;
|
||||
|
||||
case LinphoneCallIncomingReceived:
|
||||
[callDelegate displayIncomingCallNotigicationFromUI:mCurrentViewController
|
||||
[callDelegate displayIncomingCall:call
|
||||
NotificationFromUI:mCurrentViewController
|
||||
forUser:lUserName
|
||||
withDisplayName:lDisplayName];
|
||||
break;
|
||||
|
||||
case LinphoneCallOutgoingInit:
|
||||
[callDelegate displayCallInProgressFromUI:mCurrentViewController
|
||||
[callDelegate displayCall:call
|
||||
InProgressFromUI:mCurrentViewController
|
||||
forUser:lUserName
|
||||
withDisplayName:lDisplayName];
|
||||
break;
|
||||
|
||||
case LinphoneCallConnected:
|
||||
[callDelegate displayIncallFromUI:mCurrentViewController
|
||||
[callDelegate displayInCall: call
|
||||
FromUI:mCurrentViewController
|
||||
forUser:lUserName
|
||||
withDisplayName:lDisplayName];
|
||||
break;
|
||||
|
|
@ -179,15 +225,29 @@ extern void libmssilk_init();
|
|||
cancelButtonTitle:NSLocalizedString(@"Dismiss",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[callDelegate displayDialerFromUI:mCurrentViewController
|
||||
if (canHideInCallView) {
|
||||
[callDelegate displayDialerFromUI:mCurrentViewController
|
||||
forUser:@""
|
||||
withDisplayName:@""];
|
||||
} else {
|
||||
[callDelegate displayInCall:call
|
||||
FromUI:mCurrentViewController
|
||||
forUser:lUserName
|
||||
withDisplayName:lDisplayName];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LinphoneCallEnd:
|
||||
[callDelegate displayDialerFromUI:mCurrentViewController
|
||||
case LinphoneCallEnd:
|
||||
if (canHideInCallView) {
|
||||
[callDelegate displayDialerFromUI:mCurrentViewController
|
||||
forUser:@""
|
||||
withDisplayName:@""];
|
||||
} else {
|
||||
[callDelegate displayInCall:call
|
||||
FromUI:mCurrentViewController
|
||||
forUser:lUserName
|
||||
withDisplayName:lDisplayName];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -254,9 +314,9 @@ static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, Lin
|
|||
|
||||
-(void) onRegister:(LinphoneCore *)lc cfg:(LinphoneProxyConfig*) cfg state:(LinphoneRegistrationState) state message:(const char*) message {
|
||||
LinphoneAddress* lAddress = linphone_address_new(linphone_proxy_config_get_identity(cfg));
|
||||
NSString* lUserName = linphone_address_get_username(lAddress)? [[NSString alloc] initWithCString:linphone_address_get_username(lAddress) ]:@"";
|
||||
NSString* lDisplayName = linphone_address_get_display_name(lAddress)? [[NSString alloc] initWithCString:linphone_address_get_display_name(lAddress) ]:@"";
|
||||
NSString* lDomain = [[NSString alloc] initWithCString:linphone_address_get_domain(lAddress)];
|
||||
NSString* lUserName = linphone_address_get_username(lAddress)? [[NSString alloc] initWithUTF8String:linphone_address_get_username(lAddress) ]:@"";
|
||||
NSString* lDisplayName = linphone_address_get_display_name(lAddress)? [[NSString alloc] initWithUTF8String:linphone_address_get_display_name(lAddress) ]:@"";
|
||||
NSString* lDomain = [[NSString alloc] initWithUTF8String:linphone_address_get_domain(lAddress)];
|
||||
linphone_address_destroy(lAddress);
|
||||
|
||||
if (state == LinphoneRegistrationOk) {
|
||||
|
|
@ -448,7 +508,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];
|
||||
|
||||
NSString* proxyAddress = [[NSUserDefaults standardUserDefaults] stringForKey:@"proxy_preference"];
|
||||
if ((!proxyAddress | [proxyAddress length] <1 ) && domain) {
|
||||
if ((!proxyAddress || [proxyAddress length] <1 ) && domain) {
|
||||
proxyAddress = [NSString stringWithFormat:@"sip:%@",domain] ;
|
||||
} else {
|
||||
proxyAddress = [NSString stringWithFormat:@"sip:%@",proxyAddress] ;
|
||||
|
|
@ -555,20 +615,41 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
|
||||
//read codecs from setting bundle and enable them one by one
|
||||
if ([self isNotIphone3G]) {
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
|
||||
[self configurePayloadType:"SILK" fromPrefKey:@"silk_24k_preference" withRate:24000];
|
||||
}
|
||||
else
|
||||
{
|
||||
ms_message("SPEEX codecs deactivated");
|
||||
else {
|
||||
ms_message("SILK 24khz codec deactivated");
|
||||
}
|
||||
[self configurePayloadType:"SILK" fromPrefKey:@"silk_24k_preference" withRate:24000];
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
|
||||
[self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
|
||||
[self configurePayloadType:"SILK" fromPrefKey:@"silk_16k_preference" withRate:16000];
|
||||
[self configurePayloadType:"AMR" fromPrefKey:@"amr_8k_preference" withRate:8000];
|
||||
[self configurePayloadType:"GSM" fromPrefKey:@"gsm_8k_preference" withRate:8000];
|
||||
[self configurePayloadType:"iLBC" fromPrefKey:@"ilbc_preference" withRate:8000];
|
||||
[self configurePayloadType:"PCMU" fromPrefKey:@"pcmu_preference" withRate:8000];
|
||||
[self configurePayloadType:"PCMA" fromPrefKey:@"pcma_preference" withRate:8000];
|
||||
[self configurePayloadType:"G722" fromPrefKey:@"g722_preference" withRate:8000];
|
||||
|
||||
//get video codecs from linphonerc
|
||||
const MSList *videoCodecs=linphone_core_get_video_codecs(theLinphoneCore);
|
||||
//disable video all codecs
|
||||
for (elem=videoCodecs;elem!=NULL;elem=elem->next){
|
||||
pt=(PayloadType*)elem->data;
|
||||
linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
|
||||
}
|
||||
[self configurePayloadType:"MP4V-ES" fromPrefKey:@"mp4v-es_preference" withRate:90000];
|
||||
[self configurePayloadType:"H264" fromPrefKey:@"h264_preference" withRate:90000];
|
||||
[self configurePayloadType:"VP8" fromPrefKey:@"vp8_preference" withRate:90000];
|
||||
|
||||
if ([self isNotIphone3G]) {
|
||||
bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"];
|
||||
linphone_core_enable_video(theLinphoneCore, enableVideo, enableVideo);
|
||||
} else {
|
||||
linphone_core_enable_video(theLinphoneCore, FALSE, FALSE);
|
||||
ms_warning("Disable video for phones prior to iPhone 3GS");
|
||||
}
|
||||
bool enableSrtp = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_srtp_preference"];
|
||||
linphone_core_set_media_encryption(theLinphoneCore, enableSrtp?LinphoneMediaEncryptionSRTP:LinphoneMediaEncryptionNone);
|
||||
|
||||
UIDevice* device = [UIDevice currentDevice];
|
||||
bool backgroundSupported = false;
|
||||
|
|
@ -580,7 +661,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
} else {
|
||||
isbackgroundModeEnabled=false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
- (BOOL)isNotIphone3G
|
||||
{
|
||||
|
|
@ -588,7 +669,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
|
||||
char *machine = (char*)malloc(size);
|
||||
sysctlbyname("hw.machine", machine, &size, NULL, 0);
|
||||
NSString *platform = [NSString stringWithCString:machine];
|
||||
NSString *platform = [[NSString alloc ] initWithUTF8String:machine];
|
||||
free(machine);
|
||||
|
||||
return ![platform isEqualToString:@"iPhone1,2"];
|
||||
|
|
@ -601,7 +682,9 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
}
|
||||
}
|
||||
-(void) destroyLibLinphone {
|
||||
[mIterateTimer invalidate];
|
||||
[mIterateTimer invalidate];
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setDelegate:nil];
|
||||
if (theLinphoneCore != nil) { //just in case application terminate before linphone core initialization
|
||||
linphone_core_destroy(theLinphoneCore);
|
||||
theLinphoneCore = nil;
|
||||
|
|
@ -617,13 +700,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
|
||||
//**********************BG mode management*************************///////////
|
||||
-(void) enterBackgroundMode {
|
||||
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *res=NULL;
|
||||
int err;
|
||||
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
LinphoneAddress *addr;
|
||||
linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg);
|
||||
linphone_core_stop_dtmf_stream(theLinphoneCore);
|
||||
|
||||
|
|
@ -663,39 +740,6 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
ms_error("cannot get current transport");
|
||||
}
|
||||
|
||||
if (mReadStream == nil && transportValue.udp_port>0) { //only for udp
|
||||
int sipsock = linphone_core_get_sip_socket(theLinphoneCore);
|
||||
//disable keepalive handler
|
||||
linphone_core_enable_keep_alive(theLinphoneCore, false);
|
||||
const char *port;
|
||||
addr=linphone_address_new(linphone_proxy_config_get_addr(proxyCfg));
|
||||
memset(&hints,0,sizeof(hints));
|
||||
hints.ai_family=linphone_core_ipv6_enabled(theLinphoneCore) ? AF_INET6 : AF_INET;
|
||||
port=linphone_address_get_port(addr);
|
||||
if (port==NULL) port="5060";
|
||||
err=getaddrinfo(linphone_address_get_domain(addr),port,&hints,&res);
|
||||
if (err!=0){
|
||||
ms_error("getaddrinfo() failed for %s: %s",linphone_address_get_domain(addr),gai_strerror(err));
|
||||
linphone_address_destroy(addr);
|
||||
return;
|
||||
}
|
||||
err=connect(sipsock,res->ai_addr,res->ai_addrlen);
|
||||
if (err==-1){
|
||||
ms_error("Connect failed: %s",strerror(errno));
|
||||
}
|
||||
freeaddrinfo(res);
|
||||
|
||||
CFStreamCreatePairWithSocket(NULL, (CFSocketNativeHandle)sipsock, &mReadStream,nil);
|
||||
|
||||
if (!CFReadStreamSetProperty(mReadStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP)) {
|
||||
ms_error("cannot set service type to voip for read stream");
|
||||
}
|
||||
|
||||
|
||||
if (!CFReadStreamOpen(mReadStream)) {
|
||||
ms_error("cannot open read stream");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
ms_warning("Entering lite bg mode");
|
||||
|
|
@ -741,9 +785,11 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
#endif
|
||||
#ifdef HAVE_AMR
|
||||
libmsamr_init(); //load amr plugin if present from the liblinphone sdk
|
||||
#endif /*
|
||||
* Initialize linphone core
|
||||
*/
|
||||
#endif
|
||||
#ifdef HAVE_X264
|
||||
libmsx264_init(); //load x264 plugin if present from the liblinphone sdk
|
||||
#endif
|
||||
/* Initialize linphone core*/
|
||||
|
||||
linphonec_vtable.show =NULL;
|
||||
linphonec_vtable.call_state_changed =(LinphoneCallStateCb)linphone_iphone_call_state;
|
||||
|
|
@ -773,11 +819,17 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
proxyReachabilityContext.info=self;
|
||||
//initial state is network off should be done as soon as possible
|
||||
SCNetworkReachabilityFlags flags;
|
||||
SCNetworkReachabilityGetFlags(proxyReachability, &flags);
|
||||
if (!SCNetworkReachabilityGetFlags(proxyReachability, &flags)) {
|
||||
ms_error("Cannot get reachability flags");
|
||||
};
|
||||
networkReachabilityCallBack(proxyReachability,flags,self);
|
||||
|
||||
SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext);
|
||||
SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
||||
if (!SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext)){
|
||||
ms_error("Cannot register reachability cb");
|
||||
};
|
||||
if(!SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)){
|
||||
ms_error("Cannot register schedule reachability cb");
|
||||
};
|
||||
|
||||
[self doLinphoneConfiguration:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
|
|
@ -795,6 +847,8 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
BOOL bAudioInputAvailable= [audioSession inputIsAvailable];
|
||||
[audioSession setDelegate:self];
|
||||
|
||||
NSError* err;
|
||||
[audioSession setActive:NO error: &err];
|
||||
if(!bAudioInputAvailable){
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No microphone",nil)
|
||||
message:NSLocalizedString(@"You need to plug a microphone to your device to use this application.",nil)
|
||||
|
|
@ -803,12 +857,30 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
otherButtonTitles:nil ,nil];
|
||||
[error show];
|
||||
}
|
||||
/*DETECT cameras*/
|
||||
frontCamId= backCamId=nil;
|
||||
char** camlist = (char**)linphone_core_get_video_devices(theLinphoneCore);
|
||||
for (char* cam = *camlist;*camlist!=NULL;cam=*++camlist) {
|
||||
if (strcmp(FRONT_CAM_NAME, cam)==0) {
|
||||
frontCamId = cam;
|
||||
//great set default cam to front
|
||||
linphone_core_set_video_device(theLinphoneCore, cam);
|
||||
}
|
||||
if (strcmp(BACK_CAM_NAME, cam)==0) {
|
||||
backCamId = cam;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
|
||||
&& [UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
|
||||
//go directly to bg mode
|
||||
[self enterBackgroundMode];
|
||||
}
|
||||
|
||||
ms_warning("Linphone [%s] started on [%s]"
|
||||
,linphone_core_get_version()
|
||||
,[[UIDevice currentDevice].model cStringUsingEncoding:[NSString defaultCStringEncoding]] );
|
||||
|
||||
}
|
||||
-(void) becomeActive {
|
||||
|
|
@ -824,25 +896,6 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
/*IOS specific*/
|
||||
linphone_core_start_dtmf_stream(theLinphoneCore);
|
||||
|
||||
LCSipTransports transportValue;
|
||||
if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) {
|
||||
ms_error("cannot get current transport");
|
||||
}
|
||||
if (transportValue.udp_port != 0) {
|
||||
//enable sip keepalive
|
||||
linphone_core_enable_keep_alive(theLinphoneCore, true);
|
||||
}
|
||||
if (mReadStream !=nil) {
|
||||
//unconnect
|
||||
int socket = linphone_core_get_sip_socket(theLinphoneCore);
|
||||
struct sockaddr hints;
|
||||
memset(&hints,0,sizeof(hints));
|
||||
hints.sa_family=AF_UNSPEC;
|
||||
connect(socket,&hints,sizeof(hints));
|
||||
CFReadStreamClose(mReadStream);
|
||||
CFRelease(mReadStream);
|
||||
mReadStream=nil;
|
||||
}
|
||||
}
|
||||
-(void) registerLogView:(id<LogView>) view {
|
||||
mLogView = view;
|
||||
|
|
@ -865,7 +918,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
linphone_core_resume_call(theLinphoneCore, (LinphoneCall*) c->data);
|
||||
}
|
||||
|
||||
[callDelegate updateUIFromLinphoneState:mCurrentViewController];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -17,15 +17,15 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "linphonecore.h"
|
||||
|
||||
@protocol LinphoneUICallDelegate
|
||||
// UI changes
|
||||
-(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
-(void) displayIncomingCallNotigicationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
-(void) updateUIFromLinphoneState:(UIViewController*) viewCtrl;
|
||||
-(void) displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
-(void) displayIncomingCall: (LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
-(void) displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
-(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
|
||||
//status reporting
|
||||
-(void) displayStatus:(NSString*) message;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* AdvancedPhoneViewController.h
|
||||
/* UIAddVideoButton.h
|
||||
*
|
||||
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -10,19 +10,15 @@
|
|||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* 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 "PhoneViewController.h"
|
||||
|
||||
|
||||
@interface AdvancedPhoneViewController : PhoneViewController {
|
||||
IncallViewController* mIncallViewController;
|
||||
}
|
||||
|
||||
@interface UIAddVideoButton : UIButton
|
||||
- (id)initWithCoder:(NSCoder *)decoder;
|
||||
@end
|
||||
58
Classes/LinphoneUI/UIAddVideoButton.m
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/* UIAddVideoButton.m
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "UIAddVideoButton.h"
|
||||
#include "LinphoneManager.h"
|
||||
|
||||
@implementation UIAddVideoButton
|
||||
|
||||
-(void) touchUp:(id) sender {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
if (call) {
|
||||
LinphoneCallParams* call_params = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
linphone_call_params_enable_video(call_params, TRUE);
|
||||
linphone_core_update_call(lc, call, call_params);
|
||||
linphone_call_params_destroy(call_params);
|
||||
} {
|
||||
ms_warning("Cannot add video, because no current call");
|
||||
}
|
||||
}
|
||||
|
||||
- (id) init {
|
||||
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
|
||||
return self;
|
||||
}
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self) {
|
||||
[self init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -23,14 +23,14 @@
|
|||
|
||||
@implementation UIBluetoothButton
|
||||
#define check_auresult(au,method) \
|
||||
if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%i",method,au)
|
||||
if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%ld",method,au)
|
||||
|
||||
-(void) onOn {
|
||||
//redirect audio to bluetooth
|
||||
|
||||
UInt32 size = sizeof(CFStringRef);
|
||||
CFStringRef route="HeadsetBT";
|
||||
OSStatus result = AudioSessionSetProperty(kAudioSessionProperty_AudioRoute, &size, &route);
|
||||
OSStatus result = AudioSessionSetProperty(kAudioSessionProperty_AudioRoute, size, &route);
|
||||
check_auresult(result,"set kAudioSessionProperty_AudioRoute HeadsetBT");
|
||||
|
||||
int allowBluetoothInput = 1;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
@private
|
||||
char mDigit;
|
||||
UITextField* mAddress;
|
||||
UILabel* mDisplayName;
|
||||
}
|
||||
-(void) initWithAddress:(UITextField*) address withDisplayName:(UILabel*) displayName;
|
||||
-(void) initWithAddress:(UITextField*) address;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -32,14 +32,17 @@
|
|||
[error show];
|
||||
return;
|
||||
}
|
||||
if (!linphone_core_in_call([LinphoneManager getLc])) {
|
||||
if (TRUE /*!linphone_core_in_call([LinphoneManager getLc])*/) {
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
//get default proxy
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
|
||||
bool startVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"];
|
||||
LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters([LinphoneManager getLc]);
|
||||
linphone_call_params_enable_video(lcallParams,startVideo&linphone_core_video_enabled([LinphoneManager getLc]));
|
||||
|
||||
if ([mAddress.text length] == 0) return; //just return
|
||||
if ([mAddress.text hasPrefix:@"sip:"]) {
|
||||
linphone_core_invite([LinphoneManager getLc], [mAddress.text cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
linphone_core_invite_with_params([LinphoneManager getLc],[mAddress.text cStringUsingEncoding:[NSString defaultCStringEncoding]],lcallParams);
|
||||
} else if ( proxyCfg==nil){
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid sip address",nil)
|
||||
message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)",nil)
|
||||
|
|
@ -51,19 +54,20 @@
|
|||
} else {
|
||||
char normalizedUserName[256];
|
||||
NSString* toUserName = [NSString stringWithString:[mAddress text]];
|
||||
if ([mDisplayName.text length] <=0) {
|
||||
NSString* lDisplayName = [[LinphoneManager instance] getDisplayNameFromAddressBook:toUserName andUpdateCallLog:nil];
|
||||
if (lDisplayName) {
|
||||
mDisplayName.text = lDisplayName;
|
||||
}
|
||||
}
|
||||
NSString* lDisplayName = [[LinphoneManager instance] getDisplayNameFromAddressBook:toUserName andUpdateCallLog:nil];
|
||||
|
||||
linphone_proxy_config_normalize_number(proxyCfg,[toUserName cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
|
||||
LinphoneAddress* tmpAddress = linphone_address_new(linphone_core_get_identity([LinphoneManager getLc]));
|
||||
linphone_address_set_username(tmpAddress,normalizedUserName);
|
||||
linphone_address_set_display_name(tmpAddress,[mDisplayName.text length]>0?[mDisplayName.text cStringUsingEncoding:[NSString defaultCStringEncoding]]:nil);
|
||||
linphone_core_invite([LinphoneManager getLc],linphone_address_as_string(tmpAddress)) ;
|
||||
linphone_address_set_display_name(tmpAddress,(lDisplayName)?[lDisplayName cStringUsingEncoding:[NSString defaultCStringEncoding]]:nil);
|
||||
|
||||
|
||||
|
||||
linphone_core_invite_address_with_params([LinphoneManager getLc],tmpAddress,lcallParams) ;
|
||||
|
||||
linphone_address_destroy(tmpAddress);
|
||||
}
|
||||
linphone_call_params_destroy(lcallParams);
|
||||
} else if (linphone_core_inc_invite_pending([LinphoneManager getLc])) {
|
||||
linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
|
||||
}
|
||||
|
|
@ -78,9 +82,8 @@
|
|||
// Drawing code.
|
||||
}
|
||||
*/
|
||||
-(void) initWithAddress:(UITextField*) address withDisplayName:(UILabel*) displayName {
|
||||
-(void) initWithAddress:(UITextField*) address{
|
||||
mAddress=[address retain];
|
||||
mDisplayName = [displayName retain];
|
||||
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
||||
|
|
|
|||
31
Classes/LinphoneUI/UICamSwitch.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* UICamSwitch.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface UICamSwitch : UIButton {
|
||||
|
||||
@private
|
||||
char* currentCamId;
|
||||
char* nextCamId;
|
||||
UIView* preview;
|
||||
}
|
||||
@property (nonatomic, retain) IBOutlet UIView* preview;
|
||||
@end
|
||||
80
Classes/LinphoneUI/UICamSwitch.m
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
/* UICamSwitch.m
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "UICamSwitch.h"
|
||||
#include "LinphoneManager.h"
|
||||
|
||||
|
||||
@implementation UICamSwitch
|
||||
@synthesize preview;
|
||||
-(void) touchUp:(id) sender {
|
||||
if (nextCamId!=currentCamId) {
|
||||
ms_message("Swithcing from [%s] to [%s]",currentCamId,nextCamId);
|
||||
linphone_core_set_video_device([LinphoneManager getLc], nextCamId);
|
||||
nextCamId=currentCamId;
|
||||
currentCamId = linphone_core_get_video_device([LinphoneManager getLc]);
|
||||
linphone_core_update_call([LinphoneManager getLc]
|
||||
, linphone_core_get_current_call([LinphoneManager getLc])
|
||||
,NULL);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],preview);
|
||||
}
|
||||
}
|
||||
|
||||
- (id) init {
|
||||
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
|
||||
currentCamId = (char*)linphone_core_get_video_device([LinphoneManager getLc]);
|
||||
if ([LinphoneManager instance].frontCamId !=nil ) {
|
||||
//ok, we have 2 cameras
|
||||
if (strcmp(currentCamId,[LinphoneManager instance].frontCamId)==0) {
|
||||
nextCamId = [LinphoneManager instance].backCamId;
|
||||
} else {
|
||||
nextCamId = [LinphoneManager instance].frontCamId;
|
||||
}
|
||||
} else {
|
||||
nextCamId=currentCamId;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self) {
|
||||
[self init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
[preview release];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
|
@ -23,9 +23,14 @@
|
|||
@private
|
||||
char mDigit;
|
||||
UITextField* mAddress;
|
||||
|
||||
bool_t sendDtmfDuringCall;
|
||||
|
||||
}
|
||||
-(void) initWithNumber:(char)digit ;
|
||||
-(void) initWithNumber:(char)digit addressField:(UITextField*) address;
|
||||
-(void) initWithNumber:(char)digit addressField:(UITextField*) address dtmf:(bool_t)send;
|
||||
|
||||
|
||||
@property bool_t sendDtmfDuringCall;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -23,11 +23,12 @@
|
|||
|
||||
@implementation UIDigitButton
|
||||
|
||||
@synthesize sendDtmfDuringCall;
|
||||
|
||||
|
||||
|
||||
-(void) touchDown:(id) sender {
|
||||
if (mAddress && !linphone_core_in_call([LinphoneManager getLc])) {
|
||||
if (mAddress && (!sendDtmfDuringCall || !linphone_core_in_call([LinphoneManager getLc]))) {
|
||||
NSString* newAddress = [NSString stringWithFormat:@"%@%c",mAddress.text,mDigit];
|
||||
[mAddress setText:newAddress];
|
||||
linphone_core_play_dtmf([LinphoneManager getLc], mDigit, -1);
|
||||
|
|
@ -60,9 +61,10 @@
|
|||
}
|
||||
|
||||
-(void) initWithNumber:(char)digit {
|
||||
[self initWithNumber:digit addressField:nil];
|
||||
[self initWithNumber:digit addressField:nil dtmf:true];
|
||||
}
|
||||
-(void) initWithNumber:(char)digit addressField:(UITextField*) address{
|
||||
-(void) initWithNumber:(char)digit addressField:(UITextField*) address dtmf:(bool_t)sendDtmf{
|
||||
sendDtmfDuringCall = sendDtmf;
|
||||
mDigit=digit ;
|
||||
mAddress=address?[address retain]:nil;
|
||||
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
|
||||
|
|
|
|||
|
|
@ -23,7 +23,25 @@
|
|||
@implementation UIHangUpButton
|
||||
|
||||
-(void) touchUp:(id) sender {
|
||||
linphone_core_terminate_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
if (!lc)
|
||||
return;
|
||||
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
|
||||
if (call)
|
||||
linphone_core_terminate_call(lc,call);
|
||||
else if (linphone_core_is_in_conference(lc)) {
|
||||
linphone_core_terminate_conference(lc);
|
||||
} else {
|
||||
const MSList* calls = linphone_core_get_calls(lc);
|
||||
if (ms_list_size(calls) == 1
|
||||
&& !linphone_call_params_local_conference_mode(linphone_call_get_current_params((LinphoneCall*)(calls->data)))) {
|
||||
//Only one call in the list, hangin up!
|
||||
linphone_core_terminate_call(lc,(LinphoneCall*)(calls->data));
|
||||
} else {
|
||||
ms_message("Cannot make a decision on which call to terminate");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* UIHangUpButton.h
|
||||
/* UILinphone.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -26,4 +26,5 @@
|
|||
#import "UIDuration.h"
|
||||
#import "UIEraseButton.h"
|
||||
#import "LinphoneUIDelegates.h"
|
||||
#import "UICamSwitch.h"
|
||||
#import "UIPauseResumeButton.h"
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@
|
|||
}
|
||||
-(bool) isInitialStateOn {
|
||||
@try {
|
||||
const MSList* c = linphone_core_get_calls([LinphoneManager getLc]);
|
||||
LinphoneCall* c = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
|
||||
if (c) {
|
||||
return linphone_call_get_state((LinphoneCall*)c->data) == LinphoneCallPaused;
|
||||
return linphone_call_get_state(c) == LinphoneCallPaused;
|
||||
} else {
|
||||
|
||||
return false;
|
||||
/* if current call is paused -> c == null */
|
||||
return true;
|
||||
}
|
||||
} @catch(NSException* e) {
|
||||
//not ready yet
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ static void audioRouteChangeListenerCallback (
|
|||
AudioSessionInitialize(NULL, NULL, NULL, NULL);
|
||||
OSStatus lStatus = AudioSessionAddPropertyListener(routeChangeID, audioRouteChangeListenerCallback, self);
|
||||
if (lStatus) {
|
||||
ms_error ("cannot register route change handler [%i]",lStatus);
|
||||
ms_error ("cannot register route change handler [%ld]",lStatus);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
-(void) onOff;
|
||||
-(bool) isInitialStateOn;
|
||||
@end
|
||||
|
||||
@interface UIToggleButton : UIButton <UIToggleButtonDelegate> {
|
||||
@private
|
||||
UIImage* mOnImage;
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@
|
|||
}
|
||||
|
||||
-(void) initWithOnImage:(UIImage*) onImage offImage:(UIImage*) offImage {
|
||||
mOnImage = [onImage retain];
|
||||
mOffImage = [offImage retain];
|
||||
mIsOn=false;
|
||||
mOnImage = [onImage retain];
|
||||
mOffImage = [offImage retain];
|
||||
mIsOn=false;
|
||||
[self reset];
|
||||
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
|
|
@ -69,5 +69,19 @@
|
|||
[mOffImage release];
|
||||
}
|
||||
|
||||
-(void) onOn {
|
||||
[NSException raise:NSInternalInconsistencyException
|
||||
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
|
||||
}
|
||||
-(void) onOff {
|
||||
[NSException raise:NSInternalInconsistencyException
|
||||
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
|
||||
}
|
||||
-(bool) isInitialStateOn {
|
||||
[NSException raise:NSInternalInconsistencyException
|
||||
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -20,12 +20,14 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "linphonecore.h"
|
||||
#import "UILinphone.h"
|
||||
#import "CallDelegate.h"
|
||||
|
||||
|
||||
@class IncallViewController;
|
||||
@class FirstLoginViewController;
|
||||
|
||||
@interface PhoneViewController : UIViewController <UITextFieldDelegate,UIActionSheetDelegate,LinphoneUICallDelegate> {
|
||||
|
||||
@interface PhoneViewController : UIViewController <UITextFieldDelegate,LinphoneUICallDelegate, UIActionSheetCustomDelegate> {
|
||||
|
||||
@private
|
||||
//UI definition
|
||||
|
|
@ -33,17 +35,9 @@
|
|||
UITextField* address;
|
||||
UILabel* mDisplayName;
|
||||
UIEraseButton* erase;
|
||||
UICallButton* callShort;
|
||||
UICallButton* callLarge;
|
||||
|
||||
UIView* incallView;
|
||||
UIDuration* callDuration;
|
||||
UIMuteButton* mute;
|
||||
UISpeakerButton* speaker;
|
||||
UILabel* peerLabel;
|
||||
|
||||
|
||||
UICallButton* call;
|
||||
UIHangUpButton* hangup;
|
||||
|
||||
UILabel* status;
|
||||
|
||||
//key pad
|
||||
|
|
@ -61,27 +55,24 @@
|
|||
UIDigitButton* hash;
|
||||
|
||||
UIButton* back;
|
||||
UIButton* backToCallView;
|
||||
|
||||
UITabBarController* myTabBarController;
|
||||
|
||||
UIActionSheet *mIncomingCallActionSheet;
|
||||
FirstLoginViewController* myFirstLoginViewController;
|
||||
|
||||
IncallViewController* mIncallViewController;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* dialerView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* address;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* call;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* callShort;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* callLarge;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* hangup;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* status;
|
||||
@property (nonatomic, retain) IBOutlet UIEraseButton* erase;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* incallView;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* callDuration;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* mute;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* speaker;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* peerLabel;
|
||||
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* one;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* two;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* three;
|
||||
|
|
@ -96,7 +87,7 @@
|
|||
@property (nonatomic, retain) IBOutlet UIButton* hash;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* back;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* backToCallView;
|
||||
|
||||
|
||||
// method to handle keypad event
|
||||
|
|
|
|||
|
|
@ -22,24 +22,19 @@
|
|||
#import <AVFoundation/AVAudioSession.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import "LinphoneManager.h"
|
||||
|
||||
|
||||
#include "FirstLoginViewController.h"
|
||||
#include "linphonecore.h"
|
||||
#include "private.h"
|
||||
|
||||
@implementation PhoneViewController
|
||||
@synthesize dialerView ;
|
||||
@synthesize address ;
|
||||
@synthesize call;
|
||||
@synthesize callShort;
|
||||
@synthesize callLarge;
|
||||
@synthesize hangup;
|
||||
@synthesize status;
|
||||
@synthesize erase;
|
||||
|
||||
|
||||
@synthesize incallView;
|
||||
@synthesize callDuration;
|
||||
@synthesize mute;
|
||||
@synthesize speaker;
|
||||
@synthesize peerLabel;
|
||||
|
||||
@synthesize one;
|
||||
@synthesize two;
|
||||
@synthesize three;
|
||||
|
|
@ -55,6 +50,7 @@
|
|||
|
||||
@synthesize back;
|
||||
@synthesize myTabBarController;
|
||||
@synthesize backToCallView;
|
||||
|
||||
|
||||
//implements keypad behavior
|
||||
|
|
@ -69,24 +65,8 @@
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:true];
|
||||
[mute reset];
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == true) {
|
||||
myFirstLoginViewController = [[FirstLoginViewController alloc] initWithNibName:@"FirstLoginViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
|
|
@ -95,36 +75,36 @@
|
|||
};
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:false];
|
||||
}
|
||||
|
||||
|
||||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
mDisplayName = [UILabel alloc];
|
||||
[zero initWithNumber:'0' addressField:address ];
|
||||
[one initWithNumber:'1' addressField:address ];
|
||||
[two initWithNumber:'2' addressField:address ];
|
||||
[three initWithNumber:'3' addressField:address ];
|
||||
[four initWithNumber:'4' addressField:address ];
|
||||
[five initWithNumber:'5' addressField:address ];
|
||||
[six initWithNumber:'6' addressField:address ];
|
||||
[seven initWithNumber:'7' addressField:address ];
|
||||
[eight initWithNumber:'8' addressField:address ];
|
||||
[nine initWithNumber:'9' addressField:address ];
|
||||
[star initWithNumber:'*' addressField:address ];
|
||||
[hash initWithNumber:'#' addressField:address ];
|
||||
[call initWithAddress:address withDisplayName:mDisplayName];
|
||||
[mute initWithOnImage:[UIImage imageNamed:@"mic_muted.png"] offImage:[UIImage imageNamed:@"mic_active.png"] ];
|
||||
[speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ];
|
||||
[zero initWithNumber:'0' addressField:address dtmf:false];
|
||||
[one initWithNumber:'1' addressField:address dtmf:false];
|
||||
[two initWithNumber:'2' addressField:address dtmf:false];
|
||||
[three initWithNumber:'3' addressField:address dtmf:false];
|
||||
[four initWithNumber:'4' addressField:address dtmf:false];
|
||||
[five initWithNumber:'5' addressField:address dtmf:false];
|
||||
[six initWithNumber:'6' addressField:address dtmf:false];
|
||||
[seven initWithNumber:'7' addressField:address dtmf:false];
|
||||
[eight initWithNumber:'8' addressField:address dtmf:false];
|
||||
[nine initWithNumber:'9' addressField:address dtmf:false];
|
||||
[star initWithNumber:'*' addressField:address dtmf:false];
|
||||
[hash initWithNumber:'#' addressField:address dtmf:false];
|
||||
[callShort initWithAddress:address];
|
||||
[callLarge initWithAddress:address];
|
||||
[erase initWithAddressField:address];
|
||||
|
||||
[backToCallView addTarget:self action:@selector(backToCallViewPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
mIncallViewController = [[IncallViewController alloc] initWithNibName:@"IncallViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// Override to allow orientations other than the default portrait orientation.
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
|
|
@ -145,18 +125,41 @@
|
|||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
|
||||
if (theTextField == address) {
|
||||
[address resignFirstResponder];
|
||||
[mDisplayName setText:@""]; //display name only relefvant
|
||||
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void) updateCallAndBackButtons {
|
||||
@try {
|
||||
if (linphone_core_get_calls_nb([LinphoneManager getLc]) == 0) {
|
||||
[callLarge setHidden:FALSE];
|
||||
[callShort setHidden:TRUE];
|
||||
[backToCallView setHidden:TRUE];
|
||||
} else {
|
||||
[callShort setEnabled:!linphone_core_sound_resources_locked([LinphoneManager getLc])];
|
||||
[callLarge setHidden:TRUE];
|
||||
[callShort setHidden:FALSE];
|
||||
[backToCallView setHidden:FALSE];
|
||||
}
|
||||
} @catch (NSException* exc) {
|
||||
// R.A.S: linphone core si simply not ready...
|
||||
ms_warning("Exception %s: %s",
|
||||
[exc.name cStringUsingEncoding:[NSString defaultCStringEncoding]],
|
||||
[exc.reason cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
}
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated {
|
||||
[self updateCallAndBackButtons];
|
||||
}
|
||||
|
||||
-(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
|
||||
//cancel local notification, just in case
|
||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
|
||||
&& [UIApplication sharedApplication].applicationState == UIApplicationStateBackground ) {
|
||||
|
|
@ -169,80 +172,37 @@
|
|||
}
|
||||
}
|
||||
|
||||
[address setHidden:false];
|
||||
if (username) {
|
||||
[address setText:username];
|
||||
} //else keep previous
|
||||
|
||||
[mDisplayName setText:displayName];
|
||||
[incallView setHidden:true];
|
||||
[dialerView setHidden:false];
|
||||
|
||||
[call setEnabled:true];
|
||||
[hangup setEnabled:false];
|
||||
|
||||
[callDuration stop];
|
||||
UIDevice *device = [UIDevice currentDevice];
|
||||
device.proximityMonitoringEnabled = NO;
|
||||
[self updateCallAndBackButtons];
|
||||
|
||||
|
||||
[peerLabel setText:@""];
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlogindone_preference" ] == true) {
|
||||
//first login case, dismmis first login view
|
||||
[self dismissModalViewControllerAnimated:true];
|
||||
};
|
||||
[mIncallViewController displayDialerFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
|
||||
[myTabBarController setSelectedIndex:DIALER_TAB_INDEX];
|
||||
|
||||
}
|
||||
-(void) displayIncalViewforUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
UIDevice *device = [UIDevice currentDevice];
|
||||
device.proximityMonitoringEnabled = YES;
|
||||
if (device.proximityMonitoringEnabled == YES) {
|
||||
ms_message("Ok this device support proximity, and I just enabled it");
|
||||
}
|
||||
|
||||
[hangup setEnabled:true];
|
||||
if (displayName && [displayName length]>0) {
|
||||
[peerLabel setText:displayName];
|
||||
} else {
|
||||
[peerLabel setText:username?username:@""];
|
||||
}
|
||||
[address setHidden:true];
|
||||
[incallView setHidden:false];
|
||||
[dialerView setHidden:true];
|
||||
}
|
||||
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[self displayIncalViewforUser:username
|
||||
withDisplayName:displayName];
|
||||
[call setEnabled:false];
|
||||
[callDuration setText:NSLocalizedString(@"Calling...",nil)];
|
||||
if ([speaker isOn]) [speaker toggle] ; //preset to off
|
||||
}
|
||||
|
||||
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[callDuration start];
|
||||
[callDuration setHidden:false];
|
||||
|
||||
if (linphone_call_get_dir(linphone_core_get_current_call([LinphoneManager getLc])) == LinphoneCallIncoming) {
|
||||
[self displayIncalViewforUser:username
|
||||
withDisplayName:displayName];
|
||||
if ([speaker isOn]) [speaker toggle] ; //preset to off;
|
||||
}
|
||||
}
|
||||
//status reporting
|
||||
-(void) displayStatus:(NSString*) message {
|
||||
[status setText:message];
|
||||
}
|
||||
|
||||
-(void) updateUIFromLinphoneState:(UIViewController*) viewCtrl {
|
||||
[mute reset];
|
||||
[mIncallViewController displayStatus:message];
|
||||
}
|
||||
|
||||
|
||||
-(void) displayIncomingCallNotigicationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
-(void) displayIncomingCall:(LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
|
||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
|
||||
&& [UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
|
||||
&& [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
|
||||
// Create a new notification
|
||||
UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease];
|
||||
if (notif)
|
||||
|
|
@ -251,26 +211,79 @@
|
|||
notif.alertBody =[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username];
|
||||
notif.alertAction = @"Answer";
|
||||
notif.soundName = @"oldphone-mono-30s.caf";
|
||||
NSData *callData = [NSData dataWithBytes:&call length:sizeof(call)];
|
||||
notif.userInfo = [NSDictionary dictionaryWithObject:callData forKey:@"call"];
|
||||
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notif];
|
||||
}
|
||||
} else {
|
||||
CallDelegate* cd = [[CallDelegate alloc] init];
|
||||
cd.delegate = self;
|
||||
cd.call = call;
|
||||
|
||||
mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username]
|
||||
delegate:self
|
||||
delegate:cd
|
||||
cancelButtonTitle:NSLocalizedString(@"Decline",nil)
|
||||
destructiveButtonTitle:NSLocalizedString(@"Answer",nil)
|
||||
otherButtonTitles:nil];
|
||||
|
||||
mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
|
||||
[mIncomingCallActionSheet showInView:self.view];
|
||||
[mIncomingCallActionSheet showInView:self.parentViewController.view];
|
||||
[mIncomingCallActionSheet release];
|
||||
}
|
||||
|
||||
}
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
if (buttonIndex == 0 ) {
|
||||
linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
|
||||
|
||||
-(void) backToCallViewPressed {
|
||||
[self displayInCall: nil
|
||||
FromUI:nil
|
||||
forUser:nil
|
||||
withDisplayName:nil];
|
||||
}
|
||||
|
||||
-(void) displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
if (self.presentedViewController != (UIViewController*)mIncallViewController) {
|
||||
[self presentModalViewController:(UIViewController*)mIncallViewController animated:true];
|
||||
}
|
||||
[mIncallViewController displayCall:call InProgressFromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
|
||||
}
|
||||
|
||||
-(void) displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
if (self.presentedViewController != (UIViewController*)mIncallViewController && (call == 0x0 ||
|
||||
linphone_call_get_dir(call)==LinphoneCallIncoming)){
|
||||
[self presentModalViewController:(UIViewController*)mIncallViewController animated:true];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[mIncallViewController displayInCall:call FromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
[callLarge setHidden:TRUE];
|
||||
[callShort setHidden:FALSE];
|
||||
[backToCallView setHidden:FALSE];
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[mIncallViewController displayVideoCall:call FromUI:viewCtrl
|
||||
forUser:username
|
||||
withDisplayName:displayName];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas{
|
||||
LinphoneCall* call = (LinphoneCall*)datas;
|
||||
if (buttonIndex == actionSheet.destructiveButtonIndex ) {
|
||||
linphone_core_accept_call([LinphoneManager getLc],call);
|
||||
} else {
|
||||
linphone_core_terminate_call ([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
|
||||
linphone_core_terminate_call ([LinphoneManager getLc], call);
|
||||
}
|
||||
mIncomingCallActionSheet = nil;
|
||||
}
|
||||
|
|
@ -278,13 +291,9 @@
|
|||
- (void)dealloc {
|
||||
[address dealloc];
|
||||
[ mDisplayName dealloc];
|
||||
[incallView dealloc];
|
||||
[dialerView dealloc];
|
||||
[callDuration dealloc];
|
||||
[mute dealloc];
|
||||
[speaker dealloc];
|
||||
[peerLabel dealloc];
|
||||
[call dealloc];
|
||||
[callShort dealloc];
|
||||
[callLarge dealloc];
|
||||
[hangup dealloc];
|
||||
[status dealloc];
|
||||
[one dealloc];
|
||||
|
|
@ -301,6 +310,7 @@
|
|||
[hash dealloc];
|
||||
[back dealloc];
|
||||
[myTabBarController release];
|
||||
[mIncallViewController release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
|
|||
68
Classes/VideoViewController.h
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/* VideoViewController.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "UILinphone.h"
|
||||
|
||||
@interface VideoViewController : UIViewController {
|
||||
UIView* mPortrait;
|
||||
UIView* mDisplay;
|
||||
UIView* mPreview;
|
||||
UIMuteButton* mMute;
|
||||
UIHangUpButton* mHangUp;
|
||||
UICamSwitch* mCamSwitch;
|
||||
|
||||
UIView* mLandscapeRight;
|
||||
UIView* mDisplayLandRight;
|
||||
UIView* mPreviewLandRight;
|
||||
UIMuteButton* mMuteLandRight;
|
||||
UIHangUpButton* mHangUpLandRight;
|
||||
UICamSwitch* mCamSwitchLandRight;
|
||||
|
||||
UIView* mLandscapeLeft;
|
||||
UIView* mDisplayLandLeft;
|
||||
UIView* mPreviewLandLeft;
|
||||
UIMuteButton* mMuteLandLeft;
|
||||
UIHangUpButton* mHangUpLandLeft;
|
||||
UICamSwitch* mCamSwitchLandLeft;
|
||||
BOOL isFirst;
|
||||
int maxCall;
|
||||
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* mPortrait;
|
||||
@property (nonatomic, retain) IBOutlet UIView* mDisplay;
|
||||
@property (nonatomic, retain) IBOutlet UIView* mPreview;
|
||||
@property (nonatomic, retain) IBOutlet UIMuteButton* mMute;
|
||||
@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUp;
|
||||
@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitch;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* mLandscapeRight;
|
||||
@property (nonatomic, retain) IBOutlet UIView* mDisplayLandRight;
|
||||
@property (nonatomic, retain) IBOutlet UIView* mPreviewLandRight;
|
||||
@property (nonatomic, retain) IBOutlet UIMuteButton* mMuteLandRight;
|
||||
@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUpLandRight;
|
||||
@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitchLandRight;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* mLandscapeLeft;
|
||||
@property (nonatomic, retain) IBOutlet UIView* mDisplayLandLeft;
|
||||
@property (nonatomic, retain) IBOutlet UIView* mPreviewLandLeft;
|
||||
@property (nonatomic, retain) IBOutlet UIMuteButton* mMuteLandLeft;
|
||||
@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUpLandLeft;
|
||||
@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitchLandLeft;
|
||||
@end
|
||||
172
Classes/VideoViewController.m
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
/* VideoViewController.m
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "VideoViewController.h"
|
||||
#import "LinphoneManager.h"
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
@implementation VideoViewController
|
||||
@synthesize mPortrait;
|
||||
@synthesize mDisplay;
|
||||
@synthesize mPreview;
|
||||
@synthesize mMute;
|
||||
@synthesize mHangUp;
|
||||
@synthesize mCamSwitch;
|
||||
|
||||
@synthesize mLandscapeRight;
|
||||
@synthesize mDisplayLandRight;
|
||||
@synthesize mPreviewLandRight;
|
||||
@synthesize mMuteLandRight;
|
||||
@synthesize mHangUpLandRight;
|
||||
@synthesize mCamSwitchLandRight;
|
||||
|
||||
@synthesize mLandscapeLeft;
|
||||
@synthesize mDisplayLandLeft;
|
||||
@synthesize mPreviewLandLeft;
|
||||
@synthesize mMuteLandLeft;
|
||||
@synthesize mHangUpLandLeft;
|
||||
@synthesize mCamSwitchLandLeft;
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
#pragma mark - View lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
[mMute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] ];
|
||||
[mMuteLandRight initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] ];
|
||||
[mMuteLandLeft initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] ];
|
||||
[mCamSwitch setPreview:mPreview];
|
||||
[mCamSwitchLandRight setPreview:mPreviewLandRight];
|
||||
[mCamSwitchLandLeft setPreview:mPreviewLandLeft];
|
||||
isFirst=TRUE;
|
||||
}
|
||||
|
||||
|
||||
-(void) configureOrientation:(UIInterfaceOrientation) oritentation {
|
||||
int oldLinphoneOrientation = linphone_core_get_device_rotation([LinphoneManager getLc]);
|
||||
if (oritentation == UIInterfaceOrientationPortrait ) {
|
||||
[self.view addSubview:mPortrait];
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplay);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreview);
|
||||
linphone_core_set_device_rotation([LinphoneManager getLc], 0);
|
||||
|
||||
} else if (oritentation == UIInterfaceOrientationLandscapeRight ) {
|
||||
[self.view addSubview:mLandscapeRight];
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplayLandRight);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreviewLandRight);
|
||||
linphone_core_set_device_rotation([LinphoneManager getLc], 270);
|
||||
|
||||
} else if (oritentation == UIInterfaceOrientationLandscapeLeft ) {
|
||||
[self.view addSubview:mLandscapeLeft];
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplayLandLeft);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreviewLandLeft);
|
||||
linphone_core_set_device_rotation([LinphoneManager getLc], 90);
|
||||
}
|
||||
if ((oldLinphoneOrientation != linphone_core_get_device_rotation([LinphoneManager getLc]))
|
||||
&& linphone_core_get_current_call([LinphoneManager getLc])) {
|
||||
//Orientation has change, must call update call
|
||||
linphone_core_update_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
-(void) configureOrientation {
|
||||
[self configureOrientation:self.interfaceOrientation];
|
||||
}
|
||||
|
||||
- (void)viewDidUnload
|
||||
{
|
||||
[super viewDidUnload];
|
||||
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
|
||||
-(void) viewDidDisappear:(BOOL)animated{
|
||||
[super viewDidDisappear:animated];
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
|
||||
linphone_core_set_max_calls([LinphoneManager getLc], maxCall);
|
||||
}
|
||||
|
||||
-(void) viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
//redirect audio to speaker
|
||||
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
|
||||
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
|
||||
, sizeof (audioRouteOverride)
|
||||
, &audioRouteOverride);
|
||||
|
||||
|
||||
[self performSelectorOnMainThread:@selector(configureOrientation)
|
||||
withObject:nil
|
||||
waitUntilDone:YES];
|
||||
[mMute reset];
|
||||
[mMuteLandRight reset];
|
||||
[mMuteLandLeft reset];
|
||||
maxCall = linphone_core_get_max_calls([LinphoneManager getLc]);
|
||||
linphone_core_set_max_calls([LinphoneManager getLc], 1);
|
||||
}
|
||||
|
||||
- (void) viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
// Return YES for supported orientations
|
||||
return interfaceOrientation == UIInterfaceOrientationPortrait
|
||||
|| interfaceOrientation == UIInterfaceOrientationLandscapeRight
|
||||
|| interfaceOrientation == UIInterfaceOrientationLandscapeLeft;
|
||||
}
|
||||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
[self configureOrientation:self.interfaceOrientation];
|
||||
[mMute reset];
|
||||
[mMuteLandRight reset];
|
||||
[mMuteLandLeft reset];
|
||||
}
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
||||
[mLandscapeLeft removeFromSuperview];
|
||||
[mLandscapeRight removeFromSuperview];
|
||||
[mPortrait removeFromSuperview];
|
||||
}
|
||||
@end
|
||||
1050
Classes/VideoViewController.xib
Normal file
|
|
@ -2,30 +2,31 @@
|
|||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">784</int>
|
||||
<string key="IBDocument.SystemVersion">10D573</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">762</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||
<string key="IBDocument.HIToolboxVersion">460.00</string>
|
||||
<string key="IBDocument.SystemVersion">11C74</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.23</string>
|
||||
<string key="IBDocument.HIToolboxVersion">567.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">87</string>
|
||||
<string key="NS.object.0">933</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="41"/>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUITabBarItem</string>
|
||||
<string>IBUIViewController</string>
|
||||
<string>IBUICustomObject</string>
|
||||
<string>IBUITabBarController</string>
|
||||
<string>IBUIWindow</string>
|
||||
<string>IBUITabBar</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
|
@ -41,10 +42,12 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIWindow" id="380026005">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">1316</int>
|
||||
<object class="NSPSMatrix" key="NSFrameMatrix"/>
|
||||
<string key="NSFrameSize">{320, 480}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||
|
|
@ -58,24 +61,25 @@
|
|||
<object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
<object class="IBUIViewController" key="IBUISelectedViewController" id="156830991">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="1041279701">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="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">history-orange.png</string>
|
||||
<string key="NSResourceName">dialer-orange.png</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<reference key="IBUITabBar"/>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="952473143"/>
|
||||
<string key="IBUINibName">PhoneViewController</string>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -83,34 +87,34 @@
|
|||
</object>
|
||||
<object class="NSMutableArray" key="IBUIViewControllers">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="156830991"/>
|
||||
<object class="IBUIViewController" id="258574391">
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="64474689">
|
||||
<string key="IBUITitle">Dialer</string>
|
||||
<object class="IBUIViewController" id="156830991">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="1041279701">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">dialer-orange.png</string>
|
||||
<string key="NSResourceName">history-orange.png</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<reference key="IBUITabBar"/>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="952473143"/>
|
||||
<string key="IBUINibName">PhoneViewController</string>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
<reference ref="258574391"/>
|
||||
<object class="IBUIViewController" id="383050823">
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="672878446">
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<reference key="IBUITabBar"/>
|
||||
<int key="IBUISystemItemIdentifier">5</int>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="952473143"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -120,12 +124,12 @@
|
|||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="534357631">
|
||||
<string key="IBUITitle"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<reference key="IBUITabBar"/>
|
||||
<int key="IBUISystemItemIdentifier">0</int>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="952473143"/>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -133,9 +137,11 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="IBUITabBar" key="IBUITabBar" id="995238651">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">266</int>
|
||||
<string key="NSFrame">{{129, 330}, {163, 49}}</string>
|
||||
<string key="NSFrame">{{0, 431}, {320, 49}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MCAwAA</bytes>
|
||||
|
|
@ -178,7 +184,9 @@
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
|
|
@ -289,52 +297,52 @@
|
|||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>11.IBPluginDependency</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>2.IBAttributePlaceholdersKey</string>
|
||||
<string>2.IBEditorWindowLastContentRect</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>2.UIWindow.visibleAtLaunch</string>
|
||||
<string>38.CustomClassName</string>
|
||||
<string>38.IBEditorWindowLastContentRect</string>
|
||||
<string>38.IBPluginDependency</string>
|
||||
<string>39.IBPluginDependency</string>
|
||||
<string>4.CustomClassName</string>
|
||||
<string>4.IBPluginDependency</string>
|
||||
<string>41.CustomClassName</string>
|
||||
<string>41.IBPluginDependency</string>
|
||||
<string>42.IBPluginDependency</string>
|
||||
<string>43.CustomClassName</string>
|
||||
<string>43.IBPluginDependency</string>
|
||||
<string>8.IBEditorWindowLastContentRect</string>
|
||||
<string>44.IBPluginDependency</string>
|
||||
<string>8.IBPluginDependency</string>
|
||||
<string>9.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIApplication</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIResponder</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<object class="NSMutableDictionary">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<string>{{190, 156}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<integer value="1"/>
|
||||
<string>PhoneViewController</string>
|
||||
<string>{{343, 544}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>linphoneAppDelegate</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>CallHistoryTableViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>MoreViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>{{623, 298}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
|
|
@ -342,490 +350,18 @@
|
|||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">47</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">CallHistoryTableViewController</string>
|
||||
<string key="superclassName">GenericTabViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">doAction:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">clear</string>
|
||||
<string key="NS.object.0">UIButton</string>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/CallHistoryTableViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">GenericTabViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>header</string>
|
||||
<string>linphoneDelegate</string>
|
||||
<string>phoneControllerDelegate</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIView</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/GenericTabViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MoreViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>console</string>
|
||||
<string>credit</string>
|
||||
<string>creditText</string>
|
||||
<string>web</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UITableViewCell</string>
|
||||
<string>UITableViewCell</string>
|
||||
<string>UITextView</string>
|
||||
<string>UITableViewCell</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/MoreViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">PhoneViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>doAction:</string>
|
||||
<string>doKeyPad:</string>
|
||||
<string>doKeyPadUp:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>address</string>
|
||||
<string>back</string>
|
||||
<string>call</string>
|
||||
<string>callDuration</string>
|
||||
<string>eight</string>
|
||||
<string>five</string>
|
||||
<string>four</string>
|
||||
<string>hangup</string>
|
||||
<string>hash</string>
|
||||
<string>incallView</string>
|
||||
<string>mute</string>
|
||||
<string>nine</string>
|
||||
<string>one</string>
|
||||
<string>peerLabel</string>
|
||||
<string>seven</string>
|
||||
<string>six</string>
|
||||
<string>speaker</string>
|
||||
<string>star</string>
|
||||
<string>status</string>
|
||||
<string>three</string>
|
||||
<string>two</string>
|
||||
<string>zero</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UITextField</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UILabel</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIView</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UILabel</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UILabel</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/PhoneViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">linphoneAppDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>myPeoplePickerController</string>
|
||||
<string>myPhoneViewController</string>
|
||||
<string>myTabBarController</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>ABPeoplePickerNavigationController</string>
|
||||
<string>PhoneViewController</string>
|
||||
<string>UITabBarController</string>
|
||||
<string>UIWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/linphoneAppDelegate.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ABPeoplePickerNavigationController</string>
|
||||
<string key="superclassName">UINavigationController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">AddressBookUI.framework/Headers/ABPeoplePickerNavigationController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="864247238">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIApplication</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIBarItem</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIButton</string>
|
||||
<string key="superclassName">UIControl</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIControl</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UILabel</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UINavigationController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="507408314">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIResponder</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="864247238"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIScrollView</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchBar</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISearchDisplayController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITabBar</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITabBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITabBarController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="46659541">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITabBarItem</string>
|
||||
<string key="superclassName">UIBarItem</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITabBarItem.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITableViewCell</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITableViewCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITableViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITableViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITextField</string>
|
||||
<string key="superclassName">UIControl</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="1053502899">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UITextView</string>
|
||||
<string key="superclassName">UIScrollView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UITextView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIView</string>
|
||||
<reference key="sourceIdentifier" ref="1053502899"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIView</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<reference key="sourceIdentifier" ref="507408314"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<reference key="sourceIdentifier" ref="46659541"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIViewController</string>
|
||||
<string key="superclassName">UIResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIWindow</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="maxID">48</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
|
||||
|
|
@ -834,14 +370,13 @@
|
|||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<integer value="784" key="NS.object.0"/>
|
||||
<real value="1280" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">linphone.xcodeproj</string>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
|
@ -856,6 +391,6 @@
|
|||
<string>{25, 23}</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="IBCocoaTouchPluginVersion">87</string>
|
||||
<string key="IBCocoaTouchPluginVersion">933</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
|
|||
49
README
|
|
@ -2,6 +2,8 @@
|
|||
******************************************
|
||||
|
||||
Linphone for iPhone depends on liblinphone sdk. To build this sdk, you must install both xcode with iPhone OS SDK and MacPorts (www.macports.org) with the following ports:
|
||||
-nawk
|
||||
-coreutils
|
||||
-automake
|
||||
-autoconf
|
||||
-libtool
|
||||
|
|
@ -9,26 +11,47 @@ Linphone for iPhone depends on liblinphone sdk. To build this sdk, you must inst
|
|||
-wget
|
||||
-pkgconfig
|
||||
-cmake (for ZRTP support)
|
||||
-yasm
|
||||
-doxygen
|
||||
|
||||
|
||||
gas-preprosessor.pl (http://github.com/yuvi/gas-preprocessor/ ) to be copied into /opt/local/bin :
|
||||
$ wget --no-check-certificate https://raw.github.com/yuvi/gas-preprocessor/master/gas-preprocessor.pl
|
||||
$ sudo mv gas-preprocessor.pl /opt/local/bin/.
|
||||
|
||||
Link macport libtoolize to glibtoolize (sudo ln -s /opt/local/bin/glibtoolize /opt/local/bin/libtoolize)
|
||||
Link host's strings to simulator SDK (ln -s /usr/bin/strings /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings)
|
||||
|
||||
You may update variable SDK_VERSION from file submodules/build/iphone-config.site according to your iPhone SDK version. Current is 4.0
|
||||
|
||||
To generate the liblinphone dual arch sdk, once the above commands have been executed:
|
||||
***********************************************************************
|
||||
*******GPL third parties versus non GPL third parties******************
|
||||
***********************************************************************
|
||||
This sdk can be generated in 2 flavors. Firt is with GPL third parties, it means liblinphone includes GPL third parties like FFMPEG or x264.
|
||||
If you choose this flavor, your final application must comply with GPL in any case. This is the default mode.
|
||||
|
||||
To generate the liblinphone multi arch sdk in GPL mode, once the above commands have been executed:
|
||||
cd submodules/build
|
||||
make all
|
||||
|
||||
In case you upgrade your IOS SDK, you may force configure by using make targets <clean> and <clean-makefile>
|
||||
ALTERNATIVELY, you can force liblinphone to use only non GPL code except for liblinphone, mediastremer2, ortp, exosip, osip.
|
||||
If you choose this flavor, your final application is still subject to GPL except if you have an alternative license for liblinphone, mediastremer2, ortp, exosip, osip.
|
||||
|
||||
To generate the liblinphone multi arch sdkin non GPL mode, once the above commands have been executed:
|
||||
cd submodules/build
|
||||
make all enable_gpl_third_parties=no
|
||||
|
||||
Note: simulator build does not work with this flavor.
|
||||
|
||||
******************************************
|
||||
****Third party, subject to lincense*****
|
||||
******************************************
|
||||
The liblinphone-sdk is compiled with third parties code that are subject to license, specially: AMR, SILK and X264.
|
||||
Linphone activates/de-activates these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_X264 positioned in xcode.
|
||||
Before embeding these 3 codecs in the final application, make sure to have the right to do so.
|
||||
******************************************
|
||||
|
||||
|
||||
In case you upgrade your IOS SDK, you may force configure by using make targets <veryclean>
|
||||
|
||||
Libraries are available from liblinphone-sdk/
|
||||
|
||||
AMR plugin
|
||||
liblinphone-sdk contains Linphone ARM plugin. As AMR may require to pay for patents, it is not enabled unless Linphone for iphone is compiled with gcc flag HAVE_AMR.
|
||||
|
||||
SILK plugin
|
||||
liblinphone-sdk contains Linphone SILK plugin.
|
||||
As Skype requires that you accept its license, the plugin is not compiled and enabled unless:
|
||||
- you compile the SDK with enable_silk=yes flag (make);
|
||||
- you compile the UI with HAVE_SILK preprocessor macro (xcode).
|
||||
- you compile add libmssilk.so to the list a library (xcode).
|
||||
|
||||
|
|
|
|||
BIN
Resources/HP.png
Executable file
|
After Width: | Height: | Size: 3 KiB |
BIN
Resources/HP_inverse.png
Executable file
|
After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 1.7 KiB |
BIN
Resources/addcall-green.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
Resources/ajouter.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Resources/clavier.png
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
Resources/conf_merge.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
Resources/contact.png
Executable file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
Resources/contact_orange.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
Resources/contact_vide.png
Executable file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
Resources/effacer.png
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Resources/grouper.png
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
Resources/mic_active.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
Resources/mic_muted.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
Resources/micro.png
Executable file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
Resources/micro_inverse.png
Executable file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
Resources/numpad.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
Resources/pause.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Resources/pause_inactif.png
Executable file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
Resources/pausecall.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Resources/resumecall.png
Normal file
|
After Width: | Height: | Size: 3 KiB |
BIN
Resources/secured.png
Normal file
|
After Width: | Height: | Size: 838 B |
BIN
Resources/unverified.png
Normal file
|
After Width: | Height: | Size: 358 B |
|
|
@ -94,69 +94,25 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Codecs</string>
|
||||
<string>Media</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>speex_16k_preference</string>
|
||||
<key>File</key>
|
||||
<string>audio</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 16Khz</string>
|
||||
<string>Audio</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<string>PSChildPaneSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>speex_8k_preference</string>
|
||||
<key>File</key>
|
||||
<string>video</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 8Khz</string>
|
||||
<string>Video</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>gsm_8k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>GSM</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>ilbc_preference</string>
|
||||
<key>Title</key>
|
||||
<string>ILBC</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>pcmu_preference</string>
|
||||
<key>Title</key>
|
||||
<string>PCMU</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>pcma_preference</string>
|
||||
<key>Title</key>
|
||||
<string>PCMA</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<string>PSChildPaneSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
|
|
@ -274,6 +230,16 @@
|
|||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>enable_srtp_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Secure rtp</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>backgroundmode_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Background mode</string>
|
||||
|
|
|
|||
105
Settings.bundle/audio.plist
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Codecs</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>speex_16k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 16Khz</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>speex_8k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 8Khz</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>silk_24k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Silk 24Khz</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>silk_16k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Silk 16Khz</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>g722_preference</string>
|
||||
<key>Title</key>
|
||||
<string>G722</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>gsm_8k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>GSM</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>ilbc_preference</string>
|
||||
<key>Title</key>
|
||||
<string>ILBC</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>pcmu_preference</string>
|
||||
<key>Title</key>
|
||||
<string>PCMU</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>pcma_preference</string>
|
||||
<key>Title</key>
|
||||
<string>PCMA</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
65
Settings.bundle/video.plist
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Enable video</string>
|
||||
<key>Key</key>
|
||||
<string>enable_video_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Automatically start video</string>
|
||||
<key>Key</key>
|
||||
<string>start_video_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Codecs</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>mp4v-es_preference</string>
|
||||
<key>Title</key>
|
||||
<string>mpeg4</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>h264_preference</string>
|
||||
<key>Title</key>
|
||||
<string>h264</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>vp8_preference</string>
|
||||
<key>Title</key>
|
||||
<string>VP8</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
35
disable-security.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
diff --git a/Settings.bundle/Root.plist b/Settings.bundle/Root.plist
|
||||
index 5bc0378..9d011f1 100644
|
||||
--- a/Settings.bundle/Root.plist
|
||||
+++ b/Settings.bundle/Root.plist
|
||||
@@ -169,7 +169,7 @@
|
||||
<array>
|
||||
<string>udp</string>
|
||||
<string>tcp</string>
|
||||
- <string>tls</string>
|
||||
+ <!--string>tls</string-->
|
||||
</array>
|
||||
<key>Type</key>
|
||||
<string>PSMultiValueSpecifier</string>
|
||||
@@ -177,10 +177,10 @@
|
||||
<array>
|
||||
<string>udp</string>
|
||||
<string>tcp</string>
|
||||
- <string>tls</string>
|
||||
+ <!--string>tls</string-->
|
||||
</array>
|
||||
</dict>
|
||||
- <dict>
|
||||
+ <!--dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
@@ -189,7 +189,7 @@
|
||||
<string>Secure rtp</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
- </dict>
|
||||
+ </dict-->
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
44
linphone copy-Info.plist
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Linphone</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icone-linphone-57.png</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.linphone.phone</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.4.9</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.7.3</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>PhoneMainView</string>
|
||||
<key>UIApplicationExitsOnSuspend</key>
|
||||
<false/>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>voip</string>
|
||||
<string>audio</string>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>wifi</string>
|
||||
<string>microphone</string>
|
||||
</array>
|
||||
<key>UIRequiresPersistentWiFi</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -19,11 +19,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.4.5</string>
|
||||
<string>3.4.11</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.7</string>
|
||||
<string>1.1.0.1</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>PhoneMainView</string>
|
||||
<key>UIApplicationExitsOnSuspend</key>
|
||||
|
|
|
|||
19
linphonerc
|
|
@ -1,11 +1,16 @@
|
|||
[net]
|
||||
download_bw=128
|
||||
upload_bw=128
|
||||
download_bw=380
|
||||
upload_bw=380
|
||||
firewall_policy=0
|
||||
mtu=0
|
||||
|
||||
[sip]
|
||||
sip_random_port=1
|
||||
sip_port=5060
|
||||
sip_tcp_random_port=1
|
||||
sip_tcp_port=0
|
||||
sip_tls_random_port=1
|
||||
sip_tls_port=0
|
||||
guess_hostname=1
|
||||
contact=sip:toto@unknown-host
|
||||
inc_timeout=15
|
||||
|
|
@ -31,4 +36,12 @@ echocancellation=0
|
|||
|
||||
[misc]
|
||||
history_max_size=30
|
||||
max_calls=1
|
||||
max_calls=3
|
||||
|
||||
[video]
|
||||
display=1
|
||||
capture=1
|
||||
show_local=0
|
||||
enabled=1
|
||||
size=ios-medium
|
||||
|
||||
|
|
|
|||
BIN
nogpl-thirdparties/.DS_Store
vendored
Normal file
207
nogpl-thirdparties/Settings.bundle/Root.plist
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>SIP account</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AutocapitalizationType</key>
|
||||
<string>None</string>
|
||||
<key>AutocorrectionType</key>
|
||||
<string>No</string>
|
||||
<key>DefaultValue</key>
|
||||
<string></string>
|
||||
<key>IsSecure</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>username_preference</string>
|
||||
<key>KeyboardType</key>
|
||||
<string>Alphabet</string>
|
||||
<key>Title</key>
|
||||
<string>User name</string>
|
||||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AutocapitalizationType</key>
|
||||
<string>None</string>
|
||||
<key>AutocorrectionType</key>
|
||||
<string>No</string>
|
||||
<key>DefaultValue</key>
|
||||
<string></string>
|
||||
<key>IsSecure</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>password_preference</string>
|
||||
<key>KeyboardType</key>
|
||||
<string>Alphabet</string>
|
||||
<key>Title</key>
|
||||
<string>Password</string>
|
||||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AutocapitalizationType</key>
|
||||
<string>None</string>
|
||||
<key>AutocorrectionType</key>
|
||||
<string>No</string>
|
||||
<key>DefaultValue</key>
|
||||
<string></string>
|
||||
<key>IsSecure</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>domain_preference</string>
|
||||
<key>KeyboardType</key>
|
||||
<string>URL</string>
|
||||
<key>Title</key>
|
||||
<string>Domain</string>
|
||||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AutocapitalizationType</key>
|
||||
<string>None</string>
|
||||
<key>AutocorrectionType</key>
|
||||
<string>No</string>
|
||||
<key>DefaultValue</key>
|
||||
<string></string>
|
||||
<key>IsSecure</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>proxy_preference</string>
|
||||
<key>KeyboardType</key>
|
||||
<string>URL</string>
|
||||
<key>Title</key>
|
||||
<string>Proxy</string>
|
||||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>outbound_proxy_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Outbound proxy</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Media</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>File</key>
|
||||
<string>audio</string>
|
||||
<key>Title</key>
|
||||
<string>Audio</string>
|
||||
<key>Type</key>
|
||||
<string>PSChildPaneSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>File</key>
|
||||
<string>video</string>
|
||||
<key>Title</key>
|
||||
<string>Video</string>
|
||||
<key>Type</key>
|
||||
<string>PSChildPaneSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Advanced</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>debugenable_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Debug</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AutocapitalizationType</key>
|
||||
<string>None</string>
|
||||
<key>AutocorrectionType</key>
|
||||
<string>No</string>
|
||||
<key>DefaultValue</key>
|
||||
<string></string>
|
||||
<key>IsSecure</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>prefix_preference</string>
|
||||
<key>KeyboardType</key>
|
||||
<string>NumberPad</string>
|
||||
<key>Title</key>
|
||||
<string>Prefix</string>
|
||||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>substitute_+_by_00_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Substitue + by 00</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<string>udp</string>
|
||||
<key>Key</key>
|
||||
<string>transport_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Transport</string>
|
||||
<key>Titles</key>
|
||||
<array>
|
||||
<string>udp</string>
|
||||
<string>tcp</string>
|
||||
<string>tls</string>
|
||||
</array>
|
||||
<key>Type</key>
|
||||
<string>PSMultiValueSpecifier</string>
|
||||
<key>Values</key>
|
||||
<array>
|
||||
<string>udp</string>
|
||||
<string>tcp</string>
|
||||
<string>tls</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>enable_srtp_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Secure rtp</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>backgroundmode_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Background mode</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>StringsTable</key>
|
||||
<string>Root</string>
|
||||
</dict>
|
||||
</plist>
|
||||
85
nogpl-thirdparties/Settings.bundle/audio.plist
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Codecs</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>speex_16k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 16Khz</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>speex_8k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 8Khz</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>g722_preference</string>
|
||||
<key>Title</key>
|
||||
<string>G722</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>gsm_8k_preference</string>
|
||||
<key>Title</key>
|
||||
<string>GSM</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>ilbc_preference</string>
|
||||
<key>Title</key>
|
||||
<string>ILBC</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>pcmu_preference</string>
|
||||
<key>Title</key>
|
||||
<string>PCMU</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>pcma_preference</string>
|
||||
<key>Title</key>
|
||||
<string>PCMA</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
nogpl-thirdparties/Settings.bundle/en.lproj/Root.strings
Normal file
35
nogpl-thirdparties/Settings.bundle/video.plist
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Enable video</string>
|
||||
<key>Key</key>
|
||||
<string>enable_video_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Codecs</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>vp8_preference</string>
|
||||
<key>Title</key>
|
||||
<string>VP8</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -19,11 +19,35 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
all:
|
||||
make -f builder-iphone-simulator.mk all build-tunnel\
|
||||
&& make -f builder-iphone-os.mk all build-tunnel\
|
||||
&& make -f builder-iphone-os.mk host=armv7-apple-darwin all build-tunnel\
|
||||
&& make -f builder-iphone-os.mk delivery-sdk
|
||||
|
||||
enable_gpl_third_parties=yes
|
||||
|
||||
.NOTPARALLEL all: build warning
|
||||
ifeq ($(enable_gpl_third_parties),yes)
|
||||
warning:
|
||||
@echo
|
||||
@echo "*****************************************************************"
|
||||
@echo "*****************************************************************"
|
||||
@echo "*****CAUTION, this liblinphone SDK is built using GPL code ******"
|
||||
@echo "*****To disable gpl code, use make enable_gpl_third_parties=no***"
|
||||
@echo "*****************************************************************"
|
||||
@echo "*****************************************************************"
|
||||
else
|
||||
warning:
|
||||
@echo
|
||||
@echo "*****************************************************************"
|
||||
@echo "*****************************************************************"
|
||||
@echo "*****linphone SDK without GPL code ******"
|
||||
@echo "*****************************************************************"
|
||||
@echo "*****************************************************************"
|
||||
endif
|
||||
|
||||
build:
|
||||
make -f builder-iphone-os.mk all build-tunnel enable_gpl_third_parties=$(enable_gpl_third_parties) \
|
||||
&& make -f builder-iphone-simulator.mk all build-tunnel enable_gpl_third_parties=$(enable_gpl_third_parties)\
|
||||
&& make -f builder-iphone-os.mk host=armv7-apple-darwin all build-tunnel enable_gpl_third_parties=$(enable_gpl_third_parties)\
|
||||
&& make -f builder-iphone-os.mk delivery-sdk
|
||||
|
||||
clean:
|
||||
make -f builder-iphone-simulator.mk clean clean-tunnel\
|
||||
&& make -f builder-iphone-os.mk clean clean-tunnel\
|
||||
|
|
|
|||
|
|
@ -21,11 +21,9 @@
|
|||
############################################################################
|
||||
|
||||
host?=armv6-apple-darwin
|
||||
enable_zrtp?=no
|
||||
enable_silk?=no
|
||||
config_site:=iphone-config.site
|
||||
library_mode:= --disable-shared --enable-static
|
||||
linphone_configure_controls= --disable-video \
|
||||
linphone_configure_controls= \
|
||||
--disable-strict \
|
||||
--disable-nls \
|
||||
--with-readline=none \
|
||||
|
|
@ -33,23 +31,12 @@ linphone_configure_controls= --disable-video \
|
|||
--enable-console_ui=no \
|
||||
--enable-ssl-hmac=no \
|
||||
--enable-ssl=yes \
|
||||
--disable-theora \
|
||||
--disable-sdl \
|
||||
--disable-x11 \
|
||||
--with-gsm=$(prefix) \
|
||||
--disable-tests \
|
||||
LIBZRTPCPP_CFLAGS="-I$(prefix)/include" \
|
||||
LIBZRTPCPP_LIBS="-L$(prefix)/lib -lzrtpcpp -lcrypto" \
|
||||
SRTP_CFLAGS="-I$(prefix)/include" \
|
||||
SRTP_LIBS="-L$(prefix)/lib -lsrtp -lcrypto" \
|
||||
SRTP_CFLAGS="-I$(prefix)/include" \
|
||||
SPEEX_CFLAGS="-I$(prefix)/include" \
|
||||
SPEEXDSP_CFLAGS="-I$(prefix)/include" \
|
||||
SPEEXDSP_LIBS="-L$(prefix)/lib -lspeexdsp" \
|
||||
SPEEX_LIBS="-L$(prefix)/lib -lspeexdsp -lspeex " \
|
||||
OPENSSL_CFLAGS="-I$(prefix)/include" \
|
||||
OPENSSL_LIBS="-L$(prefix)/lib -lssl -lcrypto"
|
||||
ifeq ($(enable_zrtp),yes)
|
||||
linphone_configure_controls+= --with-srtp=$(prefix) --enable-zrtp=yes --disable-tests
|
||||
endif
|
||||
|
||||
--with-srtp=$(prefix)
|
||||
|
||||
#path
|
||||
BUILDER_SRC_DIR?=$(shell pwd)/../
|
||||
|
|
@ -58,17 +45,34 @@ BUILDER_BUILD_DIR?=$(shell pwd)/../build-$(host)
|
|||
LINPHONE_SRC_DIR=$(BUILDER_SRC_DIR)/linphone
|
||||
LINPHONE_BUILD_DIR=$(BUILDER_BUILD_DIR)/linphone
|
||||
|
||||
osip_dir?=externals/osip
|
||||
all: build-linphone build-msilbc build-msamr build-msx264 build-mssilk
|
||||
|
||||
eXosip_dir?=externals/exosip
|
||||
$(LINPHONE_BUILD_DIR)/enable_gpl_third_parties:
|
||||
mkdir -p $(LINPHONE_BUILD_DIR)
|
||||
touch $(LINPHONE_BUILD_DIR)/enable_gpl_third_parties
|
||||
rm -f $(LINPHONE_BUILD_DIR)/disable_gpl_third_parties
|
||||
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
|
||||
|
||||
speex_dir?=externals/speex
|
||||
$(LINPHONE_BUILD_DIR)/disable_gpl_third_parties:
|
||||
mkdir -p $(LINPHONE_BUILD_DIR)
|
||||
touch $(LINPHONE_BUILD_DIR)/disable_gpl_third_parties
|
||||
rm -f $(LINPHONE_BUILD_DIR)/enable_gpl_third_parties
|
||||
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
|
||||
|
||||
gsm_dir?=externals/gsm
|
||||
ifeq ($(enable_gpl_third_parties),yes)
|
||||
linphone_configure_controls+= --enable-ffmpeg --enable-zrtp
|
||||
detect_gpl_mode_switch: $(LINPHONE_BUILD_DIR)/enable_gpl_third_parties
|
||||
|
||||
else
|
||||
linphone_configure_controls+= --disable-ffmpeg --disable-zrtp
|
||||
detect_gpl_mode_switch: $(LINPHONE_BUILD_DIR)/disable_gpl_third_parties
|
||||
|
||||
endif
|
||||
|
||||
srtp_dir?=externals/srtp
|
||||
|
||||
zrtpcpp_dir?=externals/zrtpcpp
|
||||
osip_dir=externals/osip
|
||||
eXosip_dir=externals/exosip
|
||||
speex_dir=externals/speex
|
||||
gsm_dir=externals/gsm
|
||||
|
||||
MSILBC_SRC_DIR:=$(BUILDER_SRC_DIR)/msilbc
|
||||
MSILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/msilbc
|
||||
|
|
@ -77,35 +81,39 @@ LIBILBC_SRC_DIR:=$(BUILDER_SRC_DIR)/libilbc-rfc3951
|
|||
LIBILBC_BUILD_DIR:=$(BUILDER_BUILD_DIR)/libilbc-rfc3951
|
||||
|
||||
ifneq (,$(findstring arm,$(host)))
|
||||
SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api
|
||||
#SPEEX_CONFIGURE_OPTION := --enable-arm5e-asm --enable-fixed-point
|
||||
#SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api
|
||||
CFLAGS := $(CFLAGS) -marm
|
||||
SPEEX_CONFIGURE_OPTION := --disable-float-api --enable-arm5e-asm --enable-fixed-point
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
SPEEX_CONFIGURE_OPTION += --enable-armv7neon-asm
|
||||
endif
|
||||
|
||||
prefix?=$(BUILDER_SRC_DIR)/../liblinphone-sdk/$(host)
|
||||
|
||||
.NOTPARALLEL all: build-linphone build-msilbc build-msamr build-mssilk
|
||||
|
||||
clean-makefile: clean-makefile-linphone
|
||||
clean: clean-linphone
|
||||
init:
|
||||
mkdir -p $(prefix)/include
|
||||
mkdir -p $(prefix)/lib
|
||||
mkdir -p $(prefix)/lib/pkgconfig
|
||||
|
||||
veryclean: veryclean-linphone
|
||||
rm -rf $(BUILDER_BUILD_DIR)
|
||||
|
||||
.NOTPARALLEL build-linphone: init build-openssl build-srtp build-zrtpcpp build-osip2 build-eXosip2 build-speex build-libgsm $(LINPHONE_BUILD_DIR)/Makefile
|
||||
|
||||
.NOTPARALLEL build-linphone: init build-openssl build-srtp build-zrtpcpp build-osip2 build-eXosip2 build-speex build-libgsm build-ffmpeg build-libvpx detect_gpl_mode_switch $(LINPHONE_BUILD_DIR)/Makefile
|
||||
cd $(LINPHONE_BUILD_DIR) && export PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig export CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make newdate && make && make install
|
||||
|
||||
clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr clean-mssilk
|
||||
clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr clean-mssilk clean-ffmpeg clean-libvpx clean-msx264
|
||||
cd $(LINPHONE_BUILD_DIR) && make clean
|
||||
|
||||
veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-zrtpcpp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr veryclean-mssilk
|
||||
veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-zrtpcpp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr veryclean-mssilk veryclean-msx264
|
||||
#-cd $(LINPHONE_BUILD_DIR) && make distclean
|
||||
-cd $(LINPHONE_SRC_DIR) && rm -f configure
|
||||
|
||||
clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-srtp clean-makefile-zrtpcpp clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl clean-makefile-msamr clean-makefile-mssilk
|
||||
clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex clean-makefile-srtp clean-makefile-zrtpcpp clean-makefile-libilbc clean-makefile-msilbc clean-makefile-openssl clean-makefile-msamr clean-makefile-ffmpeg clean-makefile-libvpx clean-makefile-mssilk
|
||||
cd $(LINPHONE_BUILD_DIR) && rm -f Makefile && rm -f oRTP/Makefile && rm -f mediastreamer2/Makefile
|
||||
|
||||
|
||||
|
|
@ -189,12 +197,11 @@ $(BUILDER_SRC_DIR)/$(speex_dir)/configure:
|
|||
$(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile: $(BUILDER_SRC_DIR)/$(speex_dir)/configure
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(speex_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir)/\
|
||||
&& CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
$(BUILDER_SRC_DIR)/$(speex_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-oggtest $(SPEEX_CONFIGURE_OPTION)
|
||||
&& CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) CFLAGS="$(CFLAGS) -O2" \
|
||||
$(BUILDER_SRC_DIR)/$(speex_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-ogg $(SPEEX_CONFIGURE_OPTION)
|
||||
|
||||
build-speex: $(BUILDER_BUILD_DIR)/$(speex_dir)/Makefile
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir)/libspeex && make && make install
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir)/include && make && make install
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make && make install
|
||||
|
||||
clean-speex:
|
||||
cd $(BUILDER_BUILD_DIR)/$(speex_dir) && make clean
|
||||
|
|
@ -294,7 +301,7 @@ multi-arch:
|
|||
if test -f "$$i386_path"; then \
|
||||
echo "Mixing $$archive and $$i386_path into $$destpath"; \
|
||||
mkdir -p `dirname $$destpath` ; \
|
||||
lipo -create -arch armv6 $$archive -arch armv7 $$armv7_path -arch i386 $$i386_path -output $$destpath; \
|
||||
lipo -create $$archive $$armv7_path $$i386_path -output $$destpath; \
|
||||
else \
|
||||
echo "WARNING: archive `basename $$archive` exists in arm tree but does not exists in i386 tree."; \
|
||||
fi \
|
||||
|
|
|
|||
47
submodules/build/builders.d/ffmpeg.mk
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
ffmpeg_configure_options=\
|
||||
--disable-mmx \
|
||||
--enable-cross-compile \
|
||||
--disable-ffprobe --disable-ffserver --disable-avdevice \
|
||||
--disable-avfilter --disable-network \
|
||||
--disable-everything --enable-decoder=mjpeg --enable-encoder=mjpeg --enable-decoder=mpeg4 --enable-encoder=mpeg4 \
|
||||
--enable-decoder=h264 --disable-avformat --enable-armv5te --enable-armv6 --enable-armv6t2 \
|
||||
--enable-armvfp \
|
||||
--cross-prefix=$$SDK_BIN_PATH/ \
|
||||
--sysroot=$$SYSROOT_PATH --arch=$$ARCH \
|
||||
--enable-static --disable-shared --target-os=darwin \
|
||||
--extra-cflags="-arch $$ARCH " --extra-ldflags="-arch $$ARCH -Wl,-syslibroot,$$SYSROOT_PATH " \
|
||||
--source-path=$(BUILDER_SRC_DIR)/$(ffmpeg_dir)
|
||||
# --as=$(BUILDER_SRC_DIR)/externals/x264/extras/gas-preprocessor.pl
|
||||
|
||||
#--sysinclude=PATH location of cross-build system headers
|
||||
ifneq (,$(findstring armv6,$(host)))
|
||||
ffmpeg_configure_options+= --cpu=arm1176jzf-s
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
ffmpeg_configure_options+= --enable-neon --cpu=cortex-a8
|
||||
endif
|
||||
ffmpeg_dir?=externals/ffmpeg
|
||||
$(BUILDER_SRC_DIR)/$(ffmpeg_dir)/patched :
|
||||
cd $(BUILDER_SRC_DIR)/$(ffmpeg_dir) \
|
||||
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/ffmpeg.patch \
|
||||
&& touch $(BUILDER_SRC_DIR)/$(ffmpeg_dir)/patched
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/config.mak: $(BUILDER_SRC_DIR)/$(ffmpeg_dir)/patched
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/ \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& $(BUILDER_SRC_DIR)/$(ffmpeg_dir)/configure --prefix=$(prefix) $(ffmpeg_configure_options)
|
||||
|
||||
build-ffmpeg: $(BUILDER_BUILD_DIR)/$(ffmpeg_dir)/config.mak
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install
|
||||
|
||||
clean-ffmpeg:
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && make clean
|
||||
|
||||
veryclean-ffmpeg:
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && make distclean
|
||||
|
||||
clean-makefile-ffmpeg:
|
||||
cd $(BUILDER_BUILD_DIR)/$(ffmpeg_dir) && rm -f config.mak
|
||||
|
||||
20
submodules/build/builders.d/ffmpeg.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
|
||||
index 8f03d4b..0504b95 100644
|
||||
--- a/libavutil/arm/intmath.h
|
||||
+++ b/libavutil/arm/intmath.h
|
||||
@@ -91,10 +91,12 @@ static av_always_inline av_const int FASTDIV(int a, int b)
|
||||
static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
|
||||
{
|
||||
int x, y;
|
||||
- __asm__ volatile ("adds %1, %R2, %Q2, lsr #31 \n\t"
|
||||
+ union { uint64_t a; uint32_t hl[2]; } tmp_a;
|
||||
+ tmp_a.a=a;
|
||||
+ __asm__ volatile ("adds %1, %2, %3, lsr #31 \n\t"
|
||||
"mvnne %1, #1<<31 \n\t"
|
||||
- "eorne %0, %1, %R2, asr #31 \n\t"
|
||||
- : "=r"(x), "=&r"(y) : "r"(a));
|
||||
+ "eorne %0, %1, %2, asr #31 \n\t"
|
||||
+ : "=r"(x), "=&r"(y) : "r"(tmp_a.hl[0]),"r"(tmp_a.hl[1]));
|
||||
return x;
|
||||
}
|
||||
|
||||
39
submodules/build/builders.d/libvpx.mk
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
libvpx_configure_options=\
|
||||
--enable-static --disable-shared \
|
||||
--disable-examples
|
||||
# --extra-cflags="-isysroot $$SYSROOT_PATH "
|
||||
# -Wl,-syslibroot,$$SYSROOT_PATH " \
|
||||
--enable-error-concealment --disable-examples
|
||||
|
||||
ifneq (,$(findstring armv6,$(host)))
|
||||
libvpx_configure_options+= --target=armv6-darwin-gcc --cpu=arm1176jzf-s
|
||||
else ifneq (,$(findstring armv7,$(host)))
|
||||
libvpx_configure_options+= --target=armv7-darwin-gcc --cpu=cortex-a8
|
||||
else
|
||||
libvpx_configure_options+= --force-target=x86-darwin10-gcc
|
||||
endif
|
||||
libvpx_dir?=externals/libvpx
|
||||
$(BUILDER_SRC_DIR)/$(libvpx_dir)/patched :
|
||||
cd $(BUILDER_SRC_DIR)/$(libvpx_dir) \
|
||||
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/libvpx.patch \
|
||||
&& touch $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk: $(BUILDER_SRC_DIR)/$(libvpx_dir)/patched
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(libvpx_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir)/ \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& $(BUILDER_SRC_DIR)/$(libvpx_dir)/configure --prefix=$(prefix) $(libvpx_configure_options)
|
||||
|
||||
build-libvpx: $(BUILDER_BUILD_DIR)/$(libvpx_dir)/config.mk
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install
|
||||
|
||||
clean-libvpx:
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && make clean
|
||||
|
||||
veryclean-libvpx:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && make distclean
|
||||
rm -rf $(BUILDER_BUILD_DIR)/$(libvpx_dir)
|
||||
|
||||
clean-makefile-libvpx:
|
||||
cd $(BUILDER_BUILD_DIR)/$(libvpx_dir) && rm -f config.mak
|
||||
|
||||
25
submodules/build/builders.d/libvpx.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
||||
index 009a6c4..1cd1ea8 100755
|
||||
--- a/build/make/configure.sh
|
||||
+++ b/build/make/configure.sh
|
||||
@@ -729,7 +729,7 @@ process_common_toolchain() {
|
||||
TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
|
||||
CC=${TOOLCHAIN_PATH}/gcc
|
||||
AR=${TOOLCHAIN_PATH}/ar
|
||||
- LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-gcc-4.2.1
|
||||
+ LD=${TOOLCHAIN_PATH}/gcc
|
||||
AS=${TOOLCHAIN_PATH}/as
|
||||
STRIP=${TOOLCHAIN_PATH}/strip
|
||||
NM=${TOOLCHAIN_PATH}/nm
|
||||
@@ -741,9 +741,9 @@ process_common_toolchain() {
|
||||
ASFLAGS="-version -arch ${tgt_isa} -g"
|
||||
|
||||
add_cflags -arch ${tgt_isa}
|
||||
- add_ldflags -arch_only ${tgt_isa}
|
||||
+ add_ldflags "-arch ${tgt_isa} -Wl,-syslibroot,${SDK_PATH}/SDKs/iPhoneOS5.0.sdk"
|
||||
|
||||
- add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS4.3.sdk"
|
||||
+ add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS5.0.sdk"
|
||||
|
||||
# This should be overridable
|
||||
alt_libc=${SDK_PATH}/SDKs/iPhoneOS4.3.sdk
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
#
|
||||
############################################################################
|
||||
mssilk_dir?=mssilk
|
||||
enable_silk?=yes
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(mssilk_dir)/configure:
|
||||
echo -e "\033[01;32m Running autogen for mssilk in $(BUILDER_SRC_DIR)/$(mssilk_dir) \033[0m"
|
||||
|
|
|
|||
43
submodules/build/builders.d/msx264.mk
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
############################################################################
|
||||
# msx264.mk
|
||||
# Copyright (C) 2011 Belledonne Communications,Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
msx264_dir?=msx264
|
||||
$(BUILDER_SRC_DIR)/$(msx264_dir)/configure:
|
||||
cd $(BUILDER_SRC_DIR)/$(msx264_dir) && ./autogen.sh
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(msx264_dir)/Makefile: $(BUILDER_SRC_DIR)/$(msx264_dir)/configure
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(msx264_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(msx264_dir)/ \
|
||||
&& PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
$(BUILDER_SRC_DIR)/$(msx264_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode}
|
||||
|
||||
build-msx264: build-x264 $(BUILDER_BUILD_DIR)/$(msx264_dir)/Makefile
|
||||
cd $(BUILDER_BUILD_DIR)/$(msx264_dir) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install
|
||||
|
||||
clean-msx264: clean-x264
|
||||
cd $(BUILDER_BUILD_DIR)/$(msx264_dir) && make clean
|
||||
|
||||
veryclean-msx264: veryclean-x264
|
||||
-cd $(BUILDER_BUILD_DIR)/$(msx264_dir) && make distclean
|
||||
-cd $(BUILDER_SRC_DIR)/$(msx264_dir) && rm -f configure
|
||||
|
||||
clean-makefile-msx264: clean-makefile-x264
|
||||
cd $(BUILDER_BUILD_DIR)/$(msx264_dir) && rm -f Makefile
|
||||
|
|
@ -19,13 +19,15 @@ $(OPENSSL_BUILD_DIR)/Configure:
|
|||
$(OPENSSL_BUILD_DIR)/Makefile: $(OPENSSL_BUILD_DIR)/Configure
|
||||
cd $(OPENSSL_BUILD_DIR) \
|
||||
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& ./Configure -openssldir=$(prefix) --cross-compile-prefix=$$SDK_BIN_PATH/ BSD-generic32 no-asm no-dso
|
||||
&& ./Configure --prefix=$(prefix) --cross-compile-prefix=$$SDK_BIN_PATH/ BSD-generic32 no-asm
|
||||
|
||||
build-openssl: $(OPENSSL_BUILD_DIR)/Makefile
|
||||
cd $(OPENSSL_BUILD_DIR) && host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& make CC="$$CC" build_crypto build_ssl \
|
||||
&& make CC="$$CC" build_crypto build_ssl libcrypto.pc libssl.pc\
|
||||
&& cp -r include $(prefix)/ \
|
||||
&& cp lib*.a $(prefix)/lib
|
||||
&& cp lib*.a $(prefix)/lib \
|
||||
&& cp libcrypto.pc $(prefix)/lib/pkgconfig/. \
|
||||
&& cp libssl.pc $(prefix)/lib/pkgconfig/. \
|
||||
|
||||
clean-openssl:
|
||||
cd $(OPENSSL_BUILD_DIR) && make clean
|
||||
|
|
|
|||
|
|
@ -1,17 +1,8 @@
|
|||
srtp_version?=1.4.4
|
||||
#srtp_url?=http://srtp.sourceforge.net/srtp-$(srtp_version).tgz
|
||||
srtp_url=http://sourceforge.net/projects/srtp/files/srtp/$(srtp_version)/srtp-$(srtp_version).tgz/download
|
||||
srtp_tgz_file=srtp-$(srtp_version).tgz
|
||||
|
||||
$(BUILDER_SRC_DIR)/externals/$(srtp_tgz_file):
|
||||
cd $(BUILDER_SRC_DIR)/externals \
|
||||
&& wget $(srtp_url) -O $(srtp_tgz_file)
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(srtp_dir)/configure: $(BUILDER_SRC_DIR)/externals/$(srtp_tgz_file)
|
||||
cd $(BUILDER_SRC_DIR)/externals \
|
||||
&& tar zxvf $(srtp_tgz_file) \
|
||||
&& cd srtp && patch -p0 < $(BUILDER_SRC_DIR)/build/builders.d/srtp.patch
|
||||
srtp_dir?=externals/srtp
|
||||
|
||||
$(BUILDER_SRC_DIR)/$(srtp_dir)/configure:
|
||||
cd $(BUILDER_SRC_DIR)/$(srtp_dir) \
|
||||
&& autoconf
|
||||
$(BUILDER_BUILD_DIR)/$(srtp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(srtp_dir)/configure
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(srtp_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(srtp_dir)/\
|
||||
|
|
@ -19,17 +10,16 @@ $(BUILDER_BUILD_DIR)/$(srtp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(srtp_dir)/config
|
|||
$(BUILDER_SRC_DIR)/$(srtp_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode}
|
||||
|
||||
build-srtp: $(BUILDER_BUILD_DIR)/$(srtp_dir)/Makefile
|
||||
cp -rf $(BUILDER_SRC_DIR)/$(srtp_dir)/include $(BUILDER_BUILD_DIR)/$(srtp_dir)
|
||||
cp -rf $(BUILDER_SRC_DIR)/$(srtp_dir)/crypto/include $(BUILDER_BUILD_DIR)/$(srtp_dir)
|
||||
-cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make uninstall && make clean
|
||||
cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make libsrtp.a && make install
|
||||
cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make libsrtp.a && make uninstall && make install
|
||||
|
||||
clean-srtp:
|
||||
cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make clean
|
||||
-cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make clean
|
||||
|
||||
veryclean-srtp:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && make distclean
|
||||
-rm -rf $(BUILDER_BUILD_DIR)/$(srtp_dir)
|
||||
-rm -f $(BUILDER_SRC_DIR)/$(srtp_dir)/configure
|
||||
|
||||
clean-makefile-srtp:
|
||||
cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && rm -f Makefile
|
||||
-cd $(BUILDER_BUILD_DIR)/$(srtp_dir) && rm -f Makefile
|
||||
|
||||
|
|
|
|||
72
submodules/build/builders.d/x264.mk
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
############################################################################
|
||||
# x264.mk
|
||||
# Copyright (C) 2011 Belledonne Communications,Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
#--enable-static is mandatory otherwise the lib is not installed
|
||||
|
||||
x264-configure-option= \
|
||||
--host=$(host)\
|
||||
--enable-static \
|
||||
--cross-prefix=$$SDK_BIN_PATH/ \
|
||||
--extra-ldflags="-arch $$ARCH -isysroot $$SYSROOT_PATH"
|
||||
|
||||
|
||||
|
||||
ifneq (,$(findstring i386,$(host)))
|
||||
x264-configure-option+= --extra-cflags="-arch $$ARCH -isysroot $$SYSROOT_PATH"
|
||||
endif
|
||||
ifneq (,$(findstring armv6,$(host)))
|
||||
x264-configure-option+= --extra-cflags="-arch $$ARCH -mcpu=arm1176jzf-s -marm -isysroot $$SYSROOT_PATH"
|
||||
x264-configure-option+= --disable-asm
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(host)))
|
||||
x264-configure-option+= --extra-cflags="-arch $$ARCH -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -isysroot $$SYSROOT_PATH"
|
||||
endif
|
||||
|
||||
x264_dir?=externals/x264
|
||||
$(BUILDER_SRC_DIR)/$(x264_dir)/patched :
|
||||
cd $(BUILDER_SRC_DIR)/$(x264_dir) \
|
||||
&& git apply $(BUILDER_SRC_DIR)/build/builders.d/x264.patch \
|
||||
&& touch $(BUILDER_SRC_DIR)/$(x264_dir)/patched
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(x264_dir)/configure: $(BUILDER_SRC_DIR)/$(x264_dir)/patched
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(x264_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir)/ \
|
||||
&& rsync -av --exclude ".git" $(BUILDER_SRC_DIR)/$(x264_dir)/* .
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(x264_dir)/config.mak: $(BUILDER_BUILD_DIR)/$(x264_dir)/configure
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir)/ \
|
||||
&& host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& ./configure --prefix=$(prefix) ${x264-configure-option}
|
||||
|
||||
build-x264: $(BUILDER_BUILD_DIR)/$(x264_dir)/config.mak
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir) make && make install
|
||||
|
||||
clean-x264:
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir) && make clean
|
||||
|
||||
veryclean-x264:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(x264_dir) && make distclean
|
||||
rm -rf $(BUILDER_BUILD_DIR)/$(x264_dir)
|
||||
|
||||
clean-makefile-x264:
|
||||
cd $(BUILDER_BUILD_DIR)/$(x264_dir) && rm -f config.mak
|
||||
12
submodules/build/builders.d/x264.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/common/arm/asm.S b/common/arm/asm.S
|
||||
index 8e70403..259bb92 100644
|
||||
--- a/common/arm/asm.S
|
||||
+++ b/common/arm/asm.S
|
||||
@@ -47,6 +47,7 @@ ELF .eabi_attribute 25, \val
|
||||
.endm
|
||||
|
||||
.macro function name
|
||||
+ .align 2
|
||||
.global EXTERN_ASM\name
|
||||
EXTERN_ASM\name:
|
||||
ELF .hidden \name
|
||||
|
|
@ -1,36 +1,24 @@
|
|||
$(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker: $(BUILDER_SRC_DIR)/build/builders.d/zrtpcpp.CMakeLists.txt
|
||||
cp $(BUILDER_SRC_DIR)/build/builders.d/zrtpcpp.CMakeLists.txt $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt
|
||||
|
||||
|
||||
#I coudn't manage to crosscompile using only -D arguments to cmake
|
||||
#Thus the use of a toolchain file.
|
||||
$(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker
|
||||
zrtpcpp_dir=externals/zrtpcpp
|
||||
$(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile:
|
||||
mkdir -p $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)
|
||||
cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/\
|
||||
&& host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
&& cmake $(BUILDER_SRC_DIR)/$(zrtpcpp_dir) -Denable-ccrtp=false -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)build/iphone-toolchain.cmake \
|
||||
-LH -Wdev -DCMAKE_C_COMPILER=$$SDK_BIN_PATH/gcc -DCMAKE_CXX_COMPILER=$$SDK_BIN_PATH/g++ \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$$ARCH -DCMAKE_C_FLAGS="$$COMMON_FLAGS" -DCMAKE_CXX_FLAGS="$$COMMON_FLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_FIND_ROOT_PATH="$(prefix)"
|
||||
-DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_FIND_ROOT_PATH="$(prefix) -DBUILD_STATIC=ON "
|
||||
# Used toolchain: $(TC)
|
||||
|
||||
ifeq ($(enable_zrtp),yes)
|
||||
|
||||
build-zrtpcpp: $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile
|
||||
echo "Build ZRTP - prefix $(prefix)"
|
||||
@echo "Build ZRTP - prefix $(prefix)"
|
||||
cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) && make VERBOSE=1 && make install
|
||||
|
||||
else
|
||||
build-zrtpcpp:
|
||||
echo "Build of zrtpcpp disabled"
|
||||
endif
|
||||
|
||||
clean-zrtpcpp:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) && make clean
|
||||
|
||||
clean-makefile-zrtpcpp: clean-zrtpcpp
|
||||
-rm -f $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile
|
||||
-rm -f $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/CMakeCache.txt
|
||||
|
||||
veryclean-zrtpcpp:
|
||||
-rm -rf $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)
|
||||
|
|
|
|||
|
|
@ -1,169 +0,0 @@
|
|||
# Copyright (C) 2009 Werner Dittman
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
PROJECT(libzrtpcpp)
|
||||
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR 2)
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR 0)
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH 0)
|
||||
|
||||
set (VERSION 2.0.0)
|
||||
set (SOVERSION 2)
|
||||
set (PACKAGE libzrtpcpp)
|
||||
|
||||
if(MSVC60)
|
||||
set(BUILD_STATIC ON CACHE BOOL "static linking only" FORCE)
|
||||
MARK_AS_ADVANCED(BUILD_STATIC)
|
||||
else()
|
||||
option(BUILD_STATIC "Set to OFF to build shared libraries" ON)
|
||||
endif()
|
||||
|
||||
# set to true for debug and trace during CMakeLists development
|
||||
set(CMAKE_VERBOSE_MAKEFILE FALSE)
|
||||
|
||||
MESSAGE( STATUS "Configuring GNU ${PROJECT_NAME} ${VERSION}...")
|
||||
|
||||
# include most of the fine stuff we need
|
||||
include(cmake/Modules/FindGcryptConfig.cmake)
|
||||
include(FindPkgConfig)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckIncludeFiles)
|
||||
include(cmake/Modules/AutoArgs.cmake)
|
||||
|
||||
if(${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
||||
include(cmake/Modules/GeneratePackage.cmake)
|
||||
|
||||
GENERATE_PACKAGING(${PACKAGE} ${VERSION})
|
||||
endif()
|
||||
|
||||
# check the -Denable-ccrtp setting, defaults to true
|
||||
enable_arg(ccrtp true "Enable GNU ccRTP support for GNU ZRTP")
|
||||
args_help()
|
||||
|
||||
# this caused problems in debian where it has to always be lib....
|
||||
set(LIBDIRNAME "lib")
|
||||
if (NOT EXISTS /etc/debian_version)
|
||||
if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" )
|
||||
set(LIBDIRNAME "lib64")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# setup the Thread include and lib
|
||||
find_package(Threads)
|
||||
if(CMAKE_HAVE_PTHREAD_H)
|
||||
set(HAVE_PTHREAD_H TRUE)
|
||||
endif()
|
||||
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(enable_ccrtp)
|
||||
if (USES_CCRTP_INCLUDE_DIRS)
|
||||
message(STATUS " Using local commoncpp dependency")
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(USES_CCRTP libccrtp>=2.0.0)
|
||||
endif()
|
||||
include_directories(${USES_CCRTP_INCLUDE_DIRS})
|
||||
link_directories(${USES_CRTP_LIBRARY_DIRS})
|
||||
add_definitions(${USES_CCRTP_CFLAGS})
|
||||
set (LIBS ${LIBS} ${USES_CCRTP_LDFLAGS} ${USES_CCRTP_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
include_directories(${CMAKE_INSTALL_PREFIX}/include)
|
||||
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} ${CMAKE_INSTALL_PREFIX}/include")
|
||||
## set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/*")
|
||||
endif()
|
||||
|
||||
|
||||
# now get info about crypto libraries
|
||||
gcr_check(GCRYPT gcrypt)
|
||||
#if(GCRYPT_FOUND)
|
||||
# check_include_files(gcrypt.h HAVE_GCRYPT_H)
|
||||
# set(LIBS ${LIBS} ${GCRYPT_LIBRARIES})
|
||||
# set(BUILD_REQ "libgcrypt-devel")
|
||||
# set(CRYPTOBACKEND="")
|
||||
# set(PACKAGE_REQ "libgcrypt")
|
||||
#else()
|
||||
pkg_check_modules(OPENSSL libcrypto>=0.9.8)
|
||||
if (OPENSSL_FOUND)
|
||||
check_include_files(openssl/bn.h HAVE_OPENSSL_BN_H)
|
||||
check_include_files(openssl/aes.h HAVE_OPENSSL_AES_H)
|
||||
check_include_files(openssl/sha.h HAVE_OPENSSL_SHA_H)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -lcrypto")
|
||||
check_library_exists(crypto EVP_CipherInit_ex "${CMAKE_INSTALL_PREFIX}/lib" HAVE_SSL_CRYPT)
|
||||
# don't test HAVE_SSL_CRYPT_FOUND as it doesn't work
|
||||
if (HAVE_OPENSSL_BN_H_FOUND)
|
||||
# AND HAVE_OPENSSL_AES_H_FOUND AND HAVE_OPENSSL_SHA_H_FOUND))
|
||||
message(FATAL_ERROR "Openssl crypto library not found")
|
||||
endif()
|
||||
set(LIBS ${LIBS} -lcrypto)
|
||||
set(CRYPTOBACKEND "libcrypto >= 0.9.8")
|
||||
set(BUILD_REQ "libopenssl-devel >= 0.9.8")
|
||||
set(PACKAGE_REQ "libopenssl >= 0.9.8")
|
||||
else()
|
||||
message(FATAL_ERROR "No crypto library found")
|
||||
endif()
|
||||
#endif()
|
||||
|
||||
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||
check_include_files(string.h HAVE_STRING_H)
|
||||
|
||||
# necessary and required modules checked, ready to generate config.h
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# the following set(...) commands are only to have backward
|
||||
# compatibility with autoconf stuff to generate the pc file
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${prefix}/bin)
|
||||
set(libdir ${prefix}/lib)
|
||||
set(includedir ${prefix}/include)
|
||||
set(PACKAGE pkgconfig)
|
||||
configure_file(libzrtpcpp.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libzrtpcpp.pc @ONLY)
|
||||
|
||||
configure_file(libzrtpcpp.spec.cmake ${CMAKE_CURRENT_BINARY_DIR}/libzrtpcpp.spec @ONLY)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
add_definitions(-g -O2 -fno-strict-aliasing)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-Wno-long-long -Wno-char-subscripts)
|
||||
add_definitions(-Wall -ansi -pedantic)
|
||||
add_definitions(-DNEW_STDCPP)
|
||||
# add_definitions(-D__EXPORT=)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if (enable_ccrtp)
|
||||
add_subdirectory(demo)
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/package/)
|
||||
MESSAGE(STATUS "package dir not found")
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/package/)
|
||||
endif()
|
||||
|
||||
########### install files ###############
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzrtpcpp.pc DESTINATION ${LIBDIRNAME}/pkgconfig)
|
||||
|
||||
if(${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
|
||||
|
||||
########### Add uninstall target ###############
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
add_custom_target(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
endif()
|
||||
|
|
@ -28,8 +28,9 @@ SDK_PATH_LIST=`ls -drt /Developer/Platforms/iPhone${PLATFORM}.platform/Developer
|
|||
SDK_BIN_PATH=/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin
|
||||
for SYSROOT_PATH in $SDK_PATH_LIST ; do echo $SYSROOT_PATH ; done ;
|
||||
echo "Selecting SDK path = ${SYSROOT_PATH}"
|
||||
COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE -D__IOS"
|
||||
COMMON_FLAGS=" -arch ${ARCH} ${MCPU} -isysroot ${SYSROOT_PATH} -miphoneos-version-min=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -D__IOS"
|
||||
CC="${SDK_BIN_PATH}/gcc -std=c99 $COMMON_FLAGS"
|
||||
OBJC="${SDK_BIN_PATH}/gcc -std=c99 $COMMON_FLAGS"
|
||||
CXX="${SDK_BIN_PATH}/g++ $COMMON_FLAGS"
|
||||
LD="${SDK_BIN_PATH}/ld -arch ${ARCH}"
|
||||
AR=${SDK_BIN_PATH}/ar
|
||||
|
|
@ -37,3 +38,4 @@ RANLIB=${SDK_BIN_PATH}/ranlib
|
|||
|
||||
CPPFLAGS="-Dasm=__asm"
|
||||
LDFLAGS="-Wl,-syslibroot,${SYSROOT_PATH} -framework CFNetwork"
|
||||
OBJCFLAGS="-x objective-c -fexceptions -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch"
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
SET (CMAKE_SYSTEM_NAME "Generic")
|
||||
SET (CMAKE_SYSTEM_PROCESSOR "i386")
|
||||
|
||||
SET (SDKVER "4.3")
|
||||
SET (DEVROOT "/Developer/Platforms/iPhoneOS.platform/Developer")
|
||||
SET (SDKROOT "${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk")
|
||||
|
||||
SET (CMAKE_FIND_ROOT_PATH "${CMAKE_INSTALL_PREFIX}" "${SDKROOT}" "${DEVROOT}")
|
||||
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
|
||||
2
submodules/externals/exosip
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit ce927e6b891a9d9129ab50d0666f6f22f37228a1
|
||||
Subproject commit c3da0303519ad3120355cb85baee9cf6d0e4d1c2
|
||||
1
submodules/externals/ffmpeg
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 907783f221ad9594a528681e30777705f11bf0b5
|
||||
1
submodules/externals/libvpx
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4341e5af66c92531fcd3f3e66ac18e70b3752ca9
|
||||
2
submodules/externals/speex
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit a6d05eb5ff9d5062852cdf7df574bec728921ef9
|
||||
Subproject commit a796bb048a6b8b9b38ed2668da87ddb96a2de8f9
|
||||
1
submodules/externals/srtp
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit daa25fdbacb75e2aa99f5fce1bd5836dc616fb42
|
||||
1
submodules/externals/x264
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 926a03a9c1f48d0fbd54b0e802d740774c100a78
|
||||