Merge branch 'new_ui' of git://git.linphone.org/linphone-iphone into castel

Conflicts:
	Classes/LinphoneManager.h
	Classes/LinphoneUI/UICallBar.h
	Classes/LinphoneUI/UIMainBar.h
	Classes/MoreViewController.h
This commit is contained in:
Yann Diorcet 2012-08-21 15:19:58 +02:00
commit 0c112efb92
68 changed files with 215 additions and 406 deletions

View file

@ -24,7 +24,6 @@
@interface ChatRoomTableViewController : UITableViewController {
@private
NSMutableArray *data;
NSString *remoteAddress;
}
@property (nonatomic, retain) NSString *remoteAddress;

View file

@ -27,17 +27,8 @@
#include "linphonecore.h"
@interface ChatRoomViewController : UIViewController<UITextFieldDelegate, UICompositeViewDelegate> {
ChatRoomTableViewController *tableController;
UITextField *messageField;
UIButton *sendButton;
NSString *remoteAddress;
UIToggleButton *editButton;
@private
LinphoneChatRoom *chatRoom;
UILabel *addressLabel;
UIImageView *avatarImage;
UIView *headerView;
UIView *footerView;
UIImageView *fieldBackgroundImage;
}

View file

@ -25,8 +25,6 @@
#import "UICompositeViewController.h"
@interface ChatViewController : UIViewController<UICompositeViewDelegate> {
ChatTableViewController *tableController;
UIToggleButton *editButton;
}
@property (nonatomic, retain) IBOutlet ChatTableViewController* tableController;

View file

@ -22,8 +22,6 @@
#import "LogView.h"
@interface ConsoleViewController : UIViewController <LogView> {
UITextView* logs;
UIView* logsView;
}
-(void) doAction;

View file

@ -26,8 +26,6 @@
@end
@interface ContactDetailsImagePickerController : UIImagePickerController <UICompositeViewDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate> {
@private
id<ContactDetailsImagePickerDelegate> imagePickerDelegate;
}
@property (nonatomic, retain) id<ContactDetailsImagePickerDelegate> imagePickerDelegate;

View file

@ -27,10 +27,6 @@
@end
@interface ContactDetailsLabelViewController : UIViewController<UITableViewDelegate, UITableViewDataSource, UICompositeViewDelegate> {
NSDictionary *dataList;
UITableView *tableView;
NSString *selectedData;
id<ContactDetailsLabelViewDelegate> delegate;
}
@property (nonatomic, copy) NSString *selectedData;

View file

@ -83,10 +83,11 @@ static UICompositeViewDescription *compositeDescription = nil;
#pragma mark - Property Functions
- (void)setDataList:(NSDictionary *)adatalist {
if (self->dataList != nil) {
[self->dataList release];
if([dataList isEqualToDictionary:adatalist]) {
return;
}
self->dataList = [adatalist retain];
[dataList release];
dataList = [adatalist retain];
[tableView reloadData];
}

View file

@ -27,13 +27,9 @@
@interface ContactDetailsTableViewController : UITableViewController<ContactDetailsLabelViewDelegate, UITextFieldDelegate> {
@private
ABRecordRef contact;
NSMutableArray *dataCache;
NSMutableArray *labelArray;
NSIndexPath *editingIndexPath;
UIContactDetailsHeader *headerController;
UIContactDetailsFooter *footerController;
id<ContactDetailsDelegate> contactDetailsDelegate;
}
@property (nonatomic, assign) ABRecordRef contact;

View file

@ -377,7 +377,7 @@ static const int contactSections[ContactSections_MAX] = {ContactSections_None, C
if(contact != nil && ABRecordGetRecordID(contact) == kABRecordInvalidID) {
CFRelease(contact);
}
self->contact = acontact;
contact = acontact;
[self loadData];
[headerController setContact:contact];
}

View file

@ -25,12 +25,6 @@
#import "ContactDetailsTableViewController.h"
@interface ContactDetailsViewController : UIViewController<UICompositeViewDelegate, ContactDetailsDelegate> {
ContactDetailsTableViewController *tableController;
ABRecordRef contact;
UIToggleButton *editButton;
UIButton *backButton;
UIButton *cancelButton;
ABAddressBookRef addressBook;
BOOL inhibUpdate;
}

View file

@ -142,20 +142,20 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
- (void)newContact {
[LinphoneLogger logc:LinphoneLoggerLog format:"New contact"];
self->contact = NULL;
contact = NULL;
[self resetData];
self->contact = ABPersonCreate();
[tableController setContact:self->contact];
contact = ABPersonCreate();
[tableController setContact:contact];
[self enableEdit:FALSE];
[[tableController tableView] reloadData];
}
- (void)newContact:(NSString*)address {
[LinphoneLogger logc:LinphoneLoggerLog format:"New contact"];
self->contact = NULL;
contact = NULL;
[self resetData];
self->contact = ABPersonCreate();
[tableController setContact:self->contact];
contact = ABPersonCreate();
[tableController setContact:contact];
[tableController addSipField:address];
[self enableEdit:FALSE];
[[tableController tableView] reloadData];
@ -163,20 +163,20 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
- (void)editContact:(ABRecordRef)acontact {
[LinphoneLogger logc:LinphoneLoggerLog format:"Edit contact %p", acontact];
self->contact = NULL;
contact = NULL;
[self resetData];
self->contact = ABAddressBookGetPersonWithRecordID(addressBook, ABRecordGetRecordID(acontact));
[tableController setContact:self->contact];
contact = ABAddressBookGetPersonWithRecordID(addressBook, ABRecordGetRecordID(acontact));
[tableController setContact:contact];
[self enableEdit:FALSE];
[[tableController tableView] reloadData];
}
- (void)editContact:(ABRecordRef)acontact address:(NSString*)address {
[LinphoneLogger logc:LinphoneLoggerLog format:"Edit contact %p", acontact];
self->contact = NULL;
contact = NULL;
[self resetData];
self->contact = ABAddressBookGetPersonWithRecordID(addressBook, ABRecordGetRecordID(acontact));
[tableController setContact:self->contact];
contact = ABAddressBookGetPersonWithRecordID(addressBook, ABRecordGetRecordID(acontact));
[tableController setContact:contact];
[tableController addSipField:address];
[self enableEdit:FALSE];
[[tableController tableView] reloadData];
@ -187,10 +187,10 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
- (void)setContact:(ABRecordRef)acontact {
[LinphoneLogger logc:LinphoneLoggerLog format:"Set contact %p", acontact];
self->contact = NULL;
contact = NULL;
[self resetData];
self->contact = ABAddressBookGetPersonWithRecordID(addressBook, ABRecordGetRecordID(acontact));
[tableController setContact:self->contact];
contact = ABAddressBookGetPersonWithRecordID(addressBook, ABRecordGetRecordID(acontact));
[tableController setContact:contact];
}
@ -208,10 +208,6 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
forState:(UIControlStateDisabled | UIControlStateSelected)];
}
- (void)viewDidUnload {
[super viewDidUnload];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {

View file

@ -23,6 +23,7 @@
#import "OrderedDictionary.h"
@interface ContactsTableViewController : UITableViewController {
@private
OrderedDictionary* addressBookMap;
NSMutableDictionary* avatarMap;

View file

@ -170,7 +170,8 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
UIContactCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
cell = [[[UIContactCell alloc] initWithIdentifier:kCellId] autorelease];
// Background View
// Background View
UACellBackgroundView *selectedBackgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];

View file

@ -42,13 +42,6 @@ typedef enum _ContactSelectionMode {
@end
@interface ContactsViewController : UIViewController<UICompositeViewDelegate> {
ContactsTableViewController *tableController;
UITableView *tableView;
UIButton *allButton;
UIButton *linphoneButton;
UIButton *backButton;
UIButton *addButton;
}
@property (nonatomic, retain) IBOutlet ContactsTableViewController* tableController;

View file

@ -27,31 +27,6 @@
#import "UIDigitButton.h"
@interface DialerViewController : UIViewController <UITextFieldDelegate, UICompositeViewDelegate> {
@private
//Buttons
UITextField* addressField;
UIButton* addContactButton;
UIButton* backButton;
UIEraseButton* eraseButton;
UICallButton* callButton;
UICallButton* addCallButton;
UITransferButton* transferButton;
//Key pad
UIDigitButton* oneButton;
UIDigitButton* twoButton;
UIDigitButton* threeButton;
UIDigitButton* fourButton;
UIDigitButton* fiveButton;
UIDigitButton* sixButton;
UIDigitButton* sevenButton;
UIDigitButton* eightButton;
UIDigitButton* nineButton;
UIDigitButton* starButton;
UIDigitButton* zeroButton;
UIDigitButton* sharpButton;
BOOL transferMode;
}
- (void)setAddress:(NSString*)address;
@ -68,18 +43,18 @@
@property (nonatomic, retain) IBOutlet UIButton* backButton;
@property (nonatomic, retain) IBOutlet UIEraseButton* eraseButton;
@property (nonatomic, retain) IBOutlet UIButton* oneButton;
@property (nonatomic, retain) IBOutlet UIButton* twoButton;
@property (nonatomic, retain) IBOutlet UIButton* threeButton;
@property (nonatomic, retain) IBOutlet UIButton* fourButton;
@property (nonatomic, retain) IBOutlet UIButton* fiveButton;
@property (nonatomic, retain) IBOutlet UIButton* sixButton;
@property (nonatomic, retain) IBOutlet UIButton* sevenButton;
@property (nonatomic, retain) IBOutlet UIButton* eightButton;
@property (nonatomic, retain) IBOutlet UIButton* nineButton;
@property (nonatomic, retain) IBOutlet UIButton* starButton;
@property (nonatomic, retain) IBOutlet UIButton* zeroButton;
@property (nonatomic, retain) IBOutlet UIButton* sharpButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* oneButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* twoButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* threeButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* fourButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* fiveButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* sixButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* sevenButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* eightButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* nineButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* starButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* zeroButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* sharpButton;
- (IBAction)onAddContactClick: (id) event;
- (IBAction)onBackClick: (id) event;

View file

@ -22,11 +22,6 @@
#import "UICompositeViewController.h"
@interface FirstLoginViewController : UIViewController<UITextFieldDelegate, UICompositeViewDelegate> {
UIButton* loginButton;
UIButton* siteButton;
UITextField* usernameField;
UITextField* passwordField;
UIView* waitView;
}
- (IBAction)onLoginClick:(id)sender;

View file

@ -24,17 +24,7 @@
#import "UICompositeViewController.h"
@interface HistoryDetailsViewController : UIViewController<UICompositeViewDelegate> {
LinphoneCallLog *callLog;
UIImageView *avatarImage;
UILabel *addressLabel;
UILabel *dateLabel;
UILabel *dateHeaderLabel;
UILabel *durationLabel;
UILabel *durationHeaderLabel;
UILabel *typeLabel;
UILabel *typeHeaderLabel;
UIButton *addressButton;
UIButton *addContactButton;
@private
ABRecordRef contact;
}
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;

View file

@ -21,7 +21,6 @@
@interface HistoryTableViewController : UITableViewController {
@private
BOOL missedFilter;
NSMutableArray *callLogs;
}

View file

@ -60,8 +60,8 @@
#pragma mark - ViewController Functions
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self loadData];
}
@ -69,9 +69,11 @@
#pragma mark - Property Functions
- (void)setMissedFilter:(BOOL)amissedFilter {
self->missedFilter = amissedFilter;
if(missedFilter == amissedFilter) {
return;
}
missedFilter = amissedFilter;
[self loadData];
[[self tableView] reloadData];
}
@ -91,6 +93,7 @@
}
logs = ms_list_next(logs);
}
[[self tableView] reloadData];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

View file

@ -24,13 +24,6 @@
#import "UIToggleButton.h"
@interface HistoryViewController : UIViewController<UICompositeViewDelegate> {
@private
HistoryTableViewController *tableController;
UITableView *tableView;
UIButton *allButton;
UIButton *missedButton;
UIToggleButton *editButton;
}
@property (nonatomic, retain) IBOutlet HistoryTableViewController* tableController;

View file

@ -76,11 +76,15 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[tableController viewWillAppear:animated];
}
if([tableController isEditing])
[tableController setEditing:FALSE animated:FALSE];
[editButton setOff];
[self changeView: History_All];
[self.tableView reloadData];
// Reset missed call
linphone_core_reset_missed_calls_count([LinphoneManager getLc]);
@ -88,6 +92,27 @@ static UICompositeViewDescription *compositeDescription = nil;
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneCallUpdate object:self];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[tableController viewDidAppear:animated];
}
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[tableController viewDidDisappear:animated];
}
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
[tableController viewWillDisappear:animated];
}
}
- (void)viewDidLoad {
[super viewDidLoad];
[self changeView: History_All];

View file

@ -34,7 +34,7 @@ enum TableSection {
#pragma mark - Lifecycle Functions
- (void)initInCallTableViewController {
self->callCellData = [[NSMutableDictionary alloc] init];
callCellData = [[NSMutableDictionary alloc] init];
}
- (id)init{

View file

@ -29,25 +29,11 @@
@class VideoViewController;
@interface InCallViewController : UIViewController <CallActionSheetDelegate, UIGestureRecognizerDelegate, UICompositeViewDelegate> {
InCallTableViewController* callTableController;
UITableView* callTableView;
UIView* videoGroup;
UIView* videoView;
UIView* videoPreview;
#ifdef TEST_VIDEO_VIEW_CHANGE
UIView* testVideoView;
#endif
UICamSwitch* videoCameraSwitch;
UIActivityIndicatorView* videoWaitingForFirstImage;
@private
UITapGestureRecognizer* singleFingerTap;
NSTimer* hideControlsTimer;
BOOL videoShown;
VideoZoomHandler* videoZoomHandler;
UIActionSheet* visibleActionSheet;
}

View file

@ -54,7 +54,12 @@ const NSInteger SECURE_BUTTON_TAG=5;
#pragma mark - Lifecycle Functions
- (id)init {
return [super initWithNibName:@"InCallViewController" bundle:[NSBundle mainBundle]];
self = [super initWithNibName:@"InCallViewController" bundle:[NSBundle mainBundle]];
if(self != nil) {
self->singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)];
self->videoZoomHandler = [[VideoZoomHandler alloc] init];
}
return self;
}
- (void)dealloc {
@ -73,6 +78,9 @@ const NSInteger SECURE_BUTTON_TAG=5;
[videoZoomHandler release];
[[PhoneMainView instance].view removeGestureRecognizer:singleFingerTap];
[singleFingerTap release];
// Remove all observer
[[NSNotificationCenter defaultCenter] removeObserver:self];
@ -172,13 +180,10 @@ static UICompositeViewDescription *compositeDescription = nil;
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView);
linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)videoPreview);
UITapGestureRecognizer* singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)];
[singleFingerTap setNumberOfTapsRequired:1];
[singleFingerTap setCancelsTouchesInView: FALSE];
[[PhoneMainView instance].view addGestureRecognizer:singleFingerTap];
[singleFingerTap release];
videoZoomHandler = [[VideoZoomHandler alloc] init];
[videoZoomHandler setup:videoGroup];
videoGroup.alpha = 0;
@ -187,6 +192,10 @@ static UICompositeViewDescription *compositeDescription = nil;
removeTableBackground([callTableController view]);
}
- (void)viewDidUnload {
[super viewDidUnload];
[[PhoneMainView instance].view removeGestureRecognizer:singleFingerTap];
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];

View file

@ -31,11 +31,6 @@
@end
@interface IncomingCallViewController : UIViewController <UICompositeViewDelegate> {
@private
UILabel* addressLabel;
UIImageView* avatarImage;
LinphoneCall *call;
id<IncomingCallViewDelegate> delegate;
}
@property (nonatomic, retain) IBOutlet UILabel* addressLabel;

View file

@ -30,13 +30,6 @@
#include "LinphoneManager.h"
#include "linphonecore.h"
#if __clang__ && __arm__
extern int __divsi3(int a, int b);
int __aeabi_idiv(int a, int b) {
return __divsi3(a,b);
}
#endif
@implementation UILinphoneWindow
@end

View file

@ -155,6 +155,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
}
{
[self setString: linphone_core_get_stun_server(lc) forKey:@"stun_preference"];
[self
setInteger:lp_config_get_int(linphone_core_get_config(lc),"app","ice_preference"
, 0) forKey:@"ice_preference"];
}
{
@ -429,7 +432,12 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
NSString* stun_server = [self stringForKey:@"stun_preference"];
if ([stun_server length] > 0){
linphone_core_set_stun_server(lc,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]);
linphone_core_set_firewall_policy(lc, LinphonePolicyUseStun);
BOOL ice_preference = [self boolForKey:@"ice_preference"];
if(ice_preference) {
linphone_core_set_firewall_policy(lc, LinphonePolicyUseIce);
} else {
linphone_core_set_firewall_policy(lc, LinphonePolicyUseStun);
}
} else {
linphone_core_set_stun_server(lc, NULL);
linphone_core_set_firewall_policy(lc, LinphonePolicyNoFirewall);

View file

@ -74,20 +74,10 @@ typedef struct _LinphoneManagerSounds {
@private
NSTimer* mIterateTimer;
bool isbackgroundModeEnabled;
Connectivity connectivity;
const char* frontCamId;
const char* backCamId;
FastAddressBook* fastAddressBook;
LinphoneManagerSounds sounds;
NSMutableArray *inhibitedEvent;
id<IASKSettingsStore> settingsStore;
sqlite3 *database;
NSDictionary *castelCommands;
@public
CallContext currentCallContextBeforeGoingBackground;

View file

@ -239,6 +239,10 @@ struct codec_name_pref_table codec_pref_table[]={
if ([fileManager fileExistsAtPath:databaseDocumentPath] == NO) {
[LinphoneLogger logc:LinphoneLoggerLog format:"Create sqlite3 database"];
NSString *resourceDocumentPath = [[NSBundle mainBundle] pathForResource:@"database" ofType:@"sqlite"];
if ([fileManager fileExistsAtPath:resourceDocumentPath] == NO) {
[LinphoneLogger log:LinphoneLoggerError format:@"Can't find original database: %@", [error localizedDescription]];
return;
}
[fileManager copyItemAtPath:resourceDocumentPath toPath:databaseDocumentPath error:&error];
if(error != nil) {
[LinphoneLogger log:LinphoneLoggerError format:@"Can't copy database: %@", [error localizedDescription]];

View file

@ -28,36 +28,6 @@
#import "TPMultiLayoutViewController.h"
@interface UICallBar: TPMultiLayoutViewController {
UIPauseButton* pauseButton;
UIButton* conferenceButton;
UIVideoButton* videoButton;
UIMicroButton* microButton;
UISpeakerButton* speakerButton;
UIToggleButton* optionsButton;
UIHangUpButton* hangupButton;
UIView* padView;
UIView* optionsView;
UIButton* optionsAddButton;
UIButton* optionsTransferButton;
UIToggleButton* dialerButton;
//Key pad
UIDigitButton* oneButton;
UIDigitButton* twoButton;
UIDigitButton* threeButton;
UIDigitButton* fourButton;
UIDigitButton* fiveButton;
UIDigitButton* sixButton;
UIDigitButton* sevenButton;
UIDigitButton* eightButton;
UIDigitButton* nineButton;
UIDigitButton* starButton;
UIDigitButton* zeroButton;
UIDigitButton* sharpButton;
UIButton* option1Button;
UIButton* option2Button;
UIButton* option3Button;
}
@property (nonatomic, retain) IBOutlet UIPauseButton* pauseButton;
@ -74,22 +44,22 @@
@property (nonatomic, retain) IBOutlet UIButton* optionsTransferButton;
@property (nonatomic, retain) IBOutlet UIToggleButton* dialerButton;
@property (nonatomic, retain) IBOutlet UIButton* oneButton;
@property (nonatomic, retain) IBOutlet UIButton* twoButton;
@property (nonatomic, retain) IBOutlet UIButton* threeButton;
@property (nonatomic, retain) IBOutlet UIButton* fourButton;
@property (nonatomic, retain) IBOutlet UIButton* fiveButton;
@property (nonatomic, retain) IBOutlet UIButton* sixButton;
@property (nonatomic, retain) IBOutlet UIButton* sevenButton;
@property (nonatomic, retain) IBOutlet UIButton* eightButton;
@property (nonatomic, retain) IBOutlet UIButton* nineButton;
@property (nonatomic, retain) IBOutlet UIButton* starButton;
@property (nonatomic, retain) IBOutlet UIButton* zeroButton;
@property (nonatomic, retain) IBOutlet UIButton* sharpButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* oneButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* twoButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* threeButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* fourButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* fiveButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* sixButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* sevenButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* eightButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* nineButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* starButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* zeroButton;
@property (nonatomic, retain) IBOutlet UIDigitButton* sharpButton;
@property (nonatomic, retain) IBOutlet UIButton* option1Button;
@property (nonatomic, retain) IBOutlet UIButton* option2Button;
@property (nonatomic, retain) IBOutlet UIButton* option3Button;
@property (nonatomic, retain) IBOutlet UIDigitButton* option1Button;
@property (nonatomic, retain) IBOutlet UIDigitButton* option2Button;
@property (nonatomic, retain) IBOutlet UIDigitButton* option3Button;
- (IBAction)onOptionsClick:(id)sender;
- (IBAction)onOptionsTransferClick:(id)sender;

View file

@ -21,8 +21,6 @@
@interface UICallButton : UIButton {
@private
UITextField* addressField;
}
@property (nonatomic, retain) IBOutlet UITextField* addressField;

View file

@ -33,25 +33,6 @@
@end
@interface UICallCell : UITableViewCell {
@private
BOOL firstCell;
BOOL conferenceCell;
BOOL currentCall;
UIImageView* headerBackgroundImage;
UIImageView* headerBackgroundHighlightImage;
UILabel *addressLabel;
UILabel *stateLabel;
UIImageView *stateImage;
UIPauseButton *pauseButton;
UIButton *removeButton;
UIImageView *avatarImage;
UIView *headerView;
UIView *avatarView;
UICallCellData *data;
}
@property (nonatomic, retain) UICallCellData *data;

View file

@ -92,7 +92,7 @@
- (void)prepareForReuse {
[super prepareForReuse];
self->currentCall = FALSE;
currentCall = FALSE;
[headerBackgroundHighlightImage setAlpha:0.0f];
[data release];
data = nil;

View file

@ -21,11 +21,9 @@
@interface UICamSwitch : UIButton {
@private
const char* currentCamId;
const char* nextCamId;
UIView* preview;
}
@property (nonatomic, retain) IBOutlet UIView* preview;
@end

View file

@ -22,13 +22,6 @@
#import "ChatModel.h"
@interface UIChatCell : UITableViewCell {
UIImageView *avatarImage;
UILabel *addressLabel;
UILabel *chatContentLabel;
UIButton *detailsButton;
UIButton *deleteButton;
ChatModel *chat;
}
@property (nonatomic, retain) ChatModel *chat;

View file

@ -22,14 +22,6 @@
#import "ChatModel.h"
@interface UIChatRoomCell : UITableViewCell {
UIImageView *backgroundImage;
UIView *innerView;
UIView *messageView;
UILabel *messageLabel;
UIButton *deleteButton;
UILabel *dateLabel;
ChatModel *chat;
}
@property (nonatomic, retain) ChatModel *chat;

View file

@ -78,7 +78,7 @@ static UIFont *CELL_FONT = nil;
- (void)prepareForReuse {
[super prepareForReuse];
self->chat = nil;
chat = nil;
}
- (void)update {

View file

@ -24,15 +24,6 @@
#import "TPMultiLayoutViewController.h"
@interface UICompositeViewDescription: NSObject{
NSString *name;
NSString *content;
NSString *stateBar;
BOOL stateBarEnabled;
NSString *tabBar;
BOOL tabBarEnabled;
BOOL fullscreen;
BOOL landscapeMode;
BOOL portraitMode;
}
@property (retain) NSString *name;
@ -65,14 +56,8 @@
@interface UICompositeViewController : TPMultiLayoutViewController {
@private
UIView *stateBarView;
UIView *contentView;
UIView *tabBarView;
NSMutableDictionary *viewControllerCache;
UICompositeViewDescription *currentViewDescription;
CATransition *viewTransition;
UIInterfaceOrientation currentOrientation;
}

View file

@ -102,7 +102,7 @@
#pragma mark - Lifecycle Functions
- (void)initUICompositeViewController {
self->viewControllerCache = [[NSMutableDictionary alloc] init];
viewControllerCache = [[NSMutableDictionary alloc] init];
currentOrientation = UIDeviceOrientationUnknown;
}
@ -244,6 +244,11 @@
return NO;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
[self clearCache];
}
#pragma mark - Event Functions
@ -259,7 +264,18 @@
#pragma mark -
- (void)clearCache {
[viewControllerCache removeAllObjects];
for(NSString *key in [viewControllerCache allKeys]) {
UIViewController *vc = [viewControllerCache objectForKey:key];
if(vc != self.stateBarViewController &&
vc != self.tabBarViewController &&
vc != self.contentViewController) {
if ([[UIDevice currentDevice].systemVersion doubleValue] >= 5.0) {
[vc viewWillUnload];
}
[vc viewDidUnload];
}
[viewControllerCache removeObjectForKey:key];
}
}
- (UIInterfaceOrientation)currentOrientation {

View file

@ -22,8 +22,6 @@
#import "UIPauseButton.h"
@interface UIConferenceHeader : UIViewController {
UIImageView *stateImage;
UIPauseButton *pauseButton;
}
@property (nonatomic, retain) IBOutlet UIImageView* stateImage;

View file

@ -21,10 +21,6 @@
#import <AddressBook/AddressBook.h>
@interface UIContactCell : UITableViewCell {
UILabel *firstNameLabel;
UILabel *lastNameLabel;
UIImageView *avatarImage;
ABRecordRef contact;
}
@property (nonatomic, retain) IBOutlet UILabel* firstNameLabel;

View file

@ -22,9 +22,6 @@
#import "ContactDetailsDelegate.h"
@interface UIContactDetailsFooter : UIViewController {
@private
UIButton *removeButton;
id<ContactDetailsDelegate> contactDetailsDelegate;
}
@property (nonatomic, retain) IBOutlet UIButton *removeButton;

View file

@ -24,16 +24,9 @@
#import "ContactDetailsDelegate.h"
@interface UIContactDetailsHeader : UIViewController<UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate, ContactDetailsImagePickerDelegate> {
UILabel *addressLabel;
UIImageView *avatarImage;
UIView *normalView;
UIView *editView;
UITableView *tableView;
@private
NSArray *propertyList;
ABRecordRef contact;
BOOL editing;
id<ContactDetailsDelegate> contactDetailsDelegate;
}
@property (nonatomic, assign) ABRecordRef contact;

View file

@ -23,10 +23,6 @@
@interface UIDigitButton : UILongTouchButton<UILongTouchButtonDelegate> {
@private
char digit;
bool dtmf;
UITextField* addressField;
}
@property (nonatomic, retain) IBOutlet UITextField* addressField;

View file

@ -31,7 +31,7 @@
#pragma mark - Lifecycle Functions
- (void)initUIDigitButton {
self->dtmf = FALSE;
dtmf = FALSE;
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside];
}

View file

@ -20,7 +20,6 @@
#import <UIKit/UIKit.h>
@interface UIEditableTableViewCell : UITableViewCell {
UITextField *detailTextField;
}
@property (nonatomic, retain) IBOutlet UITextField *detailTextField;

View file

@ -21,9 +21,7 @@
#import "UILongTouchButton.h"
@interface UIEraseButton : UILongTouchButton<UILongTouchButtonDelegate> {
@private
UITextField* addressField;
@interface UIEraseButton : UILongTouchButton<UILongTouchButtonDelegate> {
}
@property (nonatomic, retain) IBOutlet UITextField* addressField;

View file

@ -22,12 +22,6 @@
#include "linphonecore.h"
@interface UIHistoryCell : UITableViewCell {
UIImageView* imageView;
UILabel* addressLabel;
UIButton* detailsButton;
UIButton* deleteButton;
@private
LinphoneCallLog *callLog;
}
@property (nonatomic, assign) LinphoneCallLog *callLog;

View file

@ -21,18 +21,6 @@
#import "TPMultiLayoutViewController.h"
@interface UIMainBar : TPMultiLayoutViewController {
UIButton *historyButton;
UIButton *contactsButton;
UIButton *dialerButton;
UIButton *settingsButton;
/* MODIFICATION Remove chat
UIButton *chatButton;
*/
UIButton *moreButton;
UIView *historyNotificationView;
UILabel *historyNotificationLabel;
UIView *chatNotificationView;
UILabel *chatNotificationLabel;
}
@property (nonatomic, retain) IBOutlet UIButton* historyButton;

View file

@ -29,7 +29,7 @@
#pragma mark - Lifecycle Functions
- (void)initUIPauseButton {
self->type = UIPauseButtonType_CurrentCall;
type = UIPauseButtonType_CurrentCall;
}
- (id)init{
@ -91,8 +91,8 @@
#pragma mark -
- (void)setType:(UIPauseButtonType) atype call:(LinphoneCall*)acall {
self->type = atype;
self->call = acall;
type = atype;
call = acall;
}

View file

@ -21,10 +21,6 @@
#import "TPMultiLayoutViewController.h"
@interface UIStateBar : TPMultiLayoutViewController {
UIImageView* registrationStateImage;
UILabel* registrationStateLabel;
UIImageView* callQualityImage;
UIImageView* callSecurityImage;
}
@property (nonatomic, retain) IBOutlet UIImageView* registrationStateImage;

View file

@ -20,8 +20,6 @@
#import <UIKit/UIKit.h>
@interface UITransferButton : UIButton {
@private
UITextField* addressField;
}
@property (nonatomic, retain) IBOutlet UITextField* addressField;

View file

@ -22,14 +22,8 @@
#import "UIToggleButton.h"
@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,13 +22,9 @@
@implementation UIVideoButton
@synthesize locked;
@synthesize unlockVideoState;
@synthesize waitView;
- (void)initUIVideoButton {
self->locked = FALSE;
self->unlockVideoState = FALSE;
}
- (id)init{
@ -68,8 +64,6 @@
[self setEnabled: FALSE];
[waitView startAnimating];
[self setLocked: TRUE];
[self setUnlockVideoState: TRUE];
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
if (call) {
@ -95,8 +89,6 @@
[self setEnabled: FALSE];
[waitView startAnimating];
[self setLocked: TRUE];
[self setUnlockVideoState: FALSE];
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
if (call) {
@ -116,26 +108,28 @@
LinphoneCall* currentCall = linphone_core_get_current_call([LinphoneManager getLc]);
if (currentCall) {
LinphoneCallState state = linphone_call_get_state(currentCall);
if (state == LinphoneCallStreamsRunning || state == LinphoneCallUpdated || state == LinphoneCallUpdatedByRemote) {
if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
val = true;
if(locked && unlockVideoState) {
locked = FALSE;
[waitView stopAnimating];
}
} else {
if(locked && !unlockVideoState) {
locked = FALSE;
[waitView stopAnimating];
}
switch (state) {
case LinphoneCallUpdated:
{
[waitView stopAnimating];
}
if(!locked) {
case LinphoneCallStreamsRunning:
{
[self setEnabled:TRUE];
if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
val = true;
}
break;
}
} else {
// Disable button if the call is not running
[self setEnabled:FALSE];
[waitView stopAnimating];
default:
{
// Disable button if the call is not running
[self setEnabled:FALSE];
[waitView stopAnimating];
break;
}
}
} else {
// Disable button if there is no call

View file

@ -90,9 +90,9 @@
}
if([self chatId] != nil) {
[self->chatId release];
[chatId release];
}
self->chatId = [[NSNumber alloc] initWithInt:sqlite3_last_insert_rowid(database)];
chatId = [[NSNumber alloc] initWithInt:sqlite3_last_insert_rowid(database)];
sqlite3_finalize(sqlStatement);
}

View file

@ -23,10 +23,6 @@
@class ConsoleViewController;
@interface MoreViewController : UIViewController<UICompositeViewDelegate> {
@private
UIButton *linkButton;
UILabel *nameLabel;
UILabel *versionLabel;
}
@property (nonatomic, retain) IBOutlet UIButton *linkButton;

View file

@ -48,14 +48,8 @@
@interface PhoneMainView : UIViewController<CallActionSheetDelegate, IncomingCallViewDelegate> {
@private
UICompositeViewController *mainViewController;
UIActionSheet *incomingCallActionSheet;
UIActionSheet *batteryActionSheet;
int loadCount;
UICompositeViewDescription *currentView;
NSMutableArray *viewStack;
}

View file

@ -84,7 +84,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
- (void)viewDidLoad {
// Avoid IOS 4 bug
if(self->loadCount++ > 0)
if(loadCount++ > 0)
return;
[super viewDidLoad];
@ -164,7 +164,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
[super viewDidUnload];
// Avoid IOS 4 bug
self->loadCount--;
loadCount--;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@ -332,6 +332,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
case LinphoneCallOutgoingInit:
case LinphoneCallPausedByRemote:
case LinphoneCallConnected:
case LinphoneCallStreamsRunning:
case LinphoneCallUpdated:
{
[self changeCurrentView:[InCallViewController compositeViewDescription]];
@ -365,11 +366,6 @@ static PhoneMainView* phoneMainViewInstance=nil;
[self changeCurrentView:[InCallViewController compositeViewDescription]];
}
break;
}
case LinphoneCallStreamsRunning:
{
[self changeCurrentView:[InCallViewController compositeViewDescription]];
break;
}
default:
break;

View file

@ -23,8 +23,6 @@
#import "IASKAppSettingsViewController.h"
@interface SettingsViewController: UIViewController<IASKSettingsDelegate, UICompositeViewDelegate> {
IASKAppSettingsViewController *settingsController;
UINavigationController *navigationController;
}
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;

View file

@ -442,6 +442,15 @@ static UICompositeViewDescription *compositeDescription = nil;
[hiddenKeys removeObject:@"start_at_boot_preference"];
}
[settingsController setHiddenKeys:hiddenKeys animated:TRUE];
} else if ([@"stun_preference" compare: notif.object] == NSOrderedSame) {
NSMutableSet *hiddenKeys = [NSMutableSet setWithSet:[settingsController hiddenKeys]];
NSString *stun_server = [notif.userInfo objectForKey:@"stun_preference"];
if (stun_server && ([stun_server length] > 0)) {
[hiddenKeys removeObject:@"ice_preference"];
} else {
[hiddenKeys addObject:@"ice_preference"];
}
[settingsController setHiddenKeys:hiddenKeys animated:TRUE];
}
}
@ -490,6 +499,10 @@ static UICompositeViewDescription *compositeDescription = nil;
[hiddenKeys addObject:@"port_preference"];
}
if([[[[[LinphoneManager instance] settingsStore] objectForKey:@"stun_preference"] stringValue] length] == 0) {
[hiddenKeys addObject:@"ice_preference"];
}
return hiddenKeys;
}

View file

@ -19,12 +19,11 @@ typedef enum {
} UACellBackgroundViewPosition;
@interface UACellBackgroundView : UIView {
UACellBackgroundViewPosition position;
BOOL automaticPositioning;
}
@property(nonatomic) UACellBackgroundViewPosition position;
@property(nonatomic, copy) UIColor *backgroundColor;
@property(nonatomic, copy) UIColor *backgroundColor;
@property(nonatomic, copy) UIColor *borderColor;
@property(assign) BOOL automaticPositioning;
@end

View file

@ -17,11 +17,15 @@ static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWi
@synthesize position;
@synthesize backgroundColor;
@synthesize borderColor;
@synthesize automaticPositioning;
- (void)initUACellBackgroundView {
[super setBackgroundColor:[UIColor clearColor]];
self->automaticPositioning = TRUE;
backgroundColor = nil;
[self setBackgroundColor:[UIColor colorWithRed:0.02 green:0.549 blue:0.961 alpha:1.0]];
borderColor = nil;
[self setBorderColor:[UIColor grayColor]];
automaticPositioning = TRUE;
}
- (id)init {
@ -53,10 +57,19 @@ static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWi
}
- (void)setBackgroundColor:(UIColor *)abackgroundColor {
if(self->backgroundColor != nil) {
[self->backgroundColor release];
if(backgroundColor != nil) {
[backgroundColor release];
}
self->backgroundColor = [[UIColor alloc]initWithCGColor:abackgroundColor.CGColor];
backgroundColor = [[UIColor alloc] initWithCGColor:abackgroundColor.CGColor];
[self setNeedsDisplay];
}
- (void)setBorderColor:(UIColor *)aborderColor {
if(borderColor != nil) {
[borderColor release];
}
borderColor = [[UIColor alloc] initWithCGColor:aborderColor.CGColor];
[self setNeedsDisplay];
}
@ -123,7 +136,7 @@ static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWi
CGGradientRef myGradient = nil;
const CGFloat *default_components = CGColorGetComponents([[self backgroundColor] CGColor]);
CGFloat components[8] = {default_components[0], default_components[1], default_components[2], default_components[3], default_components[0] * 0.766f, default_components[1] * 0.766f, default_components[2] * 0.766f, default_components[3]};
CGContextSetStrokeColorWithColor(c, [[UIColor grayColor] CGColor]);
CGContextSetStrokeColorWithColor(c, [borderColor CGColor]);
CGContextSetLineWidth(c, lineWidth);
CGContextSetAllowsAntialiasing(c, YES);
CGContextSetShouldAntialias(c, YES);

View file

@ -22,26 +22,13 @@
#import "UICompositeViewController.h"
@interface WizardViewController : UIViewController <UITextFieldDelegate, UICompositeViewDelegate, XMLRPCConnectionDelegate> {
UIScrollView *contentView;
UIView *welcomeView;
UIView *choiceView;
UIView *createAccountView;
UIView *connectAccountView;
UIView *externalAccountView;
UIView *validateAccountView;
UIView *waitView;
UIView *currentView;
@private
UITextField *activeTextField;
UIButton *backButton;
UIButton *startButton;
UIView *currentView;
NSMutableArray *historyViews;
}
@property (nonatomic, retain) IBOutlet UIView *contentView;
@property (nonatomic, retain) IBOutlet UIScrollView *contentView;
@property (nonatomic, retain) IBOutlet UIView *welcomeView;
@property (nonatomic, retain) IBOutlet UIView *choiceView;

View file

@ -28,6 +28,16 @@
<key>DefaultValue</key>
<string></string>
</dict>
<dict>
<key>Title</key>
<string>ICE</string>
<key>Key</key>
<string>ice_preference</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>

View file

@ -29,6 +29,7 @@ playback_dev_id=AU: Audio Unit Receiver
ringer_dev_id=AQ: Audio Queue Device
capture_dev_id=AU: Audio Unit Receiver
echocancellation=0
dtmf_player_amp=0.007
[misc]
history_max_size=30

View file

@ -29,6 +29,7 @@ playback_dev_id=AU: Audio Unit Receiver
ringer_dev_id=AQ: Audio Queue Device
capture_dev_id=AU: Audio Unit Receiver
echocancellation=0
dtmf_player_amp=0.007
[misc]
history_max_size=30

@ -1 +1 @@
Subproject commit c97efee37aea1ccae3c476a108e988e47f38faa4
Subproject commit 125626d071204ca5369eb2f33c727e8e6e6418f7

@ -1 +1 @@
Subproject commit 391b6d6b0fdf6854e5a25f287c4d8461730a1d40
Subproject commit d3a6a0a130730c0eaf9a0b6ed2fc466432852684