Improve UI

Add pragma mark
Add wait indicator on video button
This commit is contained in:
Yann Diorcet 2012-07-02 18:49:14 +02:00
parent 170c82498a
commit 7b1e208703
56 changed files with 1347 additions and 1961 deletions

View file

@ -22,7 +22,7 @@
#import "OrderedDictionary.h"
@interface ContactsTableViewController : UITableViewController {
@interface ContactsTableViewController : UITableViewController<UITableViewDataSource, UITableViewDelegate> {
OrderedDictionary* addressBookMap;
ABAddressBookRef addressBook;

View file

@ -23,8 +23,6 @@
@implementation ContactsTableViewController
#pragma mark Table view methods
void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
ContactsTableViewController* controller = (ContactsTableViewController*)context;
OrderedDictionary* lAddressBookMap = controller->addressBookMap;
@ -72,6 +70,9 @@ void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info,
[(UITableView *)controller.view reloadData];
}
#pragma mark - ViewController Functions
- (void) viewDidLoad {
addressBookMap = [[OrderedDictionary alloc] init];
addressBook = ABAddressBookCreate();
@ -79,6 +80,9 @@ void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info,
sync_toc_address_book(addressBook, nil, self);
}
#pragma mark - UITableViewDataSource Functions
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return [addressBookMap count];
}
@ -133,6 +137,9 @@ void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info,
CFRelease(lPhoneNumbers);
}
#pragma mark - Lifecycle Functions
- (void)dealloc {
[super dealloc];
[addressBookMap removeAllObjects];

View file

@ -35,15 +35,29 @@ typedef enum _HistoryView {
History_MAX
} HistoryView;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"ContactsViewController" bundle:[NSBundle mainBundle]];
}
#pragma mark - ViewController Functions
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.tableView reloadData];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self changeView: History_All];
}
#pragma mark -
- (void)changeView: (HistoryView) view {
if(view == History_All) {
allButton.selected = TRUE;
@ -58,10 +72,7 @@ typedef enum _HistoryView {
}
}
- (void)viewDidLoad {
[super viewDidLoad];
[self changeView: History_All];
}
#pragma mark - Action Functions
- (IBAction)onAllClick: (id) event {
[self changeView: History_All];

View file

@ -413,7 +413,7 @@
<dictionary class="NSMutableDictionary" key="outlets">
<string key="allButton">UIButton</string>
<string key="linphoneButton">UIButton</string>
<string key="tableController">UITableViewController</string>
<string key="tableController">ContactsTableViewController</string>
<string key="tableView">UITableView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
@ -427,7 +427,7 @@
</object>
<object class="IBToOneOutletInfo" key="tableController">
<string key="name">tableController</string>
<string key="candidateClassName">UITableViewController</string>
<string key="candidateClassName">ContactsTableViewController</string>
</object>
<object class="IBToOneOutletInfo" key="tableView">
<string key="name">tableView</string>

View file

@ -19,7 +19,9 @@
#import <UIKit/UIKit.h>
#import "UILinphone.h"
#import "UIEraseButton.h"
#import "UICallButton.h"
#import "UIDigitButton.h"
@interface DialerViewController : UIViewController <UITextFieldDelegate>{

View file

@ -50,36 +50,46 @@
@synthesize zeroButton;
@synthesize hashButton;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"DialerViewController" bundle:[NSBundle mainBundle]];
}
- (void)dealloc {
[addressField release];
[addContactButton release];
[cancelButton release];
[eraseButton release];
[callButton release];
[addCallButton release];
[oneButton release];
[twoButton release];
[threeButton release];
[fourButton release];
[fiveButton release];
[sixButton release];
[sevenButton release];
[eightButton release];
[nineButton release];
[starButton release];
[zeroButton release];
[hashButton release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self update];
}
- (void)callUpdate:(NSNotification*)notif {
[self update];
}
- (void)update {
if([LinphoneManager isLcReady]) {
LinphoneCore *lc = [LinphoneManager getLc];
if(linphone_core_get_calls_nb(lc) > 0) {
[addCallButton setHidden:false];
[callButton setHidden:true];
[cancelButton setHidden:false];
[addContactButton setHidden:true];
} else {
[addCallButton setHidden:true];
[callButton setHidden:false];
[cancelButton setHidden:true];
[addContactButton setHidden:false];
}
}
}
- (void)viewDidLoad {
[super viewDidLoad];
@ -107,35 +117,40 @@
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - Event Functions
- (void)callUpdate:(NSNotification*)notif {
[self update];
}
#pragma mark -
- (void)update {
if([LinphoneManager isLcReady]) {
LinphoneCore *lc = [LinphoneManager getLc];
if(linphone_core_get_calls_nb(lc) > 0) {
[addCallButton setHidden:false];
[callButton setHidden:true];
[cancelButton setHidden:false];
[addContactButton setHidden:true];
} else {
[addCallButton setHidden:true];
[callButton setHidden:false];
[cancelButton setHidden:true];
[addContactButton setHidden:false];
}
}
}
- (void)setAddress:(NSString*) address {
[addressField setText:address];
}
- (void)dealloc {
[addressField release];
[addContactButton release];
[cancelButton release];
[eraseButton release];
[callButton release];
[addCallButton release];
[oneButton release];
[twoButton release];
[threeButton release];
[fourButton release];
[fiveButton release];
[sixButton release];
[sevenButton release];
[eightButton release];
[nineButton release];
[starButton release];
[zeroButton release];
[hashButton release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
#pragma mark - UITextFieldDelegate Functions
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField == addressField) {
@ -144,6 +159,9 @@
return YES;
}
#pragma mark - Action Functions
- (IBAction)onAddContactClick: (id) event {
}

View file

@ -29,10 +29,24 @@
@synthesize passwordField;
@synthesize waitView;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"FirstLoginViewController" bundle:[NSBundle mainBundle]];
}
- (void)dealloc {
[super dealloc];
[loginButton dealloc];
[siteButton dealloc];
[usernameField dealloc];
[passwordField dealloc];
[waitView dealloc];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - ViewController Functions
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[usernameField setText:[[LinphoneManager instance].settingsStore objectForKey:@"username_preference"]];
@ -50,6 +64,13 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(registrationUpdate:) name:@"LinphoneRegistrationUpdate" object:nil];
}
- (void)viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - Event Functions
- (void)registrationUpdate: (NSNotification*) notif {
LinphoneRegistrationState state = [[notif.userInfo objectForKey: @"state"] intValue];
switch (state) {
@ -91,19 +112,7 @@
}
}
- (void)dealloc {
[super dealloc];
[loginButton dealloc];
[siteButton dealloc];
[usernameField dealloc];
[passwordField dealloc];
[waitView dealloc];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - Action Functions
- (void)onSiteClick:(id)sender {
NSURL *url = [NSURL URLWithString:siteButton.titleLabel.text];
@ -136,6 +145,9 @@
};
}
#pragma mark - UITextFieldDelegate Functions
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
// When the user presses return, take focus away from the text field so that the keyboard is dismissed.
[theTextField resignFirstResponder];

View file

@ -19,7 +19,7 @@
#import <UIKit/UIKit.h>
@interface HistoryTableViewController : UITableViewController {
@interface HistoryTableViewController : UITableViewController<UITableViewDataSource, UITableViewDelegate> {
@private
BOOL editMode;
}

View file

@ -23,6 +23,8 @@
@implementation HistoryTableViewController
#pragma mark - Lifecycle Functions
- (id)init {
if((self = [super init]) != nil) {
self->editMode = false;
@ -30,6 +32,9 @@
return self;
}
#pragma mark - UITableViewDataSource Functions
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
@ -97,6 +102,9 @@
[dispName release];
}
#pragma mark -
- (void) toggleEditMode {
editMode = !editMode;
[(UITableView*)[self view] reloadData];
@ -114,9 +122,5 @@
}
}
- (void)dealloc {
[super dealloc];
}
@end

View file

@ -34,15 +34,46 @@ typedef enum _HistoryView {
History_MAX
} HistoryView;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"HistoryViewController" bundle:[NSBundle mainBundle]];
}
- (void)dealloc {
[allButton release];
[missedButton release];
[editButton release];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.tableView reloadData];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[tableController exitEditMode];
[editButton setOff];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self changeView: History_All];
// Set selected+over background: IB lack !
[editButton setBackgroundImage:[UIImage imageNamed:@"ok-edit-list-history-over.png"]
forState:(UIControlStateHighlighted | UIControlStateSelected)];
}
#pragma mark -
- (void)changeView: (HistoryView) view {
if(view == History_All) {
allButton.selected = TRUE;
@ -57,14 +88,8 @@ typedef enum _HistoryView {
}
}
- (void)viewDidLoad {
[super viewDidLoad];
[self changeView: History_All];
// Set selected+over background: IB lack !
[editButton setBackgroundImage:[UIImage imageNamed:@"ok-edit-list-history-over.png"]
forState:(UIControlStateHighlighted | UIControlStateSelected)];
}
#pragma mark - Action Functions
- (IBAction)onAllClick:(id) event {
[self changeView: History_All];
@ -79,17 +104,4 @@ typedef enum _HistoryView {
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[tableController exitEditMode];
[editButton setOff];
}
- (void)dealloc {
[allButton release];
[missedButton release];
[editButton release];
[super dealloc];
}
@end

View file

@ -23,7 +23,7 @@
#include "linphonecore.h"
@interface InCallTableViewController : UITableViewController {
@interface InCallTableViewController : UITableViewController<UITableViewDataSource, UITableViewDelegate> {
@private
NSMutableDictionary* callCellData;
NSTimer *updateTime;

View file

@ -31,6 +31,8 @@ enum TableSection {
CallSection = 1
};
#pragma mark - Lifecycle Functions
- (void)initInCallTableViewController {
self->callCellData = [[NSMutableDictionary alloc] init];
}
@ -59,6 +61,13 @@ enum TableSection {
return self;
}
- (void)dealloc {
[callCellData removeAllObjects];
[callCellData dealloc];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
@ -77,6 +86,9 @@ enum TableSection {
}
}
#pragma mark - Static Functions
+ (bool)isInConference:(LinphoneCall*) call {
if (!call)
return false;
@ -117,145 +129,7 @@ enum TableSection {
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
if(section == CallSection) {
return [[UIView alloc] initWithFrame:CGRectZero];
} else if(section == ConferenceSection) {
LinphoneCore* lc = [LinphoneManager getLc];
if(linphone_core_get_conference_size(lc) > 0){
UIConferenceHeader *headerController = [[UIConferenceHeader alloc] init];
[headerController update];
UIView *headerView = [headerController view];
[headerController release];
return headerView;
} else {
return [[UIView alloc] initWithFrame:CGRectZero];
}
}
return [[UIView alloc] initWithFrame:CGRectZero];
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
return [[UIView alloc] initWithFrame:CGRectZero];
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
LinphoneCore* lc = [LinphoneManager getLc];
if(section == CallSection) {
return 0.000001f; // Hack UITableView = 0
} else if(section == ConferenceSection) {
if(linphone_core_get_conference_size(lc) > 0) {
return [UIConferenceHeader getHeight];
}
}
return 0.000001f; // Hack UITableView = 0
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
LinphoneCore* lc = [LinphoneManager getLc];
if(section == CallSection) {
return 0.000000f; // Hack UITableView = 0
} else if(section == ConferenceSection) {
if(linphone_core_get_conference_size(lc) > 0) {
return 20;
}
}
return 0.000001f; // Hack UITableView = 0
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UICallCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UICallCell"];
if (cell == nil) {
cell = [[UICallCell alloc] initWithIdentifier:@"UICallCell"];
}
bool inConference = indexPath.section == ConferenceSection;
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* call = [InCallTableViewController retrieveCallAtIndex:indexPath.row inConference:inConference];
[cell setData:[self addCallData:call]];
[cell update];
if ([indexPath section] == CallSection && [indexPath row] == 0 && linphone_core_get_conference_size(lc) == 0) {
[cell firstCell];
} else {
[cell otherCell];
}
if (linphone_core_get_calls_nb(lc) > 1 || linphone_core_get_conference_size(lc) > 0) {
tableView.scrollEnabled = TRUE;
} else {
tableView.scrollEnabled = FALSE;
}
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
int count = 0;
LinphoneCore* lc = [LinphoneManager getLc];
if(section == CallSection) {
count = [InCallTableViewController callCount:lc];
} else {
count = linphone_core_get_conference_size(lc);
if(linphone_core_is_in_conference(lc)) {
count--;
}
}
return count;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return @"";
}
- (NSString*)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
{
return @"";
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
bool inConference = indexPath.section == ConferenceSection;
LinphoneCall* call = [InCallTableViewController retrieveCallAtIndex:indexPath.row inConference:inConference];
UICallCellData* data = [callCellData objectForKey:[NSValue valueWithPointer:call]];
if(data != nil &&data->minimize)
return [UICallCell getMinimizedHeight];
return [UICallCell getMaximizedHeight];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:NO];
LinphoneCore* lc = [LinphoneManager getLc];
bool inConference = indexPath.section == ConferenceSection;
LinphoneCall* selectedCall = [InCallTableViewController retrieveCallAtIndex:indexPath.row inConference:inConference];
if (inConference) {
if (linphone_core_is_in_conference(lc))
return;
LinphoneCall* current = linphone_core_get_current_call(lc);
if (current)
linphone_core_pause_call(lc, current);
linphone_core_enter_conference([LinphoneManager getLc]);
} else if (selectedCall) {
if (linphone_core_is_in_conference(lc)) {
linphone_core_leave_conference(lc);
}
if(!linphone_core_sound_resources_locked(lc)) {
linphone_core_resume_call([LinphoneManager getLc], selectedCall);
}
}
}
#pragma mark -
- (void)removeCallData:(LinphoneCall*) call {
// Remove data associated with the call
@ -303,12 +177,6 @@ enum TableSection {
}
}
- (void)dealloc {
[callCellData removeAllObjects];
[callCellData dealloc];
[super dealloc];
}
- (void)minimizeAll {
for(id key in callCellData) {
UICallCellData *data = [callCellData objectForKey:key];
@ -325,5 +193,124 @@ enum TableSection {
[[self tableView] reloadData];
}
#pragma mark - UITableViewDataSource Functions
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
if(section == CallSection) {
return [[UIView alloc] initWithFrame:CGRectZero];
} else if(section == ConferenceSection) {
LinphoneCore* lc = [LinphoneManager getLc];
if(linphone_core_get_conference_size(lc) > 0){
UIConferenceHeader *headerController = [[UIConferenceHeader alloc] init];
[headerController update];
UIView *headerView = [headerController view];
[headerController release];
return headerView;
} else {
return [[UIView alloc] initWithFrame:CGRectZero];
}
}
return [[UIView alloc] initWithFrame:CGRectZero];
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
return [[UIView alloc] initWithFrame:CGRectZero];
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UICallCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UICallCell"];
if (cell == nil) {
cell = [[UICallCell alloc] initWithIdentifier:@"UICallCell"];
}
bool inConference = indexPath.section == ConferenceSection;
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* call = [InCallTableViewController retrieveCallAtIndex:indexPath.row inConference:inConference];
[cell setData:[self addCallData:call]];
// Update cell
if ([indexPath section] == CallSection && [indexPath row] == 0 && linphone_core_get_conference_size(lc) == 0) {
[cell setFirstCell:true];
} else {
[cell setFirstCell:false];
}
[cell setConferenceCall:inConference];
[cell update];
if (linphone_core_get_calls_nb(lc) > 1 || linphone_core_get_conference_size(lc) > 0) {
tableView.scrollEnabled = true;
} else {
tableView.scrollEnabled = false;
}
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
int count = 0;
LinphoneCore* lc = [LinphoneManager getLc];
if(section == CallSection) {
count = [InCallTableViewController callCount:lc];
} else {
count = linphone_core_get_conference_size(lc);
if(linphone_core_is_in_conference(lc)) {
count--;
}
}
return count;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return @"";
}
- (NSString*)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
{
return @"";
}
#pragma mark - UITableViewDelegate Functions
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
LinphoneCore* lc = [LinphoneManager getLc];
if(section == CallSection) {
return 0.000001f; // Hack UITableView = 0
} else if(section == ConferenceSection) {
if(linphone_core_get_conference_size(lc) > 0) {
return [UIConferenceHeader getHeight];
}
}
return 0.000001f; // Hack UITableView = 0
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
LinphoneCore* lc = [LinphoneManager getLc];
if(section == CallSection) {
return 0.000001f; // Hack UITableView = 0
} else if(section == ConferenceSection) {
if(linphone_core_get_conference_size(lc) > 0) {
return 20;
}
}
return 0.000001f; // Hack UITableView = 0
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
bool inConference = indexPath.section == ConferenceSection;
LinphoneCall* call = [InCallTableViewController retrieveCallAtIndex:indexPath.row inConference:inConference];
UICallCellData* data = [callCellData objectForKey:[NSValue valueWithPointer:call]];
if(data != nil &&data->minimize)
return [UICallCell getMinimizedHeight];
return [UICallCell getMaximizedHeight];
}
@end

View file

@ -48,66 +48,110 @@ const NSInteger SECURE_BUTTON_TAG=5;
@synthesize testVideoView;
#endif
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"InCallViewController" bundle:[NSBundle mainBundle]];
}
//TODO
/*
- (void)orientationChanged: (NSNotification*) notif {
int oldLinphoneOrientation = linphone_core_get_device_rotation([LinphoneManager getLc]);
UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
int newRotation = 0;
switch (orientation) {
case UIInterfaceOrientationLandscapeRight:
newRotation = 270;
break;
case UIInterfaceOrientationLandscapeLeft:
newRotation = 90;
break;
default:
newRotation = 0;
- (void)dealloc {
[callTableController release];
[callTableView release];
[videoGroup release];
[videoView release];
[videoPreview release];
#ifdef TEST_VIDEO_VIEW_CHANGE
[testVideoView release];
#endif
[videoCameraSwitch release];
[videoWaitingForFirstImage release];
[videoZoomHandler release];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
UIDevice *device = [UIDevice currentDevice];
device.proximityMonitoringEnabled = YES;
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewDidAppear:NO];
}
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if (visibleActionSheet != nil) {
[visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:NO];
}
if (oldLinphoneOrientation != newRotation) {
linphone_core_set_device_rotation([LinphoneManager getLc], newRotation);
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView);
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
if (call && linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
//Orientation has changed, must call update call
linphone_core_update_call([LinphoneManager getLc], call, NULL);
// animate button images rotation
#define degreesToRadians(x) (M_PI * x / 180.0)
CGAffineTransform transform = CGAffineTransformIdentity;
switch (orientation) {
case UIInterfaceOrientationLandscapeRight:
transform = CGAffineTransformMakeRotation(degreesToRadians(90));
break;
case UIInterfaceOrientationLandscapeLeft:
transform = CGAffineTransformMakeRotation(degreesToRadians(-90));
break;
default:
transform = CGAffineTransformIdentity;
break;
}
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.2f];
//TODO
//endCtrl.imageView.transform = transform;
//mute.imageView.transform = transform;
//speaker.imageView.transform = transform;
//pause.imageView.transform = transform;
//contacts.imageView.transform = transform;
//addCall.imageView.transform = transform;
//addVideo.imageView.transform = transform;
//dialer.imageView.transform = transform;
[UIView commitAnimations];
}
}
}*/
if (hideControlsTimer != nil) {
[hideControlsTimer invalidate];
hideControlsTimer = nil;
}
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewWillDisappear:NO];
}
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewWillAppear:NO];
}
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[[UIApplication sharedApplication] setIdleTimerDisabled:false];
UIDevice *device = [UIDevice currentDevice];
device.proximityMonitoringEnabled = NO;
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewDidDisappear:NO];
}
}
- (void)viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Set windows (warn memory leaks)
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView);
linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)videoPreview);
// Set observer
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callUpdate:) name:@"LinphoneCallUpdate" object:nil];
UITapGestureRecognizer* singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)];
[singleFingerTap setNumberOfTapsRequired:1];
[singleFingerTap setCancelsTouchesInView: FALSE];
[[[UIApplication sharedApplication].delegate window] addGestureRecognizer:singleFingerTap];
[singleFingerTap release];
videoZoomHandler = [[VideoZoomHandler alloc] init];
[videoZoomHandler setup:videoGroup];
videoGroup.alpha = 0;
[videoCameraSwitch setPreview:videoPreview];
}
#pragma mark -
- (void)showControls:(id)sender {
if (hideControlsTimer) {
@ -141,7 +185,7 @@ const NSInteger SECURE_BUTTON_TAG=5;
if([[LinphoneManager instance] currentView] == PhoneView_InCall && videoShown)
[[LinphoneManager instance] showTabBar: false];
if (hideControlsTimer) {
[hideControlsTimer invalidate];
hideControlsTimer = nil;
@ -162,9 +206,10 @@ const NSInteger SECURE_BUTTON_TAG=5;
#endif
- (void)enableVideoDisplay:(BOOL)animation {
if(videoShown)
return;
videoShown = true;
//TODO
//[self orientationChanged:nil];
[videoZoomHandler resetZoom];
@ -189,7 +234,7 @@ const NSInteger SECURE_BUTTON_TAG=5;
#ifdef TEST_VIDEO_VIEW_CHANGE
[NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(_debugChangeVideoView) userInfo:nil repeats:YES];
#endif
// [self batteryLevelChanged:nil];
// [self batteryLevelChanged:nil];
videoWaitingForFirstImage.hidden = NO;
[videoWaitingForFirstImage startAnimating];
@ -201,17 +246,20 @@ const NSInteger SECURE_BUTTON_TAG=5;
}
- (void)disableVideoDisplay:(BOOL)animation {
if(!videoShown)
return;
videoShown = false;
if(animation) {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
}
[videoGroup setAlpha:0.0];
[[LinphoneManager instance] showTabBar: true];
[callTableView setAlpha:1.0];
[videoCameraSwitch setAlpha:0.0];
if(animation) {
[UIView commitAnimations];
}
@ -224,36 +272,6 @@ const NSInteger SECURE_BUTTON_TAG=5;
[[LinphoneManager instance] fullScreen:false];
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
// Set windows (warn memory leaks)
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView);
linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)videoPreview);
// Set observer
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callUpdate:) name:@"LinphoneCallUpdate" object:nil];
UITapGestureRecognizer* singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)];
[singleFingerTap setNumberOfTapsRequired:1];
[singleFingerTap setCancelsTouchesInView: FALSE];
[[[UIApplication sharedApplication].delegate window] addGestureRecognizer:singleFingerTap];
[singleFingerTap release];
videoZoomHandler = [[VideoZoomHandler alloc] init];
[videoZoomHandler setup:videoGroup];
videoGroup.alpha = 0;
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
//[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(batteryLevelChanged:) name:UIDeviceBatteryLevelDidChangeNotification object:nil];
[videoCameraSwitch setPreview:videoPreview];
}
- (void)transferPressed {
/* allow only if call is active */
if (!linphone_core_get_current_call([LinphoneManager getLc]))
@ -314,67 +332,17 @@ const NSInteger SECURE_BUTTON_TAG=5;
}
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewDidAppear:NO];
}
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if (visibleActionSheet != nil) {
[visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:NO];
}
if (hideControlsTimer != nil) {
[hideControlsTimer invalidate];
hideControlsTimer = nil;
}
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewWillDisappear:NO];
}
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewWillAppear:NO];
}
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
if (!videoShown) [[UIApplication sharedApplication] setIdleTimerDisabled:false];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[callTableController viewDidDisappear:NO];
}
}
- (void)viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)displayVideoCall:(LinphoneCall*) call {
UIDevice *device = [UIDevice currentDevice];
device.proximityMonitoringEnabled = YES;
if(!videoShown)
[self enableVideoDisplay: TRUE];
- (void)displayVideoCall:(LinphoneCall*) call {
[self enableVideoDisplay: TRUE];
}
- (void)displayTableCall:(LinphoneCall*) call {
UIDevice *device = [UIDevice currentDevice];
device.proximityMonitoringEnabled = YES;
if(videoShown)
[self disableVideoDisplay: TRUE];
[self disableVideoDisplay: TRUE];
}
#pragma mark - Spinner Functions
- (void)hideSpinnerIndicator: (LinphoneCall*)call {
videoWaitingForFirstImage.hidden = TRUE;
}
@ -384,6 +352,8 @@ static void hideSpinner(LinphoneCall* call, void* user_data) {
[thiz hideSpinnerIndicator:call];
}
#pragma mark - Event Functions
- (void)callUpdate: (NSNotification*) notif {
LinphoneCall *call = [[notif.userInfo objectForKey: @"call"] pointerValue];
LinphoneCallState state = [[notif.userInfo objectForKey: @"state"] intValue];
@ -460,6 +430,8 @@ static void hideSpinner(LinphoneCall* call, void* user_data) {
}
#pragma mark - ActionSheet Functions
- (void)dismissActionSheet: (id)o {
if (visibleActionSheet != nil) {
[visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
@ -500,22 +472,6 @@ static void hideSpinner(LinphoneCall* call, void* user_data) {
[visibleActionSheet release];
}
- (void)dealloc {
[videoGroup release];
[callTableView release];
[videoView release];
[videoPreview release];
#ifdef TEST_VIDEO_VIEW_CHANGE
[testVideoView release];
#endif
[videoCameraSwitch release];
[videoWaitingForFirstImage release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas {
LinphoneCall* call = (LinphoneCall*)datas;
// maybe we could verify call validity

View file

@ -25,6 +25,9 @@
@synthesize addressLabel;
@synthesize avatarImage;
#pragma mark - Lifecycle Functions
- (id)init {
self = [super initWithNibName:@"IncomingCallViewController" bundle:[NSBundle mainBundle]];
if(self) {
@ -42,6 +45,9 @@
[super dealloc];
}
#pragma mark - Event Functions
- (void)callUpdate:(NSNotification*)notif {
LinphoneCall *acall = [[notif.userInfo objectForKey: @"call"] pointerValue];
LinphoneCallState astate = [[notif.userInfo objectForKey: @"state"] intValue];
@ -50,15 +56,8 @@
}
}
- (IBAction)onAcceptClick:(id)event {
linphone_core_accept_call([LinphoneManager getLc], call);
[self dismiss: IncomingCall_Accepted];
}
- (IBAction)onDeclineClick:(id)event {
linphone_core_terminate_call([LinphoneManager getLc], call);
[self dismiss: IncomingCall_Decline];
}
#pragma mark -
- (void)update:(LinphoneCall*)acall {
[self view]; //Force view load
@ -76,4 +75,17 @@
return call;
}
#pragma mark - Action Functions
- (IBAction)onAcceptClick:(id)event {
linphone_core_accept_call([LinphoneManager getLc], call);
[self dismiss: IncomingCall_Accepted];
}
- (IBAction)onDeclineClick:(id)event {
linphone_core_terminate_call([LinphoneManager getLc], call);
[self dismiss: IncomingCall_Decline];
}
@end

View file

@ -153,13 +153,15 @@ int __aeabi_idiv(int a, int b) {
}
- (void)setupGSMInteraction {
callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler = ^(CTCall* call) {
// post on main thread
[self performSelectorOnMainThread:@selector(handleGSMCallInteration:)
if (callCenter == nil) {
callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler = ^(CTCall* call) {
// post on main thread
[self performSelectorOnMainThread:@selector(handleGSMCallInteration:)
withObject:callCenter
waitUntilDone:YES];
};
};
}
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{

View file

@ -89,9 +89,6 @@ typedef struct _LinphoneCallAppData {
+ (LinphoneCore*) getLc;
+ (BOOL)isLcReady;
+ (BOOL)runningOnIpad;
+ (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)registerLogView:(id<LogView>) view;
+ (NSString *)getPreferenceForCodec: (const char*) name withRate: (int) rate;
@ -117,6 +114,7 @@ typedef struct _LinphoneCallAppData {
- (PhoneView) currentView;
- (void)enableSpeaker:(BOOL)enable;
- (BOOL)isSpeakerEnabled;
@property (nonatomic, retain) id<IASKSettingsStore> settingsStore;

View file

@ -765,6 +765,19 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
}
- (BOOL)isSpeakerEnabled {
CFStringRef lNewRoute = CFSTR("Unknown");
UInt32 lNewRouteSize = sizeof(lNewRoute);
OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &lNewRouteSize, &lNewRoute);
if (!lStatus && lNewRouteSize > 0) {
NSString *route = (NSString *) lNewRoute;
ms_message("Current audio route is [%s]", [route cStringUsingEncoding:[NSString defaultCStringEncoding]]);
return [route isEqualToString: @"Speaker"] || [route isEqualToString: @"SpeakerAndMicrophone"];
} else {
return false;
}
}
+ (BOOL)runningOnIpad {
#ifdef UI_USER_INTERFACE_IDIOM
return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
@ -772,22 +785,4 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
return NO;
}
+ (void)set:(UIButton*)view enabled: (BOOL) enabled withName:(const char*)name andReason:(const char*) reason{
if (view.enabled != enabled) {
ms_message("UI - '%s' is now '%s' ('%s')", name, enabled ? "ENABLED" : "DISABLED", reason);
[view setEnabled:enabled];
}
}
+ (void)set:(UIView*)view hidden: (BOOL) hidden withName:(const char*)name andReason:(const char*) reason{
if (view.hidden != hidden) {
ms_message("UI - '%s' is now '%s' ('%s')", name, hidden ? "HIDDEN" : "SHOWN", reason);
[view setHidden:hidden];
}
}
+ (void)logUIElementPressed:(const char*) name {
ms_message("UI - '%s' pressed", name);
}
@end

View file

@ -50,10 +50,29 @@
@synthesize zeroButton;
@synthesize hashButton;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"UICallBar" bundle:[NSBundle mainBundle]];
}
- (void)dealloc {
[pauseButton release];
[conferenceButton release];
[videoButton release];
[microButton release];
[speakerButton release];
[optionsButton release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidLoad {
[pauseButton setType:UIPauseButtonType_CurrentCall call:nil];
@ -71,12 +90,19 @@
[hashButton initWithNumber:'#' addressField:nil dtmf:true];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callUpdate:) name:@"LinphoneCallUpdate" object:nil];
// Set selected+over background: IB lack !
[videoButton setBackgroundImage:[UIImage imageNamed:@"video-ON-disabled.png"]
forState:(UIControlStateDisabled | UIControlStateSelected)];
}
- (void)viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - Event Functions
- (void)callUpdate: (NSNotification*) notif {
//LinphoneCall *call = [[notif.userInfo objectForKey: @"call"] pointerValue];
LinphoneCallState state = [[notif.userInfo objectForKey: @"state"] intValue];
@ -122,19 +148,54 @@
}
}
- (void)dealloc {
[pauseButton release];
[conferenceButton release];
[videoButton release];
[microButton release];
[speakerButton release];
[optionsButton release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
#pragma mark -
- (void)showPad{
if([padView isHidden]) {
CGRect frame = [padView frame];
int original_y = frame.origin.y;
frame.origin.y = [[self view] frame].size.height;
[padView setFrame:frame];
[padView setHidden:FALSE];
CPAnimationSequence* move = [[CPAnimationSequence sequenceWithSteps:
[[CPAnimationStep for:0.5 animate:^{
CGRect frame = [padView frame];
frame.origin.y = original_y;
[padView setFrame:frame];
}] autorelease],
nil
] autorelease];
[move run];
}
}
- (void)hidePad{
if(![padView isHidden]) {
CGRect frame = [padView frame];
int original_y = frame.origin.y;
CPAnimationSequence* move = [[CPAnimationSequence sequenceWithSteps:
[[CPAnimationStep for:0.5 animate:^{
CGRect frame = [padView frame];
frame.origin.y = [[self view] frame].size.height;
[padView setFrame:frame];
}] autorelease],
[[CPAnimationStep after:0.0 animate:^{
CGRect frame = [padView frame];
frame.origin.y = original_y;
[padView setHidden:TRUE];
[padView setFrame:frame];
}] autorelease],
nil
] autorelease];
[move run];
}
}
#pragma mark - Action Functions
- (IBAction)onPadClick:(id)sender {
if([padView isHidden]) {
[self showPad];
@ -143,46 +204,6 @@
}
}
- (void)showPad{
CGRect frame = [padView frame];
int original_y = frame.origin.y;
frame.origin.y = [[self view] frame].size.height;
[padView setFrame:frame];
[padView setHidden:FALSE];
CPAnimationSequence* move = [CPAnimationSequence sequenceWithSteps:
[CPAnimationStep for:0.5 animate:^{
CGRect frame = [padView frame];
frame.origin.y = original_y;
[padView setFrame:frame];
}],
nil
];
[move run];
[move release];
}
- (void)hidePad{
CGRect frame = [padView frame];
int original_y = frame.origin.y;
CPAnimationSequence* move = [CPAnimationSequence sequenceWithSteps:
[CPAnimationStep for:0.5 animate:^{
CGRect frame = [padView frame];
frame.origin.y = [[self view] frame].size.height;
[padView setFrame:frame];
}],
[CPAnimationStep after:0.0 animate:^{
CGRect frame = [padView frame];
frame.origin.y = original_y;
[padView setHidden:TRUE];
[padView setFrame:frame];
}],
nil
];
[move run];
[move release];
}
- (IBAction)onOptionsClick:(id)sender {
// Go to dialer view
NSDictionary *dict = [[[NSDictionary alloc] initWithObjectsAndKeys:

View file

@ -11,9 +11,10 @@
<string key="NS.object.0">1181</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIView</string>
<string>IBUIButton</string>
<string>IBUIActivityIndicatorView</string>
<string>IBUIView</string>
<string>IBProxyObject</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -41,6 +42,7 @@
<string key="NSFrame">{{0, 335}, {320, 125}}</string>
<reference key="NSSuperview" ref="931774220"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
@ -424,6 +426,7 @@
<string key="NSFrame">{{20, 57}, {281, 260}}</string>
<reference key="NSSuperview" ref="931774220"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="501543038"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@ -444,7 +447,7 @@
<string key="NSFrameSize">{80, 67}</string>
<reference key="NSSuperview" ref="143533231"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="693636558"/>
<reference key="NSNextKeyView" ref="1016105438"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
@ -478,6 +481,18 @@
</object>
<reference key="IBUIFont" ref="172665800"/>
</object>
<object class="IBUIActivityIndicatorView" id="1016105438">
<reference key="NSNextResponder" ref="143533231"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{20, 18}, {37, 37}}</string>
<reference key="NSSuperview" ref="143533231"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="693636558"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIStyle">0</int>
</object>
<object class="IBUIButton" id="693636558">
<reference key="NSNextResponder" ref="143533231"/>
<int key="NSvFlags">292</int>
@ -903,6 +918,14 @@
</object>
<int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">waitView</string>
<reference key="source" ref="262544423"/>
<reference key="destination" ref="1016105438"/>
</object>
<int key="connectionID">60</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onConferenceClick:</string>
@ -962,6 +985,7 @@
<reference ref="351323248"/>
<reference ref="99607181"/>
<reference ref="976589610"/>
<reference ref="1016105438"/>
</array>
<reference key="parent" ref="931774220"/>
<string key="objectName">buttons</string>
@ -1106,6 +1130,12 @@
<reference key="parent" ref="556199520"/>
<string key="objectName">6</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">59</int>
<reference key="object" ref="1016105438"/>
<reference key="parent" ref="143533231"/>
<string key="objectName">waitView</string>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -1120,7 +1150,7 @@
<real value="1" key="11.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="12.CustomClassName">UIVideoButton</string>
<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="0.0" key="12.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<real value="3" key="12.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="1" key="21.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="30.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -1163,6 +1193,7 @@
<string key="43.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="1" key="43.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="59.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="0.0" key="6.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="7.CustomClassName">UIHangUpButton</string>
@ -1179,7 +1210,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">58</int>
<int key="maxID">60</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -1381,6 +1412,17 @@
<object class="IBPartialClassDescription">
<string key="className">UIVideoButton</string>
<string key="superclassName">UIToggleButton</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">waitView</string>
<string key="NS.object.0">UIActivityIndicatorView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">waitView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">waitView</string>
<string key="candidateClassName">UIActivityIndicatorView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/UIVideoButton.h</string>

View file

@ -25,6 +25,23 @@
static BOOL transferMode = NO;
#pragma mark - Lifecycle Functions
-(void) initWithAddress:(UITextField*) address{
mAddress=[address retain];
transferMode = NO;
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)dealloc {
[super dealloc];
[mAddress release];
}
#pragma mark - Statics Functions
+(void) enableTransforMode:(BOOL) enable {
transferMode = enable;
}
@ -33,6 +50,9 @@ static BOOL transferMode = NO;
return transferMode;
}
#pragma mark -
-(void) touchUp:(id) sender {
if (!linphone_core_is_network_reachabled([LinphoneManager getLc])) {
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil)
@ -109,25 +129,4 @@ static BOOL transferMode = NO;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code.
}
*/
-(void) initWithAddress:(UITextField*) address{
mAddress=[address retain];
transferMode = NO;
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)dealloc {
[super dealloc];
[mAddress release];
}
@end

View file

@ -34,6 +34,9 @@
@interface UICallCell : UITableViewCell {
@private
BOOL firstCell;
BOOL conferenceCall;
UIView *firstBackground;
UIView *otherBackground;
@ -41,6 +44,7 @@
UILabel *stateLabel;
UIImageView *stateImage;
UIPauseButton *pauseButton;
UIButton *removeButton;
UIImageView *avatarImage;
UIView *headerView;
@ -58,18 +62,21 @@
@property (nonatomic, retain) IBOutlet UILabel* stateLabel;
@property (nonatomic, retain) IBOutlet UIImageView* stateImage;
@property (nonatomic, retain) IBOutlet UIImageView* avatarImage;
@property (nonatomic, retain) IBOutlet UIButton *removeButton;
@property (nonatomic, retain) IBOutlet UIPauseButton *pauseButton;
@property (nonatomic, retain) IBOutlet UIView* headerView;
@property (nonatomic, retain) IBOutlet UIView* avatarView;
- (void)firstCell;
- (void)otherCell;
@property (assign) BOOL firstCell;
@property (assign) BOOL conferenceCall;
- (void)update;
- (id)initWithIdentifier:(NSString*)identifier;
- (IBAction)doHeaderClick:(id)sender;
- (IBAction)doRemoveClick:(id)sender;
+ (int)getMaximizedHeight;
+ (int)getMinimizedHeight;

View file

@ -19,6 +19,8 @@
#import "UICallCell.h"
#import "LinphoneManager.h"
@implementation UICallCellData
- (id)init:(LinphoneCall*) acall {
@ -43,10 +45,17 @@
@synthesize stateImage;
@synthesize avatarImage;
@synthesize pauseButton;
@synthesize removeButton;
@synthesize headerView;
@synthesize avatarView;
@synthesize firstCell;
@synthesize conferenceCall;
#pragma mark - Lifecycle Functions
- (id)initWithIdentifier:(NSString*)identifier {
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]) != nil) {
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"UICallCell"
@ -63,16 +72,31 @@
return self;
}
- (void)firstCell{
[firstBackground setHidden:false];
[otherBackground setHidden:true];
- (void)dealloc {
[firstBackground release];
[otherBackground release];
[addressLabel release];
[stateLabel release];
[stateImage release];
[avatarImage release];
[headerView release];
[super dealloc];
}
- (void)otherCell{
[firstBackground setHidden:true];
[otherBackground setHidden:false];
#pragma mark - Static cell sizes
+ (int)getMaximizedHeight {
return 280;
}
+ (int)getMinimizedHeight {
return 54;
}
#pragma mark -
- (void)update:(UICallCellData*) adata {
self->data = adata;
[self update];
@ -109,18 +133,25 @@
LinphoneCallState state = linphone_call_get_state(call);
if(state == LinphoneCallOutgoingRinging) {
[stateImage setImage:[UIImage imageNamed:@"ring-champ-numero-actif"]];
[stateImage setHidden:false];
[pauseButton setHidden:true];
} else if(state == LinphoneCallOutgoingInit || state == LinphoneCallOutgoingProgress){
[stateImage setImage:[UIImage imageNamed:@"outgoing-champ-numero-actif"]];
[stateImage setHidden:false];
[pauseButton setHidden:true];
if(!conferenceCall) {
if(state == LinphoneCallOutgoingRinging) {
[stateImage setImage:[UIImage imageNamed:@"ring-champ-numero-actif"]];
[stateImage setHidden:false];
[pauseButton setHidden:true];
} else if(state == LinphoneCallOutgoingInit || state == LinphoneCallOutgoingProgress){
[stateImage setImage:[UIImage imageNamed:@"outgoing-champ-numero-actif"]];
[stateImage setHidden:false];
[pauseButton setHidden:true];
} else {
[stateImage setHidden:true];
[pauseButton setHidden:false];
[pauseButton update];
}
[removeButton setHidden:true];
} else {
[stateImage setHidden:true];
[pauseButton setHidden:false];
[pauseButton update];
[pauseButton setHidden:true];
[removeButton setHidden:false];
}
NSMutableString* msDuration = [[NSMutableString alloc] init];
@ -142,14 +173,9 @@
}
}
[pauseButton setType:UIPauseButtonType_Call call:call];
}
- (IBAction)doHeaderClick:(id)sender {
NSLog(@"Toggle UICallCell");
if(data) {
data->minimize = !data->minimize;
[self selfUpdate];
}
[firstBackground setHidden:!firstCell];
[otherBackground setHidden:firstCell];
}
- (void)selfUpdate {
@ -166,24 +192,20 @@
}*/
}
- (void)dealloc {
[firstBackground release];
[otherBackground release];
[addressLabel release];
[stateLabel release];
[stateImage release];
[avatarImage release];
[headerView release];
[super dealloc];
#pragma mark - Action Functions
- (IBAction)doHeaderClick:(id)sender {
if(data) {
data->minimize = !data->minimize;
[self selfUpdate];
}
}
+ (int)getMaximizedHeight {
return 280;
- (IBAction)doRemoveClick:(id)sender {
if(data != nil && data->call != NULL) {
linphone_core_remove_from_conference([LinphoneManager getLc], data->call);
}
}
+ (int)getMinimizedHeight {
return 54;
}
@end

View file

@ -153,7 +153,7 @@
<string key="NSFrameSize">{320, 63}</string>
<reference key="NSSuperview" ref="227927177"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="544229628"/>
<reference key="NSNextKeyView" ref="1040042446"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="293312528"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -4597,9 +4597,9 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIButton" id="874892962">
<object class="IBUIButton" id="349911861">
<reference key="NSNextResponder" ref="227927177"/>
<int key="NSvFlags">292</int>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{216, 6}, {41, 41}}</string>
<reference key="NSSuperview" ref="227927177"/>
<reference key="NSWindow"/>
@ -4616,6 +4616,36 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<double key="IBUIContentEdgeInsets.left">8</double>
<double key="IBUIContentEdgeInsets.right">8</double>
<reference key="IBUINormalTitleShadowColor" ref="127131304"/>
<object class="NSCustomResource" key="IBUIHighlightedImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">supprimer-participant-conf-over.png</string>
</object>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">supprimer-participant-conf-actif.png</string>
</object>
<reference key="IBUIFontDescription" ref="955169232"/>
<reference key="IBUIFont" ref="269414177"/>
</object>
<object class="IBUIButton" id="874892962">
<reference key="NSNextResponder" ref="227927177"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{216, 6}, {41, 41}}</string>
<reference key="NSSuperview" ref="227927177"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="349911861"/>
<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>
<bool key="IBUIAdjustsImageWhenDisabled">NO</bool>
<double key="IBUIContentEdgeInsets.top">8</double>
<double key="IBUIContentEdgeInsets.bottom">8</double>
<double key="IBUIContentEdgeInsets.left">8</double>
<double key="IBUIContentEdgeInsets.right">8</double>
<reference key="IBUINormalTitleShadowColor" ref="127131304"/>
<object class="NSCustomResource" key="IBUIHighlightedImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">play-champ-numero-over.png</string>
@ -4666,7 +4696,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="NSFrame">{{0, 5}, {200, 40}}</string>
<reference key="NSSuperview" ref="227927177"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1040042446"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@ -4793,6 +4822,14 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
</object>
<int key="connectionID">48</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">removeButton</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="349911861"/>
</object>
<int key="connectionID">50</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">doHeaderClick:</string>
@ -4802,6 +4839,15 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
</object>
<int key="connectionID">39</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">doRemoveClick:</string>
<reference key="source" ref="349911861"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">51</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@ -4859,6 +4905,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<reference ref="111701986"/>
<reference ref="544229628"/>
<reference ref="874892962"/>
<reference ref="349911861"/>
</array>
<reference key="parent" ref="675878782"/>
<string key="objectName">headerView</string>
@ -4893,12 +4940,6 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<reference key="parent" ref="227927177"/>
<string key="objectName">stateLabel</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">38</int>
<reference key="object" ref="544229628"/>
<reference key="parent" ref="227927177"/>
<string key="objectName">toggleButton</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">30</int>
<reference key="object" ref="942473668"/>
@ -4922,6 +4963,18 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<reference key="parent" ref="227927177"/>
<string key="objectName">pauseButton</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
<reference key="object" ref="349911861"/>
<reference key="parent" ref="227927177"/>
<string key="objectName">removeButton</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">38</int>
<reference key="object" ref="544229628"/>
<reference key="parent" ref="227927177"/>
<string key="objectName">toggleButton</string>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -4947,30 +5000,36 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="45.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="47.CustomClassName">UIPauseButton</string>
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="2" key="47.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<real value="0.0" key="47.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="49.CustomClassName">UIPauseButton</string>
<string key="49.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="1" key="49.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">48</int>
<int key="maxID">51</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">UICallCell</string>
<string key="superclassName">UITableViewCell</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">doHeaderClick:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">doHeaderClick:</string>
<object class="IBActionInfo" key="NS.object.0">
<dictionary class="NSMutableDictionary" key="actions">
<string key="doHeaderClick:">id</string>
<string key="doRemoveClick:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="doHeaderClick:">
<string key="name">doHeaderClick:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBActionInfo" key="doRemoveClick:">
<string key="name">doRemoveClick:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="addressLabel">UILabel</string>
<string key="avatarImage">UIImageView</string>
@ -4979,6 +5038,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="headerView">UIView</string>
<string key="otherBackground">UIView</string>
<string key="pauseButton">UIPauseButton</string>
<string key="removeButton">UIButton</string>
<string key="stateImage">UIImageView</string>
<string key="stateLabel">UILabel</string>
</dictionary>
@ -5011,6 +5071,10 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="name">pauseButton</string>
<string key="candidateClassName">UIPauseButton</string>
</object>
<object class="IBToOneOutletInfo" key="removeButton">
<string key="name">removeButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="stateImage">
<string key="name">stateImage</string>
<string key="candidateClassName">UIImageView</string>
@ -5059,6 +5123,8 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE</bytes>
<string key="pause-champ-numero-actif.png">{43, 50}</string>
<string key="play-champ-numero-actif.png">{43, 46}</string>
<string key="play-champ-numero-over.png">{43, 46}</string>
<string key="supprimer-participant-conf-actif.png">{43, 43}</string>
<string key="supprimer-participant-conf-over.png">{43, 43}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">1181</string>
</data>

View file

@ -25,6 +25,9 @@
@synthesize displayNameLabel;
@synthesize chatContentLabel;
#pragma mark - Lifecycle Functions
- (id)init {
if ((self = [super init]) != nil) {
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"UIChatCell"
@ -38,10 +41,15 @@
return self;
}
- (IBAction)onDetails: (id) event {
- (void)dealloc {
[displayNameLabel release];
[chatContentLabel release];
[super dealloc];
}
#pragma mark -
- (void)update{
[avatarView setImage:[UIImage imageNamed:@"avatar-small.png"]];
@ -69,11 +77,11 @@
[chatContentLabel setFrame: lastNameFrame];
}
- (void)dealloc {
[displayNameLabel release];
[chatContentLabel release];
#pragma mark - Action Functions
- (IBAction)onDetails: (id) event {
[super dealloc];
}
@end

View file

@ -56,6 +56,9 @@
@synthesize viewTransition;
#pragma mark - Lifecycle Functions
- (void)initUICompositeViewController {
self->viewControllerCache = [[NSMutableDictionary alloc] init];
}
@ -93,6 +96,8 @@
[super dealloc];
}
#pragma mark -
+ (void)addSubView:(UIViewController*)controller view:(UIView*)view {
if(controller != nil) {
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {

View file

@ -26,10 +26,22 @@
@synthesize stateImage;
@synthesize pauseButton;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"UIConferenceHeader" bundle:[NSBundle mainBundle]];
}
- (void)dealloc {
[stateImage release];
[pauseButton release];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidLoad {
[super viewDidLoad];
// Set selected+over background: IB lack !
@ -38,10 +50,16 @@
[pauseButton setType:UIPauseButtonType_Conference call:nil];
}
#pragma mark - Static size Functions
+ (int)getHeight {
return 50;
}
#pragma mark -
- (void)update {
[self view];
[stateImage setHidden:true];

View file

@ -24,6 +24,9 @@
@synthesize firstNameLabel;
@synthesize lastNameLabel;
#pragma mark - Lifecycle Functions
- (id)initWithIdentifier:(NSString*)identifier {
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]) != nil) {
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"UIContactCell"
@ -37,6 +40,16 @@
return self;
}
- (void) dealloc {
[firstNameLabel release];
[lastNameLabel release];
[super dealloc];
}
#pragma mark -
- (void)touchUp:(id) sender {
[self setHighlighted:true animated:true];
}
@ -93,11 +106,4 @@
[lastNameLabel setFrame: lastNameFrame];
}
- (void) dealloc {
[firstNameLabel release];
[lastNameLabel release];
[super dealloc];
}
@end

View file

@ -25,31 +25,8 @@
@synthesize sendDtmfDuringCall;
- (void)touchDown:(id) sender {
if (mAddress && (!sendDtmfDuringCall || !linphone_core_in_call([LinphoneManager getLc]))) {
NSString* newAddress = [NSString stringWithFormat:@"%@%c",mAddress.text,mDigit];
[mAddress setText:newAddress];
linphone_core_play_dtmf([LinphoneManager getLc], mDigit, -1);
} else {
linphone_core_send_dtmf([LinphoneManager getLc], mDigit);
linphone_core_play_dtmf([LinphoneManager getLc], mDigit, 100);
}
}
- (void)touchUp:(id) sender {
linphone_core_stop_dtmf([LinphoneManager getLc]);
}
- (void)onRepeatTouch {
}
- (void)onLongTouch {
if (mDigit == '0') {
NSString* newAddress = [[mAddress.text substringToIndex: [mAddress.text length]-1] stringByAppendingString:@"+"];
[mAddress setText:newAddress];
[mAddress sendActionsForControlEvents:UIControlEventEditingChanged];
}
}
#pragma mark - Lifecycle Functions
- (void)initWithNumber:(char)digit {
[self initWithNumber:digit addressField:nil dtmf:true];
@ -69,4 +46,35 @@
}
#pragma mark - Actions Functions
- (void)touchDown:(id) sender {
if (mAddress && (!sendDtmfDuringCall || !linphone_core_in_call([LinphoneManager getLc]))) {
NSString* newAddress = [NSString stringWithFormat:@"%@%c",mAddress.text,mDigit];
[mAddress setText:newAddress];
linphone_core_play_dtmf([LinphoneManager getLc], mDigit, -1);
} else {
linphone_core_send_dtmf([LinphoneManager getLc], mDigit);
linphone_core_play_dtmf([LinphoneManager getLc], mDigit, 100);
}
}
- (void)touchUp:(id) sender {
linphone_core_stop_dtmf([LinphoneManager getLc]);
}
#pragma mark - UILongTouchButtonDelegate Functions
- (void)onRepeatTouch {
}
- (void)onLongTouch {
if (mDigit == '0') {
NSString* newAddress = [[mAddress.text substringToIndex: [mAddress.text length]-1] stringByAppendingString:@"+"];
[mAddress setText:newAddress];
[mAddress sendActionsForControlEvents:UIControlEventEditingChanged];
}
}
@end

View file

@ -1,33 +0,0 @@
/* UIDuration.h
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU 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 UIDuration : UILabel {
@private
NSTimer *durationRefreasher;
}
-(void) start;
-(void) stop;
@end

View file

@ -1,66 +0,0 @@
/* UIDuration.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 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 "UIDuration.h"
#import "LinphoneManager.h"
@implementation UIDuration
-(void)updateCallDuration {
int lDuration = linphone_core_get_current_call_duration([LinphoneManager getLc]);
if (lDuration < 60) {
[self setText:[NSString stringWithFormat: @"%02i s", lDuration]];
} else {
[self setText:[NSString stringWithFormat: @"%02i:%02i", lDuration/60,lDuration - 60 *(lDuration/60)]];
}
}
-(void) start {
[self setText:@"00 s"];
durationRefreasher = [NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(updateCallDuration)
userInfo:nil
repeats:YES];
}
-(void) stop {
[durationRefreasher invalidate];
durationRefreasher=nil;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code.
}
*/
- (void)dealloc {
[super dealloc];
[durationRefreasher invalidate];
}
@end

View file

@ -22,16 +22,28 @@
@implementation UIEraseButton
#pragma mark - Lifecycle Functions
-(void) initWithAddressField:(UITextField*) address {
mAddress = address;
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
}
- (void)dealloc {
[super dealloc];
}
#pragma mark - Action Functions
-(void) touchDown:(id) sender {
if ([mAddress.text length] > 0) {
[mAddress setText:[mAddress.text substringToIndex:[mAddress.text length]-1]];
}
}
-(void) initWithAddressField:(UITextField*) address {
mAddress = address;
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
}
#pragma mark - UILongTouchButtonDelegate Functions
- (void)onRepeatTouch {
}
@ -40,9 +52,4 @@
[mAddress setText:@""];
}
- (void)dealloc {
[super dealloc];
}
@end

View file

@ -24,6 +24,9 @@
@implementation UIHangUpButton
#pragma mark - Static Functions
+ (bool)isInConference:(LinphoneCall*) call {
if (!call)
return false;
@ -43,24 +46,8 @@
return count;
}
-(void) touchUp:(id) sender {
if([LinphoneManager isLcReady]) {
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* currentcall = linphone_core_get_current_call(lc);
if (linphone_core_is_in_conference(lc) || // In conference
(linphone_core_get_conference_size(lc) > 0 && [UIHangUpButton callCount:lc] == 0) // Only one conf
) {
linphone_core_terminate_conference(lc);
} else if(currentcall != NULL) { // In a call
linphone_core_terminate_call(lc, currentcall);
} else {
const MSList* calls = linphone_core_get_calls(lc);
if (ms_list_size(calls) == 1) { // Only one call
linphone_core_terminate_call(lc,(LinphoneCall*)(calls->data));
}
}
}
}
#pragma mark - Lifecycle Functions
- (void)initUIHangUpButton {
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
@ -90,6 +77,13 @@
return self;
}
- (void)dealloc {
[super dealloc];
}
#pragma mark -
- (void)update {
if([LinphoneManager isLcReady]) {
LinphoneCore * lc = [LinphoneManager getLc];
@ -105,17 +99,25 @@
[self setEnabled:false];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code.
}
*/
#pragma mark - Action Functions
- (void)dealloc {
[super dealloc];
-(void) touchUp:(id) sender {
if([LinphoneManager isLcReady]) {
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* currentcall = linphone_core_get_current_call(lc);
if (linphone_core_is_in_conference(lc) || // In conference
(linphone_core_get_conference_size(lc) > 0 && [UIHangUpButton callCount:lc] == 0) // Only one conf
) {
linphone_core_terminate_conference(lc);
} else if(currentcall != NULL) { // In a call
linphone_core_terminate_call(lc, currentcall);
} else {
const MSList* calls = linphone_core_get_calls(lc);
if (ms_list_size(calls) == 1) { // Only one call
linphone_core_terminate_call(lc,(LinphoneCall*)(calls->data));
}
}
}
}
@end

View file

@ -29,6 +29,8 @@
#define DETAILS_DISABLED
#pragma mark - Lifecycle Functions
- (id)initWithIdentifier:(NSString*)identifier {
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]) != nil) {
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"UIHistoryCell"
@ -44,6 +46,18 @@
return self;
}
- (void) dealloc {
[detailsButton release];
[deleteButton release];
[displayNameLabel release];
[imageView release];
[super dealloc];
}
#pragma mark - Action Functions
- (IBAction)onDetails:(id) event {
if(callLog != NULL) {
@ -58,6 +72,9 @@
}
}
#pragma mark -
- (void)update:(LinphoneCallLog*) aCallLog {
self->callLog = aCallLog;
// Set up the cell...
@ -97,13 +114,4 @@
[deleteButton setHidden:true];
}
- (void) dealloc {
[detailsButton release];
[deleteButton release];
[displayNameLabel release];
[imageView release];
[super dealloc];
}
@end

View file

@ -1,29 +0,0 @@
/* UILinphone.h
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU 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 "UICallButton.h"
#import "UIHangUpButton.h"
#import "UIDigitButton.h"
#import "UIToggleButton.h"
#import "UIMicroButton.h"
#import "UISpeakerButton.h"
#import "UIDuration.h"
#import "UIEraseButton.h"
#import "UICamSwitch.h"
#import "UIPauseResumeButton.h"

View file

@ -21,12 +21,39 @@
@implementation UILongTouchButton
- (id)init {
#pragma mark - Lifecycle Functions
- (id)initUILongTouchButton {
[self addTarget:self action:@selector(___touchDown:) forControlEvents:UIControlEventTouchDown];
[self addTarget:self action:@selector(___touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside];
return self;
}
- (id)init {
self = [super init];
if (self) {
[self initUILongTouchButton];
}
return self;
}
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initUILongTouchButton];
}
return self;
}
- (id)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
if (self) {
[self initUILongTouchButton];
}
return self;
}
- (void)___touchDown:(id) sender {
[self performSelector:@selector(doLongTouch) withObject:nil afterDelay:0.5];
}
@ -47,22 +74,6 @@
[self performSelector:@selector(doRepeatTouch) withObject:nil afterDelay:0.1];
}
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self init];
}
return self;
}
- (id)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
if (self) {
[self init];
}
return self;
}
- (void)onRepeatTouch {
[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];

View file

@ -28,16 +28,38 @@
@synthesize settingsButton;
@synthesize chatButton;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"UIMainBar" bundle:[NSBundle mainBundle]];
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidLoad {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLinphoneMainViewChangeEvent:) name:@"LinphoneMainViewChange" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeView:) name:@"LinphoneMainViewChange" object:nil];
[self update:[[LinphoneManager instance] currentView]];
}
- (void)receiveLinphoneMainViewChangeEvent: (NSNotification*) notif {
- (void)viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[historyButton release];
[contactsButton release];
[dialerButton release];
[settingsButton release];
[chatButton release];
}
#pragma mark -
- (void)changeView: (NSNotification*) notif {
NSNumber *viewNumber = [notif.userInfo objectForKey: @"view"];
if(viewNumber != nil)
[self update:[viewNumber intValue]];
@ -71,19 +93,8 @@
}
}
- (void)viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[historyButton release];
[contactsButton release];
[dialerButton release];
[settingsButton release];
[chatButton release];
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
#pragma mark - Action Functions
- (IBAction)onHistoryClick: (id) sender {
[[LinphoneManager instance] changeView:PhoneView_History];

View file

@ -25,6 +25,9 @@
@implementation UIPauseButton
#pragma mark - Lifecycle Functions
- (void)initUIPauseButton {
self->type = UIPauseButtonType_CurrentCall;
}
@ -53,11 +56,48 @@
return self;
}
#pragma mark - Static Functions
+ (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;
}
+ (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;
}
#pragma mark -
- (void)setType:(UIPauseButtonType) atype call:(LinphoneCall*)acall {
self->type = atype;
self->call = acall;
}
#pragma mark - UIToggleButtonDelegate Functions
- (void)onOn {
switch (type) {
case UIPauseButtonType_Call:
@ -113,25 +153,6 @@
}
}
+ (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 {
bool ret = false;
// TODO: disable pause on not running call
@ -145,9 +166,9 @@
if(state == LinphoneCallPaused || state == LinphoneCallPausing) {
ret = true;
}
[LinphoneManager set:self enabled:TRUE withName:"PAUSE button" andReason:""];
[self setEnabled:TRUE];
} else {
[LinphoneManager set:self enabled:FALSE withName:"PAUSE button" andReason:""];
[self setEnabled:FALSE];
}
break;
}
@ -157,9 +178,9 @@
if (!linphone_core_is_in_conference(lc)) {
ret = true;
}
[LinphoneManager set:self enabled:TRUE withName:"PAUSE button" andReason:""];
[self setEnabled:TRUE];
} else {
[LinphoneManager set:self enabled:FALSE withName:"PAUSE button" andReason:""];
[self setEnabled:FALSE];
}
break;
}
@ -171,9 +192,9 @@
if(state == LinphoneCallPaused || state == LinphoneCallPausing) {
ret = true;
}
[LinphoneManager set:self enabled:TRUE withName:"PAUSE button" andReason:""];
[self setEnabled:TRUE];
} else {
[LinphoneManager set:self enabled:FALSE withName:"PAUSE button" andReason:""];
[self setEnabled:FALSE];
}
break;
}
@ -182,17 +203,4 @@
return ret;
}
+ (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

View file

@ -25,6 +25,10 @@
#include "linphonecore.h"
@implementation UISpeakerButton
#pragma mark - Static Functions
static AudioSessionPropertyID routeChangeID = kAudioSessionProperty_AudioRouteChange;
static void audioRouteChangeListenerCallback (
@ -70,6 +74,16 @@ static void audioRouteChangeListenerCallback (
return self;
}
- (void)dealloc {
OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(routeChangeID, audioRouteChangeListenerCallback, self);
if (lStatus) {
ms_error ("cannot un register route change handler [%ld]",lStatus);
}
[super dealloc];
}
#pragma mark - UIToggleButtonDelegate Functions
- (void)onOn {
[[LinphoneManager instance] enableSpeaker:TRUE];
}
@ -79,27 +93,7 @@ static void audioRouteChangeListenerCallback (
}
- (bool)onUpdate {
CFStringRef lNewRoute=CFSTR("Unknown");
UInt32 lNewRouteSize = sizeof(lNewRoute);
OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute
,&lNewRouteSize
,&lNewRoute);
if (!lStatus && CFStringGetLength(lNewRoute) > 0) {
char route[64];
CFStringGetCString(lNewRoute, route,sizeof(route), kCFStringEncodingUTF8);
ms_message("Current audio route is [%s]",route);
return ( kCFCompareEqualTo == CFStringCompare (lNewRoute,CFSTR("Speaker"),0)
|| kCFCompareEqualTo == CFStringCompare (lNewRoute,CFSTR("SpeakerAndMicrophone"),0));
} else
return false;
}
- (void)dealloc {
OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(routeChangeID, audioRouteChangeListenerCallback, self);
if (lStatus) {
ms_error ("cannot un register route change handler [%ld]",lStatus);
}
[super dealloc];
return [[LinphoneManager instance] isSpeakerEnabled];
}
@end

View file

@ -30,10 +30,23 @@
NSTimer *callQualityTimer;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"UIStateBar" bundle:[NSBundle mainBundle]];
}
- (void) dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[callQualityTimer invalidate];
[callQualityTimer release];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidLoad {
[super viewDidLoad];
@ -55,41 +68,20 @@ NSTimer *callQualityTimer;
[self proxyConfigUpdate: config];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
- (void) viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[callQualityTimer invalidate];
}
#pragma mark - Event Functions
- (void)registrationUpdate: (NSNotification*) notif {
LinphoneProxyConfig* config = NULL;
linphone_core_get_default_proxy([LinphoneManager getLc], &config);
[self proxyConfigUpdate:config];
}
- (void)callQualityUpdate {
UIImage *image = nil;
if([LinphoneManager isLcReady]) {
LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]);
if(call != NULL) {
float quality = linphone_call_get_average_quality(call);
if(quality < 1) {
image = [UIImage imageNamed:@"quality-call-0.png"];
} else if (quality < 2) {
image = [UIImage imageNamed:@"quality-call-1.png"];
} else if (quality < 3) {
image = [UIImage imageNamed:@"quality-call-2.png"];
} else {
image = [UIImage imageNamed:@"quality-call-3.png"];
}
}
}
if(image != nil) {
[callQualityImage setHidden: false];
[callQualityImage setImage: image];
} else {
[callQualityImage setHidden: true];
}
}
- (void)proxyConfigUpdate: (LinphoneProxyConfig*) config {
LinphoneRegistrationState state;
NSString* message = nil;
@ -148,16 +140,32 @@ NSTimer *callQualityTimer;
[registrationStateImage setImage:image];
}
- (void) viewDidUnload {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[callQualityTimer invalidate];
}
- (void) dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[callQualityTimer invalidate];
[callQualityTimer release];
[super dealloc];
#pragma mark -
- (void)callQualityUpdate {
UIImage *image = nil;
if([LinphoneManager isLcReady]) {
LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]);
if(call != NULL) {
float quality = linphone_call_get_average_quality(call);
if(quality < 1) {
image = [UIImage imageNamed:@"quality-call-0.png"];
} else if (quality < 2) {
image = [UIImage imageNamed:@"quality-call-1.png"];
} else if (quality < 3) {
image = [UIImage imageNamed:@"quality-call-2.png"];
} else {
image = [UIImage imageNamed:@"quality-call-3.png"];
}
}
}
if(image != nil) {
[callQualityImage setHidden: false];
[callQualityImage setImage: image];
} else {
[callQualityImage setHidden: true];
}
}
@end

View file

@ -21,38 +21,8 @@
@implementation UIToggleButton
- (void)touchUp:(id) sender {
[self toggle];
}
- (bool)toggle {
if (self.selected) {
self.selected=!self.selected;
[self onOff];
} else {
self.selected=!self.selected;
[self onOn];
}
return self.selected;
}
- (void)setOn {
if (!self.selected) {
[self toggle];
}
}
- (void)setOff {
if (self.selected) {
[self toggle];
}
}
- (bool)update {
self.selected = [self onUpdate];
return self.selected;
}
#pragma mark - Lifecycle Functions
- (void)initUIToggleButton {
[self update];
@ -88,6 +58,43 @@
}
#pragma mark -
- (void)touchUp:(id) sender {
[self toggle];
}
- (bool)toggle {
if (self.selected) {
self.selected=!self.selected;
[self onOff];
} else {
self.selected=!self.selected;
[self onOn];
}
return self.selected;
}
- (void)setOn {
if (!self.selected) {
[self toggle];
}
}
- (void)setOff {
if (self.selected) {
[self toggle];
}
}
- (bool)update {
self.selected = [self onUpdate];
return self.selected;
}
#pragma mark - UIToggleButtonDelegate Functions
-(void) onOn {
/*[NSException raise:NSInternalInconsistencyException
format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];*/

View file

@ -23,6 +23,13 @@
@interface UIVideoButton : UIToggleButton<UIToggleButtonDelegate> {
BOOL locked;
BOOL unlockVideoState;
UIActivityIndicatorView *waitView;
}
@property (assign) BOOL locked;
@property (assign) BOOL unlockVideoState;
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* waitView;
@end

View file

@ -22,6 +22,39 @@
@implementation UIVideoButton
@synthesize locked;
@synthesize unlockVideoState;
@synthesize waitView;
- (void)initUIVideoButton {
self->locked = FALSE;
self->unlockVideoState = FALSE;
}
- (id)init{
self = [super init];
if (self) {
[self initUIVideoButton];
}
return self;
}
- (id)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
if (self) {
[self initUIVideoButton];
}
return self;
}
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initUIVideoButton];
}
return self;
}
- (void)onOn {
LinphoneCore* lc = [LinphoneManager getLc];
@ -29,6 +62,10 @@
return;
[self setEnabled: FALSE];
[waitView startAnimating];
[self setLocked: TRUE];
[self setUnlockVideoState: TRUE];
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
if (call) {
LinphoneCallParams* call_params = linphone_call_params_copy(linphone_call_get_current_params(call));
@ -37,8 +74,7 @@
linphone_call_params_destroy(call_params);
} else {
ms_warning("Cannot toggle video, because no current call");
}
}
}
- (void)onOff {
@ -48,6 +84,10 @@
return;
[self setEnabled: FALSE];
[waitView startAnimating];
[self setLocked: TRUE];
[self setUnlockVideoState: 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));
@ -69,19 +109,33 @@
if (state == LinphoneCallStreamsRunning || state == LinphoneCallUpdated || state == LinphoneCallUpdatedByRemote) {
if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
val = true;
if(locked && unlockVideoState) {
locked = FALSE;
[waitView stopAnimating];
}
} else {
if(locked && !unlockVideoState) {
locked = FALSE;
[waitView stopAnimating];
}
}
if(!locked) {
[self setEnabled:TRUE];
}
[self setEnabled:TRUE];
} else {
// Disable button if the call is not running
[self setEnabled:FALSE];
[waitView stopAnimating];
}
} else {
// Disable button if there is no call
[self setEnabled:FALSE];
[waitView stopAnimating];
}
} else {
// Disable button if video is not enabled
[self setEnabled:FALSE];
[waitView stopAnimating];
}
return val;
} else {
@ -90,4 +144,9 @@
}
}
- (void)dealloc {
[waitView release];
[super dealloc];
}
@end

View file

@ -1,42 +0,0 @@
/* MainScreenWithVideoPreview.h
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "DialerViewController.h"
@interface MainScreenWithVideoPreview : UIViewController {
UIWindow *window;
DialerViewController* phoneMainView;
AVCaptureSession* session;
AVCaptureDeviceInput* input;
int currentCamera;
}
-(void) showPreview:(BOOL) show;
-(void) useCameraAtIndex:(NSInteger)camIndex startSession:(BOOL)start;
@property (nonatomic, retain) IBOutlet DialerViewController* phoneMainView;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@end

View file

@ -1,185 +0,0 @@
/* MainScreenWithVideoPreview.h
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <AVFoundation/AVFoundation.h>
#import "MainScreenWithVideoPreview.h"
#import "LinphoneManager.h"
@implementation MainScreenWithVideoPreview
@synthesize window;
@synthesize phoneMainView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView
{
}
*/
-(void) initVideoPreview {
session = [[AVCaptureSession alloc] init];
currentCamera = 0;
AVCaptureVideoPreviewLayer* previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:session];
previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
previewLayer.frame = self.view.bounds;
[self.view.layer addSublayer:previewLayer];
[session beginConfiguration];
[session setSessionPreset:AVCaptureSessionPresetHigh];
[session commitConfiguration];
[self useCameraAtIndex:0 startSession:NO];
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
[super viewDidLoad];
}
-(void) switchCameraPressed {
[self useCameraAtIndex: (currentCamera + 1) startSession:YES];
}
-(void) useCameraAtIndex:(NSInteger)camIndex startSession:(BOOL)start {
@synchronized (self) {
[session stopRunning];
if (input != nil)
[session removeInput:input];
NSError* error;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc]init];
NSArray* array = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
if ( [array count] == 0) {
ms_warning("No camera available (running on simulator ?");
return;
}
currentCamera = camIndex % [array count];
AVCaptureDevice* device = (AVCaptureDevice*) [array objectAtIndex:currentCamera];
input = [[AVCaptureDeviceInput deviceInputWithDevice:device
error:&error] retain];
[session addInput:input];
[pool drain];
if (start)
[session startRunning];
}
}
-(void) stopPreview:(id) a {
@synchronized (self) {
if (!session.running)
return;
[self.view removeFromSuperview];
[session stopRunning];
}
}
-(void) startPreview:(id) a {
@synchronized (self) {
if (session.running)
return;
[window addSubview:self.view];
[window sendSubviewToBack:self.view];
[session startRunning];
}
}
-(void) showPreview:(BOOL) show {
LinphoneCore* lc;
if([LinphoneManager isLcReady])
lc = [LinphoneManager getLc];
lc = [LinphoneManager getLc];
if (lc==NULL) return;
bool enableVideo = linphone_core_video_enabled(lc);
if (enableVideo) {
LinphoneCall* call = linphone_core_get_current_call(lc);
if (show && call && linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
return;
}
if (session == nil) {
[self initVideoPreview];
}
if (show && !session.running) {
[self performSelectorInBackground:@selector(startPreview:) withObject:nil];
} else if (!show && session.running) {
[self performSelectorInBackground:@selector(stopPreview:) withObject:nil];
}
} else {
[self stopPreview:nil];
}
}
-(void) viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
//TODO
//[phoneMainView.switchCamera addTarget:self action:@selector(switchCameraPressed) forControlEvents:UIControlEventTouchUpInside];
}
-(void) viewDidDisappear:(BOOL)animated {
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
/*- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return NO;
}*/
@end

View file

@ -1,629 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.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>IBUITabBarItem</string>
<string>IBUIViewController</string>
<string>IBUICustomObject</string>
<string>IBUITabBarController</string>
<string>IBUIWindow</string>
<string>IBUITabBar</string>
<string>IBUIView</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">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUICustomObject" id="154803318">
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIWindow" id="46357543">
<reference key="NSNextResponder"/>
<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>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
<object class="IBUITabBarController" id="888354232">
<object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<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 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>
<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>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<array class="NSMutableArray" key="IBUIViewControllers">
<reference ref="538833779"/>
<object class="IBUIViewController" id="446523710">
<object class="IBUITabBarItem" key="IBUITabBarItem" id="64676500">
<string key="IBUITitle">Dialer</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<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>
<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>
<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"/>
<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>
</array>
<object class="IBUITabBar" key="IBUITabBar" id="752322970">
<reference key="NSNextResponder"/>
<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">
<object class="IBUIView" key="IBUIView" id="433141527">
<reference key="NSNextResponder"/>
<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>
<bytes key="NSRGB">MC40MzUwMTEzNDA3IDAuNjI1IDEAA</bytes>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<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>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="154803318"/>
</object>
<int key="connectionID">30</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="26482769"/>
<reference key="destination" ref="46357543"/>
</object>
<int key="connectionID">9</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">phoneMainView</string>
<reference key="source" ref="26482769"/>
<reference key="destination" ref="446523710"/>
</object>
<int key="connectionID">44</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="154803318"/>
<reference key="destination" ref="46357543"/>
</object>
<int key="connectionID">27</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">myTabBarController</string>
<reference key="source" ref="154803318"/>
<reference key="destination" ref="888354232"/>
</object>
<int key="connectionID">28</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">mMainScreenWithVideoPreview</string>
<reference key="source" ref="446523710"/>
<reference key="destination" ref="26482769"/>
</object>
<int key="connectionID">31</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="975951072"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="46357543"/>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="26482769"/>
<array class="NSMutableArray" key="children">
<reference ref="433141527"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">16</int>
<reference key="object" ref="154803318"/>
<reference key="parent" ref="0"/>
<string key="objectName">linphoneAppDelegate</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">17</int>
<reference key="object" ref="888354232"/>
<array class="NSMutableArray" key="children">
<reference ref="446523710"/>
<reference ref="538833779"/>
<reference ref="954789010"/>
<reference ref="369729967"/>
<reference ref="752322970"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">18</int>
<reference key="object" ref="446523710"/>
<array class="NSMutableArray" key="children">
<reference ref="64676500"/>
</array>
<reference key="parent" ref="888354232"/>
<string key="objectName">dialer</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">19</int>
<reference key="object" ref="538833779"/>
<array class="NSMutableArray" key="children">
<reference ref="918692703"/>
</array>
<reference key="parent" ref="888354232"/>
<string key="objectName">history</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">20</int>
<reference key="object" ref="954789010"/>
<array class="NSMutableArray" key="children">
<reference ref="162230919"/>
</array>
<reference key="parent" ref="888354232"/>
<string key="objectName">more</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">21</int>
<reference key="object" ref="369729967"/>
<array class="NSMutableArray" key="children">
<reference ref="935176592"/>
</array>
<reference key="parent" ref="888354232"/>
<string key="objectName">Contacts</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="752322970"/>
<reference key="parent" ref="888354232"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">23</int>
<reference key="object" ref="935176592"/>
<reference key="parent" ref="369729967"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">24</int>
<reference key="object" ref="162230919"/>
<reference key="parent" ref="954789010"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">25</int>
<reference key="object" ref="918692703"/>
<reference key="parent" ref="538833779"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="64676500"/>
<reference key="parent" ref="446523710"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="433141527"/>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="26482769"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">UIApplication</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="16.CustomClassName">linphoneAppDelegate</string>
<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<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">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>
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="24.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.CustomClassName">MainScreenWithVideoPreview</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"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">44</int>
</object>
<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">
<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="dialer-orange.png">{25, 24}</string>
<string key="history-orange.png">{25, 23}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">1181</string>
</data>
</archive>

View file

@ -20,7 +20,7 @@
#import <UIKit/UIKit.h>
@class ConsoleViewController;
@interface MoreViewController : UITableViewController {
@interface MoreViewController : UITableViewController<UITableViewDataSource, UITableViewDelegate> {
bool isLogViewEnabled;

View file

@ -23,13 +23,16 @@
#include "lpconfig.h"
@implementation MoreViewController
@synthesize web;
@synthesize credit;
@synthesize console;
@synthesize creditText;
@synthesize weburi;
//Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
#pragma mark - Lifecycle Functions
- (void)viewDidLoad {
[super viewDidLoad];
[creditText setText: [NSString stringWithFormat:creditText.text,[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]];
@ -39,38 +42,35 @@
}
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[credit release];
[creditText release];
[web release];
[weburi release];
[console release];
[consoleViewController release];
[super dealloc];
}
#pragma mark -
-(void) enableLogView {
isLogViewEnabled = true;
}
#pragma mark - UITableViewDelegate Functions
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
#pragma mark - UITableViewDataSource Functions
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return 230;
@ -79,7 +79,6 @@
}
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return 1;

View file

@ -30,6 +30,9 @@
@synthesize mainViewController;
#pragma mark - Lifecycle Functions
- (void)initPhoneMainView {
currentPhoneView = -1;
loadCount = 0; // For avoiding IOS 4 bug
@ -63,78 +66,22 @@
return self;
}
- (CATransition*)getTransition:(PhoneView)old new:(PhoneView)new {
CATransition* trans = [CATransition animation];
[trans setType:kCATransitionPush];
[trans setDuration:0.35];
[trans setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
bool left = false;
[mainViewController release];
if(old == PhoneView_Chat) {
if(new == PhoneView_Contacts ||
new == PhoneView_Dialer ||
new == PhoneView_Settings ||
new == PhoneView_History) {
left = true;
}
} else if(old == PhoneView_Settings) {
if(new == PhoneView_Dialer ||
new == PhoneView_Contacts ||
new == PhoneView_History) {
left = true;
}
} else if(old == PhoneView_Dialer) {
if(new == PhoneView_Contacts ||
new == PhoneView_History) {
left = true;
}
} else if(old == PhoneView_Contacts) {
if(new == PhoneView_History) {
left = true;
}
}
[viewDescriptions removeAllObjects];
[viewDescriptions release];
if(left) {
[trans setSubtype:kCATransitionFromLeft];
} else {
[trans setSubtype:kCATransitionFromRight];
}
return trans;
[modalControllers removeAllObjects];
[modalControllers release];
[super dealloc];
}
- (void)changeView: (NSNotification*) notif {
NSNumber *viewId = [notif.userInfo objectForKey: @"view"];
NSNumber *tabBar = [notif.userInfo objectForKey: @"tabBar"];
NSNumber *fullscreen = [notif.userInfo objectForKey: @"fullscreen"];
// Check view change
if(viewId != nil) {
PhoneView view = [viewId intValue];
UICompositeViewDescription* description = [viewDescriptions objectForKey:[NSNumber numberWithInt: view]];
if(description == nil)
return;
if(view != currentPhoneView) {
[mainViewController setViewTransition:[self getTransition:currentPhoneView new:view]];
[mainViewController changeView:description];
currentPhoneView = view;
}
}
if(tabBar != nil) {
[mainViewController setToolBarHidden:![tabBar boolValue]];
}
if(fullscreen != nil) {
[mainViewController setFullScreen:[fullscreen boolValue]];
}
// Call abstractCall
NSDictionary *dict = [notif.userInfo objectForKey: @"args"];
if(dict != nil)
[AbstractCall call:[mainViewController getCurrentViewController] dict:dict];
}
#pragma mark - ViewController Functions
- (void)viewDidLoad {
// Avoid IOS 4 bug
@ -259,6 +206,9 @@
self->loadCount--;
}
#pragma mark - Event Functions
- (void)registrationUpdate:(NSNotification*)notif {
LinphoneRegistrationState state = [[notif.userInfo objectForKey: @"state"] intValue];
LinphoneProxyConfig *cfg = [[notif.userInfo objectForKey: @"cfg"] pointerValue];
@ -362,6 +312,82 @@
}
#pragma mark -
- (CATransition*)getTransition:(PhoneView)old new:(PhoneView)new {
CATransition* trans = [CATransition animation];
[trans setType:kCATransitionPush];
[trans setDuration:0.35];
[trans setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
bool left = false;
if(old == PhoneView_Chat) {
if(new == PhoneView_Contacts ||
new == PhoneView_Dialer ||
new == PhoneView_Settings ||
new == PhoneView_History) {
left = true;
}
} else if(old == PhoneView_Settings) {
if(new == PhoneView_Dialer ||
new == PhoneView_Contacts ||
new == PhoneView_History) {
left = true;
}
} else if(old == PhoneView_Dialer) {
if(new == PhoneView_Contacts ||
new == PhoneView_History) {
left = true;
}
} else if(old == PhoneView_Contacts) {
if(new == PhoneView_History) {
left = true;
}
}
if(left) {
[trans setSubtype:kCATransitionFromLeft];
} else {
[trans setSubtype:kCATransitionFromRight];
}
return trans;
}
- (void)changeView: (NSNotification*) notif {
NSNumber *viewId = [notif.userInfo objectForKey: @"view"];
NSNumber *tabBar = [notif.userInfo objectForKey: @"tabBar"];
NSNumber *fullscreen = [notif.userInfo objectForKey: @"fullscreen"];
// Check view change
if(viewId != nil) {
PhoneView view = [viewId intValue];
UICompositeViewDescription* description = [viewDescriptions objectForKey:[NSNumber numberWithInt: view]];
if(description == nil)
return;
if(view != currentPhoneView) {
[mainViewController setViewTransition:[self getTransition:currentPhoneView new:view]];
[mainViewController changeView:description];
currentPhoneView = view;
}
}
if(tabBar != nil) {
[mainViewController setToolBarHidden:![tabBar boolValue]];
}
if(fullscreen != nil) {
[mainViewController setFullScreen:[fullscreen boolValue]];
}
// Call abstractCall
NSDictionary *dict = [notif.userInfo objectForKey: @"args"];
if(dict != nil)
[AbstractCall call:[mainViewController getCurrentViewController] dict:dict];
}
- (void)displayCallError:(LinphoneCall*) call message:(NSString*) message {
const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(call));
NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil);
@ -404,6 +430,8 @@
}
#pragma mark - ActionSheet Functions
- (void)displayIncomingCall:(LinphoneCall*) call{
const char* userNameChars=linphone_address_get_username(linphone_call_get_remote_address(call));
@ -489,6 +517,9 @@
}
}
#pragma mark - Modal Functions
- (void)modalViewDismiss:(UIModalViewController*)controller value:(int)value {
[self removeModalViewController:controller];
}
@ -522,18 +553,4 @@
[[controller view] removeFromSuperview];
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[mainViewController release];
[viewDescriptions removeAllObjects];
[viewDescriptions release];
[modalControllers removeAllObjects];
[modalControllers release];
[super dealloc];
}
@end

View file

@ -25,10 +25,15 @@
@synthesize settingsController;
@synthesize navigationController;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"SettingsViewController" bundle:[NSBundle mainBundle]];
}
#pragma mark - ViewController Functions
- (void)viewDidLoad {
settingsController.delegate = self;
settingsController.settingsReaderDelegate = self;
@ -39,6 +44,37 @@
[self.view addSubview: navigationController.view];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewWillDisappear:NO];
}
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewWillAppear:NO];
}
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewDidAppear:NO];
}
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewDidDisappear:NO];
}
}
#pragma mark - IASKSettingsReaderFilterDelegate Functions
- (NSDictionary*)filterPreferenceSpecifier:(NSDictionary *)specifier {
if (![LinphoneManager isLcReady]) {
// LinphoneCore not ready: do not filter
@ -81,35 +117,10 @@
return specifier;
}
#pragma mark - IASKSettingsDelegate Functions
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender {
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewWillDisappear:NO];
}
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewWillAppear:NO];
}
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewDidAppear:NO];
}
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[settingsController viewDidDisappear:NO];
}
}
@end

View file

@ -32,10 +32,15 @@
}
instance.steps = [NSArray arrayWithArray:tempSteps];
va_end(args);
[tempSteps release];
}
return instance;
}
- (void) dealloc {
[steps release];
[super dealloc];
}
#pragma mark - property override

View file

@ -33,7 +33,7 @@ typedef void (^AnimationStep)(void);
@property (nonatomic) NSTimeInterval delay;
@property (nonatomic) NSTimeInterval duration;
@property (nonatomic, copy) AnimationStep step;
@property (nonatomic, strong) AnimationStep step;
@property (nonatomic) UIViewAnimationOptions options;
#pragma mark - execution

View file

@ -43,11 +43,16 @@
instance.delay = theDelay;
instance.duration = theDuration;
instance.options = theOptions;
instance.step = [theStep copy];
instance.step = theStep;
}
return instance;
}
- (void)dealloc {
[step release];
[super dealloc];
}
#pragma mark action
// From http://stackoverflow.com/questions/4007023/blocks-instead-of-performselectorwithobjectafterdelay
@ -65,6 +70,7 @@
self.consumableSteps = [[NSMutableArray alloc] initWithArray:[self animationStepArray]];
}
if (![self.consumableSteps count]) { // recursion anchor
[self.consumableSteps release];
self.consumableSteps = nil;
return; // we're done
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -58,7 +58,6 @@
228697C411AC29B800E9E0CA /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 228697C311AC29B800E9E0CA /* CFNetwork.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
228B19AF130290C500F154D3 /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 228B19AE130290C500F154D3 /* iTunesArtwork */; };
22968A5F12F875C600588287 /* UISpeakerButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22968A5E12F875C600588287 /* UISpeakerButton.m */; };
22968A8812F87C2000588287 /* UIDuration.m in Sources */ = {isa = PBXBuildFile; fileRef = 22968A8712F87C2000588287 /* UIDuration.m */; };
22A10F3B11F8960300373793 /* libortp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2C10765B400068D98F /* libortp.a */; };
22AA8AFD13D7125600B30535 /* libx264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22AA8AFB13D7125500B30535 /* libx264.a */; };
22AA8AFE13D7125600B30535 /* libmsx264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22AA8AFC13D7125500B30535 /* libmsx264.a */; };
@ -94,7 +93,6 @@
22D8F14F147548E2008C97DB /* UIHangUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB8812F84EBB002A5394 /* UIHangUpButton.m */; };
22D8F151147548E2008C97DB /* UIMicroButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EBF212F86360002A5394 /* UIMicroButton.m */; };
22D8F152147548E2008C97DB /* UISpeakerButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22968A5E12F875C600588287 /* UISpeakerButton.m */; };
22D8F153147548E2008C97DB /* UIDuration.m in Sources */ = {isa = PBXBuildFile; fileRef = 22968A8712F87C2000588287 /* UIDuration.m */; };
22D8F154147548E2008C97DB /* FirstLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2218A92312FBE1340088A667 /* FirstLoginViewController.m */; };
22D8F155147548E2008C97DB /* UIBluetoothButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */; };
22D8F156147548E2008C97DB /* UIEraseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22BB1A68132FF16A005CD7AA /* UIEraseButton.m */; };
@ -163,10 +161,6 @@
34A6ECEB14CF13CB00460C04 /* icone-linphone-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 34A6ECEA14CF13CB00460C04 /* icone-linphone-72.png */; };
34C7646C14CD5585008E9607 /* dialer-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646A14CD5585008E9607 /* dialer-orange.png */; };
34C7646D14CD5585008E9607 /* history-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646B14CD5585008E9607 /* history-orange.png */; };
34CA852F148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */; };
34CA8530148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */; };
34CA8539148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */; };
34CA853A148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */; };
57282931154AF1460076F540 /* history-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646B14CD5585008E9607 /* history-orange.png */; };
57282933154AF14D0076F540 /* dialer-orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 34C7646A14CD5585008E9607 /* dialer-orange.png */; };
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
@ -332,6 +326,11 @@
D37295CB158B1E2D00D2C0C7 /* registration_inprogress.png in Resources */ = {isa = PBXBuildFile; fileRef = D37295C9158B1E2D00D2C0C7 /* registration_inprogress.png */; };
D37295DB158B3C9600D2C0C7 /* video-OFF-disabled.png in Resources */ = {isa = PBXBuildFile; fileRef = D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */; };
D37295DC158B3C9600D2C0C7 /* video-OFF-disabled.png in Resources */ = {isa = PBXBuildFile; fileRef = D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */; };
D377BBFA15A19DA6002B696B /* video-ON-disabled.png in Resources */ = {isa = PBXBuildFile; fileRef = D377BBF915A19DA6002B696B /* video-ON-disabled.png */; };
D37B96B715A1A6F20005CCD2 /* supprimer-participant-conf-actif.png in Resources */ = {isa = PBXBuildFile; fileRef = D37B96B515A1A6F20005CCD2 /* supprimer-participant-conf-actif.png */; };
D37B96B815A1A6F20005CCD2 /* supprimer-participant-conf-actif.png in Resources */ = {isa = PBXBuildFile; fileRef = D37B96B515A1A6F20005CCD2 /* supprimer-participant-conf-actif.png */; };
D37B96B915A1A6F20005CCD2 /* supprimer-participant-conf-over.png in Resources */ = {isa = PBXBuildFile; fileRef = D37B96B615A1A6F20005CCD2 /* supprimer-participant-conf-over.png */; };
D37B96BA15A1A6F20005CCD2 /* supprimer-participant-conf-over.png in Resources */ = {isa = PBXBuildFile; fileRef = D37B96B615A1A6F20005CCD2 /* supprimer-participant-conf-over.png */; };
D37DC6C11594AE1800B2A5EB /* LinphoneCoreSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = D37DC6C01594AE1800B2A5EB /* LinphoneCoreSettingsStore.m */; };
D37DC6C21594AE1800B2A5EB /* LinphoneCoreSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = D37DC6C01594AE1800B2A5EB /* LinphoneCoreSettingsStore.m */; };
D37DC6ED1594AE6F00B2A5EB /* IASKAppSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D37DC6C61594AE6F00B2A5EB /* IASKAppSettingsViewController.m */; };
@ -755,7 +754,6 @@
2214EB7912F846B1002A5394 /* UICallButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICallButton.m; sourceTree = "<group>"; };
2214EB8712F84EBB002A5394 /* UIHangUpButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHangUpButton.h; sourceTree = "<group>"; };
2214EB8812F84EBB002A5394 /* UIHangUpButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIHangUpButton.m; sourceTree = "<group>"; };
2214EB8A12F84FE9002A5394 /* UILinphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILinphone.h; sourceTree = "<group>"; };
2214EBF112F86360002A5394 /* UIMicroButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIMicroButton.h; sourceTree = "<group>"; };
2214EBF212F86360002A5394 /* UIMicroButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIMicroButton.m; sourceTree = "<group>"; };
2218A5CE12F973450088A667 /* LogView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogView.h; sourceTree = "<group>"; };
@ -798,8 +796,6 @@
228B19AE130290C500F154D3 /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = text; name = iTunesArtwork; path = Resources/iTunesArtwork; sourceTree = "<group>"; };
22968A5D12F875C600588287 /* UISpeakerButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISpeakerButton.h; sourceTree = "<group>"; };
22968A5E12F875C600588287 /* UISpeakerButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UISpeakerButton.m; sourceTree = "<group>"; };
22968A8612F87C2000588287 /* UIDuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIDuration.h; sourceTree = "<group>"; };
22968A8712F87C2000588287 /* UIDuration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIDuration.m; sourceTree = "<group>"; };
22AA8AFB13D7125500B30535 /* libx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libx264.a; path = "liblinphone-sdk/apple-darwin/lib/libx264.a"; sourceTree = "<group>"; };
22AA8AFC13D7125500B30535 /* libmsx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsx264.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsx264.a"; sourceTree = "<group>"; };
22AA8AFF13D83F6300B30535 /* UICamSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICamSwitch.h; sourceTree = "<group>"; };
@ -915,9 +911,6 @@
34A6ECEA14CF13CB00460C04 /* icone-linphone-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icone-linphone-72.png"; path = "Resources/icone-linphone-72.png"; sourceTree = "<group>"; };
34C7646A14CD5585008E9607 /* dialer-orange.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "dialer-orange.png"; path = "submodules/linphone/pixmaps/dialer-orange.png"; sourceTree = "<group>"; };
34C7646B14CD5585008E9607 /* history-orange.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "history-orange.png"; path = "submodules/linphone/pixmaps/history-orange.png"; sourceTree = "<group>"; };
34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainScreenWithVideoPreview.xib; sourceTree = "<group>"; };
34CA8537148F692A00503C01 /* MainScreenWithVideoPreview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainScreenWithVideoPreview.h; sourceTree = "<group>"; };
34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainScreenWithVideoPreview.m; sourceTree = "<group>"; };
70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = "<group>"; };
7066FC0B13E830E400EFC6DC /* libvpx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx.a; path = "liblinphone-sdk/apple-darwin/lib/libvpx.a"; sourceTree = "<group>"; };
70E542F213E147E3002BA2C0 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
@ -1023,6 +1016,9 @@
D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIPauseButton.m; sourceTree = "<group>"; };
D37295C9158B1E2D00D2C0C7 /* registration_inprogress.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = registration_inprogress.png; path = Resources/registration_inprogress.png; sourceTree = "<group>"; };
D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "video-OFF-disabled.png"; path = "Resources/video-OFF-disabled.png"; sourceTree = "<group>"; };
D377BBF915A19DA6002B696B /* video-ON-disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "video-ON-disabled.png"; path = "Resources/video-ON-disabled.png"; sourceTree = "<group>"; };
D37B96B515A1A6F20005CCD2 /* supprimer-participant-conf-actif.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "supprimer-participant-conf-actif.png"; path = "Resources/supprimer-participant-conf-actif.png"; sourceTree = "<group>"; };
D37B96B615A1A6F20005CCD2 /* supprimer-participant-conf-over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "supprimer-participant-conf-over.png"; path = "Resources/supprimer-participant-conf-over.png"; sourceTree = "<group>"; };
D37DC6BF1594AE1800B2A5EB /* LinphoneCoreSettingsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinphoneCoreSettingsStore.h; sourceTree = "<group>"; };
D37DC6C01594AE1800B2A5EB /* LinphoneCoreSettingsStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LinphoneCoreSettingsStore.m; sourceTree = "<group>"; };
D37DC6C51594AE6F00B2A5EB /* IASKAppSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsViewController.h; sourceTree = "<group>"; };
@ -1340,9 +1336,6 @@
D3EA53FB159850E80037DC6B /* LinphoneManager.h */,
D3EA53FC159850E80037DC6B /* LinphoneManager.m */,
2214EB7012F84668002A5394 /* LinphoneUI */,
34CA8537148F692A00503C01 /* MainScreenWithVideoPreview.h */,
34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */,
34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */,
22E0A81D111C44E100B04932 /* MoreViewController.h */,
22E0A81C111C44E100B04932 /* MoreViewController.m */,
22E0A81B111C44E100B04932 /* MoreViewController.xib */,
@ -1599,8 +1592,6 @@
D3A55FBE15877E69003FD403 /* UIContactCell.xib */,
2248E90C12F7E4CF00220D9C /* UIDigitButton.h */,
2248E90D12F7E4CF00220D9C /* UIDigitButton.m */,
22968A8612F87C2000588287 /* UIDuration.h */,
22968A8712F87C2000588287 /* UIDuration.m */,
22BB1A67132FF16A005CD7AA /* UIEraseButton.h */,
22BB1A68132FF16A005CD7AA /* UIEraseButton.m */,
2214EB8712F84EBB002A5394 /* UIHangUpButton.h */,
@ -1608,7 +1599,6 @@
D31C9C96158A1CDE00756B45 /* UIHistoryCell.h */,
D31C9C97158A1CDE00756B45 /* UIHistoryCell.m */,
D31AC4AF158A29C600C2638B /* UIHistoryCell.xib */,
2214EB8A12F84FE9002A5394 /* UILinphone.h */,
D32409C1158B49A600C8C119 /* UILongTouchButton.h */,
D32409C2158B49A600C8C119 /* UILongTouchButton.m */,
D3ED3E841586291B006C0DE4 /* UIMainBar.h */,
@ -1940,6 +1930,8 @@
D3432A5D158A4446001C6B0B /* status_error.png */,
D3432A6F158A45AF001C6B0B /* status_inprogress.png */,
22226C13118197EC000CA27B /* stopcall-red.png */,
D37B96B515A1A6F20005CCD2 /* supprimer-participant-conf-actif.png */,
D37B96B615A1A6F20005CCD2 /* supprimer-participant-conf-over.png */,
D35E757515931E5D0066B1C1 /* switch_camera_default.png */,
D35E757615931E5D0066B1C1 /* switch_camera_over.png */,
D38327F11580FE3A00FA0D23 /* tchat-actif.png */,
@ -1954,6 +1946,7 @@
D37295DA158B3C9600D2C0C7 /* video-OFF-disabled.png */,
D3F83F01158205A100336684 /* video-OFF-over.png */,
D3F83F02158205A100336684 /* video-ON-actif.png */,
D377BBF915A19DA6002B696B /* video-ON-disabled.png */,
D3F83F03158205A100336684 /* video-ON-over.png */,
);
name = Resources;
@ -2161,7 +2154,6 @@
228B19AF130290C500F154D3 /* iTunesArtwork in Resources */,
2214783D1386A2030020F8B8 /* Localizable.strings in Resources */,
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */,
34CA852F148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */,
3422AA5014975EC9000D4E8A /* InCallViewController-ipad.xib in Resources */,
3422AA5314978352000D4E8A /* PhoneViewController-ipad.xib in Resources */,
341FCA8E149798210084BC26 /* linphonerc-ipad in Resources */,
@ -2342,6 +2334,9 @@
D3211BC0159CBFD70098460B /* cancel_white_bg_disabled.png in Resources */,
D3211BC2159CBFD70098460B /* cancel_white_bg_over.png in Resources */,
D3C714B3159DB84400705B8E /* toy-mono.wav in Resources */,
D377BBFA15A19DA6002B696B /* video-ON-disabled.png in Resources */,
D37B96B715A1A6F20005CCD2 /* supprimer-participant-conf-actif.png in Resources */,
D37B96B915A1A6F20005CCD2 /* supprimer-participant-conf-over.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2366,7 +2361,6 @@
22D8F13D147548E2008C97DB /* Localizable.strings in Resources */,
22D8F142147548E2008C97DB /* rootca.pem in Resources */,
2211DB95147564B400DEE054 /* Settings.bundle in Resources */,
34CA8530148F646700503C01 /* MainScreenWithVideoPreview.xib in Resources */,
3422AA5114975EC9000D4E8A /* InCallViewController-ipad.xib in Resources */,
3422AA5414978352000D4E8A /* PhoneViewController-ipad.xib in Resources */,
341FCA8F149798210084BC26 /* linphonerc-ipad in Resources */,
@ -2531,6 +2525,8 @@
D3211BC1159CBFD70098460B /* cancel_white_bg_disabled.png in Resources */,
D3211BC3159CBFD70098460B /* cancel_white_bg_over.png in Resources */,
D3C714B4159DB84400705B8E /* toy-mono.wav in Resources */,
D37B96B815A1A6F20005CCD2 /* supprimer-participant-conf-actif.png in Resources */,
D37B96BA15A1A6F20005CCD2 /* supprimer-participant-conf-over.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2551,14 +2547,12 @@
2214EB8912F84EBB002A5394 /* UIHangUpButton.m in Sources */,
2214EBF312F86360002A5394 /* UIMicroButton.m in Sources */,
22968A5F12F875C600588287 /* UISpeakerButton.m in Sources */,
22968A8812F87C2000588287 /* UIDuration.m in Sources */,
2218A92512FBE1340088A667 /* FirstLoginViewController.m in Sources */,
22C755601317E59C007BC101 /* UIBluetoothButton.m in Sources */,
22BB1A69132FF16A005CD7AA /* UIEraseButton.m in Sources */,
223963171393CFAF001DE689 /* FastAddressBook.m in Sources */,
22AA8B0113D83F6300B30535 /* UICamSwitch.m in Sources */,
2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */,
34CA8539148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */,
340751E7150F38FD00B89C47 /* UIVideoButton.m in Sources */,
34216F401547EBCD00EA9777 /* VideoZoomHandler.m in Sources */,
D3F83EEC1582021700336684 /* InCallViewController.m in Sources */,
@ -2625,14 +2619,12 @@
22D8F14F147548E2008C97DB /* UIHangUpButton.m in Sources */,
22D8F151147548E2008C97DB /* UIMicroButton.m in Sources */,
22D8F152147548E2008C97DB /* UISpeakerButton.m in Sources */,
22D8F153147548E2008C97DB /* UIDuration.m in Sources */,
22D8F154147548E2008C97DB /* FirstLoginViewController.m in Sources */,
22D8F155147548E2008C97DB /* UIBluetoothButton.m in Sources */,
22D8F156147548E2008C97DB /* UIEraseButton.m in Sources */,
22D8F157147548E2008C97DB /* FastAddressBook.m in Sources */,
22D8F159147548E2008C97DB /* UICamSwitch.m in Sources */,
2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */,
34CA853A148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */,
340751E8150F38FD00B89C47 /* UIVideoButton.m in Sources */,
34216F411547EBCD00EA9777 /* VideoZoomHandler.m in Sources */,
D3F83EED1582021700336684 /* InCallViewController.m in Sources */,