Rename classes ... split buttons enable/disable stuff
Add OrderedDictionary
|
|
@ -1,245 +0,0 @@
|
|||
/* CallHistoryTableViewController.m
|
||||
*
|
||||
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "CallHistoryTableViewController.h"
|
||||
#import "LinphoneManager.h"
|
||||
|
||||
|
||||
@implementation CallHistoryTableViewController
|
||||
/*
|
||||
- (id)initWithStyle:(UITableViewStyle)style {
|
||||
// Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
|
||||
if (self = [super initWithStyle:style]) {
|
||||
}
|
||||
return self;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
}
|
||||
*/
|
||||
/*
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
*/
|
||||
/*
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
}
|
||||
*/
|
||||
/*
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
}
|
||||
*/
|
||||
/*
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[super viewDidDisappear:animated];
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// Override to allow orientations other than the default portrait orientation.
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
// Return YES for supported orientations
|
||||
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
||||
}
|
||||
*/
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
|
||||
-(void) doAction:(id)sender {
|
||||
linphone_core_clear_call_logs([LinphoneManager getLc]);
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark Table view methods
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// Customize the number of rows in the table view.
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
return ms_list_size(logs);
|
||||
}
|
||||
|
||||
|
||||
// Customize the appearance of table view cells.
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
static NSString *CellIdentifier = @"Cell";
|
||||
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
|
||||
if (cell == nil) {
|
||||
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
|
||||
[cell.textLabel setTextColor:[UIColor colorWithRed:0.7 green:0.745 blue:0.78 alpha:1.0]];
|
||||
[cell.detailTextLabel setTextColor:cell.textLabel.textColor];
|
||||
}
|
||||
|
||||
// Set up the cell...
|
||||
LinphoneAddress* partyToDisplay;
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
|
||||
|
||||
NSString *path;
|
||||
if (callLogs->dir == LinphoneCallIncoming) {
|
||||
if (callLogs->status == LinphoneCallSuccess) {
|
||||
path = [[NSBundle mainBundle] pathForResource:callLogs->video_enabled?@"in_call_video":@"in_call" ofType:@"png"];
|
||||
} else {
|
||||
//missed call
|
||||
path = [[NSBundle mainBundle] pathForResource:@"missed_call" ofType:@"png"];
|
||||
}
|
||||
partyToDisplay=callLogs->from;
|
||||
|
||||
} else {
|
||||
path = [[NSBundle mainBundle] pathForResource:callLogs->video_enabled?@"out_call_video":@"out_call" ofType:@"png"];
|
||||
partyToDisplay=callLogs->to;
|
||||
|
||||
}
|
||||
UIImage *image = [UIImage imageWithContentsOfFile:path];
|
||||
cell.imageView.image = image;
|
||||
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
|
||||
|
||||
const char* username = linphone_address_get_username(partyToDisplay)!=0?linphone_address_get_username(partyToDisplay):"";
|
||||
const char* displayName = linphone_address_get_display_name(partyToDisplay);
|
||||
|
||||
if (displayName) {
|
||||
NSString* str1 = [NSString stringWithFormat:@"%s", displayName];
|
||||
[cell.textLabel setText:str1];
|
||||
NSString* str2 = [NSString stringWithFormat:@"%s"/* [%s]"*/,username/*,callLogs->start_date*/];
|
||||
[cell.detailTextLabel setText:str2];
|
||||
} else {
|
||||
NSString* str1 = [NSString stringWithFormat:@"%s", username];
|
||||
[cell.textLabel setText:str1];
|
||||
[cell.detailTextLabel setText:nil];
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
// Navigation logic may go here. Create and push another view controller.
|
||||
// AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
|
||||
// [self.navigationController pushViewController:anotherViewController];
|
||||
// [anotherViewController release];
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
|
||||
LinphoneAddress* partyToCall;
|
||||
if (callLogs->dir == LinphoneCallIncoming) {
|
||||
partyToCall=callLogs->from;
|
||||
|
||||
} else {
|
||||
partyToCall=callLogs->to;
|
||||
|
||||
}
|
||||
const char* username = linphone_address_get_username(partyToCall)!=0?linphone_address_get_username(partyToCall):"";
|
||||
const char* displayName = linphone_address_get_display_name(partyToCall)!=0?linphone_address_get_display_name(partyToCall):"";
|
||||
const char* domain = linphone_address_get_domain(partyToCall);
|
||||
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
|
||||
|
||||
NSString* phoneNumber;
|
||||
|
||||
if (proxyCfg && (strcmp(domain, linphone_proxy_config_get_domain(proxyCfg)) == 0)) {
|
||||
phoneNumber = [[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]];
|
||||
} else {
|
||||
phoneNumber = [[NSString alloc] initWithCString:linphone_address_as_string_uri_only(partyToCall) encoding:[NSString defaultCStringEncoding]];
|
||||
}
|
||||
|
||||
NSString* dispName = [[NSString alloc] initWithCString:displayName encoding:[NSString defaultCStringEncoding]];
|
||||
|
||||
|
||||
[[LinphoneManager instance] changeView:PhoneView_Dialer];
|
||||
|
||||
//TODO
|
||||
/*[[LinphoneManager instance].callDelegate displayDialerFromUI:self
|
||||
forUser:phoneNumber
|
||||
withDisplayName:dispName];*/
|
||||
[phoneNumber release];
|
||||
[dispName release];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Override to support conditional editing of the table view.
|
||||
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
// Return NO if you do not want the specified item to be editable.
|
||||
return YES;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
// Override to support editing the table view.
|
||||
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
if (editingStyle == UITableViewCellEditingStyleDelete) {
|
||||
// Delete the row from the data source
|
||||
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
|
||||
}
|
||||
else if (editingStyle == UITableViewCellEditingStyleInsert) {
|
||||
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
// Override to support rearranging the table view.
|
||||
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
// Override to support conditional rearranging of the table view.
|
||||
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
// Return NO if you do not want the item to be re-orderable.
|
||||
return YES;
|
||||
}
|
||||
*/
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -18,9 +18,10 @@
|
|||
*/
|
||||
|
||||
#import "ConferenceCallDetailView.h"
|
||||
#import "linphonecore.h"
|
||||
#import "LinphoneManager.h"
|
||||
#import "IncallViewController.h"
|
||||
#import "InCallViewController.h"
|
||||
|
||||
#include "linphonecore.h"
|
||||
|
||||
@implementation ConferenceCallDetailView
|
||||
|
||||
|
|
@ -86,8 +87,8 @@ NSTimer *callQualityRefresher;
|
|||
|
||||
-(void) viewWillAppear:(BOOL)animated {
|
||||
[table reloadData];
|
||||
[mute reset];
|
||||
[speaker reset];
|
||||
[mute update];
|
||||
[speaker update];
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,20 +17,18 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LogView.h"
|
||||
|
||||
#import "LogView.h"
|
||||
|
||||
@interface ConsoleViewController : UIViewController <LogView> {
|
||||
UITextView* logs;
|
||||
UIView* logsView;
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void) doAction;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextView* logs;
|
||||
@property (nonatomic, retain) IBOutlet UIView* logsView;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -20,25 +20,13 @@
|
|||
|
||||
#import "ConsoleViewController.h"
|
||||
|
||||
|
||||
@implementation ConsoleViewController
|
||||
|
||||
NSMutableString* MoreViewController_logs;
|
||||
|
||||
@synthesize logs;
|
||||
@synthesize logsView;
|
||||
|
||||
/*
|
||||
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
UIBarButtonItem* clear = [[[UIBarButtonItem alloc]
|
||||
|
|
@ -48,34 +36,12 @@ NSMutableString* MoreViewController_logs;
|
|||
[self.navigationItem setRightBarButtonItem:clear];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Override to allow orientations other than the default portrait orientation.
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
// Return YES for supported orientations
|
||||
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
||||
}
|
||||
*/
|
||||
|
||||
-(void) viewWillAppear:(BOOL)animated {
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[logs setText:MoreViewController_logs];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
|
||||
-(void) addLog:(NSString*) log {
|
||||
- (void)addLog:(NSString*) log {
|
||||
@synchronized(self) {
|
||||
if (!MoreViewController_logs) {
|
||||
MoreViewController_logs = [[NSMutableString alloc] init];
|
||||
|
|
@ -87,7 +53,8 @@ NSMutableString* MoreViewController_logs;
|
|||
}
|
||||
}
|
||||
}
|
||||
-(void) doAction{
|
||||
|
||||
- (void)doAction{
|
||||
@synchronized(self) {
|
||||
NSMutableString* oldString = MoreViewController_logs;
|
||||
MoreViewController_logs = [[NSMutableString alloc] init];
|
||||
|
|
@ -96,11 +63,8 @@ NSMutableString* MoreViewController_logs;
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AddressBook/AddressBook.h>
|
||||
|
||||
#import "OrderedDictionary.h"
|
||||
|
||||
@interface ContactTableViewController : UITableViewController {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "ContactTableViewController.h"
|
||||
#import "FastAddressBook.h"
|
||||
#import "ContactCell.h"
|
||||
#import "UIContactCell.h"
|
||||
|
||||
@implementation ContactTableViewController
|
||||
|
||||
|
|
@ -36,20 +36,25 @@ void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info,
|
|||
|
||||
NSArray *lContacts = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
|
||||
for (id lPerson in lContacts) {
|
||||
CFStringRef lValue = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonFirstNameProperty);
|
||||
CFStringRef lLocalizedLabel = ABAddressBookCopyLocalizedLabel(lValue);
|
||||
|
||||
CFStringRef lFirstName = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonFirstNameProperty);
|
||||
CFStringRef lLocalizedFirstName = ABAddressBookCopyLocalizedLabel(lFirstName);
|
||||
CFStringRef lLastName = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonLastNameProperty);
|
||||
CFStringRef lLocalizedLastName = ABAddressBookCopyLocalizedLabel(lLastName);
|
||||
NSString *name =[NSString stringWithFormat:@"%@%@", [(NSString *)lLocalizedFirstName retain], [(NSString *)lLocalizedLastName retain]];
|
||||
|
||||
// Put in correct subDic
|
||||
NSString *firstChar = [[(NSString *)lLocalizedLabel substringToIndex:1] uppercaseString];
|
||||
NSString *firstChar = [[name substringToIndex:1] uppercaseString];
|
||||
OrderedDictionary *subDic =[lAddressBookMap objectForKey: firstChar];
|
||||
if(subDic == nil) {
|
||||
subDic = [[OrderedDictionary alloc] init];
|
||||
[lAddressBookMap insertObject:subDic forKey:firstChar selector:@selector(caseInsensitiveCompare:)];
|
||||
}
|
||||
[subDic insertObject:lPerson forKey:[(NSString *)lLocalizedLabel retain] selector:@selector(caseInsensitiveCompare:)];
|
||||
|
||||
if (lLocalizedLabel) CFRelease(lLocalizedLabel);
|
||||
CFRelease(lValue);
|
||||
[subDic insertObject:lPerson forKey:name selector:@selector(caseInsensitiveCompare:)];
|
||||
|
||||
CFRelease(lLocalizedLastName);
|
||||
CFRelease(lLastName);
|
||||
CFRelease(lLocalizedFirstName);
|
||||
CFRelease(lFirstName);
|
||||
}
|
||||
CFRelease(lContacts);
|
||||
}
|
||||
|
|
@ -72,14 +77,29 @@ void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info,
|
|||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
ContactCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContactCell"];
|
||||
UIContactCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UIContactCell"];
|
||||
if (cell == nil) {
|
||||
cell = [[ContactCell alloc] init];
|
||||
cell = [[UIContactCell alloc] init];
|
||||
}
|
||||
|
||||
OrderedDictionary *subDic = [addressBookMap objectForKey: [addressBookMap keyAtIndex: [indexPath section]]];
|
||||
|
||||
[cell.label setText: (NSString *)[[subDic allKeys] objectAtIndex:[indexPath row]]];
|
||||
NSString *key = [[subDic allKeys] objectAtIndex:[indexPath row]];
|
||||
ABRecordRef record = [subDic objectForKey:key];
|
||||
|
||||
CFStringRef lFirstName = ABRecordCopyValue(record, kABPersonFirstNameProperty);
|
||||
CFStringRef lLocalizedFirstName = ABAddressBookCopyLocalizedLabel(lFirstName);
|
||||
CFStringRef lLastName = ABRecordCopyValue(record, kABPersonLastNameProperty);
|
||||
CFStringRef lLocalizedLastName = ABAddressBookCopyLocalizedLabel(lLastName);
|
||||
|
||||
[cell.firstName setText: [(NSString *)lLocalizedFirstName retain]];
|
||||
[cell.lastName setText: [(NSString *)lLocalizedLastName retain]];
|
||||
[cell update];
|
||||
|
||||
CFRelease(lLocalizedLastName);
|
||||
CFRelease(lLastName);
|
||||
CFRelease(lLocalizedFirstName);
|
||||
CFRelease(lFirstName);
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* HistoryController.h
|
||||
/* ContactsViewController.h
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -19,14 +19,17 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ContactsController : UIViewController {
|
||||
@interface ContactsViewController : UIViewController {
|
||||
UITableViewController *tableController;
|
||||
UIButton *allButton;
|
||||
UIButton *linphoneButton;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITableViewController* tableController;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* allButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* linphoneButton;
|
||||
|
||||
-(IBAction) onAllClick: (id) event;
|
||||
-(IBAction) onLinphoneClick: (id) event;
|
||||
|
||||
@end
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* HistoryController.m
|
||||
/* ContactsViewController.m
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "ContactsViewController.h"
|
||||
|
||||
#import "ContactsController.h"
|
||||
#import "AddressBook/ABPerson.h"
|
||||
|
||||
@implementation ContactsController
|
||||
@implementation ContactsViewController
|
||||
|
||||
@synthesize tableController;
|
||||
@synthesize allButton;
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIView" id="95706395">
|
||||
<reference key="NSNextResponder" ref="812520855"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<int key="NSvFlags">288</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIButton" id="257572356">
|
||||
<reference key="NSNextResponder" ref="95706395"/>
|
||||
|
|
@ -156,6 +156,7 @@
|
|||
<string key="NSFrame">{{0, 58}, {320, 402}}</string>
|
||||
<reference key="NSSuperview" ref="812520855"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:10</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -165,6 +166,10 @@
|
|||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<double key="IBUIContentInset.top">0.0</double>
|
||||
<double key="IBUIContentInset.bottom">15</double>
|
||||
<double key="IBUIContentInset.left">0.0</double>
|
||||
<double key="IBUIContentInset.right">0.0</double>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<bool key="IBUIPagingEnabled">YES</bool>
|
||||
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
|
||||
|
|
@ -189,6 +194,7 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUITableViewController" id="837659943">
|
||||
<bool key="IBUIAutoresizesArchivedViewToFullSize">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
|
|
@ -348,7 +354,7 @@
|
|||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ContactsController</string>
|
||||
<string key="-1.CustomClassName">ContactsViewController</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>
|
||||
|
|
@ -381,7 +387,7 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ContactsController</string>
|
||||
<string key="className">ContactsViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="onAllClick:">id</string>
|
||||
|
|
@ -418,7 +424,7 @@
|
|||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ContactsController.h</string>
|
||||
<string key="minorKey">./Classes/ContactsViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* CallHistoryTableViewController.h
|
||||
/* HistoryTableViewController.h
|
||||
*
|
||||
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface CallHistoryTableViewController : UITableViewController {
|
||||
@interface HistoryTableViewController : UITableViewController {
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
133
Classes/HistoryTableViewController.m
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
/* HistoryTableViewController.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 "HistoryTableViewController.h"
|
||||
#import "UIHistoryCell.h"
|
||||
#import "LinphoneManager.h"
|
||||
|
||||
@implementation HistoryTableViewController
|
||||
|
||||
-(void) doAction:(id)sender {
|
||||
linphone_core_clear_call_logs([LinphoneManager getLc]);
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark Table view methods
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
return ms_list_size(logs);
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UIHistoryCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UIHistoryCell"];
|
||||
if (cell == nil) {
|
||||
cell = [[UIHistoryCell alloc] init];
|
||||
}
|
||||
|
||||
// Set up the cell...
|
||||
LinphoneAddress* partyToDisplay;
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
|
||||
|
||||
NSString *path;
|
||||
if (callLogs->dir == LinphoneCallIncoming) {
|
||||
if (callLogs->status == LinphoneCallSuccess) {
|
||||
path = [[NSBundle mainBundle] pathForResource:callLogs->video_enabled?@"appel-entrant":@"appel-entrant" ofType:@"png"];
|
||||
} else {
|
||||
//missed call
|
||||
path = [[NSBundle mainBundle] pathForResource:@"appel-manque" ofType:@"png"];
|
||||
}
|
||||
partyToDisplay=callLogs->from;
|
||||
|
||||
} else {
|
||||
path = [[NSBundle mainBundle] pathForResource:callLogs->video_enabled?@"appel-sortant":@"appel-sortant" ofType:@"png"];
|
||||
partyToDisplay=callLogs->to;
|
||||
|
||||
}
|
||||
UIImage *image = [UIImage imageWithContentsOfFile:path];
|
||||
|
||||
const char* username = linphone_address_get_username(partyToDisplay)!=0?linphone_address_get_username(partyToDisplay):"";
|
||||
|
||||
//TODO
|
||||
//const char* displayName = linphone_address_get_display_name(partyToDisplay);
|
||||
|
||||
[cell.displayName setText:[NSString stringWithFormat:@"%s", username]];
|
||||
cell.imageView.image = image;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
|
||||
LinphoneAddress* partyToCall;
|
||||
if (callLogs->dir == LinphoneCallIncoming) {
|
||||
partyToCall=callLogs->from;
|
||||
|
||||
} else {
|
||||
partyToCall=callLogs->to;
|
||||
|
||||
}
|
||||
const char* username = linphone_address_get_username(partyToCall)!=0?linphone_address_get_username(partyToCall):"";
|
||||
const char* displayName = linphone_address_get_display_name(partyToCall)!=0?linphone_address_get_display_name(partyToCall):"";
|
||||
const char* domain = linphone_address_get_domain(partyToCall);
|
||||
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
|
||||
|
||||
NSString* phoneNumber;
|
||||
|
||||
if (proxyCfg && (strcmp(domain, linphone_proxy_config_get_domain(proxyCfg)) == 0)) {
|
||||
phoneNumber = [[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]];
|
||||
} else {
|
||||
phoneNumber = [[NSString alloc] initWithCString:linphone_address_as_string_uri_only(partyToCall) encoding:[NSString defaultCStringEncoding]];
|
||||
}
|
||||
|
||||
NSString* dispName = [[NSString alloc] initWithCString:displayName encoding:[NSString defaultCStringEncoding]];
|
||||
|
||||
// Go to dialer view
|
||||
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
[[NSArray alloc] initWithObjects: dispName, nil]
|
||||
, @"setText:", nil]
|
||||
, @"mDisplayName",
|
||||
[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
[[NSArray alloc] initWithObjects: phoneNumber, nil]
|
||||
, @"setText:", nil]
|
||||
, @"address",
|
||||
nil];
|
||||
[[LinphoneManager instance] changeView:PhoneView_Dialer dict:dict];
|
||||
|
||||
[phoneNumber release];
|
||||
[dispName release];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* HistoryController.h
|
||||
/* HistoryViewController.h
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -18,16 +18,20 @@
|
|||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "CallHistoryTableViewController.h"
|
||||
|
||||
@interface HistoryController : UIViewController {
|
||||
CallHistoryTableViewController *tableController;
|
||||
#import "HistoryTableViewController.h"
|
||||
|
||||
@interface HistoryViewController : UIViewController {
|
||||
HistoryTableViewController *tableController;
|
||||
UIButton *allButton;
|
||||
UIButton *missedButton;
|
||||
}
|
||||
@property (nonatomic, retain) IBOutlet CallHistoryTableViewController* tableController;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet HistoryTableViewController* tableController;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* allButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* missedButton;
|
||||
|
||||
-(IBAction) onAllClick: (id) event;
|
||||
-(IBAction) onMissedClick: (id) event;
|
||||
|
||||
@end
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* HistoryController.m
|
||||
/* HistoryViewController.m
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -17,11 +17,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "HistoryViewController.h"
|
||||
|
||||
#import "HistoryController.h"
|
||||
@implementation HistoryViewController
|
||||
|
||||
|
||||
@implementation HistoryController
|
||||
@synthesize tableController;
|
||||
@synthesize allButton;
|
||||
@synthesize missedButton;
|
||||
|
|
@ -32,8 +31,7 @@ typedef enum _HistoryView {
|
|||
History_MAX
|
||||
} HistoryView;
|
||||
|
||||
|
||||
- (void) changeView: (HistoryView) view {
|
||||
- (void)changeView: (HistoryView) view {
|
||||
if(view == History_All) {
|
||||
allButton.selected = TRUE;
|
||||
} else {
|
||||
|
|
@ -47,16 +45,16 @@ typedef enum _HistoryView {
|
|||
}
|
||||
}
|
||||
|
||||
- (void) viewDidLoad {
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self changeView: History_All];
|
||||
}
|
||||
|
||||
-(IBAction) onAllClick: (id) event {
|
||||
- (IBAction)onAllClick: (id) event {
|
||||
[self changeView: History_All];
|
||||
}
|
||||
|
||||
-(IBAction) onMissedClick: (id) event {
|
||||
- (IBAction)onMissedClick: (id) event {
|
||||
[self changeView: History_Missed];
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIView" id="95706395">
|
||||
<reference key="NSNextResponder" ref="812520855"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<int key="NSvFlags">288</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIButton" id="257572356">
|
||||
<reference key="NSNextResponder" ref="95706395"/>
|
||||
|
|
@ -164,6 +164,10 @@
|
|||
</object>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<double key="IBUIContentInset.top">0.0</double>
|
||||
<double key="IBUIContentInset.bottom">15</double>
|
||||
<double key="IBUIContentInset.left">0.0</double>
|
||||
<double key="IBUIContentInset.right">0.0</double>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<int key="IBUISeparatorStyle">1</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
|
|
@ -186,6 +190,7 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUITableViewController" id="327578717">
|
||||
<bool key="IBUIAutoresizesArchivedViewToFullSize">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
|
|
@ -345,12 +350,12 @@
|
|||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">HistoryController</string>
|
||||
<string key="-1.CustomClassName">HistoryViewController</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="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="18.CustomClassName">CallHistoryTableViewController</string>
|
||||
<string key="18.CustomClassName">HistoryTableViewController</string>
|
||||
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
|
|
@ -370,15 +375,15 @@
|
|||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">CallHistoryTableViewController</string>
|
||||
<string key="className">HistoryTableViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/CallHistoryTableViewController.h</string>
|
||||
<string key="minorKey">./Classes/HistoryTableViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">HistoryController</string>
|
||||
<string key="className">HistoryViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="onAllClick:">id</string>
|
||||
|
|
@ -397,7 +402,7 @@
|
|||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="allButton">UIButton</string>
|
||||
<string key="missedButton">UIButton</string>
|
||||
<string key="tableController">CallHistoryTableViewController</string>
|
||||
<string key="tableController">HistoryTableViewController</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="allButton">
|
||||
|
|
@ -410,12 +415,12 @@
|
|||
</object>
|
||||
<object class="IBToOneOutletInfo" key="tableController">
|
||||
<string key="name">tableController</string>
|
||||
<string key="candidateClassName">CallHistoryTableViewController</string>
|
||||
<string key="candidateClassName">HistoryTableViewController</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/HistoryController.h</string>
|
||||
<string key="minorKey">./Classes/HistoryViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#import "linphonecore.h"
|
||||
#import "PhoneViewController.h"
|
||||
#import "ConferenceCallDetailView.h"
|
||||
#import "UIToggleVideoButton.h"
|
||||
#import "UIVideoButton.h"
|
||||
#import "VideoZoomHandler.h"
|
||||
|
||||
#include "UILinphone.h"
|
||||
|
|
@ -37,11 +37,7 @@
|
|||
|
||||
UIButton* endCtrl;
|
||||
UIButton* dialer;
|
||||
UIMicroButton* mute;
|
||||
UIButton* pause;
|
||||
UISpeakerButton* speaker;
|
||||
UIButton* contacts;
|
||||
UIToggleVideoButton* addVideo;
|
||||
UITableView* callTableView;
|
||||
UIButton* addCall, *mergeCalls;
|
||||
UIButton* transfer;
|
||||
|
|
@ -114,11 +110,7 @@
|
|||
|
||||
@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 UIToggleVideoButton* addVideo;
|
||||
@property (nonatomic, retain) IBOutlet UITableView* callTableView;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* addCall;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* mergeCalls;
|
||||
|
|
|
|||
|
|
@ -45,10 +45,7 @@ const NSInteger SECURE_BUTTON_TAG=5;
|
|||
|
||||
@synthesize endCtrl;
|
||||
@synthesize close;
|
||||
@synthesize mute;
|
||||
@synthesize pause;
|
||||
@synthesize dialer;
|
||||
@synthesize speaker;
|
||||
@synthesize contacts;
|
||||
@synthesize callTableView;
|
||||
@synthesize addCall;
|
||||
|
|
@ -80,7 +77,7 @@ const NSInteger SECURE_BUTTON_TAG=5;
|
|||
@synthesize testVideoView;
|
||||
#endif
|
||||
|
||||
@synthesize addVideo;
|
||||
//@synthesize addVideo;
|
||||
|
||||
|
||||
+(void) updateIndicator:(UIImageView*) indicator withCallQuality:(float) quality {
|
||||
|
|
@ -167,12 +164,13 @@ void addAnimationFadeTransition(UIView* view, float duration) {
|
|||
[UIView beginAnimations:nil context:NULL];
|
||||
[UIView setAnimationDuration:0.2f];
|
||||
endCtrl.imageView.transform = transform;
|
||||
mute.imageView.transform = transform;
|
||||
speaker.imageView.transform = transform;
|
||||
pause.imageView.transform = transform;
|
||||
//TODO
|
||||
//mute.imageView.transform = transform;
|
||||
//speaker.imageView.transform = transform;
|
||||
//pause.imageView.transform = transform;
|
||||
contacts.imageView.transform = transform;
|
||||
addCall.imageView.transform = transform;
|
||||
addVideo.imageView.transform = transform;
|
||||
//addVideo.imageView.transform = transform;
|
||||
dialer.imageView.transform = transform;
|
||||
videoCallQuality.transform = transform;
|
||||
[UIView commitAnimations];
|
||||
|
|
@ -310,9 +308,10 @@ void addAnimationFadeTransition(UIView* view, float duration) {
|
|||
|
||||
/* restore buttons orientation */
|
||||
endCtrl.imageView.transform = CGAffineTransformIdentity;
|
||||
mute.imageView.transform = CGAffineTransformIdentity;
|
||||
speaker.imageView.transform = CGAffineTransformIdentity;
|
||||
pause.imageView.transform = CGAffineTransformIdentity;
|
||||
//TODO
|
||||
//mute.imageView.transform = CGAffineTransformIdentity;
|
||||
//speaker.imageView.transform = CGAffineTransformIdentity;
|
||||
//pause.imageView.transform = CGAffineTransformIdentity;
|
||||
contacts.imageView.transform = CGAffineTransformIdentity;
|
||||
addCall.imageView.transform = CGAffineTransformIdentity;
|
||||
dialer.imageView.transform = CGAffineTransformIdentity;
|
||||
|
|
@ -334,57 +333,24 @@ void addAnimationFadeTransition(UIView* view, float duration) {
|
|||
return;
|
||||
}
|
||||
// 1 call: show pause button, otherwise show merge btn
|
||||
[LinphoneManager set:pause hidden:(callCount(lc) > 1) withName:"PAUSE button" andReason:"call count"];
|
||||
[LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:"call count"];
|
||||
// [LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:"call count"];
|
||||
// reload table (glow update + call duration)
|
||||
[callTableView reloadData];
|
||||
|
||||
LinphoneCall* currentCall = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
int callsCount = linphone_core_get_calls_nb(lc);
|
||||
|
||||
// hide pause/resume if in conference
|
||||
if (currentCall) {
|
||||
[mute reset];
|
||||
if (linphone_core_is_in_conference(lc)) {
|
||||
[LinphoneManager set:pause hidden:YES withName:"PAUSE button" andReason:"is in conference"];
|
||||
}
|
||||
else if (callCount(lc) == callsCount && callsCount == 1) {
|
||||
[LinphoneManager set:pause hidden:NO withName:"PAUSE button" andReason:"call count == 1"];
|
||||
pause.selected = NO;
|
||||
} else {
|
||||
[LinphoneManager set:pause hidden:YES withName:"PAUSE button" andReason:AT];
|
||||
}
|
||||
|
||||
if (fullUpdate) {
|
||||
videoUpdateIndicator.hidden = YES;
|
||||
LinphoneCallState state = linphone_call_get_state(currentCall);
|
||||
if (state == LinphoneCallStreamsRunning || state == LinphoneCallUpdated || state == LinphoneCallUpdatedByRemote) {
|
||||
if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
|
||||
[addVideo setTitle:NSLocalizedString(@"-video", nil) forState:UIControlStateNormal];
|
||||
[InCallViewController updateIndicator: videoCallQuality withCallQuality:linphone_call_get_average_quality(currentCall)];
|
||||
} else {
|
||||
[addVideo setTitle:NSLocalizedString(@"+video", nil) forState:UIControlStateNormal];
|
||||
}
|
||||
[addVideo setEnabled:YES];
|
||||
} else {
|
||||
[addVideo setEnabled:NO];
|
||||
[videoCallQuality setImage:nil];
|
||||
}
|
||||
}
|
||||
} 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.selected = YES;
|
||||
}
|
||||
[LinphoneManager set:pause hidden:NO withName:"PAUSE button" andReason:AT];
|
||||
} else {
|
||||
[LinphoneManager set:pause hidden:YES withName:"PAUSE button" andReason:AT];
|
||||
}
|
||||
[addVideo setEnabled:NO];
|
||||
}
|
||||
[LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:AT];
|
||||
}
|
||||
// [LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:AT];
|
||||
|
||||
// update conference details view if displayed
|
||||
if (self.presentedViewController == conferenceDetail) {
|
||||
|
|
@ -464,7 +430,7 @@ void addAnimationFadeTransition(UIView* view, float duration) {
|
|||
|
||||
|
||||
[videoCameraSwitch setPreview:videoPreview];
|
||||
addVideo.videoUpdateIndicator = videoUpdateIndicator;
|
||||
//addVideo.videoUpdateIndicator = videoUpdateIndicator;
|
||||
|
||||
[transfer addTarget:self action:@selector(transferPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
|
|
@ -593,7 +559,7 @@ void addAnimationFadeTransition(UIView* view, float duration) {
|
|||
bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"];
|
||||
|
||||
[LinphoneManager set:contacts hidden:enableVideo withName:"CONTACT button" andReason:AT];
|
||||
[LinphoneManager set:addVideo hidden:!contacts.hidden withName:"ADD_VIDEO button" andReason:AT];
|
||||
//[LinphoneManager set:addVideo hidden:!contacts.hidden withName:"ADD_VIDEO button" andReason:AT];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -747,6 +713,12 @@ static void hideSpinner(LinphoneCall* lc, void* user_data);
|
|||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LinphoneCallPausing:
|
||||
case LinphoneCallPaused:
|
||||
{
|
||||
[self disableVideoDisplay];
|
||||
break;
|
||||
}
|
||||
case LinphoneCallError: {
|
||||
if (canHideInCallView) {
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@
|
|||
<string key="NSFrame">{{119, 251}, {82, 52}}</string>
|
||||
<reference key="NSSuperview" ref="759087764"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<reference key="IBUIBackgroundColor" ref="95762599"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
|
|
@ -1020,7 +1019,6 @@
|
|||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>addCall</string>
|
||||
<string>addVideo</string>
|
||||
<string>callTableView</string>
|
||||
<string>close</string>
|
||||
<string>conferenceDetail</string>
|
||||
|
|
@ -1034,14 +1032,11 @@
|
|||
<string>hangUpView</string>
|
||||
<string>hash</string>
|
||||
<string>mergeCalls</string>
|
||||
<string>mute</string>
|
||||
<string>nine</string>
|
||||
<string>one</string>
|
||||
<string>padSubView</string>
|
||||
<string>pause</string>
|
||||
<string>seven</string>
|
||||
<string>six</string>
|
||||
<string>speaker</string>
|
||||
<string>star</string>
|
||||
<string>testVideoView</string>
|
||||
<string>three</string>
|
||||
|
|
@ -1060,7 +1055,6 @@
|
|||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIButton</string>
|
||||
<string>UIToggleVideoButton</string>
|
||||
<string>UITableView</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIViewController</string>
|
||||
|
|
@ -1076,13 +1070,10 @@
|
|||
<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>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIView</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
|
|
@ -1103,7 +1094,6 @@
|
|||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>addCall</string>
|
||||
<string>addVideo</string>
|
||||
<string>callTableView</string>
|
||||
<string>close</string>
|
||||
<string>conferenceDetail</string>
|
||||
|
|
@ -1117,14 +1107,11 @@
|
|||
<string>hangUpView</string>
|
||||
<string>hash</string>
|
||||
<string>mergeCalls</string>
|
||||
<string>mute</string>
|
||||
<string>nine</string>
|
||||
<string>one</string>
|
||||
<string>padSubView</string>
|
||||
<string>pause</string>
|
||||
<string>seven</string>
|
||||
<string>six</string>
|
||||
<string>speaker</string>
|
||||
<string>star</string>
|
||||
<string>testVideoView</string>
|
||||
<string>three</string>
|
||||
|
|
@ -1146,10 +1133,6 @@
|
|||
<string key="name">addCall</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">addVideo</string>
|
||||
<string key="candidateClassName">UIToggleVideoButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">callTableView</string>
|
||||
<string key="candidateClassName">UITableView</string>
|
||||
|
|
@ -1202,10 +1185,6 @@
|
|||
<string key="name">mergeCalls</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">mute</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">nine</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
|
|
@ -1218,10 +1197,6 @@
|
|||
<string key="name">padSubView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">pause</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">seven</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
|
|
@ -1230,10 +1205,6 @@
|
|||
<string key="name">six</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">speaker</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">star</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
|
|
@ -1333,11 +1304,11 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIMuteButton</string>
|
||||
<string key="className">UIMicroButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIMuteButton.h</string>
|
||||
<string key="minorKey">./Classes/UIMicroButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
|
|
@ -1348,25 +1319,6 @@
|
|||
<string key="minorKey">./Classes/UIToggleButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIToggleVideoButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">videoUpdateIndicator</string>
|
||||
<string key="NS.object.0">UIActivityIndicatorView</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">videoUpdateIndicator</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">videoUpdateIndicator</string>
|
||||
<string key="candidateClassName">UIActivityIndicatorView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIToggleVideoButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">VideoViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
|
|
@ -1412,9 +1364,9 @@
|
|||
<string>UIHangUpButton</string>
|
||||
<string>UIView</string>
|
||||
<string>UIView</string>
|
||||
<string>UIMuteButton</string>
|
||||
<string>UIMuteButton</string>
|
||||
<string>UIMuteButton</string>
|
||||
<string>UIMicroButton</string>
|
||||
<string>UIMicroButton</string>
|
||||
<string>UIMicroButton</string>
|
||||
<string>UIView</string>
|
||||
<string>UIView</string>
|
||||
<string>UIView</string>
|
||||
|
|
@ -1507,15 +1459,15 @@
|
|||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">mMute</string>
|
||||
<string key="candidateClassName">UIMuteButton</string>
|
||||
<string key="candidateClassName">UIMicroButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">mMuteLandLeft</string>
|
||||
<string key="candidateClassName">UIMuteButton</string>
|
||||
<string key="candidateClassName">UIMicroButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">mMuteLandRight</string>
|
||||
<string key="candidateClassName">UIMuteButton</string>
|
||||
<string key="candidateClassName">UIMicroButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">mPortrait</string>
|
||||
|
|
|
|||
|
|
@ -1,195 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1296</int>
|
||||
<string key="IBDocument.SystemVersion">11E53</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.47</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1181</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUILabel</string>
|
||||
<string>IBUITableViewCell</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="694524832">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIView" id="703499560">
|
||||
<reference key="NSNextResponder" ref="694524832"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUILabel" id="505648338">
|
||||
<reference key="NSNextResponder" ref="703499560"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{10, 0}, {310, 39}}</string>
|
||||
<reference key="NSSuperview" ref="703499560"/>
|
||||
<reference key="NSWindow"/>
|
||||
<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">25</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">25</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 39}</string>
|
||||
<reference key="NSSuperview" ref="694524832"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="505648338"/>
|
||||
<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, 40}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="703499560"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:384</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<reference key="IBUIContentView" ref="703499560"/>
|
||||
<string key="IBUIReuseIdentifier">ConferenceDetailCellIdentifier</string>
|
||||
<real value="81" 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">label</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="505648338"/>
|
||||
</object>
|
||||
<int key="connectionID">9</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">4</int>
|
||||
<reference key="object" ref="694524832"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="505648338"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">cell</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="505648338"/>
|
||||
<reference key="parent" ref="694524832"/>
|
||||
<string key="objectName">label</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ContactCell</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="4.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">9</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ContactCell</string>
|
||||
<string key="superclassName">UITableViewCell</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">label</string>
|
||||
<string key="NS.object.0">UILabel</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">label</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">label</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ContactCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1296" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">1181</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
/* LinphoneCallBar.m
|
||||
*
|
||||
* Copyright (C) 2012 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 "LinphoneCallBar.h"
|
||||
#import "LinphoneManager.h"
|
||||
|
||||
#include "linphonecore.h"
|
||||
#include "private.h"
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
#define AT __FILE__ ":" TOSTRING(__LINE__)
|
||||
|
||||
@implementation LinphoneCallBar
|
||||
|
||||
@synthesize pauseButton;
|
||||
@synthesize videoButton;
|
||||
@synthesize microButton;
|
||||
@synthesize speakerButton;
|
||||
|
||||
- (void) viewDidLoad {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callUpdate:) name:@"LinphoneCallUpdate" object:nil];
|
||||
}
|
||||
|
||||
bool isInConference2(LinphoneCall* call) {
|
||||
if (!call)
|
||||
return false;
|
||||
return linphone_call_get_current_params(call)->in_conference;
|
||||
}
|
||||
|
||||
int callCount2(LinphoneCore* lc) {
|
||||
int count = 0;
|
||||
const MSList* calls = linphone_core_get_calls(lc);
|
||||
|
||||
while (calls != 0) {
|
||||
if (!isInConference2((LinphoneCall*)calls->data)) {
|
||||
count++;
|
||||
}
|
||||
calls = calls->next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
-(IBAction) onPauseClick: (id) event {
|
||||
[LinphoneManager logUIElementPressed:"PAUSE button"];
|
||||
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
LinphoneCall* currentCall = linphone_core_get_current_call(lc);
|
||||
if (currentCall) {
|
||||
if (linphone_call_get_state(currentCall) == LinphoneCallStreamsRunning) {
|
||||
[pauseButton setSelected:NO];
|
||||
linphone_core_pause_call(lc, currentCall);
|
||||
|
||||
// hide video view
|
||||
//TODO
|
||||
//[self disableVideoDisplay];
|
||||
}
|
||||
} 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);
|
||||
[pauseButton setSelected:YES];
|
||||
|
||||
const LinphoneCallParams* p = linphone_call_get_current_params(c);
|
||||
if (linphone_call_params_video_enabled(p)) {
|
||||
//TODO
|
||||
//[self enableVideoDisplay];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) callUpdate: (NSNotification*) notif {
|
||||
bool fullUpdate = true;
|
||||
// check LinphoneCore is initialized
|
||||
LinphoneCore* lc = nil;
|
||||
@try {
|
||||
lc = [LinphoneManager getLc];
|
||||
} @catch (NSException* exc) {
|
||||
return;
|
||||
}
|
||||
// 1 call: show pause button, otherwise show merge btn
|
||||
[LinphoneManager set:pauseButton enabled:(callCount2(lc) == 1) withName:"PAUSE button" andReason:"call count"];
|
||||
//TODO
|
||||
//[LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:"call count"];
|
||||
|
||||
LinphoneCall* currentCall = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
int callsCount = linphone_core_get_calls_nb(lc);
|
||||
|
||||
// hide pause/resume if in conference
|
||||
if (currentCall) {
|
||||
[microButton reset];
|
||||
if (linphone_core_is_in_conference(lc)) {
|
||||
[LinphoneManager set:pauseButton enabled:FALSE withName:"PAUSE button" andReason:"is in conference"];
|
||||
}
|
||||
else if (callCount2(lc) == callsCount && callsCount == 1) {
|
||||
[LinphoneManager set:pauseButton enabled:TRUE withName:"PAUSE button" andReason:"call count == 1"];
|
||||
pauseButton.selected = NO;
|
||||
} else {
|
||||
[LinphoneManager set:pauseButton enabled:FALSE withName:"PAUSE button" andReason:AT];
|
||||
}
|
||||
|
||||
if (fullUpdate) {
|
||||
//TODO
|
||||
//videoUpdateIndicator.hidden = YES;
|
||||
LinphoneCallState state = linphone_call_get_state(currentCall);
|
||||
if (state == LinphoneCallStreamsRunning || state == LinphoneCallUpdated || state == LinphoneCallUpdatedByRemote) {
|
||||
if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
|
||||
[videoButton setSelected:TRUE];
|
||||
} else {
|
||||
[videoButton setSelected:FALSE];
|
||||
}
|
||||
[videoButton setEnabled:YES];
|
||||
} else {
|
||||
[videoButton setEnabled:NO];
|
||||
//[videoCallQuality setImage:nil];
|
||||
}
|
||||
}
|
||||
} 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) {
|
||||
pauseButton.selected = YES;
|
||||
}
|
||||
[LinphoneManager set:pauseButton enabled:TRUE withName:"PAUSE button" andReason:AT];
|
||||
} else {
|
||||
[LinphoneManager set:pauseButton enabled:FALSE withName:"PAUSE button" andReason:AT];
|
||||
}
|
||||
[videoButton setEnabled:NO];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -92,7 +92,7 @@ typedef struct _LinphoneCallAppData {
|
|||
+(void) set:(UIView*)view hidden: (BOOL) hidden withName:(const char*)name andReason:(const char*) reason;
|
||||
+(void) set:(UIButton*)view enabled: (BOOL) enabled withName:(const char*)name andReason:(const char*) reason;
|
||||
+(void) logUIElementPressed:(const char*) name;
|
||||
|
||||
+ (void)abstractCall:(id) object dict:(NSDictionary *) dict;
|
||||
-(void) registerLogView:(id<LogView>) view;
|
||||
|
||||
-(void) startLibLinphone;
|
||||
|
|
|
|||
|
|
@ -80,21 +80,21 @@ extern void libmsbcg729_init();
|
|||
return theLinphoneManager;
|
||||
}
|
||||
|
||||
-(void) changeView:(PhoneView) view {
|
||||
- (void)changeView:(PhoneView) view {
|
||||
[self changeView:view dict:nil];
|
||||
}
|
||||
|
||||
-(void) changeView:(PhoneView) view dict:(NSDictionary *)dict {
|
||||
- (void)changeView:(PhoneView) view dict:(NSDictionary *)dict {
|
||||
currentView = view;
|
||||
|
||||
NSMutableDictionary* mdict = [NSMutableDictionary dictionaryWithObject: [NSNumber numberWithInt:currentView] forKey:@"view"];
|
||||
if(dict != nil)
|
||||
[mdict addEntriesFromDictionary:dict];
|
||||
[mdict setObject:dict forKey:@"args"];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneMainViewChange" object:self userInfo:mdict];
|
||||
}
|
||||
|
||||
-(PhoneView) currentView {
|
||||
- (PhoneView)currentView {
|
||||
return currentView;
|
||||
}
|
||||
|
||||
|
|
@ -1025,5 +1025,26 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
ms_message("UI - '%s' pressed", name);
|
||||
}
|
||||
|
||||
|
||||
+ (void)abstractCall:(id) object dict:(NSDictionary *) dict {
|
||||
for (NSString* identifier in dict) {
|
||||
if([identifier characterAtIndex:([identifier length] -1)] == ':') {
|
||||
NSArray *arguments = [dict objectForKey:identifier];
|
||||
SEL selector = NSSelectorFromString(identifier);
|
||||
NSMethodSignature *signature = [object methodSignatureForSelector:selector];
|
||||
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
|
||||
[invocation setTarget:object];
|
||||
[invocation setSelector:selector];
|
||||
for(int i=0; i<[arguments count]; i++)
|
||||
{
|
||||
id arg = [arguments objectAtIndex:i];
|
||||
[invocation setArgument:&arg atIndex:i+2]; // The first two arguments are the hidden arguments self and _cmd
|
||||
}
|
||||
[invocation invoke]; // Invoke the selector
|
||||
} else {
|
||||
NSDictionary *arguments = [dict objectForKey:identifier];
|
||||
id new_object = [object performSelector:NSSelectorFromString(identifier)];
|
||||
[LinphoneManager abstractCall:new_object dict:arguments];
|
||||
}
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* LinphoneCallBar.h
|
||||
/* UICallBar.h
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -20,17 +20,20 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "UIMicroButton.h"
|
||||
#import "UIPauseButton.h"
|
||||
#import "UISpeakerButton.h"
|
||||
#import "UIVideoButton.h"
|
||||
|
||||
@interface LinphoneCallBar : UIViewController {
|
||||
UIButton* pauseButton;
|
||||
UIButton* videoButton;
|
||||
UIMicroButton* microButton;
|
||||
UIButton* speakerButton;
|
||||
@interface UICallBar: UIViewController {
|
||||
UIPauseButton* pauseButton;
|
||||
UIVideoButton* videoButton;
|
||||
UIMicroButton* microButton;
|
||||
UISpeakerButton* speakerButton;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* pauseButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* videoButton;
|
||||
@property (nonatomic, retain) IBOutlet UIMicroButton* microButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* speakerButton;
|
||||
-(IBAction) onPauseClick: (id) event;
|
||||
@property (nonatomic, retain) IBOutlet UIPauseButton* pauseButton;
|
||||
@property (nonatomic, retain) IBOutlet UIVideoButton* videoButton;
|
||||
@property (nonatomic, retain) IBOutlet UIMicroButton* microButton;
|
||||
@property (nonatomic, retain) IBOutlet UISpeakerButton* speakerButton;
|
||||
|
||||
@end
|
||||
54
Classes/LinphoneUI/UICallBar.m
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/* UICallBar.m
|
||||
*
|
||||
* Copyright (C) 2012 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 "UICallBar.h"
|
||||
#import "LinphoneManager.h"
|
||||
|
||||
#include "linphonecore.h"
|
||||
#include "private.h"
|
||||
|
||||
@implementation UICallBar
|
||||
|
||||
@synthesize pauseButton;
|
||||
@synthesize videoButton;
|
||||
@synthesize microButton;
|
||||
@synthesize speakerButton;
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callUpdate:) name:@"LinphoneCallUpdate" object:nil];
|
||||
}
|
||||
|
||||
- (void)callUpdate: (NSNotification*) notif {
|
||||
// check LinphoneCore is initialized
|
||||
LinphoneCore* lc = nil;
|
||||
@try {
|
||||
lc = [LinphoneManager getLc];
|
||||
} @catch (NSException* exc) {
|
||||
return;
|
||||
}
|
||||
|
||||
//TODO
|
||||
//[LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:"call count"];
|
||||
|
||||
[microButton update];
|
||||
[pauseButton update];
|
||||
[videoButton update];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -167,11 +167,14 @@
|
|||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">speacker-ON-over.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUISelectedBackgroundImage" id="314442052">
|
||||
<object class="NSCustomResource" key="IBUISelectedBackgroundImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">speacker-ON-actif.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalBackgroundImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">speacker-OFF-actif.png</string>
|
||||
</object>
|
||||
<reference key="IBUINormalBackgroundImage" ref="314442052"/>
|
||||
<reference key="IBUIFontDescription" ref="794091713"/>
|
||||
<reference key="IBUIFont" ref="993152718"/>
|
||||
</object>
|
||||
|
|
@ -343,14 +346,6 @@
|
|||
</object>
|
||||
<int key="connectionID">15</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">speakerButton</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="264394465"/>
|
||||
</object>
|
||||
<int key="connectionID">16</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">videoButton</string>
|
||||
|
|
@ -368,13 +363,12 @@
|
|||
<int key="connectionID">14</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onPauseClick:</string>
|
||||
<reference key="source" ref="542459126"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">speakerButton</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="264394465"/>
|
||||
</object>
|
||||
<int key="connectionID">18</int>
|
||||
<int key="connectionID">16</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
|
|
@ -437,12 +431,6 @@
|
|||
<reference key="parent" ref="931774220"/>
|
||||
<string key="objectName">pause</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">9</int>
|
||||
<reference key="object" ref="264394465"/>
|
||||
<reference key="parent" ref="931774220"/>
|
||||
<string key="objectName">speaker</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="62185125"/>
|
||||
|
|
@ -461,10 +449,16 @@
|
|||
<reference key="parent" ref="931774220"/>
|
||||
<string key="objectName">micro</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">9</int>
|
||||
<reference key="object" ref="264394465"/>
|
||||
<reference key="parent" ref="931774220"/>
|
||||
<string key="objectName">speaker</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">LinphoneCallBar</string>
|
||||
<string key="-1.CustomClassName">UICallBar</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>
|
||||
|
|
@ -473,7 +467,7 @@
|
|||
<string key="11.CustomClassName">UIMicroButton</string>
|
||||
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="0.0" key="11.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<string key="12.CustomClassName">UIToggleVideoButton</string>
|
||||
<string key="12.CustomClassName">UIVideoButton</string>
|
||||
<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="0.0" key="12.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
|
|
@ -483,11 +477,12 @@
|
|||
<string key="7.CustomClassName">UIHangUpButton</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="2" key="7.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<string key="8.CustomClassName">UIPauseButton</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="2" key="8.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<string key="9.CustomClassName">UISpeakerButton</string>
|
||||
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="0.0" key="9.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<real value="2" key="9.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
|
|
@ -498,24 +493,13 @@
|
|||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">LinphoneCallBar</string>
|
||||
<string key="className">UICallBar</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">onPauseClick:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">onPauseClick:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">onPauseClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="microButton">UIMicroButton</string>
|
||||
<string key="pauseButton">UIButton</string>
|
||||
<string key="speakerButton">UIButton</string>
|
||||
<string key="videoButton">UIButton</string>
|
||||
<string key="pauseButton">UIPauseButton</string>
|
||||
<string key="speakerButton">UISpeakerButton</string>
|
||||
<string key="videoButton">UIVideoButton</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="microButton">
|
||||
|
|
@ -524,20 +508,20 @@
|
|||
</object>
|
||||
<object class="IBToOneOutletInfo" key="pauseButton">
|
||||
<string key="name">pauseButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
<string key="candidateClassName">UIPauseButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="speakerButton">
|
||||
<string key="name">speakerButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
<string key="candidateClassName">UISpeakerButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="videoButton">
|
||||
<string key="name">videoButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
<string key="candidateClassName">UIVideoButton</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/LinphoneCallBar.h</string>
|
||||
<string key="minorKey">./Classes/UICallBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
|
|
@ -556,6 +540,14 @@
|
|||
<string key="minorKey">./Classes/UIMicroButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIPauseButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIPauseButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISpeakerButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
|
|
@ -573,8 +565,8 @@
|
|||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIToggleVideoButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<string key="className">UIVideoButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">videoUpdateIndicator</string>
|
||||
<string key="NS.object.0">UIActivityIndicatorView</string>
|
||||
|
|
@ -588,7 +580,7 @@
|
|||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIToggleVideoButton.h</string>
|
||||
<string key="minorKey">./Classes/UIVideoButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
|
|
@ -614,6 +606,7 @@
|
|||
<string key="raccrocher-actif.png">{222, 136}</string>
|
||||
<string key="raccrocher-over.png">{222, 136}</string>
|
||||
<string key="speacker-OFF-actif.png">{160, 134}</string>
|
||||
<string key="speacker-ON-actif.png">{160, 134}</string>
|
||||
<string key="speacker-ON-over.png">{160, 134}</string>
|
||||
<string key="video-OFF-actif.png">{160, 134}</string>
|
||||
<string key="video-ON-actif.png">{160, 134}</string>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* ContactCell.h
|
||||
/* UIContactCell.h
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -19,9 +19,13 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ContactCell : UITableViewCell {
|
||||
UILabel *label;
|
||||
@interface UIContactCell : UITableViewCell {
|
||||
UILabel *firstName;
|
||||
UILabel *lastName;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* label;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* firstName;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* lastName;
|
||||
|
||||
- (void) update;
|
||||
@end
|
||||
76
Classes/LinphoneUI/UIContactCell.m
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/* UIContactCell.m
|
||||
*
|
||||
* Copyright (C) 2012 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 "UIContactCell.h"
|
||||
|
||||
@implementation UIContactCell
|
||||
|
||||
@synthesize firstName;
|
||||
@synthesize lastName;
|
||||
|
||||
- (id)init {
|
||||
if ((self = [super init]) != nil) {
|
||||
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"UIContactCell"
|
||||
owner:self
|
||||
options:nil];
|
||||
|
||||
if ([arrayOfViews count] >= 1) {
|
||||
[self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)touchUp:(id) sender {
|
||||
[self setHighlighted:true animated:true];
|
||||
}
|
||||
|
||||
- (void)touchDown:(id) sender {
|
||||
[self setHighlighted:false animated:true];
|
||||
}
|
||||
|
||||
- (void) update {
|
||||
CGRect firstNameFrame = [firstName frame];
|
||||
CGRect lastNameFrame = [lastName frame];
|
||||
|
||||
lastNameFrame.origin.x -= firstNameFrame.size.width;
|
||||
|
||||
// Compute firstName size
|
||||
CGSize contraints;
|
||||
contraints.height = [firstName frame].size.height;
|
||||
contraints.width = ([lastName frame].size.width + [lastName frame].origin.x) - [firstName frame].origin.x;
|
||||
CGSize firstNameSize = [[firstName text] sizeWithFont:[firstName font] constrainedToSize: contraints];
|
||||
firstNameFrame.size.width = firstNameSize.width;
|
||||
|
||||
// Compute lastName size & position
|
||||
lastNameFrame.origin.x += firstNameFrame.size.width;
|
||||
lastNameFrame.size.width = (contraints.width + [firstName frame].origin.x) - lastNameFrame.origin.x;
|
||||
|
||||
[firstName setFrame: firstNameFrame];
|
||||
[lastName setFrame: lastNameFrame];
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[firstName release];
|
||||
[lastName release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
287
Classes/LinphoneUI/UIContactCell.xib
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1296</int>
|
||||
<string key="IBDocument.SystemVersion">11E53</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.47</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1181</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUIView</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="IBUIView" id="675878782">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIButton" id="111701986">
|
||||
<reference key="NSNextResponder" ref="675878782"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="505648338"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<bool key="IBUIAdjustsImageWhenHighlighted">NO</bool>
|
||||
<object class="NSColor" key="IBUIHighlightedTitleColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleShadowColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">2</int>
|
||||
<double key="pointSize">15</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">15</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUILabel" id="505648338">
|
||||
<reference key="NSNextResponder" ref="675878782"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{10, 0}, {55, 44}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="261477247"/>
|
||||
<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>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
<string key="IBUIAccessibilityLabel">Firstname</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">John</string>
|
||||
<object class="NSColor" key="IBUITextColor" id="829378485">
|
||||
<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">25</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">25</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
|
||||
</object>
|
||||
<object class="IBUILabel" id="261477247">
|
||||
<reference key="NSNextResponder" ref="675878782"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{75, 0}, {200, 44}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<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>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
<string key="IBUIAccessibilityLabel">Lastname</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">Doe</string>
|
||||
<reference key="IBUITextColor" ref="829378485"/>
|
||||
<nil key="IBUIHighlightedColor"/>
|
||||
<int key="IBUIBaselineAdjustment">1</int>
|
||||
<float key="IBUIMinimumFontSize">10</float>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">2</int>
|
||||
<double key="pointSize">25</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">25</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<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">backgroundView</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="111701986"/>
|
||||
</object>
|
||||
<int key="connectionID">15</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">firstName</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="505648338"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">lastName</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="261477247"/>
|
||||
</object>
|
||||
<int key="connectionID">12</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">16</int>
|
||||
<reference key="object" ref="675878782"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="261477247"/>
|
||||
<reference ref="505648338"/>
|
||||
<reference ref="111701986"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">14</int>
|
||||
<reference key="object" ref="111701986"/>
|
||||
<reference key="parent" ref="675878782"/>
|
||||
<string key="objectName">background</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="505648338"/>
|
||||
<reference key="parent" ref="675878782"/>
|
||||
<string key="objectName">firstName</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="261477247"/>
|
||||
<reference key="parent" ref="675878782"/>
|
||||
<string key="objectName">lastName</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">UIContactCell</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="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="16.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">16</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIContactCell</string>
|
||||
<string key="superclassName">UITableViewCell</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="firstName">UILabel</string>
|
||||
<string key="lastName">UILabel</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="firstName">
|
||||
<string key="name">firstName</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="lastName">
|
||||
<string key="name">lastName</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIContactCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1296" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">1181</string>
|
||||
</data>
|
||||
</archive>
|
||||
32
Classes/LinphoneUI/UIHistoryCell.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* UIHistoryCell.h
|
||||
*
|
||||
* Copyright (C) 2012 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 UIHistoryCell : UITableViewCell {
|
||||
UIImageView* imageView;
|
||||
UILabel* displayName;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* imageView;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* displayName;
|
||||
|
||||
-(IBAction) onDetails: (id) event;
|
||||
|
||||
@end
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* ContactCell.m
|
||||
/* UIHistoryCell.m
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -15,23 +15,37 @@
|
|||
* 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 "ContactCell.h"
|
||||
#import "UIHistoryCell.h"
|
||||
|
||||
@implementation ContactCell
|
||||
@implementation UIHistoryCell
|
||||
|
||||
@synthesize label;
|
||||
- (id) init {
|
||||
if((self = [super init]) != nil) {
|
||||
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"ContactCell"
|
||||
owner:self
|
||||
options:nil];
|
||||
|
||||
if ([arrayOfViews count] >= 1){
|
||||
@synthesize displayName;
|
||||
@synthesize imageView;
|
||||
|
||||
- (id)init {
|
||||
if ((self = [super init]) != nil) {
|
||||
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"UIHistoryCell"
|
||||
owner:self
|
||||
options:nil];
|
||||
|
||||
if ([arrayOfViews count] >= 1) {
|
||||
[self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(IBAction) onDetails: (id) event {
|
||||
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[displayName release];
|
||||
[imageView release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
282
Classes/LinphoneUI/UIHistoryCell.xib
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1296</int>
|
||||
<string key="IBDocument.SystemVersion">11E53</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.47</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1181</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUIImageView</string>
|
||||
<string>IBUIView</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="841351856">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="371349661">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="702431052">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIImageView" id="811339934">
|
||||
<reference key="NSNextResponder" ref="702431052"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{10, 8}, {27, 27}}</string>
|
||||
<reference key="NSSuperview" ref="702431052"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="123093962"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUILabel" id="123093962">
|
||||
<reference key="NSNextResponder" ref="702431052"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{45, 0}, {236, 44}}</string>
|
||||
<reference key="NSSuperview" ref="702431052"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="364135044"/>
|
||||
<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>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
<string key="IBUIAccessibilityLabel">Firstname</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">John</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">25</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">25</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
|
||||
</object>
|
||||
<object class="IBUIButton" id="364135044">
|
||||
<reference key="NSNextResponder" ref="702431052"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{289, 11}, {22, 22}}</string>
|
||||
<reference key="NSSuperview" ref="702431052"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<bool key="IBUIAdjustsImageWhenHighlighted">NO</bool>
|
||||
<object class="NSColor" key="IBUIHighlightedTitleColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleShadowColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUIHighlightedBackgroundImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">bouton-detail-contact-over.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalBackgroundImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">bouton-detail-contact-actif.png</string>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">2</int>
|
||||
<double key="pointSize">15</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">15</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<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">imageView</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="811339934"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">displayName</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="123093962"/>
|
||||
</object>
|
||||
<int key="connectionID">8</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="841351856"/>
|
||||
<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="371349661"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">12</int>
|
||||
<reference key="object" ref="702431052"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="364135044"/>
|
||||
<reference ref="123093962"/>
|
||||
<reference ref="811339934"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="811339934"/>
|
||||
<reference key="parent" ref="702431052"/>
|
||||
<string key="objectName">imageView</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="123093962"/>
|
||||
<reference key="parent" ref="702431052"/>
|
||||
<string key="objectName">firstName</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="364135044"/>
|
||||
<reference key="parent" ref="702431052"/>
|
||||
<string key="objectName">details</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">UIHistoryCell</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="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="1" key="7.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">12</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIHistoryCell</string>
|
||||
<string key="superclassName">UITableViewCell</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">onDetails:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">onDetails:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">onDetails:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="displayName">UILabel</string>
|
||||
<string key="imageView">UIImageView</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="displayName">
|
||||
<string key="name">displayName</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="imageView">
|
||||
<string key="name">imageView</string>
|
||||
<string key="candidateClassName">UIImageView</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIHistoryCell.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1296" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="bouton-detail-contact-actif.png">{45, 45}</string>
|
||||
<string key="bouton-detail-contact-over.png">{45, 45}</string>
|
||||
</dictionary>
|
||||
<string key="IBCocoaTouchPluginVersion">1181</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* LinphoneMainBar.m
|
||||
/* UIMainBar.m
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface LinphoneMainBar : UIViewController {
|
||||
@interface UIMainBar : UIViewController {
|
||||
UIButton *historyButton;
|
||||
UIButton *contactsButton;
|
||||
UIButton *dialerButton;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* LinphoneMainBar.m
|
||||
/* UIMainBar.m
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "LinphoneMainBar.h"
|
||||
#import "UIMainBar.h"
|
||||
#import "PhoneMainView.h"
|
||||
|
||||
@implementation LinphoneMainBar
|
||||
@implementation UIMainBar
|
||||
|
||||
@synthesize historyButton;
|
||||
@synthesize contactsButton;
|
||||
|
|
@ -28,11 +28,11 @@
|
|||
@synthesize settingsButton;
|
||||
@synthesize chatButton;
|
||||
|
||||
- (void) viewDidLoad {
|
||||
- (void)viewDidLoad {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLinphoneMainViewChangeEvent:) name:@"LinphoneMainViewChange" object:nil];
|
||||
}
|
||||
|
||||
- (void) receiveLinphoneMainViewChangeEvent: (NSNotification*) notif {
|
||||
- (void)receiveLinphoneMainViewChangeEvent: (NSNotification*) notif {
|
||||
PhoneView view = [[notif.userInfo objectForKey: @"view"] intValue];
|
||||
if(view == PhoneView_History) {
|
||||
historyButton.selected = TRUE;
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) viewDidUnload {
|
||||
- (void)viewDidUnload {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[historyButton release];
|
||||
[contactsButton release];
|
||||
|
|
@ -70,28 +70,28 @@
|
|||
[chatButton release];
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (IBAction) onHistoryClick: (id) sender {
|
||||
- (IBAction)onHistoryClick: (id) sender {
|
||||
[[LinphoneManager instance] changeView:PhoneView_History];
|
||||
}
|
||||
|
||||
-(IBAction) onContactsClick: (id) event {
|
||||
- (IBAction)onContactsClick: (id) event {
|
||||
[[LinphoneManager instance] changeView:PhoneView_Contacts];
|
||||
}
|
||||
|
||||
-(IBAction) onDialerClick: (id) event {
|
||||
- (IBAction)onDialerClick: (id) event {
|
||||
[[LinphoneManager instance] changeView:PhoneView_Dialer];
|
||||
}
|
||||
|
||||
-(IBAction) onSettingsClick: (id) event {
|
||||
- (IBAction)onSettingsClick: (id) event {
|
||||
[[LinphoneManager instance] changeView:PhoneView_Settings];
|
||||
}
|
||||
|
||||
-(IBAction) onChatClick: (id) event {
|
||||
- (IBAction)onChatClick: (id) event {
|
||||
[[LinphoneManager instance] changeView:PhoneView_Chat];
|
||||
}
|
||||
|
||||
|
|
@ -212,6 +212,7 @@
|
|||
<string key="NSFrame">{{256, 0}, {64, 72}}</string>
|
||||
<reference key="NSSuperview" ref="1018893129"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
|
|
@ -424,7 +425,7 @@
|
|||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">LinphoneMainBar</string>
|
||||
<string key="-1.CustomClassName">UIMainBar</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>
|
||||
|
|
@ -451,7 +452,7 @@
|
|||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">LinphoneMainBar</string>
|
||||
<string key="className">UIMainBar</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="onChatClick:">id</string>
|
||||
|
|
@ -513,7 +514,7 @@
|
|||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/LinphoneMainBar.h</string>
|
||||
<string key="minorKey">./Classes/UIMainBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* UIMuteButton.h
|
||||
/* UIMicroButton.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "UIToggleButton.h"
|
||||
|
||||
#import "UIToggleButton.h"
|
||||
|
||||
@interface UIMicroButton : UIToggleButton<UIToggleButtonDelegate> {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* UIMuteButton.m
|
||||
/* UIMicroButton.m
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
linphone_core_mute_mic([LinphoneManager getLc], true);
|
||||
}
|
||||
|
||||
- (bool)isInitialStateOn {
|
||||
- (bool)onUpdate {
|
||||
@try {
|
||||
return linphone_core_is_mic_muted([LinphoneManager getLc]) == false;
|
||||
} @catch(NSException* e) {
|
||||
|
|
|
|||
25
Classes/LinphoneUI/UIPauseButton.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* UIPauseButton.h
|
||||
*
|
||||
* Copyright (C) 2012 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 "UIToggleButton.h"
|
||||
|
||||
@interface UIPauseButton : UIToggleButton<UIToggleButtonDelegate> {
|
||||
|
||||
}
|
||||
@end
|
||||
106
Classes/LinphoneUI/UIPauseButton.m
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
/* UIPauseButton.m
|
||||
*
|
||||
* Copyright (C) 2012 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 "UIPauseButton.h"
|
||||
#import "LinphoneManager.h"
|
||||
|
||||
#include "linphonecore.h"
|
||||
#include "private.h"
|
||||
|
||||
@implementation UIPauseButton
|
||||
|
||||
- (void)onOn {
|
||||
LinphoneCall* currentCall = [UIPauseButton getCall];
|
||||
if (currentCall != nil) {
|
||||
linphone_core_pause_call([LinphoneManager getLc], currentCall);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onOff {
|
||||
LinphoneCall* currentCall = [UIPauseButton getCall];
|
||||
if (currentCall != nil) {
|
||||
linphone_core_resume_call([LinphoneManager getLc], currentCall);
|
||||
}
|
||||
}
|
||||
|
||||
+ (bool)isInConference: (LinphoneCall*) call {
|
||||
if (!call)
|
||||
return false;
|
||||
return linphone_call_get_current_params(call)->in_conference;
|
||||
}
|
||||
|
||||
+ (int)notInConferenceCallCount: (LinphoneCore*) lc {
|
||||
int count = 0;
|
||||
const MSList* calls = linphone_core_get_calls(lc);
|
||||
|
||||
while (calls != 0) {
|
||||
if (![UIPauseButton isInConference: (LinphoneCall*)calls->data]) {
|
||||
count++;
|
||||
}
|
||||
calls = calls->next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
- (bool)onUpdate {
|
||||
// TODO: disable pause on not running call
|
||||
@try {
|
||||
bool ret = false;
|
||||
LinphoneCall* currentCall = [UIPauseButton getCall];
|
||||
if (currentCall != nil) {
|
||||
LinphoneCallState state = linphone_call_get_state(currentCall);
|
||||
if(state == LinphoneCallPaused || state == LinphoneCallPausing) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
int callsCount = linphone_core_get_calls_nb(lc);
|
||||
|
||||
if (currentCall) {
|
||||
if (linphone_core_is_in_conference(lc)) {
|
||||
[LinphoneManager set:self enabled:FALSE withName:"PAUSE button" andReason:"is in conference"];
|
||||
} else if ([UIPauseButton notInConferenceCallCount: lc] == callsCount && callsCount == 1) {
|
||||
[LinphoneManager set:self enabled:TRUE withName:"PAUSE button" andReason:"call count == 1"];
|
||||
} else {
|
||||
[LinphoneManager set:self enabled:FALSE withName:"PAUSE button" andReason:""];
|
||||
}
|
||||
} else {
|
||||
[LinphoneManager set:self enabled:FALSE withName:"PAUSE button" andReason:""];
|
||||
}
|
||||
return ret;
|
||||
} @catch(NSException* e) {
|
||||
//not ready yet
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+ (LinphoneCall*)getCall {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
LinphoneCall* currentCall = linphone_core_get_current_call(lc);
|
||||
if (currentCall == nil && linphone_core_get_calls_nb(lc) == 1) {
|
||||
currentCall = (LinphoneCall*) linphone_core_get_calls(lc)->data;
|
||||
}
|
||||
return currentCall;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "UIToggleButton.h"
|
||||
|
||||
#import "UIToggleButton.h"
|
||||
|
||||
@interface UISpeakerButton : UIToggleButton<UIToggleButtonDelegate> {
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ static void audioRouteChangeListenerCallback (
|
|||
const void *inPropertyValue // 4
|
||||
) {
|
||||
if (inPropertyID != kAudioSessionProperty_AudioRouteChange) return; // 5
|
||||
[(UISpeakerButton*)inUserData reset];
|
||||
[(UISpeakerButton*)inUserData update];
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ static void audioRouteChangeListenerCallback (
|
|||
}
|
||||
|
||||
|
||||
-(void) onOn {
|
||||
- (void)onOn {
|
||||
//redirect audio to speaker
|
||||
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
|
||||
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
|
||||
|
|
@ -56,13 +56,13 @@ static void audioRouteChangeListenerCallback (
|
|||
, &audioRouteOverride);
|
||||
|
||||
}
|
||||
-(void) onOff {
|
||||
- (void)onOff {
|
||||
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_None;
|
||||
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
|
||||
, sizeof (audioRouteOverride)
|
||||
, &audioRouteOverride);
|
||||
}
|
||||
-(bool) isInitialStateOn {
|
||||
- (bool)onUpdate {
|
||||
CFStringRef lNewRoute=CFSTR("Unknown");
|
||||
UInt32 lNewRouteSize = sizeof(lNewRoute);
|
||||
OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute
|
||||
|
|
@ -78,15 +78,6 @@ static void audioRouteChangeListenerCallback (
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code.
|
||||
}
|
||||
*/
|
||||
|
||||
- (void)dealloc {
|
||||
OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(routeChangeID, audioRouteChangeListenerCallback, self);
|
||||
if (lStatus) {
|
||||
|
|
@ -95,5 +86,4 @@ static void audioRouteChangeListenerCallback (
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* StatusSubViewController.h
|
||||
/* UIStateBar.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
* Copyright (C) 2012 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
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#import <UIKit/UIKit.h>
|
||||
#include "linphonecore.h"
|
||||
|
||||
@interface LinphoneStatusBar : UIViewController {
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UIStateBar : UIViewController {
|
||||
UIImageView* image;
|
||||
UIActivityIndicatorView* spinner;
|
||||
UILabel* label;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* StatusSubViewController.h
|
||||
/* UIStateBar.m
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
* Copyright (C) 2012 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
|
||||
|
|
@ -17,25 +17,25 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "LinphoneStatusBar.h"
|
||||
#import "UIStateBar.h"
|
||||
#import "LinphoneManager.h"
|
||||
|
||||
@implementation LinphoneStatusBar
|
||||
#include "linphonecore.h"
|
||||
|
||||
@implementation UIStateBar
|
||||
|
||||
@synthesize image;
|
||||
@synthesize spinner;
|
||||
@synthesize label;
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// Set observer
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(registrationUpdate:) name:@"LinphoneRegistrationUpdate" object:nil];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
||||
}
|
||||
|
||||
|
|
@ -76,22 +76,22 @@
|
|||
[label setText:message != nil ? message : NSLocalizedString(@"No SIP account defined", nil)];*/
|
||||
case LinphoneRegistrationFailed:
|
||||
image.hidden = NO;
|
||||
[image setImage:[UIImage imageNamed:@"status_red.png"]];
|
||||
[image setImage:[UIImage imageNamed:@"status_error.png"]];
|
||||
[spinner stopAnimating];
|
||||
[label setText:message];
|
||||
case LinphoneRegistrationNone:
|
||||
image.hidden = NO;
|
||||
[image setImage:[UIImage imageNamed:@"status_gray.png"]];
|
||||
[image setImage:[UIImage imageNamed:@"status_disconnected.png"]];
|
||||
[spinner stopAnimating];
|
||||
[label setText:message];
|
||||
case LinphoneRegistrationProgress:
|
||||
image.hidden = YES;
|
||||
spinner.hidden = NO;
|
||||
[spinner startAnimating];
|
||||
image.hidden = NO;
|
||||
[image setImage:[UIImage imageNamed:@"status_inprogress.png"]];
|
||||
[spinner stopAnimating];
|
||||
[label setText:message];
|
||||
case LinphoneRegistrationOk:
|
||||
image.hidden = NO;
|
||||
[image setImage:[UIImage imageNamed:@"status_green.png"]];
|
||||
[image setImage:[UIImage imageNamed:@"status_connected.png"]];
|
||||
[spinner stopAnimating];
|
||||
[label setText:message];
|
||||
}
|
||||
|
|
@ -12,7 +12,6 @@
|
|||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUIImageView</string>
|
||||
<string>IBUIActivityIndicatorView</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBUILabel</string>
|
||||
<string>IBProxyObject</string>
|
||||
|
|
@ -43,7 +42,7 @@
|
|||
<string key="NSFrameSize">{320, 23}</string>
|
||||
<reference key="NSSuperview" ref="848661322"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="665185352"/>
|
||||
<reference key="NSNextKeyView" ref="332800514"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -55,10 +54,10 @@
|
|||
<object class="IBUIImageView" id="332800514">
|
||||
<reference key="NSNextResponder" ref="848661322"/>
|
||||
<int key="NSvFlags">-2147483356</int>
|
||||
<string key="NSFrame">{{0, -1}, {25, 23}}</string>
|
||||
<string key="NSFrame">{{6, 6}, {10, 10}}</string>
|
||||
<reference key="NSSuperview" ref="848661322"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="393098359"/>
|
||||
<reference key="NSNextKeyView" ref="200467549"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:567</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -67,22 +66,10 @@
|
|||
<string key="NSResourceName">status_gray.png</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIActivityIndicatorView" id="665185352">
|
||||
<reference key="NSNextResponder" ref="848661322"/>
|
||||
<int key="NSvFlags">-2147483356</int>
|
||||
<string key="NSFrame">{{0, 1}, {20, 20}}</string>
|
||||
<reference key="NSSuperview" ref="848661322"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="200467549"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1030</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIStyle">2</int>
|
||||
</object>
|
||||
<object class="IBUILabel" id="200467549">
|
||||
<reference key="NSNextResponder" ref="848661322"/>
|
||||
<int key="NSvFlags">-2147483356</int>
|
||||
<string key="NSFrame">{{28, 0}, {280, 21}}</string>
|
||||
<string key="NSFrame">{{22, 0}, {298, 20}}</string>
|
||||
<reference key="NSSuperview" ref="848661322"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
|
|
@ -114,7 +101,7 @@
|
|||
<string key="NSFrameSize">{320, 23}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="332800514"/>
|
||||
<reference key="NSNextKeyView" ref="393098359"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:196</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -141,14 +128,6 @@
|
|||
</object>
|
||||
<int key="connectionID">9</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">spinner</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="665185352"/>
|
||||
</object>
|
||||
<int key="connectionID">10</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
|
|
@ -181,24 +160,17 @@
|
|||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="848661322"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="665185352"/>
|
||||
<reference ref="332800514"/>
|
||||
<reference ref="200467549"/>
|
||||
<reference ref="393098359"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="665185352"/>
|
||||
<reference key="parent" ref="848661322"/>
|
||||
<string key="objectName">spin</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="200467549"/>
|
||||
<reference key="parent" ref="848661322"/>
|
||||
<string key="objectName">label</string>
|
||||
<string key="objectName">status</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
|
|
@ -215,7 +187,7 @@
|
|||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">LinphoneStatusBar</string>
|
||||
<string key="-1.CustomClassName">UIStateBar</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>
|
||||
|
|
@ -223,7 +195,6 @@
|
|||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
|
|
@ -231,37 +202,7 @@
|
|||
<nil key="sourceID"/>
|
||||
<int key="maxID">12</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">LinphoneStatusBar</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="image">UIImageView</string>
|
||||
<string key="label">UILabel</string>
|
||||
<string key="spinner">UIActivityIndicatorView</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="image">
|
||||
<string key="name">image</string>
|
||||
<string key="candidateClassName">UIImageView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="label">
|
||||
<string key="name">label</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="spinner">
|
||||
<string key="name">spinner</string>
|
||||
<string key="candidateClassName">UIActivityIndicatorView</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/LinphoneStatusBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
|
|
@ -22,12 +22,12 @@
|
|||
@protocol UIToggleButtonDelegate
|
||||
-(void) onOn;
|
||||
-(void) onOff;
|
||||
-(bool) isInitialStateOn;
|
||||
-(bool) onUpdate;
|
||||
@end
|
||||
|
||||
@interface UIToggleButton : UIButton <UIToggleButtonDelegate> {
|
||||
}
|
||||
-(bool) reset;
|
||||
-(bool) update;
|
||||
-(bool) toggle;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@
|
|||
return self.selected;
|
||||
}
|
||||
|
||||
- (bool)reset {
|
||||
self.selected = [self isInitialStateOn];
|
||||
- (bool)update {
|
||||
self.selected = [self onUpdate];
|
||||
return self.selected;
|
||||
}
|
||||
|
||||
- (id) init {
|
||||
[self reset];
|
||||
[self update];
|
||||
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
|
||||
return self;
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
[NSException raise:NSInternalInconsistencyException
|
||||
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
|
||||
}
|
||||
-(bool) isInitialStateOn {
|
||||
-(bool) onUpdate {
|
||||
[NSException raise:NSInternalInconsistencyException
|
||||
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,75 +0,0 @@
|
|||
/* UIToggleVideoButton.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 "UIToggleVideoButton.h"
|
||||
#include "LinphoneManager.h"
|
||||
|
||||
@implementation UIToggleVideoButton
|
||||
|
||||
@synthesize videoUpdateIndicator;
|
||||
|
||||
-(void) touchUp:(id) sender {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
|
||||
if (!linphone_core_video_enabled(lc))
|
||||
return;
|
||||
|
||||
[videoUpdateIndicator startAnimating];
|
||||
videoUpdateIndicator.hidden = NO;
|
||||
self.enabled = NO;
|
||||
|
||||
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
if (call) {
|
||||
LinphoneCallParams* call_params = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
if (linphone_call_params_video_enabled(call_params)) {
|
||||
ms_message("Disabling video");
|
||||
linphone_call_params_enable_video(call_params, FALSE);
|
||||
} else {
|
||||
ms_message("Enabling video");
|
||||
linphone_call_params_enable_video(call_params, TRUE);
|
||||
}
|
||||
linphone_core_update_call(lc, call, call_params);
|
||||
linphone_call_params_destroy(call_params);
|
||||
} else {
|
||||
ms_warning("Cannot toggle 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
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* UIToggleVideoButton.h
|
||||
/* UIVideoButton.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
|
|
@ -19,11 +19,12 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UIToggleVideoButton : UIButton {
|
||||
#import "UIToggleButton.h"
|
||||
|
||||
@interface UIVideoButton : UIToggleButton<UIToggleButtonDelegate> {
|
||||
UIActivityIndicatorView* videoUpdateIndicator;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* videoUpdateIndicator;
|
||||
|
||||
92
Classes/LinphoneUI/UIVideoButton.m
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/* UIToggleVideoButton.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 "UIVideoButton.h"
|
||||
#include "LinphoneManager.h"
|
||||
|
||||
@implementation UIVideoButton
|
||||
|
||||
@synthesize videoUpdateIndicator;
|
||||
|
||||
- (void)onOn {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
|
||||
if (!linphone_core_video_enabled(lc))
|
||||
return;
|
||||
|
||||
[videoUpdateIndicator startAnimating];
|
||||
[videoUpdateIndicator setHidden: FALSE];
|
||||
[self setEnabled: FALSE];
|
||||
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);
|
||||
} else {
|
||||
ms_warning("Cannot toggle video, because no current call");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)onOff {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
|
||||
if (!linphone_core_video_enabled(lc))
|
||||
return;
|
||||
|
||||
[videoUpdateIndicator startAnimating];
|
||||
[videoUpdateIndicator setHidden: FALSE];
|
||||
[self setEnabled: FALSE];
|
||||
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, FALSE);
|
||||
linphone_core_update_call(lc, call, call_params);
|
||||
linphone_call_params_destroy(call_params);
|
||||
} else {
|
||||
ms_warning("Cannot toggle video, because no current call");
|
||||
}
|
||||
}
|
||||
|
||||
- (bool)onUpdate {
|
||||
@try {
|
||||
bool val = false;
|
||||
LinphoneCall* currentCall = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
if (currentCall) {
|
||||
LinphoneCallState state = linphone_call_get_state(currentCall);
|
||||
if (state == LinphoneCallStreamsRunning || state == LinphoneCallUpdated || state == LinphoneCallUpdatedByRemote) {
|
||||
if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
|
||||
val = true;
|
||||
}
|
||||
[self setEnabled:TRUE];
|
||||
} else {
|
||||
[self setEnabled:FALSE];
|
||||
}
|
||||
} else {
|
||||
[self setEnabled:FALSE];
|
||||
}
|
||||
return val;
|
||||
} @catch(NSException* e) {
|
||||
//not ready yet
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -44,6 +44,7 @@
|
|||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{768, 1024}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:196</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -68,12 +69,19 @@
|
|||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
<object class="IBUIViewController" key="IBUISelectedViewController" id="369729967">
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="935176592">
|
||||
<object class="IBUIViewController" key="IBUISelectedViewController" id="538833779">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="918692703">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">history-orange.png</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUISystemItemIdentifier">5</int>
|
||||
<reference key="IBUITabBar" ref="752322970"/>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="888354232"/>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
|
|
@ -82,25 +90,7 @@
|
|||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBUIViewControllers">
|
||||
<object class="IBUIViewController" id="538833779">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="918692703">
|
||||
<string key="IBUITitle">History</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">history-orange.png</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="888354232"/>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
<reference ref="538833779"/>
|
||||
<object class="IBUIViewController" id="446523710">
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="64676500">
|
||||
<string key="IBUITitle">Dialer</string>
|
||||
|
|
@ -109,6 +99,7 @@
|
|||
<string key="NSResourceName">dialer-orange.png</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<reference key="IBUITabBar" ref="752322970"/>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="888354232"/>
|
||||
<string key="IBUINibName">PhoneViewController-ipad</string>
|
||||
|
|
@ -120,11 +111,25 @@
|
|||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
<reference ref="369729967"/>
|
||||
<object class="IBUIViewController" id="369729967">
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="935176592">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<reference key="IBUITabBar" ref="752322970"/>
|
||||
<int key="IBUISystemItemIdentifier">5</int>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="888354232"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
<object class="IBUIViewController" id="954789010">
|
||||
<object class="IBUITabBarItem" key="IBUITabBarItem" id="162230919">
|
||||
<string key="IBUITitle"/>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<reference key="IBUITabBar" ref="752322970"/>
|
||||
<int key="IBUISystemItemIdentifier">0</int>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="888354232"/>
|
||||
|
|
@ -142,12 +147,20 @@
|
|||
<int key="NSvFlags">266</int>
|
||||
<string key="NSFrame">{{0, 975}, {768, 49}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MCAwAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<array class="NSMutableArray" key="IBUIItems">
|
||||
<reference ref="918692703"/>
|
||||
<reference ref="64676500"/>
|
||||
<reference ref="935176592"/>
|
||||
<reference ref="162230919"/>
|
||||
</array>
|
||||
<reference key="IBUISelectedItem" ref="918692703"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIViewController" id="26482769">
|
||||
|
|
@ -156,6 +169,7 @@
|
|||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:212</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
|
|
@ -355,7 +369,7 @@
|
|||
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="18.CustomClassName">PhoneViewController</string>
|
||||
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="19.CustomClassName">CallHistoryTableViewController</string>
|
||||
<string key="19.CustomClassName">HistoryTableViewController</string>
|
||||
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="20.CustomClassName">MoreViewController</string>
|
||||
<string key="20.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
|
|
@ -376,7 +390,228 @@
|
|||
<nil key="sourceID"/>
|
||||
<int key="maxID">44</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">HistoryTableViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/HistoryTableViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MainScreenWithVideoPreview</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="phoneMainView">PhoneViewController</string>
|
||||
<string key="window">UIWindow</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="phoneMainView">
|
||||
<string key="name">phoneMainView</string>
|
||||
<string key="candidateClassName">PhoneViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="window">
|
||||
<string key="name">window</string>
|
||||
<string key="candidateClassName">UIWindow</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MainScreenWithVideoPreview.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MoreViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="console">UITableViewCell</string>
|
||||
<string key="credit">UITableViewCell</string>
|
||||
<string key="creditText">UITextView</string>
|
||||
<string key="web">UITableViewCell</string>
|
||||
<string key="weburi">UILabel</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="console">
|
||||
<string key="name">console</string>
|
||||
<string key="candidateClassName">UITableViewCell</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="credit">
|
||||
<string key="name">credit</string>
|
||||
<string key="candidateClassName">UITableViewCell</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="creditText">
|
||||
<string key="name">creditText</string>
|
||||
<string key="candidateClassName">UITextView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="web">
|
||||
<string key="name">web</string>
|
||||
<string key="candidateClassName">UITableViewCell</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="weburi">
|
||||
<string key="name">weburi</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<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">
|
||||
<string key="NS.key.0">onAddContact:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">onAddContact:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">onAddContact:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="address">UITextField</string>
|
||||
<string key="backToCallView">UIButton</string>
|
||||
<string key="callLarge">UIButton</string>
|
||||
<string key="callShort">UIButton</string>
|
||||
<string key="dialerView">UIView</string>
|
||||
<string key="eight">UIButton</string>
|
||||
<string key="erase">UIEraseButton</string>
|
||||
<string key="five">UIButton</string>
|
||||
<string key="four">UIButton</string>
|
||||
<string key="hash">UIButton</string>
|
||||
<string key="mDisplayName">UILabel</string>
|
||||
<string key="mMainScreenWithVideoPreview">MainScreenWithVideoPreview</string>
|
||||
<string key="myTabBarController">UITabBarController</string>
|
||||
<string key="nine">UIButton</string>
|
||||
<string key="one">UIButton</string>
|
||||
<string key="seven">UIButton</string>
|
||||
<string key="six">UIButton</string>
|
||||
<string key="star">UIButton</string>
|
||||
<string key="status">UILabel</string>
|
||||
<string key="statusViewHolder">UIView</string>
|
||||
<string key="switchCamera">UIButton</string>
|
||||
<string key="three">UIButton</string>
|
||||
<string key="two">UIButton</string>
|
||||
<string key="zero">UIButton</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="address">
|
||||
<string key="name">address</string>
|
||||
<string key="candidateClassName">UITextField</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="backToCallView">
|
||||
<string key="name">backToCallView</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="callLarge">
|
||||
<string key="name">callLarge</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="callShort">
|
||||
<string key="name">callShort</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="dialerView">
|
||||
<string key="name">dialerView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="eight">
|
||||
<string key="name">eight</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="erase">
|
||||
<string key="name">erase</string>
|
||||
<string key="candidateClassName">UIEraseButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="five">
|
||||
<string key="name">five</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="four">
|
||||
<string key="name">four</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="hash">
|
||||
<string key="name">hash</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="mDisplayName">
|
||||
<string key="name">mDisplayName</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="mMainScreenWithVideoPreview">
|
||||
<string key="name">mMainScreenWithVideoPreview</string>
|
||||
<string key="candidateClassName">MainScreenWithVideoPreview</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="myTabBarController">
|
||||
<string key="name">myTabBarController</string>
|
||||
<string key="candidateClassName">UITabBarController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="nine">
|
||||
<string key="name">nine</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="one">
|
||||
<string key="name">one</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="seven">
|
||||
<string key="name">seven</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="six">
|
||||
<string key="name">six</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="star">
|
||||
<string key="name">star</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="status">
|
||||
<string key="name">status</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="statusViewHolder">
|
||||
<string key="name">statusViewHolder</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="switchCamera">
|
||||
<string key="name">switchCamera</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="three">
|
||||
<string key="name">three</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="two">
|
||||
<string key="name">two</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="zero">
|
||||
<string key="name">zero</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<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">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>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
|
|
|
|||
|
|
@ -21,27 +21,26 @@
|
|||
#import "LinphoneManager.h"
|
||||
|
||||
@interface PhoneMainView : UIViewController {
|
||||
UIView *statusBarView;
|
||||
UIView *stateBarView;
|
||||
UIView *contentView;
|
||||
UIView *tabBarView;
|
||||
PhoneView currentView;
|
||||
|
||||
@private
|
||||
NSMutableDictionary *viewDescriptions;
|
||||
NSArray *views;
|
||||
|
||||
UIViewController *statusBarController;
|
||||
UIViewController *stateBarController;
|
||||
|
||||
UIViewController *callTabBarController;
|
||||
UIViewController *mainTabBarController;
|
||||
UIViewController *incomingCallTabBarController;
|
||||
|
||||
}
|
||||
@property (nonatomic, retain) IBOutlet UIView* statusBarView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* stateBarView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* contentView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* tabBarView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIViewController* statusBarController;
|
||||
@property (nonatomic, retain) IBOutlet UIViewController* stateBarController;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIViewController* callTabBarController;
|
||||
@property (nonatomic, retain) IBOutlet UIViewController* mainTabBarController;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
#import "PhoneMainView.h"
|
||||
#import "PhoneViewController.h"
|
||||
#import "HistoryController.h"
|
||||
#import "ContactsController.h"
|
||||
#import "HistoryViewController.h"
|
||||
#import "ContactsViewController.h"
|
||||
#import "InCallViewController.h"
|
||||
|
||||
typedef enum _TabBar {
|
||||
|
|
@ -41,11 +41,11 @@ typedef enum _TabBar {
|
|||
|
||||
@implementation PhoneMainView
|
||||
|
||||
@synthesize statusBarView;
|
||||
@synthesize stateBarView;
|
||||
@synthesize contentView;
|
||||
@synthesize tabBarView;
|
||||
|
||||
@synthesize statusBarController;
|
||||
@synthesize stateBarController;
|
||||
|
||||
@synthesize callTabBarController;
|
||||
@synthesize mainTabBarController;
|
||||
|
|
@ -64,14 +64,15 @@ typedef enum _TabBar {
|
|||
if(description == nil)
|
||||
return;
|
||||
|
||||
[contentView addSubview: description->content.view];
|
||||
UIView *innerView = description->content.view;
|
||||
[contentView addSubview: innerView];
|
||||
|
||||
CGRect contentFrame = contentView.frame;
|
||||
if(description->statusEnabled) {
|
||||
statusBarView.hidden = false;
|
||||
contentFrame.origin.y = statusBarView.frame.size.height + statusBarView.frame.origin.y;
|
||||
stateBarView.hidden = false;
|
||||
contentFrame.origin.y = stateBarView.frame.size.height + stateBarView.frame.origin.y;
|
||||
} else {
|
||||
statusBarView.hidden = true;
|
||||
stateBarView.hidden = true;
|
||||
contentFrame.origin.y = 0;
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +86,7 @@ typedef enum _TabBar {
|
|||
tabFrame.size.width = description->tabBar.view.frame.size.width;
|
||||
tabFrame.origin.y -= tabFrame.size.height;
|
||||
tabFrame.origin.x -= tabFrame.size.width;
|
||||
tabBarView.frame = tabFrame;
|
||||
[tabBarView setFrame: tabFrame];
|
||||
contentFrame.size.height = tabFrame.origin.y - contentFrame.origin.y;
|
||||
for (UIView *view in description->tabBar.view.subviews) {
|
||||
if(view.tag == -1) {
|
||||
|
|
@ -99,7 +100,14 @@ typedef enum _TabBar {
|
|||
contentFrame.size.height = tabFrame.origin.y - tabFrame.size.height;
|
||||
}
|
||||
|
||||
contentView.frame = contentFrame;
|
||||
[contentView setFrame: contentFrame];
|
||||
CGRect innerContentFrame = innerView.frame;
|
||||
innerContentFrame.size = contentFrame.size;
|
||||
[innerView setFrame: innerContentFrame];
|
||||
|
||||
NSDictionary *dict = [notif.userInfo objectForKey: @"args"];
|
||||
if(dict != nil)
|
||||
[LinphoneManager abstractCall:description->content dict:dict];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
|
|
@ -113,14 +121,14 @@ typedef enum _TabBar {
|
|||
dumb = mainTabBarController.view;
|
||||
|
||||
// Status Bar
|
||||
[statusBarView addSubview: statusBarController.view];
|
||||
[stateBarView addSubview: stateBarController.view];
|
||||
|
||||
//
|
||||
// Main View
|
||||
//
|
||||
PhoneViewController* myPhoneViewController = [[PhoneViewController alloc]
|
||||
initWithNibName:@"PhoneViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
initWithNibName:@"PhoneViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
//[myPhoneViewController loadView];
|
||||
ViewsDescription *mainViewDescription = [ViewsDescription alloc];
|
||||
mainViewDescription->content = myPhoneViewController;
|
||||
|
|
@ -132,9 +140,9 @@ typedef enum _TabBar {
|
|||
//
|
||||
// Contacts View
|
||||
//
|
||||
ContactsController* myContactsController = [[ContactsController alloc]
|
||||
initWithNibName:@"ContactsController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
ContactsViewController* myContactsController = [[ContactsViewController alloc]
|
||||
initWithNibName:@"ContactsViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
//[myContactsController loadView];
|
||||
ViewsDescription *contactsDescription = [ViewsDescription alloc];
|
||||
contactsDescription->content = myContactsController;
|
||||
|
|
@ -146,9 +154,9 @@ typedef enum _TabBar {
|
|||
//
|
||||
// Call History View
|
||||
//
|
||||
HistoryController* myHistoryController = [[HistoryController alloc]
|
||||
initWithNibName:@"HistoryController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
HistoryViewController* myHistoryController = [[HistoryViewController alloc]
|
||||
initWithNibName:@"HistoryViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
//[myHistoryController loadView];
|
||||
ViewsDescription *historyDescription = [ViewsDescription alloc];
|
||||
historyDescription->content = myHistoryController;
|
||||
|
|
@ -161,8 +169,8 @@ typedef enum _TabBar {
|
|||
// InCall View
|
||||
//
|
||||
InCallViewController* myInCallController = [[InCallViewController alloc]
|
||||
initWithNibName:@"InCallViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
initWithNibName:@"InCallViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
//[myHistoryController loadView];
|
||||
ViewsDescription *inCallDescription = [ViewsDescription alloc];
|
||||
inCallDescription->content = myInCallController;
|
||||
|
|
@ -180,11 +188,13 @@ typedef enum _TabBar {
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
[viewDescriptions dealloc];
|
||||
[statusBarView dealloc];
|
||||
[statusBarController dealloc];
|
||||
[mainTabBarController dealloc];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[viewDescriptions release];
|
||||
[stateBarView release];
|
||||
[stateBarController release];
|
||||
[mainTabBarController release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
@end
|
||||
|
|
@ -49,11 +49,8 @@
|
|||
<reference key="NSNextKeyView" ref="813768660"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace" id="267218165">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MCAxIDAuMDkwOTI0NTczOTEAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -66,10 +63,6 @@
|
|||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="565712161"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MCAxIDAuMDkwOTI0NTczOTEgMAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
|
|
@ -79,6 +72,7 @@
|
|||
<string key="NSFrame">{{0, 400}, {320, 60}}</string>
|
||||
<reference key="NSSuperview" ref="891400674"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
|
|
@ -96,7 +90,9 @@
|
|||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<reference key="NSCustomColorSpace" ref="267218165"/>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace" id="267218165">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
|
|
@ -173,6 +169,7 @@
|
|||
<string key="NSFrame">{{160, 0}, {160, 77}}</string>
|
||||
<reference key="NSSuperview" ref="591517680"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
|
|
@ -271,6 +268,7 @@
|
|||
<string key="NSFrame">{{192, 0}, {128, 72}}</string>
|
||||
<reference key="NSSuperview" ref="909644813"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
|
|
@ -344,6 +342,7 @@
|
|||
</object>
|
||||
<object class="IBUIViewController" id="334571927">
|
||||
<bool key="IBUIAutoresizesArchivedViewToFullSize">NO</bool>
|
||||
<string key="IBUINibName">UIMainBar</string>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
|
|
@ -354,6 +353,7 @@
|
|||
</object>
|
||||
<object class="IBUIViewController" id="355474761">
|
||||
<bool key="IBUIAutoresizesArchivedViewToFullSize">NO</bool>
|
||||
<string key="IBUINibName">UICallBar</string>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
|
|
@ -364,6 +364,7 @@
|
|||
</object>
|
||||
<object class="IBUIViewController" id="210198832">
|
||||
<bool key="IBUIAutoresizesArchivedViewToFullSize">NO</bool>
|
||||
<string key="IBUINibName">UIStatusBar</string>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
|
|
@ -400,14 +401,6 @@
|
|||
</object>
|
||||
<int key="connectionID">159</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">statusBarView</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="512515388"/>
|
||||
</object>
|
||||
<int key="connectionID">176</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">mainTabBarController</string>
|
||||
|
|
@ -416,14 +409,6 @@
|
|||
</object>
|
||||
<int key="connectionID">192</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">statusBarController</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="210198832"/>
|
||||
</object>
|
||||
<int key="connectionID">193</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">callTabBarController</string>
|
||||
|
|
@ -432,6 +417,22 @@
|
|||
</object>
|
||||
<int key="connectionID">196</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">stateBarController</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="210198832"/>
|
||||
</object>
|
||||
<int key="connectionID">201</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">stateBarView</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="512515388"/>
|
||||
</object>
|
||||
<int key="connectionID">202</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
|
|
@ -559,25 +560,25 @@
|
|||
<int key="objectID">175</int>
|
||||
<reference key="object" ref="512515388"/>
|
||||
<reference key="parent" ref="891400674"/>
|
||||
<string key="objectName">statusBar</string>
|
||||
<string key="objectName">stateBar</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">178</int>
|
||||
<reference key="object" ref="334571927"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">mainBarController</string>
|
||||
<string key="objectName">mainTabBarController</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">190</int>
|
||||
<reference key="object" ref="210198832"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">statusBarController</string>
|
||||
<string key="objectName">stateBarController</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">194</int>
|
||||
<reference key="object" ref="355474761"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">callBarController</string>
|
||||
<string key="objectName">callTabBarController</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
@ -637,11 +638,11 @@
|
|||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>LinphoneMainBar</string>
|
||||
<string>UIMainBar</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>LinphoneStatusBar</string>
|
||||
<string>UIStateBar</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>LinphoneCallBar</string>
|
||||
<string>UICallBar</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
|
|
@ -658,29 +659,280 @@
|
|||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">196</int>
|
||||
<int key="maxID">202</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">LinphoneCallBar</string>
|
||||
<string key="className">PhoneMainView</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>callTabBarController</string>
|
||||
<string>contentView</string>
|
||||
<string>incomingCallTabBarController</string>
|
||||
<string>mainTabBarController</string>
|
||||
<string>stateBarController</string>
|
||||
<string>stateBarView</string>
|
||||
<string>tabBarView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIViewController</string>
|
||||
<string>UIView</string>
|
||||
<string>UIViewController</string>
|
||||
<string>UIViewController</string>
|
||||
<string>UIViewController</string>
|
||||
<string>UIView</string>
|
||||
<string>UIView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>callTabBarController</string>
|
||||
<string>contentView</string>
|
||||
<string>incomingCallTabBarController</string>
|
||||
<string>mainTabBarController</string>
|
||||
<string>stateBarController</string>
|
||||
<string>stateBarView</string>
|
||||
<string>tabBarView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">callTabBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">contentView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">incomingCallTabBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">mainTabBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">stateBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">stateBarView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">tabBarView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/LinphoneCallBar.h</string>
|
||||
<string key="minorKey">./Classes/PhoneMainView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">LinphoneMainBar</string>
|
||||
<string key="className">UICallBar</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>microButton</string>
|
||||
<string>pauseButton</string>
|
||||
<string>speakerButton</string>
|
||||
<string>videoButton</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIMicroButton</string>
|
||||
<string>UIPauseButton</string>
|
||||
<string>UISpeakerButton</string>
|
||||
<string>UIVideoButton</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>microButton</string>
|
||||
<string>pauseButton</string>
|
||||
<string>speakerButton</string>
|
||||
<string>videoButton</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">microButton</string>
|
||||
<string key="candidateClassName">UIMicroButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">pauseButton</string>
|
||||
<string key="candidateClassName">UIPauseButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">speakerButton</string>
|
||||
<string key="candidateClassName">UISpeakerButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">videoButton</string>
|
||||
<string key="candidateClassName">UIVideoButton</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/LinphoneMainBar.h</string>
|
||||
<string key="minorKey">./Classes/UICallBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">LinphoneStatusBar</string>
|
||||
<string key="className">UIMainBar</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>onChatClick:</string>
|
||||
<string>onContactsClick:</string>
|
||||
<string>onDialerClick:</string>
|
||||
<string>onHistoryClick:</string>
|
||||
<string>onSettingsClick:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>onChatClick:</string>
|
||||
<string>onContactsClick:</string>
|
||||
<string>onDialerClick:</string>
|
||||
<string>onHistoryClick:</string>
|
||||
<string>onSettingsClick:</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">onChatClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">onContactsClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">onDialerClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">onHistoryClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">onSettingsClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>chatButton</string>
|
||||
<string>contactsButton</string>
|
||||
<string>dialerButton</string>
|
||||
<string>historyButton</string>
|
||||
<string>settingsButton</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>chatButton</string>
|
||||
<string>contactsButton</string>
|
||||
<string>dialerButton</string>
|
||||
<string>historyButton</string>
|
||||
<string>settingsButton</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">chatButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">contactsButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">dialerButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">historyButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">settingsButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIMainBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIMicroButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIMicroButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIPauseButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIPauseButton.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">UIStateBar</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
|
@ -723,82 +975,34 @@
|
|||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/LinphoneStatusBar.h</string>
|
||||
<string key="minorKey">./Classes/UIStateBar.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">PhoneMainView</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<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>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIVideoButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>callTabBarController</string>
|
||||
<string>contentView</string>
|
||||
<string>incomingCallTabBarController</string>
|
||||
<string>mainTabBarController</string>
|
||||
<string>statusBarController</string>
|
||||
<string>statusBarView</string>
|
||||
<string>tabBarView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIViewController</string>
|
||||
<string>UIView</string>
|
||||
<string>UIViewController</string>
|
||||
<string>UIViewController</string>
|
||||
<string>UIViewController</string>
|
||||
<string>UIView</string>
|
||||
<string>UIView</string>
|
||||
</object>
|
||||
<string key="NS.key.0">videoUpdateIndicator</string>
|
||||
<string key="NS.object.0">UIActivityIndicatorView</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>callTabBarController</string>
|
||||
<string>contentView</string>
|
||||
<string>incomingCallTabBarController</string>
|
||||
<string>mainTabBarController</string>
|
||||
<string>statusBarController</string>
|
||||
<string>statusBarView</string>
|
||||
<string>tabBarView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">callTabBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">contentView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">incomingCallTabBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">mainTabBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">statusBarController</string>
|
||||
<string key="candidateClassName">UIViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">statusBarView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">tabBarView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<string key="NS.key.0">videoUpdateIndicator</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">videoUpdateIndicator</string>
|
||||
<string key="candidateClassName">UIActivityIndicatorView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/PhoneMainView.h</string>
|
||||
<string key="minorKey">./Classes/UIVideoButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@
|
|||
@property (nonatomic, retain) IBOutlet UIView* dialerView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* address;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* mDisplayName;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* callShort;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* callLarge;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* status;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
@implementation PhoneViewController
|
||||
@synthesize dialerView;
|
||||
@synthesize mDisplayName;
|
||||
@synthesize address;
|
||||
@synthesize callShort;
|
||||
@synthesize callLarge;
|
||||
|
|
|
|||
37
Classes/Utils/OrderedDictionary.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
//
|
||||
// OrderedDictionary.h
|
||||
// OrderedDictionary
|
||||
//
|
||||
// Created by Matt Gallagher on 19/12/08.
|
||||
// Copyright 2008 Matt Gallagher. All rights reserved.
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software. Permission is granted to anyone to
|
||||
// use this software for any purpose, including commercial applications, and to
|
||||
// alter it and redistribute it freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would be
|
||||
// appreciated but is not required.
|
||||
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||
// misrepresented as being the original software.
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
|
||||
@interface OrderedDictionary : NSMutableDictionary
|
||||
{
|
||||
NSMutableDictionary *dictionary;
|
||||
NSMutableArray *array;
|
||||
}
|
||||
|
||||
- (void)insertObject:(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex;
|
||||
// Added by Diorcet Yann
|
||||
- (void)insertObject:(id)anObject forKey:(id)aKey selector:(SEL) sel;
|
||||
//
|
||||
- (id)keyAtIndex:(NSUInteger)anIndex;
|
||||
- (NSEnumerator *)reverseKeyEnumerator;
|
||||
|
||||
@end
|
||||
170
Classes/Utils/OrderedDictionary.m
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
//
|
||||
// OrderedDictionary.m
|
||||
// OrderedDictionary
|
||||
//
|
||||
// Created by Matt Gallagher on 19/12/08.
|
||||
// Copyright 2008 Matt Gallagher. All rights reserved.
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software. Permission is granted to anyone to
|
||||
// use this software for any purpose, including commercial applications, and to
|
||||
// alter it and redistribute it freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would be
|
||||
// appreciated but is not required.
|
||||
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||
// misrepresented as being the original software.
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
|
||||
#import "OrderedDictionary.h"
|
||||
|
||||
NSString *DescriptionForObject(NSObject *object, id locale, NSUInteger indent)
|
||||
{
|
||||
NSString *objectString;
|
||||
if ([object isKindOfClass:[NSString class]])
|
||||
{
|
||||
objectString = (NSString *)[[object retain] autorelease];
|
||||
}
|
||||
else if ([object respondsToSelector:@selector(descriptionWithLocale:indent:)])
|
||||
{
|
||||
objectString = [(NSDictionary *)object descriptionWithLocale:locale indent:indent];
|
||||
}
|
||||
else if ([object respondsToSelector:@selector(descriptionWithLocale:)])
|
||||
{
|
||||
objectString = [(NSSet *)object descriptionWithLocale:locale];
|
||||
}
|
||||
else
|
||||
{
|
||||
objectString = [object description];
|
||||
}
|
||||
return objectString;
|
||||
}
|
||||
|
||||
@implementation OrderedDictionary
|
||||
|
||||
- (id)init
|
||||
{
|
||||
return [self initWithCapacity:0];
|
||||
}
|
||||
|
||||
- (id)initWithCapacity:(NSUInteger)capacity
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
dictionary = [[NSMutableDictionary alloc] initWithCapacity:capacity];
|
||||
array = [[NSMutableArray alloc] initWithCapacity:capacity];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[dictionary release];
|
||||
[array release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id)copy
|
||||
{
|
||||
return [self mutableCopy];
|
||||
}
|
||||
|
||||
- (void)setObject:(id)anObject forKey:(id)aKey
|
||||
{
|
||||
if (![dictionary objectForKey:aKey])
|
||||
{
|
||||
[array addObject:aKey];
|
||||
}
|
||||
[dictionary setObject:anObject forKey:aKey];
|
||||
}
|
||||
|
||||
- (void)removeObjectForKey:(id)aKey
|
||||
{
|
||||
[dictionary removeObjectForKey:aKey];
|
||||
[array removeObject:aKey];
|
||||
}
|
||||
|
||||
- (NSUInteger)count
|
||||
{
|
||||
return [dictionary count];
|
||||
}
|
||||
|
||||
- (id)objectForKey:(id)aKey
|
||||
{
|
||||
return [dictionary objectForKey:aKey];
|
||||
}
|
||||
|
||||
- (NSEnumerator *)keyEnumerator
|
||||
{
|
||||
return [array objectEnumerator];
|
||||
}
|
||||
|
||||
- (NSEnumerator *)reverseKeyEnumerator
|
||||
{
|
||||
return [array reverseObjectEnumerator];
|
||||
}
|
||||
|
||||
|
||||
// Added by Diorcet Yann
|
||||
- (void)insertObject:(id)anObject forKey:(id)aKey selector:(SEL)comparator
|
||||
{
|
||||
if ([dictionary objectForKey:aKey])
|
||||
{
|
||||
[self removeObjectForKey:aKey];
|
||||
}
|
||||
NSUInteger anIndex;
|
||||
for(anIndex = 0; anIndex < [array count]; ++anIndex) {
|
||||
NSComparisonResult result = (NSComparisonResult) [aKey performSelector:comparator withObject:[array objectAtIndex: anIndex]];
|
||||
if(result <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
[array insertObject:aKey atIndex:anIndex];
|
||||
[dictionary setObject:anObject forKey:aKey];
|
||||
}
|
||||
//
|
||||
|
||||
- (void)insertObject:(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex
|
||||
{
|
||||
if ([dictionary objectForKey:aKey])
|
||||
{
|
||||
[self removeObjectForKey:aKey];
|
||||
}
|
||||
[array insertObject:aKey atIndex:anIndex];
|
||||
[dictionary setObject:anObject forKey:aKey];
|
||||
}
|
||||
|
||||
- (id)keyAtIndex:(NSUInteger)anIndex
|
||||
{
|
||||
return [array objectAtIndex:anIndex];
|
||||
}
|
||||
|
||||
- (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level
|
||||
{
|
||||
NSMutableString *indentString = [NSMutableString string];
|
||||
NSUInteger i, count = level;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
[indentString appendFormat:@" "];
|
||||
}
|
||||
|
||||
NSMutableString *description = [NSMutableString string];
|
||||
[description appendFormat:@"%@{\n", indentString];
|
||||
for (NSObject *key in self)
|
||||
{
|
||||
[description appendFormat:@"%@ %@ = %@;\n",
|
||||
indentString,
|
||||
DescriptionForObject(key, locale, level),
|
||||
DescriptionForObject([self objectForKey:key], locale, level)];
|
||||
}
|
||||
[description appendFormat:@"%@}\n", indentString];
|
||||
return description;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -190,9 +190,9 @@ NSTimer *callQualityRefresher;
|
|||
[self performSelectorOnMainThread:@selector(configureOrientation)
|
||||
withObject:nil
|
||||
waitUntilDone:YES];
|
||||
[mMute reset];
|
||||
[mMuteLandRight reset];
|
||||
[mMuteLandLeft reset];
|
||||
[mMute update];
|
||||
[mMuteLandRight update];
|
||||
[mMuteLandLeft update];
|
||||
maxCall = linphone_core_get_max_calls([LinphoneManager getLc]);
|
||||
linphone_core_set_max_calls([LinphoneManager getLc], 1);
|
||||
}
|
||||
|
|
@ -218,9 +218,9 @@ NSTimer *callQualityRefresher;
|
|||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
[self configureOrientation:self.interfaceOrientation];
|
||||
[mMute reset];
|
||||
[mMuteLandRight reset];
|
||||
[mMuteLandLeft reset];
|
||||
[mMute update];
|
||||
[mMuteLandRight update];
|
||||
[mMuteLandLeft update];
|
||||
}
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
||||
[mLandscapeLeft removeFromSuperview];
|
||||
|
|
|
|||
BIN
Resources/HP.png
|
Before Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
BIN
Resources/appel-entrant.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Resources/appel-manque.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Resources/appel-sortant.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
BIN
Resources/fond-detail-numero.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
BIN
Resources/quality-call-0.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Resources/quality-call-1.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Resources/quality-call-2.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Resources/quality-call-3.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Resources/registration_inprogress.png
Normal file
|
After Width: | Height: | Size: 664 B |
|
Before Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 905 B |
|
Before Width: | Height: | Size: 597 B |
|
Before Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 532 B |
BIN
Resources/status_connected.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
Resources/status_disconnected.png
Normal file
|
After Width: | Height: | Size: 575 B |
BIN
Resources/status_error.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 948 B |
|
Before Width: | Height: | Size: 1.2 KiB |
BIN
Resources/status_inprogress.png
Normal file
|
After Width: | Height: | Size: 684 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |