diff --git a/Classes/BuschJaegerApp.xib b/Classes/BuschJaegerApp.xib
index 3fd1ff150..89d7ba768 100644
--- a/Classes/BuschJaegerApp.xib
+++ b/Classes/BuschJaegerApp.xib
@@ -13,11 +13,6 @@
IBProxyObject
IBUICustomObject
- IBUINavigationBar
- IBUINavigationController
- IBUINavigationItem
- IBUIToolbar
- IBUIViewController
IBUIWindow
@@ -45,7 +40,6 @@
{320, 480}
-
_NS:9
-
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
@@ -136,46 +70,6 @@
6
-
-
- buschJaegerCallView
-
-
-
- 23
-
-
-
- buschJaegerSettingsView
-
-
-
- 25
-
-
-
- navigationController
-
-
-
- 26
-
-
-
- buschJaegerMainView
-
-
-
- 24
-
-
-
- rootViewController
-
-
-
- 19
-
@@ -207,49 +101,6 @@
-
- 14
-
-
-
-
-
-
-
-
-
- 15
-
-
-
-
- 21
-
-
-
-
- 22
-
-
-
-
- 20
-
-
-
-
-
-
-
- 27
-
-
-
-
- 28
-
-
-
@@ -257,17 +108,7 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UIResponder
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- BuschJaegerMainView
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- BuschJaegerCallView
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- BuschJaegerSettingsView
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- BuschJaegerAppDelegate
+ LinphoneAppDelegate
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -280,196 +121,11 @@
- BuschJaegerAppDelegate
+ LinphoneAppDelegate
NSObject
-
- BuschJaegerCallView
- BuschJaegerMainView
- BuschJaegerSettingsView
- UINavigationController
- UIWindow
-
-
-
- buschJaegerCallView
- BuschJaegerCallView
-
-
- buschJaegerMainView
- BuschJaegerMainView
-
-
- buschJaegerSettingsView
- BuschJaegerSettingsView
-
-
- navigationController
- UINavigationController
-
-
- window
- UIWindow
-
-
IBProjectSource
- ./Classes/BuschJaegerAppDelegate.h
-
-
-
- BuschJaegerCallView
- UIViewController
-
- id
- id
-
-
-
- startCall:
- id
-
-
- takeCall:
- id
-
-
-
- UIHangUpButton
- UIHangUpButton
- UIDigitButton
- UIToggleButton
- UIDigitButton
- UIButton
- UIButton
- UIView
-
-
-
- decline
- UIHangUpButton
-
-
- endOrRejectCall
- UIHangUpButton
-
-
- lights
- UIDigitButton
-
-
- mute
- UIToggleButton
-
-
- openDoor
- UIDigitButton
-
-
- startCall
- UIButton
-
-
- takeCall
- UIButton
-
-
- videoView
- UIView
-
-
-
- IBProjectSource
- ./Classes/BuschJaegerCallView.h
-
-
-
- BuschJaegerMainView
- UIViewController
-
- settingsClick:
- id
-
-
- settingsClick:
-
- settingsClick:
- id
-
-
-
- settingsButton
- UIButton
-
-
- settingsButton
-
- settingsButton
- UIButton
-
-
-
- IBProjectSource
- ./Classes/BuschJaegerMainView.h
-
-
-
- BuschJaegerSettingsView
- UIViewController
-
- id
- id
-
-
-
- onBackClick:
- id
-
-
- onScanClick:
- id
-
-
-
- UIView
- UIView
-
-
-
- backButton
- UIView
-
-
- scanButton
- UIView
-
-
-
- IBProjectSource
- ./Classes/BuschJaegerSettingsView.h
-
-
-
- UIDigitButton
- UIButton
-
- IBProjectSource
- ./Classes/UIDigitButton.h
-
-
-
- UIHangUpButton
- UIButton
-
- IBProjectSource
- ./Classes/UIHangUpButton.h
-
-
-
- UIToggleButton
- UIButton
-
- IBProjectSource
- ./Classes/UIToggleButton.h
+ ./Classes/LinphoneAppDelegate.h
diff --git a/Classes/BuschJaegerAppDelegate.h b/Classes/BuschJaegerAppDelegate.h
deleted file mode 100644
index a6aa4976b..000000000
--- a/Classes/BuschJaegerAppDelegate.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* BuschJaegerAppDelegate.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
-#import "BuschJaegerMainView.h"
-#import "BuschJaegerCallView.h"
-#import "BuschJaegerSettingsView.h"
-#import "BuschJaegerConfigParser.h"
-
-@interface BuschJaegerAppDelegate : NSObject {
- @private
- UIWindow *window;
- BuschJaegerMainView* buschJaegerMainView;
- BuschJaegerCallView* buschJaegerCallView;
- BuschJaegerSettingsView* buschJaegerSettingsView;
- UINavigationController* navigationController;
- BuschJaegerConfigParser* configuration;
-}
-
-@property (nonatomic, retain) IBOutlet UIWindow *window;
-@property (nonatomic, retain) IBOutlet BuschJaegerMainView* buschJaegerMainView;
-@property (nonatomic, retain) IBOutlet BuschJaegerCallView* buschJaegerCallView;
-@property (nonatomic, retain) IBOutlet BuschJaegerSettingsView* buschJaegerSettingsView;
-@property (nonatomic, retain) IBOutlet UINavigationController* navigationController;
-@property (readonly) BuschJaegerConfigParser* configuration;
-
-+ (BuschJaegerAppDelegate*)instance;
-
-@end
diff --git a/Classes/BuschJaegerAppDelegate.m b/Classes/BuschJaegerAppDelegate.m
deleted file mode 100644
index 59aad8ce1..000000000
--- a/Classes/BuschJaegerAppDelegate.m
+++ /dev/null
@@ -1,148 +0,0 @@
-/* BuschJaegerAppDelegate.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 "BuschJaegerAppDelegate.h"
-
-@implementation BuschJaegerAppDelegate
-@synthesize window;
-@synthesize buschJaegerMainView;
-@synthesize buschJaegerCallView;
-@synthesize buschJaegerSettingsView;
-@synthesize navigationController;
-@synthesize configuration;
-
-- (id)init {
- self = [super init];
- if (self != nil) {
- configuration = [[BuschJaegerConfigParser alloc] init];
- }
- return self;
-}
-
-- (void)dealloc {
- [configuration release];
- [super dealloc];
-}
-
-- (void) loadDefaultSettings {
- NSString *settingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"];
- if(!settingsBundle) {
- NSLog(@"Could not find Settings.bundle");
- return;
- }
-
- NSMutableDictionary *rootSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Root.plist"]];
- NSMutableArray *preferences = [rootSettings objectForKey:@"PreferenceSpecifiers"];
- NSMutableDictionary *defaultsToRegister = [[NSMutableDictionary alloc] initWithCapacity:[preferences count]];
-
- NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
- @"YES", @"debugenable_preference",
- @"YES", @"enable_video_preference",
- @"YES", @"start_video_preference",
- @"YES", @"h264_preference",
- @"YES", @"vp8_preference",
- @"NO", @"mpeg4_preference",
- @"YES", @"pcmu_preference",
- @"YES", @"pcma_preference",
- @"tcp", @"transport_preference",
- @"NO", @"enable_srtp_preference",
- @"YES", @"backgroundmode_preference",
- @"YES", @"outbound_proxy_preference",
- nil];
-
- [defaultsToRegister addEntriesFromDictionary:appDefaults];
- [[NSUserDefaults standardUserDefaults] registerDefaults:defaultsToRegister];
- [defaultsToRegister release];
- [[NSUserDefaults standardUserDefaults] synchronize];
-
-}
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
- [[UIApplication sharedApplication] setStatusBarHidden:YES];
-
- [self loadDefaultSettings];
-
- /* explicitely instanciate LinphoneManager */
- LinphoneManager* lm = [[LinphoneManager alloc] init];
- assert(lm == [LinphoneManager instance]);
-
- [[LinphoneManager instance] startLibLinphone];
- [[LinphoneManager instance] setCallDelegate:self];
-
- [window addSubview:buschJaegerMainView.view];
- [window makeKeyAndVisible];
-
- [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound];
-
-
- linphone_core_set_device_rotation([LinphoneManager getLc], 0);
- linphone_core_set_video_device([LinphoneManager getLc], "DummyImage: Dummy (no) picture");
-
- linphone_core_set_ring([LinphoneManager getLc], NULL ); //so that we don't attempt to play ring by the core
- return YES;
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application {
- [buschJaegerCallView activateVideoView:FALSE];
- [[LinphoneManager instance] enterBackgroundMode];
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application {
- [[LinphoneManager instance] becomeActive];
- [buschJaegerCallView activateVideoView:TRUE];
-}
-
-+ (BuschJaegerAppDelegate*)instance {
- return (BuschJaegerAppDelegate *)[UIApplication sharedApplication].delegate;
-}
-
-- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
-
-}
-
-// UI changes
--(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [buschJaegerCallView displayDialerFromUI:viewCtrl forUser:username withDisplayName:displayName];
-}
--(void) displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [buschJaegerCallView displayCall:call InProgressFromUI:viewCtrl forUser:username withDisplayName:displayName];
-}
--(void) displayIncomingCall: (LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [buschJaegerCallView displayIncomingCall:call NotificationFromUI:viewCtrl forUser:username withDisplayName:displayName];
-}
--(void) displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [buschJaegerCallView displayInCall:call FromUI:viewCtrl forUser:username withDisplayName:displayName];
-}
--(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [buschJaegerCallView displayVideoCall:call FromUI:viewCtrl forUser:username withDisplayName:displayName];
-}
-
-//status reporting
--(void) displayStatus:(NSString*) message {
- [buschJaegerCallView displayStatus:message];
-}
-
--(void) displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [buschJaegerCallView displayAskToEnableVideoCall:call forUser:username withDisplayName:displayName];
-}
-
--(void) firstVideoFrameDecoded:(LinphoneCall*) call {
- [buschJaegerCallView firstVideoFrameDecoded:call];
-}
-
-@end
diff --git a/Classes/BuschJaegerCallView.h b/Classes/BuschJaegerCallView.h
index 55d58a35a..2da642e54 100644
--- a/Classes/BuschJaegerCallView.h
+++ b/Classes/BuschJaegerCallView.h
@@ -21,14 +21,13 @@
#import "linphonecore.h"
#import "UILinphone.h"
-#import "CallDelegate.h"
+#import "UIDigitButton.h"
+#import "UIHangUpButton.h"
#import "LinphoneManager.h"
#import "UILightButton.h"
#import "VideoZoomHandler.h"
-#define BJ_RING_FILE "01"
-
-@interface BuschJaegerCallView : UIViewController {
+@interface BuschJaegerCallView : UIViewController {
@private
UIView* videoView;
UIButton* startCall;
@@ -54,6 +53,5 @@
- (IBAction)takeCall:(id)sender;
- (IBAction)startCall:(id)sender;
-- (void)activateVideoView:(BOOL) value;
@end
diff --git a/Classes/BuschJaegerCallView.m b/Classes/BuschJaegerCallView.m
index 8c9b697a1..2a66efce0 100644
--- a/Classes/BuschJaegerCallView.m
+++ b/Classes/BuschJaegerCallView.m
@@ -42,6 +42,22 @@
#pragma mark - View lifecycle
+- (void)dealloc {
+ [videoView release];
+ [startCall release];
+ [takeCall release];
+ [decline release];
+ [endOrRejectCall release];
+ [mute release];
+ [lights release];
+ [openDoor release];
+
+ // Remove all observer
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+ [super dealloc];
+}
+
// 59x47
// 54
// 54 -> 67
@@ -50,9 +66,9 @@
- (void)viewDidLoad {
[super viewDidLoad];
- [openDoor initWithNumber:'1'];
- [lights initWithNumber:'2'];
- [mute initWithOnImage:[UIImage imageNamed:@"bj_mute_on.png"] offImage:[UIImage imageNamed:@"bj_mute_off.png"] debugName:"MUTE_BTN"];
+ [openDoor setDigit:'1'];
+ [lights setDigit:'2'];
+ [mute setImage:[UIImage imageNamed:@"bj_mute_on.png"] forState:UIControlStateHighlighted | UIControlStateSelected];
/* init gradients */
{
@@ -78,167 +94,133 @@
[BuschJaegerUtils createGradientForView:takeCall withTopColor:col1 bottomColor:col2];
}
+ linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView);
+ linphone_core_set_native_preview_window_id([LinphoneManager getLc],0);
+
videoZoomHandler = [[VideoZoomHandler alloc] init];
[videoZoomHandler setup:videoView];
}
-- (void)viewDidUnload
-{
+- (void)viewDidUnload {
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
-- (void)viewDidAppear:(BOOL)animated {
- [[LinphoneManager instance] setRegistrationDelegate:self];
+- (void)viewWillAppear:(BOOL)animated {
+ [super viewWillAppear:animated];
+
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
- [LinphoneManager set:startCall hidden:NO withName:"START_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:takeCall hidden:YES withName:"TAKE_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:mute hidden:NO withName:"MUTE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:decline hidden:YES withName:"DECLINE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:endOrRejectCall hidden:YES withName:"END_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:videoView hidden:YES withName:"VIDEO_VIEW" andReason:__FUNCTION__];
+ // Set observer
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(callUpdateEvent:)
+ name:kLinphoneCallUpdate
+ object:nil];
+ [startCall setHidden:NO];
+ [takeCall setHidden:YES];
+ [mute setHidden:NO];
+ [decline setHidden:YES];
+ [endOrRejectCall setHidden:YES];
+ [videoView setHidden:YES];
if (!chatRoom) {
NSString* s = [NSString stringWithFormat:@"sip:100000001@%@", [[NSUserDefaults standardUserDefaults] stringForKey:@"adapter_ip_preference"]];
const char* adapter = [s cStringUsingEncoding:[NSString defaultCStringEncoding]];
chatRoom = linphone_core_create_chat_room([LinphoneManager getLc], adapter);
- lights->chatRoom = chatRoom;
- openDoor->chatRoom = chatRoom;
+ //lights->chatRoom = chatRoom;
+ //openDoor->chatRoom = chatRoom;
}
+
+ // Update on show
+ LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
+ LinphoneCallState state = (call != NULL)?linphone_call_get_state(call): 0;
+ [self callUpdate:call state:state animated:FALSE];
}
-- (void)activateVideoView:(BOOL)value{
- if (value){
- linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView);
- }else{
- linphone_core_set_native_video_window_id([LinphoneManager getLc],0);
- linphone_core_set_native_preview_window_id([LinphoneManager getLc],0);
+- (void)vieWillDisappear:(BOOL)animated{
+ [super viewWillDisappear:animated];
+
+ // Remove observer
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:kLinphoneCallUpdate
+ object:nil];
+}
+
+
+#pragma mark - Event Functions
+
+- (void)callUpdateEvent: (NSNotification*) notif {
+ LinphoneCall *call = [[notif.userInfo objectForKey: @"call"] pointerValue];
+ LinphoneCallState state = [[notif.userInfo objectForKey: @"state"] intValue];
+ [self callUpdate:call state:state animated:TRUE];
+}
+
+
+#pragma mark -
+
+- (void)callUpdate:(LinphoneCall *)call state:(LinphoneCallState)state animated:(BOOL)animated {
+ // Fake call update
+ if(call == NULL) {
+ return;
}
-
-}
-
-- (void)viewDidDisappear:(BOOL)animated{
-}
-
-- (void)displayCall:(LinphoneCall *)call InProgressFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
- /* nothing */
- [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
-}
-
-- (void)displayDialerFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
- [LinphoneManager set:startCall hidden:NO withName:"START_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:takeCall hidden:YES withName:"TAKE_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:mute hidden:NO withName:"MUTE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:decline hidden:YES withName:"DECLINE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:endOrRejectCall hidden:YES withName:"END_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:videoView hidden:YES withName:"VIDEO_VIEW" andReason:__FUNCTION__];
-
- [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
-}
-
-- (void)displayInCall:(LinphoneCall *)call FromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
- [LinphoneManager set:startCall hidden:YES withName:"START_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:takeCall hidden:YES withName:"TAKE_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:mute hidden:NO withName:"MUTE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:decline hidden:YES withName:"DECLINE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:endOrRejectCall hidden:NO withName:"END_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:videoView hidden:NO withName:"VIDEO_VIEW" andReason:__FUNCTION__];
-}
-
-- (void)displayIncomingCall:(LinphoneCall *)call NotificationFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
- [LinphoneManager set:startCall hidden:YES withName:"START_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:takeCall hidden:NO withName:"TAKE_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:mute hidden:YES withName:"MUTE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:decline hidden:NO withName:"DECLINE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:endOrRejectCall hidden:YES withName:"END_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:videoView hidden:NO withName:"VIDEO_VIEW" andReason:__FUNCTION__];
-
- if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
- && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
- // Create a new notification
- UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease];
- if (notif)
+ switch (state) {
+ case LinphoneCallIncomingReceived:
{
- notif.repeatInterval = 0;
- notif.alertBody = NSLocalizedString(@" Ding Dong !",nil);
- notif.alertAction = @"See the answer";
- notif.soundName = @BJ_RING_FILE ".wav";
- NSData *callData = [NSData dataWithBytes:&call length:sizeof(call)];
- notif.userInfo = [NSDictionary dictionaryWithObject:callData forKey:@"call"];
-
- [[UIApplication sharedApplication] presentLocalNotificationNow:notif];
+ [self displayIncomingCall:call];
}
- }else{
- NSBundle* myBundle = [NSBundle mainBundle];
-
- NSString* path = [myBundle pathForResource:@BJ_RING_FILE ofType:@"wav"];
- if (path) {
- const char* soundfile = [path cStringUsingEncoding:[NSString defaultCStringEncoding]];
- ms_message("Using '%s' as ring file", soundfile);
- SystemSoundID sid;
- NSURL *pathURL = [NSURL fileURLWithPath : path];
- NSError *setCategoryError = nil;
- [[AVAudioSession sharedInstance]
- setCategory: AVAudioSessionCategoryAmbient
- error: &setCategoryError];
- //redirect audio to speaker
- UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
- AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
- , sizeof (audioRouteOverride)
- , &audioRouteOverride);
-
- AudioServicesCreateSystemSoundID((CFURLRef) pathURL, &sid);
- AudioServicesPlaySystemSound(sid);
+ case LinphoneCallOutgoingInit:
+ case LinphoneCallConnected:
+ case LinphoneCallStreamsRunning:
+ case LinphoneCallUpdated:
+ {
+ //check video
+ if (linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
+ [self displayVideoCall];
+ } else {
+ [self displayInCall];
+ }
+ break;
}
-
- }
-
- linphone_call_enable_camera(call, FALSE);
-}
-
-- (void)displayVideoCall:(LinphoneCall *)call FromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
- [LinphoneManager set:startCall hidden:YES withName:"START_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:takeCall hidden:YES withName:"TAKE_CALL_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:mute hidden:NO withName:"MUTE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:decline hidden:YES withName:"DECLINE_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:endOrRejectCall hidden:NO withName:"END_BTN" andReason:__FUNCTION__];
- [LinphoneManager set:videoView hidden:NO withName:"VIDEO_VIEW" andReason:__FUNCTION__];
-
-}
-
-- (void)displayStatus:(NSString *)message {
+ default:
+ break;
+ }
}
-- (void)displayNotRegisteredFromUI:(UIViewController *)viewCtrl {
-
+- (void)displayIncomingCall:(LinphoneCall *)call {
+ [startCall setHidden:YES];
+ [takeCall setHidden:NO];
+ [mute setHidden:YES];
+ [decline setHidden:NO];
+ [endOrRejectCall setHidden:YES];
+ [videoView setHidden:NO];
}
-- (void)displayRegisteredFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName onDomain:(NSString *)domain {
-
+- (void)displayInCall {
+ [startCall setHidden:YES];
+ [takeCall setHidden:YES];
+ [mute setHidden:NO];
+ [decline setHidden:YES];
+ [endOrRejectCall setHidden:NO];
+ [videoView setHidden:NO];
}
-- (void)displayRegisteringFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName onDomain:(NSString *)domain {
-
-}
-
-- (void)displayRegistrationFailedFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName onDomain:(NSString *)domain forReason:(NSString *)reason {
-
-}
-
-- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas {
-
+- (void)displayVideoCall {
+ [startCall setHidden:YES];
+ [takeCall setHidden:YES];
+ [mute setHidden:NO];
+ [decline setHidden:YES];
+ [endOrRejectCall setHidden:NO];
+ [videoView setHidden:NO];
}
- (IBAction)takeCall:(id)sender {
@@ -270,16 +252,4 @@
linphone_call_params_destroy(lcallParams);
}
--(void)displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName {
-
-}
-
--(void)firstVideoFrameDecoded:(LinphoneCall*) call {
-
-}
-
-- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType) type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void*) datas {
-
-}
-
@end
diff --git a/Classes/BuschJaegerCallView.xib b/Classes/BuschJaegerCallView.xib
index ba1fb86f8..b7f3dd18e 100644
--- a/Classes/BuschJaegerCallView.xib
+++ b/Classes/BuschJaegerCallView.xib
@@ -160,10 +160,14 @@
-
+
NSImage
bj_mute_on.png
+
+ NSImage
+ bj_mute_off.png
+
@@ -173,6 +177,7 @@
{{207, 0}, {73, 58}}
+
_NS:225
NO
@@ -490,7 +495,7 @@
IBBuiltInLabel-Red
UIMuteButton
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
+
IBBuiltInLabel-Red
@@ -569,7 +574,18 @@
UIDigitButton
- UIButton
+ UILongTouchButton
+
+ addressField
+ UITextField
+
+
+ addressField
+
+ addressField
+ UITextField
+
+
IBProjectSource
./Classes/UIDigitButton.h
@@ -584,11 +600,11 @@
- UIMuteButton
- UIToggleButton
+ UILongTouchButton
+ UIButton
IBProjectSource
- ./Classes/UIMuteButton.h
+ ./Classes/UILongTouchButton.h
@@ -616,6 +632,7 @@
{160, 98}
{160, 98}
{160, 98}
+ {160, 98}
{160, 98}
{160, 98}
{16, 16}
diff --git a/Classes/BuschJaegerMainView.h b/Classes/BuschJaegerMainView.h
index 7ffbe37f6..4dfce830f 100644
--- a/Classes/BuschJaegerMainView.h
+++ b/Classes/BuschJaegerMainView.h
@@ -19,12 +19,19 @@
#import
+#import "BuschJaegerCallView.h"
+#import "BuschJaegerSettingsView.h"
+#import "BuschJaegerWelcomeView.h"
+
@interface BuschJaegerMainView : UIViewController {
- UIButton* settingsButton;
+
}
-@property (nonatomic, retain) IBOutlet UIButton* settingsButton;
+@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
+@property (nonatomic, retain) IBOutlet BuschJaegerCallView *callView;
+@property (nonatomic, retain) IBOutlet BuschJaegerSettingsView *settingsView;
+@property (nonatomic, retain) IBOutlet BuschJaegerWelcomeView *welcomeView;
-- (IBAction)settingsClick:(id)sender;
++ (BuschJaegerMainView*) instance;
@end
diff --git a/Classes/BuschJaegerMainView.m b/Classes/BuschJaegerMainView.m
index 7c1bc6a65..a464514a7 100644
--- a/Classes/BuschJaegerMainView.m
+++ b/Classes/BuschJaegerMainView.m
@@ -18,15 +18,157 @@
*/
#import "BuschJaegerMainView.h"
-#import "BuschJaegerAppDelegate.h"
@implementation BuschJaegerMainView
-@synthesize settingsButton;
+@synthesize navigationController;
+@synthesize callView;
+@synthesize settingsView;
+@synthesize welcomeView;
-- (IBAction)settingsClick:(id)sender {
- BuschJaegerAppDelegate *delegate = [BuschJaegerAppDelegate instance];
- [delegate.navigationController pushViewController:delegate.buschJaegerSettingsView animated:TRUE];
+static BuschJaegerMainView* mainViewInstance=nil;
+
+
+#pragma mark - Lifecycle Functions
+
+- (void)initBuschJaegerMainView {
+ assert (!mainViewInstance);
+ mainViewInstance = self;
}
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initBuschJaegerMainView];
+ }
+ return self;
+}
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ [self initBuschJaegerMainView];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initBuschJaegerMainView];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [callView release];
+ [settingsView release];
+ [welcomeView release];
+
+ // Remove all observer
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+ [super dealloc];
+}
+
+
+#pragma mark - ViewController Functions
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ UIView *view = navigationController.view;
+ [view setFrame:[self.view bounds]];
+ [self.view addSubview:view];
+ [navigationController pushViewController:welcomeView animated:FALSE];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+ [super viewWillAppear:animated];
+
+ // Set observer
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(callUpdateEvent:)
+ name:kLinphoneCallUpdate
+ object:nil];
+}
+
+- (void)vieWillDisappear:(BOOL)animated{
+ [super viewWillDisappear:animated];
+
+ // Remove observer
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:kLinphoneCallUpdate
+ object:nil];
+}
+
+
+#pragma mark - Event Functions
+
+- (void)callUpdateEvent: (NSNotification*) notif {
+ LinphoneCall *call = [[notif.userInfo objectForKey: @"call"] pointerValue];
+ LinphoneCallState state = [[notif.userInfo objectForKey: @"state"] intValue];
+ [self callUpdate:call state:state animated:TRUE];
+}
+
+
+#pragma mark -
+
+- (void)callUpdate:(LinphoneCall *)call state:(LinphoneCallState)state animated:(BOOL)animated {
+ // Fake call update
+ if(call == NULL) {
+ return;
+ }
+
+ switch (state) {
+ case LinphoneCallIncomingReceived:
+ {
+ [self displayIncomingCall:call];
+ }
+ default:
+ break;
+ }
+}
+
+- (void)displayIncomingCall:(LinphoneCall *)call {
+ if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
+ && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
+ // Create a new notification
+ UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease];
+ if (notif)
+ {
+ notif.repeatInterval = 0;
+ notif.alertBody = NSLocalizedString(@"Ding Dong !",nil);
+ notif.alertAction = @"See the answer";
+ notif.soundName = @"01.wav";
+ NSData *callData = [NSData dataWithBytes:&call length:sizeof(call)];
+ notif.userInfo = [NSDictionary dictionaryWithObject:callData forKey:@"call"];
+
+ [[UIApplication sharedApplication] presentLocalNotificationNow:notif];
+ }
+ }else{
+ NSError *setCategoryError = nil;
+ [[AVAudioSession sharedInstance]
+ setCategory: AVAudioSessionCategoryAmbient
+ error: &setCategoryError];
+ //redirect audio to speaker
+ UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
+ AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
+ , sizeof (audioRouteOverride)
+ , &audioRouteOverride);
+
+ AudioServicesPlaySystemSound([LinphoneManager instance].sounds.call);
+ }
+
+ [navigationController popToRootViewControllerAnimated:FALSE];
+ [navigationController pushViewController:callView animated:TRUE];
+
+ linphone_call_enable_camera(call, FALSE);
+}
+
++ (BuschJaegerMainView *) instance {
+ return mainViewInstance;
+}
+
+
@end
diff --git a/Classes/BuschJaegerMainView.xib b/Classes/BuschJaegerMainView.xib
index 16de5fb54..f9c0e37a3 100644
--- a/Classes/BuschJaegerMainView.xib
+++ b/Classes/BuschJaegerMainView.xib
@@ -12,9 +12,11 @@
IBProxyObject
- IBUIButton
- IBUILabel
+ IBUINavigationBar
+ IBUINavigationController
+ IBUINavigationItem
IBUIView
+ IBUIViewController
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -32,95 +34,84 @@
IBFirstResponder
IBCocoaTouchFramework
-
-
- 274
-
-
-
- 292
- {{20, 20}, {245, 50}}
-
-
-
- _NS:9
- NO
- YES
- 7
- NO
+
+ BuschJaegerCallView
+
+
+ 1
+ 1
+
+ IBCocoaTouchFramework
+ NO
+
+
+ BuschJaegerWelcomeView
+
+
+ 1
+ 1
+
+ IBCocoaTouchFramework
+ NO
+
+
+ BuschJaegerSettingsView
+
+
+ 1
+ 1
+
+ IBCocoaTouchFramework
+ NO
+
+
+
+
+ 1
+ 1
+
+ YES
+ IBCocoaTouchFramework
+ NO
+
+
+ 256
+ {0, 0}
+ _NS:15
+ IBCocoaTouchFramework
+
+
+
+
+
+ Root View Controller
+ IBCocoaTouchFramework
+
+
+
+ 1
+ 1
+
IBCocoaTouchFramework
- Welcome
-
- 1
- MSAxIDEAA
-
- 1
-
-
-
- 0
- 10
-
- 1
- 38
-
-
- Helvetica
- 38
- 16
-
-
-
-
- 292
- {{236, 13}, {64, 64}}
-
-
- _NS:9
- NO
- IBCocoaTouchFramework
- 0
- 0
- 10
- 10
- 10
- 10
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
- 3
- MC41AA
-
-
- NSImage
- bj_settings.png
-
-
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
+ NO
- {{0, 20}, {320, 460}}
+ YES
+
+
+
+ 292
+ {320, 460}
-
+ _NS:9
3
- MAA
+ MQA
+
+ 2
+
-
IBCocoaTouchFramework
@@ -128,28 +119,43 @@
- view
+ callView
-
+
- 3
+ 11
- settingsButton
+ settingsView
-
+
- 6
+ 12
-
- settingsClick:
-
-
- 7
+
+ welcomeView
+
+
- 7
+ 13
+
+
+
+ navigationController
+
+
+
+ 20
+
+
+
+ view
+
+
+
+ 22
@@ -160,15 +166,6 @@
-
- 1
-
-
-
-
-
-
-
-1
@@ -181,15 +178,52 @@
- 4
-
-
+ 9
+
+
- 5
-
-
- Button - Settings
+ 10
+
+
+
+
+ 6
+
+
+
+
+
+ 16
+
+
+
+
+
+
+
+
+ 17
+
+
+
+
+ 18
+
+
+
+
+
+
+
+ 19
+
+
+
+
+ 21
+
+
@@ -198,20 +232,162 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UIResponder
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ BuschJaegerCallView
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ BuschJaegerWelcomeView
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ BuschJaegerSettingsView
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 7
+ 22
+
+ BuschJaegerCallView
+ UIViewController
+
+ id
+ id
+
+
+
+ startCall:
+ id
+
+
+ takeCall:
+ id
+
+
+
+ UIHangUpButton
+ UIHangUpButton
+ UIDigitButton
+ UIToggleButton
+ UIDigitButton
+ UIButton
+ UIButton
+ UIView
+
+
+
+ decline
+ UIHangUpButton
+
+
+ endOrRejectCall
+ UIHangUpButton
+
+
+ lights
+ UIDigitButton
+
+
+ mute
+ UIToggleButton
+
+
+ openDoor
+ UIDigitButton
+
+
+ startCall
+ UIButton
+
+
+ takeCall
+ UIButton
+
+
+ videoView
+ UIView
+
+
+
+ IBProjectSource
+ ./Classes/BuschJaegerCallView.h
+
+
BuschJaegerMainView
+ UINavigationController
+
+ BuschJaegerCallView
+ BuschJaegerSettingsView
+ BuschJaegerWelcomeView
+
+
+
+ callView
+ BuschJaegerCallView
+
+
+ settingsView
+ BuschJaegerSettingsView
+
+
+ welcomeView
+ BuschJaegerWelcomeView
+
+
+
+ IBProjectSource
+ ./Classes/BuschJaegerMainView.h
+
+
+
+ BuschJaegerSettingsView
+ UIViewController
+
+ id
+ id
+
+
+
+ onBackClick:
+ id
+
+
+ onScanClick:
+ id
+
+
+
+ UIView
+ UIView
+ UIView
+
+
+
+ backButton
+ UIView
+
+
+ scanButton
+ UIView
+
+
+ waitView
+ UIView
+
+
+
+ IBProjectSource
+ ./Classes/BuschJaegerSettingsView.h
+
+
+
+ BuschJaegerWelcomeView
UIViewController
settingsClick:
@@ -237,7 +413,50 @@
IBProjectSource
- ./Classes/BuschJaegerMainView.h
+ ./Classes/BuschJaegerWelcomeView.h
+
+
+
+ UIDigitButton
+ UILongTouchButton
+
+ addressField
+ UITextField
+
+
+ addressField
+
+ addressField
+ UITextField
+
+
+
+ IBProjectSource
+ ./Classes/UIDigitButton.h
+
+
+
+ UIHangUpButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UIHangUpButton.h
+
+
+
+ UILongTouchButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UILongTouchButton.h
+
+
+
+ UIToggleButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UIToggleButton.h
@@ -250,10 +469,6 @@
YES
3
-
- bj_settings.png
- {128, 128}
-
1498
diff --git a/Classes/BuschJaegerSettingsView.m b/Classes/BuschJaegerSettingsView.m
index 8be61c214..d2e508b34 100644
--- a/Classes/BuschJaegerSettingsView.m
+++ b/Classes/BuschJaegerSettingsView.m
@@ -19,7 +19,7 @@
#import "BuschJaegerSettingsView.h"
#import "BuschJaegerUtils.h"
-#import "BuschJaegerAppDelegate.h"
+#import "BuschJaegerMainView.h"
@implementation BuschJaegerSettingsView
@@ -79,7 +79,7 @@
}
- (IBAction)onBackClick:(id)sender {
- [[BuschJaegerAppDelegate instance].navigationController popViewControllerAnimated:TRUE];
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:TRUE];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
@@ -87,10 +87,10 @@
if(zbs != nil) {
BOOL handled = FALSE;
for(ZBarSymbol *symbol in zbs) {
- if([[[BuschJaegerAppDelegate instance] configuration] parseQRCode:[symbol data] delegate:self]) {
+ /*if([[[LinphoneManager instance] configuration] parseQRCode:[symbol data] delegate:self]) {
handled = TRUE;
[waitView setHidden:FALSE];
- }
+ }*/
}
if(handled) {
[self dismissModalViewControllerAnimated:TRUE];
diff --git a/Classes/BuschJaegerWelcomeView.h b/Classes/BuschJaegerWelcomeView.h
new file mode 100644
index 000000000..fd77af458
--- /dev/null
+++ b/Classes/BuschJaegerWelcomeView.h
@@ -0,0 +1,30 @@
+/* BuschJaegerWelcomeView.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
+
+@interface BuschJaegerWelcomeView : UIViewController {
+ UIButton* settingsButton;
+}
+
+@property (nonatomic, retain) IBOutlet UIButton* settingsButton;
+
+- (IBAction)settingsClick:(id)sender;
+
+@end
diff --git a/Classes/BuschJaegerWelcomeView.m b/Classes/BuschJaegerWelcomeView.m
new file mode 100644
index 000000000..d52729c1e
--- /dev/null
+++ b/Classes/BuschJaegerWelcomeView.m
@@ -0,0 +1,31 @@
+/* BuschJaegerWelcomeView.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 "BuschJaegerWelcomeView.h"
+#import "BuschJaegerMainView.h"
+
+@implementation BuschJaegerWelcomeView
+
+@synthesize settingsButton;
+
+- (IBAction)settingsClick:(id)sender {
+ [[BuschJaegerMainView instance].navigationController pushViewController:[BuschJaegerMainView instance].settingsView animated:TRUE];
+}
+
+@end
diff --git a/Classes/StatusSubViewController.xib b/Classes/BuschJaegerWelcomeView.xib
similarity index 52%
rename from Classes/StatusSubViewController.xib
rename to Classes/BuschJaegerWelcomeView.xib
index 9ce474c3b..7ade9762b 100644
--- a/Classes/StatusSubViewController.xib
+++ b/Classes/BuschJaegerWelcomeView.xib
@@ -1,21 +1,20 @@
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
+ 1296
+ 11E53
+ 2549
+ 1138.47
+ 569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
+ 1498
- IBUIImageView
- IBUIActivityIndicatorView
- IBUIView
- IBUILabel
IBProxyObject
+ IBUIButton
+ IBUILabel
+ IBUIView
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -33,113 +32,125 @@
IBFirstResponder
IBCocoaTouchFramework
-
+
- 292
+ 274
-
-
- -2147483356
- {{0, -1}, {25, 23}}
-
+
+
+ 292
+ {{20, 20}, {245, 50}}
+
-
- _NS:567
- NO
- IBCocoaTouchFramework
-
- NSImage
- status_gray.png
-
-
-
-
- -2147483356
- {{0, 1}, {20, 20}}
-
-
-
- _NS:1030
- NO
- IBCocoaTouchFramework
- 2
-
-
-
- -2147483356
- {{28, 0}, {280, 21}}
-
-
- _NS:328
+
+ _NS:9
NO
YES
7
NO
IBCocoaTouchFramework
- CARAMBA
+ Welcome
- 3
- MC42NjY2NjY2NjY3AA
+ 1
+ MSAxIDEAA
+
+ 1
+
- 1
+ 0
10
1
- 17
+ 38
Helvetica
- 17
+ 38
+ 16
+
+
+
+
+ 292
+ {{236, 13}, {64, 64}}
+
+
+
+ _NS:9
+ NO
+ IBCocoaTouchFramework
+ 0
+ 0
+ 10
+ 10
+ 10
+ 10
+
+ 3
+ MQA
+
+
+ 1
+ MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
+
+
+ 3
+ MC41AA
+
+
+ NSImage
+ bj_settings.png
+
+
+ 2
+ 15
+
+
+ Helvetica-Bold
+ 15
16
- {255, 23}
+ {{0, 20}, {320, 460}}
-
- _NS:196
+
3
- MCAwAA
+ MAA
+
IBCocoaTouchFramework
-
-
- image
-
-
-
- 8
-
-
-
- label
-
-
-
- 9
-
-
-
- spinner
-
-
-
- 10
-
view
-
+
- 11
+ 3
+
+
+
+ settingsButton
+
+
+
+ 6
+
+
+
+ settingsClick:
+
+
+ 7
+
+ 7
@@ -150,6 +161,15 @@
+
+ 1
+
+
+
+
+
+
+
-1
@@ -163,90 +183,66 @@
4
-
-
-
-
-
-
-
- status_view
-
-
- 7
-
-
- status_spin
-
-
- 6
-
-
- status_label
+
+
5
-
-
- status_image
+
+
+ Button - Settings
- StatusSubViewController
+ BuschJaegerWelcomeView
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UIResponder
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 11
+ 7
- StatusSubViewController
- UIViewController
-
- UIImageView
- UILabel
- UIActivityIndicatorView
-
-
-
- image
- UIImageView
+ BuschJaegerWelcomeView
+
+ settingsClick:
+ id
+
+
+ settingsClick:
+
+ settingsClick:
+ id
-
- label
- UILabel
-
-
- spinner
- UIActivityIndicatorView
-
-
+
IBProjectSource
- ./Classes/StatusSubViewController.h
+ ./Classes/BuschJaegerWelcomeView.h
0
IBCocoaTouchFramework
+
+ com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
+
+
YES
3
- status_gray.png
- {25, 23}
+ bj_settings.png
+ {55, 57}
- 933
+ 1498
diff --git a/Classes/CallHistoryTableViewController.m b/Classes/CallHistoryTableViewController.m
deleted file mode 100644
index 72633984f..000000000
--- a/Classes/CallHistoryTableViewController.m
+++ /dev/null
@@ -1,253 +0,0 @@
-/* CallHistoryTableViewController.m
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#import "CallHistoryTableViewController.h"
-#import "LinphoneManager.h"
-
-
-@implementation CallHistoryTableViewController
-
-@synthesize clear;
-
-/*
-- (id)initWithStyle:(UITableViewStyle)style {
- // Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- if (self = [super initWithStyle:style]) {
- }
- return self;
-}
-*/
-
-
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- UIBarButtonItem* clearButton = [[UIBarButtonItem alloc]
- initWithBarButtonSystemItem:UIBarButtonSystemItemTrash
- target:self
- action:@selector(doAction:)];
- [self.navigationItem setRightBarButtonItem:clearButton];
- [clearButton release];
-}
-
-/*
-- (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-}
-*/
-/*
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
-
-}
-*/
-/*
-- (void)viewWillDisappear:(BOOL)animated {
- [super viewWillDisappear:animated];
-}
-*/
-/*
-- (void)viewDidDisappear:(BOOL)animated {
- [super viewDidDisappear:animated];
-}
-*/
-
-/*
-// Override to allow orientations other than the default portrait orientation.
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-*/
-
-- (void)didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-
--(void) doAction:(id)sender {
- linphone_core_clear_call_logs([LinphoneManager getLc]);
- [self.tableView reloadData];
-}
-
-#pragma mark Table view methods
-
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 1;
-}
-
-
-// Customize the number of rows in the table view.
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
- return ms_list_size(logs);
-}
-
-
-// Customize the appearance of table view cells.
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
- static NSString *CellIdentifier = @"Cell";
-
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
- [cell.textLabel setTextColor:[UIColor colorWithRed:0.7 green:0.745 blue:0.78 alpha:1.0]];
- [cell.detailTextLabel setTextColor:cell.textLabel.textColor];
- }
-
- // Set up the cell...
- LinphoneAddress* partyToDisplay;
- const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
- LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
-
- NSString *path;
- if (callLogs->dir == LinphoneCallIncoming) {
- if (callLogs->status == LinphoneCallSuccess) {
- path = [[NSBundle mainBundle] pathForResource:callLogs->video_enabled?@"in_call_video":@"in_call" ofType:@"png"];
- } else {
- //missed call
- path = [[NSBundle mainBundle] pathForResource:@"missed_call" ofType:@"png"];
- }
- partyToDisplay=callLogs->from;
-
- } else {
- path = [[NSBundle mainBundle] pathForResource:callLogs->video_enabled?@"out_call_video":@"out_call" ofType:@"png"];
- partyToDisplay=callLogs->to;
-
- }
- UIImage *image = [UIImage imageWithContentsOfFile:path];
- cell.imageView.image = image;
- cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
-
- const char* username = linphone_address_get_username(partyToDisplay)!=0?linphone_address_get_username(partyToDisplay):"";
- const char* displayName = linphone_address_get_display_name(partyToDisplay);
-
- if (displayName) {
- NSString* str1 = [NSString stringWithFormat:@"%s", displayName];
- [cell.textLabel setText:str1];
- NSString* str2 = [NSString stringWithFormat:@"%s"/* [%s]"*/,username/*,callLogs->start_date*/];
- [cell.detailTextLabel setText:str2];
- } else {
- NSString* str1 = [NSString stringWithFormat:@"%s", username];
- [cell.textLabel setText:str1];
- [cell.detailTextLabel setText:nil];
- }
-
- return cell;
-}
-
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- // Navigation logic may go here. Create and push another view controller.
- // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
- // [self.navigationController pushViewController:anotherViewController];
- // [anotherViewController release];
- [tableView deselectRowAtIndexPath:indexPath animated:NO];
-
- const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
- LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
- LinphoneAddress* partyToCall;
- if (callLogs->dir == LinphoneCallIncoming) {
- partyToCall=callLogs->from;
-
- } else {
- partyToCall=callLogs->to;
-
- }
- const char* username = linphone_address_get_username(partyToCall)!=0?linphone_address_get_username(partyToCall):"";
- const char* displayName = linphone_address_get_display_name(partyToCall)!=0?linphone_address_get_display_name(partyToCall):"";
- const char* domain = linphone_address_get_domain(partyToCall);
-
- LinphoneProxyConfig* proxyCfg;
- linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
-
- NSString* phoneNumber;
-
- if (proxyCfg && (strcmp(domain, linphone_proxy_config_get_domain(proxyCfg)) == 0)) {
- phoneNumber = [[NSString alloc] initWithCString:username encoding:[NSString defaultCStringEncoding]];
- } else {
- phoneNumber = [[NSString alloc] initWithCString:linphone_address_as_string_uri_only(partyToCall) encoding:[NSString defaultCStringEncoding]];
- }
-
- NSString* dispName = [[NSString alloc] initWithCString:displayName encoding:[NSString defaultCStringEncoding]];
-
- [[LinphoneManager instance].callDelegate displayDialerFromUI:self
- forUser:phoneNumber
- withDisplayName:dispName];
- [phoneNumber release];
- [dispName release];
-}
-
-
-/*
-// Override to support conditional editing of the table view.
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
- // Return NO if you do not want the specified item to be editable.
- return YES;
-}
-*/
-
-
-/*
-// Override to support editing the table view.
-- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-
- if (editingStyle == UITableViewCellEditingStyleDelete) {
- // Delete the row from the data source
- [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
- }
- else if (editingStyle == UITableViewCellEditingStyleInsert) {
- // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
- }
-}
-*/
-
-
-/*
-// Override to support rearranging the table view.
-- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
-}
-*/
-
-
-/*
-// Override to support conditional rearranging of the table view.
-- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
- // Return NO if you do not want the item to be re-orderable.
- return YES;
-}
-*/
-
-
-- (void)dealloc {
- [super dealloc];
-}
-
-
-@end
-
diff --git a/Classes/CallHistoryTableViewController.xib b/Classes/CallHistoryTableViewController.xib
deleted file mode 100644
index ceb06857e..000000000
--- a/Classes/CallHistoryTableViewController.xib
+++ /dev/null
@@ -1,201 +0,0 @@
-
-
-
- 784
- 9L31a
- 680
- 949.54
- 353.00
-
- YES
-
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- YES
-
- YES
-
-
- YES
-
-
-
- YES
-
- IBFilesOwner
-
-
- IBFirstResponder
-
-
-
- 292
- {320, 460}
-
-
- 3
- MQA
-
- NO
- YES
- NO
-
- NO
- 1
- 0
- YES
- 4.400000e+01
- 4.400000e+01
- 2.200000e+01
-
-
-
-
- YES
-
-
- view
-
-
-
- 5
-
-
-
- dataSource
-
-
-
- 6
-
-
-
- delegate
-
-
-
- 7
-
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- -1
-
-
- RmlsZSdzIE93bmVyA
-
-
- -2
-
-
-
-
- 4
-
-
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -2.CustomClassName
- 4.IBEditorWindowLastContentRect
- 4.IBPluginDependency
-
-
- YES
- CallHistoryTableViewController
- UIResponder
- {{163, 500}, {320, 480}}
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
- YES
-
-
- YES
-
-
-
-
- YES
-
- YES
-
-
- YES
-
-
-
- 13
-
-
-
- YES
-
- CallHistoryTableViewController
- GenericTabViewController
-
- doAction:
- id
-
-
- clear
- UIButton
-
-
- IBProjectSource
- Classes/CallHistoryTableViewController.h
-
-
-
- GenericTabViewController
- UITableViewController
-
- YES
-
- YES
- header
- linphoneDelegate
- phoneControllerDelegate
-
-
- YES
- UIView
- id
- id
-
-
-
- IBProjectSource
- Classes/GenericTabViewController.h
-
-
-
-
- 0
- ../linphone.xcodeproj
- 3
- 3.1
-
-
diff --git a/Classes/ConferenceCallDetailCell.xib b/Classes/ConferenceCallDetailCell.xib
deleted file mode 100644
index 1a406056a..000000000
--- a/Classes/ConferenceCallDetailCell.xib
+++ /dev/null
@@ -1,257 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- IBUITableViewCell
- IBUIImageView
- IBUILabel
- IBProxyObject
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
-
- 292
-
-
-
- 256
-
-
-
- 292
- {80, 80}
-
-
-
- _NS:567
- 1
- NO
- IBCocoaTouchFramework
-
-
-
- 274
- {{80, 0}, {212, 80}}
-
-
-
- _NS:328
- NO
- YES
- 7
- 2
- NO
- IBCocoaTouchFramework
- Texte de test
-
- 1
- MCAwIDAAA
-
-
- 1
- 10
-
- 1
- 40
-
-
- Helvetica
- 40
- 16
-
-
-
-
- 292
- {{292, 26}, {28, 28}}
-
-
-
- _NS:567
- 3
- NO
- IBCocoaTouchFramework
-
-
- {320, 79}
-
-
-
- _NS:395
-
- 3
- MCAwAA
-
- NO
- YES
- 4
- YES
- IBCocoaTouchFramework
-
-
- {320, 80}
-
-
-
- _NS:384
- IBCocoaTouchFramework
-
- ConferenceDetailCellIdentifier
-
-
-
-
-
-
-
- conferenceDetailCell
-
-
-
- 7
-
-
-
-
-
- 0
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 3
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
- 8
-
-
-
-
- 6
-
-
-
-
-
-
- ConferenceCallDetailView
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
-
-
- 8
-
-
-
-
- ConferenceCallDetailView
- UIViewController
-
- UIButton
- UIButton
- UITableViewCell
- UIButton
- UIButton
- UIButton
- UITableView
-
-
-
- addCall
- UIButton
-
-
- back
- UIButton
-
-
- conferenceDetailCell
- UITableViewCell
-
-
- hangup
- UIButton
-
-
- mute
- UIButton
-
-
- speaker
- UIButton
-
-
- table
- UITableView
-
-
-
- IBProjectSource
- ./Classes/ConferenceCallDetailView.h
-
-
-
-
- 0
- IBCocoaTouchFramework
- YES
- 3
- 933
-
-
diff --git a/Classes/ConferenceCallDetailView-ipad.xib b/Classes/ConferenceCallDetailView-ipad.xib
deleted file mode 100644
index 57f2d7412..000000000
--- a/Classes/ConferenceCallDetailView-ipad.xib
+++ /dev/null
@@ -1,479 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- IBUIButton
- IBUITableView
- IBUIView
- IBProxyObject
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
-
- IBFilesOwner
- IBIPadFramework
-
-
- IBFirstResponder
- IBIPadFramework
-
-
-
- 274
-
-
-
- 274
- {768, 872}
-
-
-
- _NS:418
-
- 3
- MCAwAA
-
- YES
- IBIPadFramework
- YES
- 0
- NO
- YES
- 44
- 22
- 22
-
-
-
- 292
- {{224, 874}, {107, 66}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
- 3
- MC41AA
-
-
- NSImage
- effacer.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 292
- {{437, 873}, {107, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- HP_inverse.png
-
-
- NSImage
- HP.png
-
-
- 2
- 2
-
-
- Helvetica-Bold
- 18
- 16
-
-
-
-
- 292
- {{224, 938}, {320, 66}}
-
-
-
-
- 1
- MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- stopcall-red.png
-
-
- NSImage
- clavier-01-106px.png
-
-
-
-
-
-
- 292
- {{331, 873}, {106, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- mic_active.png
-
-
- NSImage
- micro_inverse.png
-
-
- NSImage
- micro.png
-
-
-
-
-
- {{0, 20}, {768, 1004}}
-
-
-
-
- 3
- MC42NjY2NjY2NjY3AA
-
-
- 2
-
- IBIPadFramework
-
-
-
-
-
-
- back
-
-
-
- 8
-
-
-
- hangup
-
-
-
- 9
-
-
-
- mute
-
-
-
- 10
-
-
-
- speaker
-
-
-
- 11
-
-
-
- table
-
-
-
- 12
-
-
-
- view
-
-
-
- 13
-
-
-
- dataSource
-
-
-
- 14
-
-
-
- delegate
-
-
-
- 15
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 3
-
-
- Erase
-
-
- 4
-
-
- speaker
-
-
- 5
-
-
-
-
- 6
-
-
- end
-
-
- 7
-
-
- mute
-
-
-
-
- ConferenceCallDetailView
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIEraseButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UISpeakerButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
-
-
-
- 15
-
-
-
-
- ConferenceCallDetailView
- UIViewController
-
- UIButton
- UIButton
- UITableViewCell
- UIButton
- UIButton
- UIButton
- UITableView
-
-
-
- addCall
- UIButton
-
-
- back
- UIButton
-
-
- conferenceDetailCell
- UITableViewCell
-
-
- hangup
- UIButton
-
-
- mute
- UIButton
-
-
- speaker
- UIButton
-
-
- table
- UITableView
-
-
-
- IBProjectSource
- ./Classes/ConferenceCallDetailView.h
-
-
-
- UIEraseButton
- UIButton
-
- IBProjectSource
- ./Classes/UIEraseButton.h
-
-
-
- UIHangUpButton
- UIButton
-
- IBProjectSource
- ./Classes/UIHangUpButton.h
-
-
-
- UIMuteButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UIMuteButton.h
-
-
-
- UISpeakerButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UISpeakerButton.h
-
-
-
- UIToggleButton
- UIButton
-
- IBProjectSource
- ./Classes/UIToggleButton.h
-
-
-
-
- 0
- IBIPadFramework
- YES
- 3
-
- {107, 67}
- {107, 67}
- {106, 60}
- {66, 65}
- {20, 20}
- {107, 67}
- {107, 67}
- {62, 54}
-
- 933
-
-
diff --git a/Classes/ConferenceCallDetailView.h b/Classes/ConferenceCallDetailView.h
deleted file mode 100644
index b6bb27fe7..000000000
--- a/Classes/ConferenceCallDetailView.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ConferenceCallDetailView.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
-#import "LinphoneUI/UIMuteButton.h"
-#import "LinphoneUI/UISpeakerButton.h"
-
-@interface ConferenceCallDetailView : UIViewController {
-
- UIMuteButton* mute;
- UISpeakerButton* speaker;
- UIButton* back;
- UIButton* hangup;
- UITableView* table;
-
- UITableViewCell* conferenceDetailCell;
-}
-
-@property (nonatomic, retain) IBOutlet UIButton* mute;
-@property (nonatomic, retain) IBOutlet UIButton* speaker;
-@property (nonatomic, retain) IBOutlet UIButton* addCall;
-@property (nonatomic, retain) IBOutlet UIButton* back;
-@property (nonatomic, retain) IBOutlet UIButton* hangup;
-@property (nonatomic, retain) IBOutlet UITableView* table;
-
-@property (nonatomic, assign) IBOutlet UITableViewCell* conferenceDetailCell;
-
--(void) updateCallQuality;
-@end
diff --git a/Classes/ConferenceCallDetailView.m b/Classes/ConferenceCallDetailView.m
deleted file mode 100644
index 231fcb4ce..000000000
--- a/Classes/ConferenceCallDetailView.m
+++ /dev/null
@@ -1,165 +0,0 @@
-/* ConferenceCallDetailView.m
- *
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#import "ConferenceCallDetailView.h"
-#import "linphonecore.h"
-#import "LinphoneManager.h"
-#import "IncallViewController.h"
-
-@implementation ConferenceCallDetailView
-
-@synthesize mute;
-@synthesize speaker;
-@synthesize back;
-@synthesize hangup;
-@synthesize table;
-@synthesize addCall;
-
-@synthesize conferenceDetailCell;
-
-NSTimer *callQualityRefresher;
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
-{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
-}
-
-- (void)didReceiveMemoryWarning
-{
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-#pragma mark - View lifecycle
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
-
- [back addTarget:self action:@selector(backButtonPressed) forControlEvents:UIControlEventTouchUpInside];
-
- table.rowHeight = 80;
-
- [mute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE button"];
- [speaker initWithOnImage:[UIImage imageNamed:@"HP_inverse.png"] offImage:[UIImage imageNamed:@"HP.png"] debugName:"SPEAKER button"];
-}
-
--(void) backButtonPressed {
- [self dismissModalViewControllerAnimated:YES];
-}
-
-- (void)viewDidUnload
-{
- [super viewDidUnload];
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-
--(void) viewWillAppear:(BOOL)animated {
- [table reloadData];
- [mute reset];
- [speaker reset];
- [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
- [super viewWillAppear:animated];
-}
-
--(void) viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- callQualityRefresher = [NSTimer scheduledTimerWithTimeInterval:1
- target:self
- selector:@selector(updateCallQuality)
- userInfo:nil
- repeats:YES];
-}
-
--(void) viewDidDisappear:(BOOL)animated {
- [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
-
- if (callQualityRefresher != nil) {
- [callQualityRefresher invalidate];
- callQualityRefresher=nil;
- }
-}
-
--(void) updateCallQuality {
- [table reloadData];
- [table setNeedsDisplay];
-}
-
-#pragma mark - UITableView delegates
--(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
- if (indexPath.row % 2)
- cell.backgroundColor = [UIColor lightGrayColor];
- else
- cell.backgroundColor = [UIColor darkGrayColor];
-}
-
--(UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString* identifier = @"ConferenceDetailCellIdentifier";
- UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:identifier];
- if (cell == nil) {
- [[NSBundle mainBundle] loadNibNamed:@"ConferenceCallDetailCell" owner:self options:nil];
- cell = conferenceDetailCell;
- self.conferenceDetailCell = nil;
- }
-
- /* retrieve cell's fields using tags */
- UIImageView* image = (UIImageView*) [cell viewWithTag:1];
- UILabel* label = (UILabel*) [cell viewWithTag:2];
-
- /* update cell content */
- LinphoneCall* call = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:YES];
- [IncallViewController updateCellImageView:image Label:label DetailLabel:nil AndAccessoryView:nil withCall:call];
-
- cell.accessoryType = UITableViewCellAccessoryNone;
- if (cell.accessoryView == nil) {
- UIView *containerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 28, 28)] autorelease];
- cell.accessoryView = containerView;
- }
- else {
- for (UIView *view in cell.accessoryView.subviews) {
- [view removeFromSuperview];
- }
- }
- UIImageView* callquality = (UIImageView*) [cell viewWithTag:3];
- [IncallViewController updateIndicator:callquality withCallQuality:linphone_call_get_average_quality(call)];
- tableView.rowHeight = 80;
-
- return cell;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- LinphoneCore* lc = [LinphoneManager getLc];
- int result = linphone_core_get_conference_size(lc) - (int)linphone_core_is_in_conference(lc);
- return result;
-}
-
-@end
diff --git a/Classes/ConferenceCallDetailView.xib b/Classes/ConferenceCallDetailView.xib
deleted file mode 100644
index 3b80aa096..000000000
--- a/Classes/ConferenceCallDetailView.xib
+++ /dev/null
@@ -1,478 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- IBUITableView
- IBUIButton
- IBUIView
- IBProxyObject
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
-
- 274
-
-
-
- 274
- {320, 328}
-
-
-
- _NS:418
-
- 3
- MCAwAA
-
- YES
- IBCocoaTouchFramework
- YES
- 0
- NO
- YES
- 44
- 22
- 22
-
-
-
- 292
- {{107, 328}, {106, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
- 3
- MC41AA
-
-
- NSImage
- mic_active.png
-
-
- NSImage
- micro_inverse.png
-
-
- NSImage
- micro.png
-
-
- 2
- 2
-
-
- Helvetica-Bold
- 18
- 16
-
-
-
-
- 292
- {{213, 328}, {107, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- HP_inverse.png
-
-
- NSImage
- HP.png
-
-
-
-
-
-
- 292
- {{0, 394}, {320, 66}}
-
-
-
-
- 1
- MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- stopcall-red.png
-
-
- NSImage
- clavier-01-106px.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 292
- {{0, 328}, {107, 66}}
-
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
- NSImage
- effacer.png
-
-
-
-
-
- {{0, 20}, {320, 460}}
-
-
-
-
- 3
- MC42NjY2NjY2NjY3AA
-
-
- IBCocoaTouchFramework
-
-
-
-
-
-
- back
-
-
-
- 16
-
-
-
- hangup
-
-
-
- 17
-
-
-
- mute
-
-
-
- 18
-
-
-
- speaker
-
-
-
- 19
-
-
-
- view
-
-
-
- 20
-
-
-
- table
-
-
-
- 23
-
-
-
- dataSource
-
-
-
- 21
-
-
-
- delegate
-
-
-
- 22
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 7
-
-
-
-
-
- 10
-
-
- mute
-
-
- 11
-
-
- end
-
-
- 12
-
-
- speaker
-
-
- 14
-
-
- Erase
-
-
-
-
- ConferenceCallDetailView
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UISpeakerButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- UIEraseButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
-
-
- 23
-
-
-
-
- ConferenceCallDetailView
- UIViewController
-
- UIButton
- UIButton
- UITableViewCell
- UIButton
- UIButton
- UIButton
- UITableView
-
-
-
- addCall
- UIButton
-
-
- back
- UIButton
-
-
- conferenceDetailCell
- UITableViewCell
-
-
- hangup
- UIButton
-
-
- mute
- UIButton
-
-
- speaker
- UIButton
-
-
- table
- UITableView
-
-
-
- IBProjectSource
- ./Classes/ConferenceCallDetailView.h
-
-
-
- UIEraseButton
- UIButton
-
- IBProjectSource
- ./Classes/UIEraseButton.h
-
-
-
- UIHangUpButton
- UIButton
-
- IBProjectSource
- ./Classes/UIHangUpButton.h
-
-
-
- UIMuteButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UIMuteButton.h
-
-
-
- UISpeakerButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UISpeakerButton.h
-
-
-
- UIToggleButton
- UIButton
-
- IBProjectSource
- ./Classes/UIToggleButton.h
-
-
-
-
- 0
- IBCocoaTouchFramework
- YES
- 3
-
- {107, 67}
- {107, 67}
- {106, 60}
- {66, 65}
- {20, 20}
- {107, 67}
- {107, 67}
- {62, 54}
-
- 933
-
-
diff --git a/Classes/ConsoleViewController.h b/Classes/ConsoleViewController.h
deleted file mode 100644
index 2956112a2..000000000
--- a/Classes/ConsoleViewController.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* ConsoleViewController.h
- *
- * Copyright (C) 2010 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
-#import "LogView.h"
-
-
-@interface ConsoleViewController : UIViewController {
- UITextView* logs;
- UIView* logsView;
-
-
-}
--(void) doAction;
-@property (nonatomic, retain) IBOutlet UITextView* logs;
-@property (nonatomic, retain) IBOutlet UIView* logsView;
-
-
-@end
diff --git a/Classes/ConsoleViewController.m b/Classes/ConsoleViewController.m
deleted file mode 100644
index 246ced0eb..000000000
--- a/Classes/ConsoleViewController.m
+++ /dev/null
@@ -1,106 +0,0 @@
-/*ConsoleViewController.h
- *
- * Copyright (C) 2010 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 "ConsoleViewController.h"
-
-
-@implementation ConsoleViewController
-NSMutableString* MoreViewController_logs;
-
-@synthesize logs;
-@synthesize logsView;
-
-/*
- // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
- if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
- // Custom initialization
- }
- return self;
-}
-*/
-
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
- [super viewDidLoad];
- UIBarButtonItem* clear = [[[UIBarButtonItem alloc]
- initWithBarButtonSystemItem:UIBarButtonSystemItemTrash
- target:self
- action:@selector(doAction)] autorelease];
- [self.navigationItem setRightBarButtonItem:clear];
-}
-
-
-/*
-// Override to allow orientations other than the default portrait orientation.
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-*/
-
--(void) viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
- [logs setText:MoreViewController_logs];
-}
-
-- (void)didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-
--(void) addLog:(NSString*) log {
- @synchronized(self) {
- if (!MoreViewController_logs) {
- MoreViewController_logs = [[NSMutableString alloc] init];
- }
- [MoreViewController_logs appendString:log];
- if (MoreViewController_logs.length > 50000) {
- NSRange range = {0,log.length};
- [MoreViewController_logs deleteCharactersInRange:range];
- }
- }
-}
--(void) doAction{
- @synchronized(self) {
- NSMutableString* oldString = MoreViewController_logs;
- MoreViewController_logs = [[NSMutableString alloc] init];
- [oldString release];
- [logs setText:@""];
- }
-}
-
-
-
-- (void)dealloc {
- [super dealloc];
-}
-
-
-@end
diff --git a/Classes/ConsoleViewController.xib b/Classes/ConsoleViewController.xib
deleted file mode 100644
index 16846dae6..000000000
--- a/Classes/ConsoleViewController.xib
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
- 784
- 9L31a
- 680
- 949.54
- 353.00
-
- YES
-
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- YES
-
- YES
-
-
- YES
-
-
-
- YES
-
- IBFilesOwner
-
-
- IBFirstResponder
-
-
-
-
- 292
-
- YES
-
-
- 274
- {320, 450}
-
-
- 1
- MSAxIDEAA
-
- YES
- YES
- NO
- NO
- NO
- NO
- NO
-
-
- 2
-
-
-
- {320, 460}
-
-
- 3
- MQA
-
- 2
-
-
- NO
-
-
-
-
-
-
- YES
-
-
- logs
-
-
-
- 9
-
-
-
- logsView
-
-
-
- 13
-
-
-
- view
-
-
-
- 14
-
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- -1
-
-
- RmlsZSdzIE93bmVyA
-
-
- -2
-
-
-
-
- 10
-
-
- YES
-
-
-
-
-
- 4
-
-
- YES
-
-
-
- logView
-
-
- 7
-
-
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -2.CustomClassName
- 10.CustomClassName
- 10.IBEditorWindowLastContentRect
- 10.IBPluginDependency
- 4.IBPluginDependency
- 7.IBPluginDependency
-
-
- YES
- ConsoleViewController
- UIResponder
- ConsoleViewController
- {{807, 300}, {320, 480}}
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
- YES
-
-
- YES
-
-
-
-
- YES
-
- YES
-
-
- YES
-
-
-
- 14
-
-
-
- YES
-
- ConsoleViewController
- UIViewController
-
- YES
-
- YES
- logs
- logsView
-
-
- YES
- UITextView
- UIView
-
-
-
- IBProjectSource
- Classes/ConsoleViewController.h
-
-
-
-
- 0
- ../linphone.xcodeproj
- 3
- 3.1
-
-
diff --git a/Classes/ContactPickerDelegate.h b/Classes/ContactPickerDelegate.h
deleted file mode 100644
index 623ccd1f7..000000000
--- a/Classes/ContactPickerDelegate.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* ContactPickerDelegate.h
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU 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
-#import
-#import "PhoneViewController.h"
-#import "linphoneAppDelegate.h"
-
-
-@interface ContactPickerDelegate : NSObject {
-
-}
-
-
-@end
diff --git a/Classes/ContactPickerDelegate.m b/Classes/ContactPickerDelegate.m
deleted file mode 100644
index 00d53e489..000000000
--- a/Classes/ContactPickerDelegate.m
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ContactPickerDelegate.m
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#import "ContactPickerDelegate.h"
-#import "LinphoneManager.h"
-
-@implementation ContactPickerDelegate
-
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
- shouldContinueAfterSelectingPerson:(ABRecordRef)person {
- return true;
-
-}
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
- shouldContinueAfterSelectingPerson:(ABRecordRef)person
- property:(ABPropertyID)property
- identifier:(ABMultiValueIdentifier)identifier {
-
- CFTypeRef multiValue = ABRecordCopyValue(person, property);
- CFIndex valueIdx = ABMultiValueGetIndexForIdentifier(multiValue,identifier);
- NSString *phoneNumber = (NSString *)ABMultiValueCopyValueAtIndex(multiValue, valueIdx);
- [[LinphoneManager instance].callDelegate displayDialerFromUI:nil
- forUser:phoneNumber
- withDisplayName:[(NSString*)ABRecordCopyCompositeName(person) autorelease]];
- [phoneNumber release];
- CFRelease(multiValue);
- return false;
-}
-
-- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
- [[LinphoneManager instance].callDelegate displayDialerFromUI:nil
- forUser:nil
- withDisplayName:@""];
-}
-
-@end
diff --git a/Classes/FirstLoginViewController.m b/Classes/FirstLoginViewController.m
deleted file mode 100644
index 69ae3149d..000000000
--- a/Classes/FirstLoginViewController.m
+++ /dev/null
@@ -1,125 +0,0 @@
-/* FirstLoginViewController.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 "FirstLoginViewController.h"
-#import "LinphoneManager.h"
-
-@implementation FirstLoginViewController
-
-@synthesize ok;
-@synthesize username;
-@synthesize passwd;
-@synthesize activityIndicator;
-@synthesize site;
-
-
-
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- //[username setText:[[NSUserDefaults standardUserDefaults] stringForKey:@"username_preference"]];
- //[passwd setText:[[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"]];
-}
-
--(void) viewDidLoad {
- NSString* siteUrl = [[NSUserDefaults standardUserDefaults] stringForKey:@"firt_login_view_url"];
- if (siteUrl==nil) {
- siteUrl=@"http://www.linphone.org";
- }
- [site setTitle:siteUrl forState:UIControlStateNormal];
-
-}
-
-- (void)dealloc {
- [super dealloc];
- [ok dealloc];
- [site dealloc];
- [username dealloc];
- [activityIndicator dealloc];
-}
-
-
-
--(void) doOk:(id)sender {
- if (sender == site) {
- NSURL *url = [NSURL URLWithString:site.titleLabel.text];
- [[UIApplication sharedApplication] openURL:url];
- return;
- }
- NSString* errorMessage=nil;
- if ([username.text length]==0 ) {
- errorMessage=NSLocalizedString(@"Enter your username",nil);
- } else if ([passwd.text length]==0 ) {
- errorMessage=NSLocalizedString(@"Enter your password",nil);
- }
-
- if (errorMessage != nil) {
- UIAlertView* error=nil;
- error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Alert",nil)
- message:errorMessage
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"Continue",nil)
- otherButtonTitles:nil];
- [error show];
- [error release];
- } else {
- [[NSUserDefaults standardUserDefaults] setObject:username.text forKey:@"username_preference"];
- [[NSUserDefaults standardUserDefaults] setObject:passwd.text forKey:@"password_preference"];
- [[LinphoneManager instance] reconfigureLinphoneIfNeeded:nil];
- [self.activityIndicator setHidden:false];
- };
-
-
-}
--(void) displayRegisteredFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain {
- [[NSUserDefaults standardUserDefaults] setBool:false forKey:@"enable_first_login_view_preference"];
- [self.activityIndicator setHidden:true];
- [self dismissModalViewControllerAnimated:YES];
-}
--(void) displayRegisteringFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain {
- [self.activityIndicator setHidden:false];
-}
--(void) displayRegistrationFailedFromUI:(UIViewController*) viewCtrl forUser:(NSString*) user withDisplayName:(NSString*) displayName onDomain:(NSString*)domain forReason:(NSString*) reason {
- [self.activityIndicator setHidden:true];
- //default behavior if no registration delegates
-
- //UIAlertView* error = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"Registration failure for user %@",user]
- // message:reason
- // delegate:nil
- // cancelButtonTitle:@"Continue"
- // otherButtonTitles:nil ,nil];
- //[error show];
- //[error release];
- //erase uername passwd
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"username_preference"];
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"password_preference"];
-}
--(void) displayNotRegisteredFromUI:(UIViewController*) viewCtrl {
- [self.activityIndicator setHidden:true];
-}
-
-
-- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
- // When the user presses return, take focus away from the text field so that the keyboard is dismissed.
- [theTextField resignFirstResponder];
- return YES;
-}
-
-
-@end
diff --git a/Classes/FirstLoginViewController.xib b/Classes/FirstLoginViewController.xib
deleted file mode 100644
index 5ab733adc..000000000
--- a/Classes/FirstLoginViewController.xib
+++ /dev/null
@@ -1,500 +0,0 @@
-
-
-
- 784
- 10K549
- 1938
- 1038.36
- 461.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- YES
- IBUIView
- IBUIImageView
- IBUIViewController
- IBProxyObject
- IBUIActivityIndicatorView
- IBUITextField
- IBUIButton
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
- YES
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
-
-
- 292
-
- YES
-
-
- 292
- {{0, -20}, {360, 480}}
-
-
- NO
- NO
- 9
- NO
- IBCocoaTouchFramework
-
- NSImage
- wallpaper_iphone_320x480.png
-
-
-
-
- -2147483356
- {{60, 400}, {200, 37}}
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
- 3
- MC41AA
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 292
- {{60, 200}, {200, 31}}
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
- 3
- Password
-
- 3
- MAA
-
- 2
-
-
- YES
- YES
- 17
-
- 1
- YES
- IBCocoaTouchFramework
-
-
- 1
- 12
-
-
- Helvetica
- 12
- 16
-
-
-
-
- 292
- {{60, 150}, {200, 31}}
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
-
- 3
- Username
-
- 3
- MAA
-
-
- YES
- 17
-
- 1
- IBCocoaTouchFramework
-
-
-
-
-
-
- 292
- {{60, 300}, {200, 37}}
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 1
- Login
-
-
- 5
- MSAwLjY2MDAwMDAyNjIgMCAwAA
-
- 3
-
- 1 0.66 0 0 1
-
-
-
- 2
- 2
-
-
- Helvetica-Bold
- 18
- 16
-
-
-
-
- -2147483356
-
- YES
-
-
- 292
- {{142, 211}, {37, 37}}
-
-
- NO
- NO
- NO
- IBCocoaTouchFramework
- NO
- YES
- 0
-
-
- {320, 460}
-
-
-
- 3
- MSAwLjY2AA
-
-
- NO
- IBCocoaTouchFramework
-
-
- {{0, 20}, {320, 460}}
-
-
-
- 3
- MQA
-
-
-
- IBCocoaTouchFramework
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
-
- YES
-
-
- view
-
-
-
- 3
-
-
-
- passwd
-
-
-
- 15
-
-
-
- activityIndicator
-
-
-
- 33
-
-
-
- username
-
-
-
- 38
-
-
-
- site
-
-
-
- 36
-
-
-
- delegate
-
-
-
- 39
-
-
-
- delegate
-
-
-
- 17
-
-
-
- doOk:
-
-
- 7
-
- 20
-
-
-
- doOk:
-
-
- 7
-
- 37
-
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 4
-
-
- YES
-
-
-
-
-
- 1
-
-
- YES
-
-
-
-
-
-
-
-
-
-
- 12
-
-
-
-
- 6
-
-
- username
-
-
- 8
-
-
- passwd
-
-
- 5
-
-
-
-
- 31
-
-
- YES
-
-
-
- wait
-
-
- 32
-
-
-
-
- 35
-
-
- site
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -1.IBPluginDependency
- -2.CustomClassName
- -2.IBPluginDependency
- 1.IBPluginDependency
- 1.IBUserGuides
- 12.IBPluginDependency
- 12.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 31.IBPluginDependency
- 32.IBPluginDependency
- 35.IBPluginDependency
- 4.IBPluginDependency
- 5.IBPluginDependency
- 6.IBPluginDependency
- 8.IBPluginDependency
-
-
- YES
- FirstLoginViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- YES
-
-
- 104
- 0
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
-
-
-
-
- YES
-
-
-
-
- 54
-
-
- 0
- IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
-
-
- YES
- 3
-
- wallpaper_iphone_320x480.png
- {320, 480}
-
- 933
-
-
diff --git a/Classes/InCallViewController-ipad.xib b/Classes/InCallViewController-ipad.xib
deleted file mode 100644
index 51b1dfa66..000000000
--- a/Classes/InCallViewController-ipad.xib
+++ /dev/null
@@ -1,1953 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- IBUIButton
- IBUIImageView
- IBUIViewController
- IBProxyObject
- IBUIActivityIndicatorView
- IBUITableView
- IBUIView
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
-
- IBFilesOwner
- IBIPadFramework
-
-
- IBFirstResponder
- IBIPadFramework
-
-
-
-
- 274
-
-
-
- 274
-
-
-
- 292
- {768, 1024}
-
-
-
- _NS:569
- NO
- IBIPadFramework
-
-
-
- 292
- {{20, 956}, {28, 28}}
-
-
-
- _NS:567
- NO
- IBIPadFramework
-
-
-
- 292
- {{366, 493}, {37, 37}}
-
-
-
- _NS:1062
- NO
- IBIPadFramework
- NO
- 0
-
-
-
- 292
- {{598, 799}, {170, 225}}
-
-
-
-
- 3
- MQA
-
- 2
-
-
- IBIPadFramework
-
-
- {768, 1024}
-
-
-
- _NS:212
-
- 3
- MC42NjY2NjY2NjY3AA
-
- IBIPadFramework
-
-
-
- 292
- {{224, 740}, {320, 66}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
- 1
- Change camera
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
- 3
- MC41AA
-
-
- NSImage
- clavier-01-108px.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 274
- {768, 805}
-
-
-
- _NS:408
-
- 3
- MSAwAA
-
-
- YES
- IBIPadFramework
- YES
- 0
- YES
- 80
- 22
- 22
-
-
-
- 292
-
-
-
- 292
- {{0, 1}, {320, 66}}
-
-
-
-
- 1
- MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- stopcall-red.png
-
-
- NSImage
- clavier-01-106px.png
-
-
-
-
-
- {{224, 937}, {320, 77}}
-
-
-
- _NS:196
-
- 3
- MCAwAA
-
- IBIPadFramework
-
-
-
- 292
-
-
-
- 292
- {{80, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- grouper.png
-
-
- 2
- 17
-
-
- Helvetica-Bold
- 17
- 16
-
-
-
-
- 292
- {{0, 4}, {107, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- mic_active.png
-
-
- NSImage
- micro_inverse.png
-
-
- NSImage
- micro.png
-
-
- 2
- 2
-
-
- Helvetica-Bold
- 18
- 16
-
-
-
-
- 292
- {{0, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- ajouter.png
-
-
-
-
-
-
- 292
- {{240, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
- 1
- MCAwIDAAA
-
-
- NSImage
- contact.png
-
-
-
-
-
-
- -2147483356
- {{240, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 1
- video
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- clavier-01-160px.png
-
-
-
-
-
-
- 292
- {{160, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- transfer
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
-
-
-
-
-
- 292
- {{262, 84}, {37, 37}}
-
-
-
- _NS:1062
- NO
- IBIPadFramework
- NO
- 0
-
-
-
- 292
- {{107, 4}, {106, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- clavier.png
-
-
-
-
-
-
- 292
- {{213, 4}, {107, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- NO
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- HP_inverse.png
-
-
- NSImage
- HP.png
-
-
-
-
-
-
- 292
- {{80, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
-
- NSImage
- pause_inactif.png
-
-
- NSImage
- pause.png
-
-
-
-
-
- {{224, 801.5}, {320, 135}}
-
-
-
-
- NO
- NO
- IBIPadFramework
-
-
-
- -2147483356
-
-
-
- 292
- {{119, 251}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- close
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 193}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 19}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 1
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 19}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 2
-
-
-
-
-
-
-
-
- 292
- {{207, 19}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 3
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 77}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 4
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 77}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 5
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{207, 77}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 6
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 135}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 7
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 135}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 8
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{207, 135}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 9
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 193}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- *
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{207, 193}, {82, 52}}
-
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- #
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
- {{178, 146}, {320, 310}}
-
-
-
-
- 3
- MC4yNAA
-
- NO
- NO
- IBIPadFramework
-
-
- {{0, 20}, {768, 1004}}
-
-
-
- _NS:212
-
- IBIPadFramework
-
-
- 2
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
-
-
-
-
- callTableView
-
-
-
- 114
-
-
-
- endCtrl
-
-
-
- 119
-
-
-
- hangUpView
-
-
-
- 122
-
-
-
- speaker
-
-
-
- 132
-
-
-
- mute
-
-
-
- 125
-
-
-
- addVideo
-
-
-
- 113
-
-
-
- mergeCalls
-
-
-
- 124
-
-
-
- addCall
-
-
-
- 112
-
-
-
- contacts
-
-
-
- 116
-
-
-
- dialer
-
-
-
- 141
-
-
-
- pause
-
-
-
- 129
-
-
-
- controlSubView
-
-
-
- 117
-
-
-
- five
-
-
-
- 120
-
-
-
- nine
-
-
-
- 126
-
-
-
- seven
-
-
-
- 130
-
-
-
- six
-
-
-
- 131
-
-
-
- four
-
-
-
- 121
-
-
-
- three
-
-
-
- 134
-
-
-
- zero
-
-
-
- 137
-
-
-
- two
-
-
-
- 135
-
-
-
- close
-
-
-
- 115
-
-
-
- hash
-
-
-
- 123
-
-
-
- eight
-
-
-
- 118
-
-
-
- one
-
-
-
- 127
-
-
-
- star
-
-
-
- 133
-
-
-
- padSubView
-
-
-
- 128
-
-
-
- view
-
-
-
- 136
-
-
-
- videoGroup
-
-
-
- 159
-
-
-
- videoView
-
-
-
- 161
-
-
-
- videoPreview
-
-
-
- 162
-
-
-
- videoCallQuality
-
-
-
- 163
-
-
-
- videoCameraSwitch
-
-
-
- 164
-
-
-
- videoUpdateIndicator
-
-
-
- 167
-
-
-
- videoWaitingForFirstImage
-
-
-
- 168
-
-
-
- transfer
-
-
-
- 170
-
-
-
- dataSource
-
-
-
- 139
-
-
-
- delegate
-
-
-
- 140
-
-
-
- doAction:
-
-
- 7
-
- 144
-
-
-
- doAction:
-
-
- 7
-
- 142
-
-
-
- doAction:
-
-
- 7
-
- 143
-
-
-
-
-
- 0
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 59
-
-
-
-
-
-
-
- 60
-
-
-
-
-
-
-
-
-
-
-
-
- 61
-
-
-
-
- 88
-
-
-
-
-
-
-
- 98
-
-
- end
-
-
- 89
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- controls
-
-
- 96
-
-
- speaker
-
-
- 92
-
-
- mute
-
-
- 90
-
-
- video
-
-
- 91
-
-
- merge
-
-
- 93
-
-
- addcall
-
-
- 94
-
-
- contacts
-
-
- 95
-
-
- dialer
-
-
- 97
-
-
- pauseresume
-
-
- 87
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pad
-
-
- 99
-
-
- 5
-
-
- 100
-
-
- 9
-
-
- 101
-
-
- 7
-
-
- 102
-
-
- 6
-
-
- 103
-
-
- 4
-
-
- 104
-
-
- 3
-
-
- 105
-
-
- 0
-
-
- 106
-
-
- 2
-
-
- 107
-
-
- close
-
-
- 108
-
-
- hash
-
-
- 109
-
-
- 8
-
-
- 110
-
-
- 1
-
-
- 111
-
-
- star
-
-
- 152
-
-
-
-
-
-
-
-
- video
-
-
- 158
-
-
-
- video_preview
-
-
- 157
-
-
- video_view
-
-
- 153
-
-
- call_quality_video
-
-
- 154
-
-
-
-
- 165
-
-
- toggleVideoIndicator
-
-
- 166
-
-
-
-
- 169
-
-
- transfer
-
-
-
-
- IncallViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIToggleVideoButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UISpeakerButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
-
-
- 170
-
-
-
-
- IncallViewController
- UIViewController
-
- doAction:
- id
-
-
- doAction:
-
- doAction:
- id
-
-
-
- UIButton
- UIToggleVideoButton
- UITableView
- UIButton
- UIViewController
- UIButton
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIImageView
- UICamSwitch
- UIView
- UIView
- UIActivityIndicatorView
- UIView
- VideoViewController
- UIActivityIndicatorView
- UIButton
-
-
-
- addCall
- UIButton
-
-
- addVideo
- UIToggleVideoButton
-
-
- callTableView
- UITableView
-
-
- close
- UIButton
-
-
- conferenceDetail
- UIViewController
-
-
- contacts
- UIButton
-
-
- controlSubView
- UIView
-
-
- dialer
- UIButton
-
-
- eight
- UIButton
-
-
- endCtrl
- UIButton
-
-
- five
- UIButton
-
-
- four
- UIButton
-
-
- hangUpView
- UIView
-
-
- hash
- UIButton
-
-
- mergeCalls
- UIButton
-
-
- mute
- UIButton
-
-
- nine
- UIButton
-
-
- one
- UIButton
-
-
- padSubView
- UIView
-
-
- pause
- UIButton
-
-
- seven
- UIButton
-
-
- six
- UIButton
-
-
- speaker
- UIButton
-
-
- star
- UIButton
-
-
- three
- UIButton
-
-
- transfer
- UIButton
-
-
- two
- UIButton
-
-
- videoCallQuality
- UIImageView
-
-
- videoCameraSwitch
- UICamSwitch
-
-
- videoGroup
- UIView
-
-
- videoPreview
- UIView
-
-
- videoUpdateIndicator
- UIActivityIndicatorView
-
-
- videoView
- UIView
-
-
- videoViewController
- VideoViewController
-
-
- videoWaitingForFirstImage
- UIActivityIndicatorView
-
-
- zero
- UIButton
-
-
-
- IBProjectSource
- ./Classes/IncallViewController.h
-
-
-
- UICamSwitch
- UIButton
-
- preview
- UIView
-
-
- preview
-
- preview
- UIView
-
-
-
- IBProjectSource
- ./Classes/UICamSwitch.h
-
-
-
- UIDigitButton
- UIButton
-
- IBProjectSource
- ./Classes/UIDigitButton.h
-
-
-
- UIHangUpButton
- UIButton
-
- IBProjectSource
- ./Classes/UIHangUpButton.h
-
-
-
- UIMuteButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UIMuteButton.h
-
-
-
- UISpeakerButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UISpeakerButton.h
-
-
-
- UIToggleButton
- UIButton
-
- IBProjectSource
- ./Classes/UIToggleButton.h
-
-
-
- UIToggleVideoButton
- UIButton
-
- videoUpdateIndicator
- UIActivityIndicatorView
-
-
- videoUpdateIndicator
-
- videoUpdateIndicator
- UIActivityIndicatorView
-
-
-
- IBProjectSource
- ./Classes/UIToggleVideoButton.h
-
-
-
- VideoViewController
- UIViewController
-
- UIImageView
- UIImageView
- UIImageView
- UICamSwitch
- UICamSwitch
- UICamSwitch
- UIView
- UIView
- UIView
- UIHangUpButton
- UIHangUpButton
- UIHangUpButton
- UIView
- UIView
- UIMuteButton
- UIMuteButton
- UIMuteButton
- UIView
- UIView
- UIView
- UIView
-
-
-
- mCallQuality
- UIImageView
-
-
- mCallQualityLandLeft
- UIImageView
-
-
- mCallQualityLandRight
- UIImageView
-
-
- mCamSwitch
- UICamSwitch
-
-
- mCamSwitchLandLeft
- UICamSwitch
-
-
- mCamSwitchLandRight
- UICamSwitch
-
-
- mDisplay
- UIView
-
-
- mDisplayLandLeft
- UIView
-
-
- mDisplayLandRight
- UIView
-
-
- mHangUp
- UIHangUpButton
-
-
- mHangUpLandLeft
- UIHangUpButton
-
-
- mHangUpLandRight
- UIHangUpButton
-
-
- mLandscapeLeft
- UIView
-
-
- mLandscapeRight
- UIView
-
-
- mMute
- UIMuteButton
-
-
- mMuteLandLeft
- UIMuteButton
-
-
- mMuteLandRight
- UIMuteButton
-
-
- mPortrait
- UIView
-
-
- mPreview
- UIView
-
-
- mPreviewLandLeft
- UIView
-
-
- mPreviewLandRight
- UIView
-
-
-
- IBProjectSource
- ./Classes/VideoViewController.h
-
-
-
-
- 0
- IBIPadFramework
- YES
- 3
-
- {107, 67}
- {107, 67}
- {107, 67}
- {106, 60}
- {108, 60}
- {160, 60}
- {106, 67}
- {107, 67}
- {106, 67}
- {20, 20}
- {107, 67}
- {107, 67}
- {106, 67}
- {106, 67}
- {62, 54}
-
- 933
-
-
diff --git a/Classes/IncallViewController.h b/Classes/IncallViewController.h
deleted file mode 100644
index 0d7340568..000000000
--- a/Classes/IncallViewController.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* IncallViewController.h
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU 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
-#import "linphonecore.h"
-#import "PhoneViewController.h"
-#import "ConferenceCallDetailView.h"
-#import
-#include "UILinphone.h"
-#import "UIToggleVideoButton.h"
-#import "VideoZoomHandler.h"
-@class VideoViewController;
-
-@interface IncallViewController : UIViewController {
-
-
- UIView* controlSubView, *hangUpView;
-
- UIButton* endCtrl;
- UIButton* dialer;
- UIMuteButton* mute;
- UIButton* pause;
- UISpeakerButton* speaker;
- UIButton* contacts;
- UIToggleVideoButton* addVideo;
- UITableView* callTableView;
- UIButton* addCall, *mergeCalls;
- UIButton* transfer;
-
-
- //key pad
-
- UIView* padSubView;
- UIDigitButton* one;
- UIDigitButton* two;
- UIDigitButton* three;
- UIDigitButton* four;
- UIDigitButton* five;
- UIDigitButton* six;
- UIDigitButton* seven;
- UIDigitButton* eight;
- UIDigitButton* nine;
- UIDigitButton* star;
- UIDigitButton* zero;
- UIDigitButton* hash;
- UIButton* close;
-
- UIView* videoGroup;
- UIView* videoView;
- UIView* videoPreview;
- UIImageView* videoCallQuality;
- UICamSwitch* videoCameraSwitch;
- UIActivityIndicatorView* videoUpdateIndicator;
- UIActivityIndicatorView* videoWaitingForFirstImage;
-
- bool dismissed;
-
- NSTimer *durationRefreasher;
- NSTimer * glowingTimer;
-
- float glow;
- NSIndexPath* activePath;
-
- ABPeoplePickerNavigationController* myPeoplePickerController;
-
- UITableViewCell* activeCallCell;
-
- VideoViewController* mVideoViewController;
- ConferenceCallDetailView* conferenceDetail;
- BOOL mVideoShown;
- BOOL mVideoIsPending;
- BOOL mIncallViewIsReady;
-
- UIImage* verified, *unverified;
- UIImage* stat_sys_signal_0, *stat_sys_signal_1, *stat_sys_signal_2, *stat_sys_signal_3, *stat_sys_signal_4;
- UIActionSheet* visibleActionSheet;
-
- NSTimer* hideControlsTimer;
- VideoZoomHandler* videoZoomHandler;
-}
-
--(void)displayStatus:(NSString*) message;
-
-- (IBAction)doAction:(id)sender;
-
-+(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf;
-+ (void) updateCellImageView:(UIImageView*)imageView Label:(UILabel*)label DetailLabel:(UILabel*)detailLabel AndAccessoryView:(UIView*)accessoryView withCall:(LinphoneCall*) call;
-+(void) updateIndicator:(UIImageView*) indicator withCallQuality:(float) quality;
-
-@property (nonatomic, retain) IBOutlet UIView* controlSubView;
-@property (nonatomic, retain) IBOutlet UIView* padSubView;
-@property (nonatomic, retain) IBOutlet UIView* hangUpView;
-@property (nonatomic, retain) IBOutlet UIViewController* conferenceDetail;
-
-@property (nonatomic, retain) IBOutlet UIButton* endCtrl;
-@property (nonatomic, retain) IBOutlet UIButton* dialer;
-@property (nonatomic, retain) IBOutlet UIButton* mute;
-@property (nonatomic, retain) IBOutlet UIButton* pause;
-@property (nonatomic, retain) IBOutlet UIButton* speaker;
-@property (nonatomic, retain) IBOutlet UIButton* contacts;
-@property (nonatomic, retain) IBOutlet UIToggleVideoButton* addVideo;
-@property (nonatomic, retain) IBOutlet UITableView* callTableView;
-@property (nonatomic, retain) IBOutlet UIButton* addCall;
-@property (nonatomic, retain) IBOutlet UIButton* mergeCalls;
-@property (nonatomic, retain) IBOutlet UIButton* transfer;
-
-@property (nonatomic, retain) IBOutlet UIButton* one;
-@property (nonatomic, retain) IBOutlet UIButton* two;
-@property (nonatomic, retain) IBOutlet UIButton* three;
-@property (nonatomic, retain) IBOutlet UIButton* four;
-@property (nonatomic, retain) IBOutlet UIButton* five;
-@property (nonatomic, retain) IBOutlet UIButton* six;
-@property (nonatomic, retain) IBOutlet UIButton* seven;
-@property (nonatomic, retain) IBOutlet UIButton* eight;
-@property (nonatomic, retain) IBOutlet UIButton* nine;
-@property (nonatomic, retain) IBOutlet UIButton* star;
-@property (nonatomic, retain) IBOutlet UIButton* zero;
-@property (nonatomic, retain) IBOutlet UIButton* hash;
-@property (nonatomic, retain) IBOutlet UIButton* close;
-@property (nonatomic, retain) IBOutlet VideoViewController* videoViewController;
-
-@property (nonatomic, retain) IBOutlet UIView* videoGroup;
-@property (nonatomic, retain) IBOutlet UIView* videoView;
-@property (nonatomic, retain) IBOutlet UIView* videoPreview;
-@property (nonatomic, retain) IBOutlet UIImageView* videoCallQuality;
-@property (nonatomic, retain) IBOutlet UICamSwitch* videoCameraSwitch;
-@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* videoUpdateIndicator;
-@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* videoWaitingForFirstImage;
-
-@end
diff --git a/Classes/IncallViewController.m b/Classes/IncallViewController.m
deleted file mode 100644
index d0bad0b07..000000000
--- a/Classes/IncallViewController.m
+++ /dev/null
@@ -1,1223 +0,0 @@
-/* IncallViewController.h
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU 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 "IncallViewController.h"
-#import "VideoViewController.h"
-#import
-#import
-#import "linphonecore.h"
-#include "LinphoneManager.h"
-#include "private.h"
-#import "ContactPickerDelegate.h"
-#import
-#import
-#import
-#import
-
-#define STRINGIFY(x) #x
-#define TOSTRING(x) STRINGIFY(x)
-#define AT __FILE__ ":" TOSTRING(__LINE__)
-
-const NSInteger SECURE_BUTTON_TAG=5;
-
-@implementation IncallViewController
-
-@synthesize controlSubView;
-@synthesize padSubView;
-@synthesize hangUpView;
-@synthesize conferenceDetail;
-
-@synthesize endCtrl;
-@synthesize close;
-@synthesize mute;
-@synthesize pause;
-@synthesize dialer;
-@synthesize speaker;
-@synthesize contacts;
-@synthesize callTableView;
-@synthesize addCall;
-@synthesize mergeCalls;
-@synthesize transfer;
-
-@synthesize one;
-@synthesize two;
-@synthesize three;
-@synthesize four;
-@synthesize five;
-@synthesize six;
-@synthesize seven;
-@synthesize eight;
-@synthesize nine;
-@synthesize star;
-@synthesize zero;
-@synthesize hash;
-@synthesize videoViewController;
-
-@synthesize videoGroup;
-@synthesize videoView;
-@synthesize videoPreview;
-@synthesize videoCallQuality;
-@synthesize videoCameraSwitch;
-@synthesize videoUpdateIndicator;
-@synthesize videoWaitingForFirstImage;
-
-@synthesize addVideo;
-
-
-+(void) updateIndicator:(UIImageView*) indicator withCallQuality:(float) quality {
- if (quality >= 4 || quality < 0) {
- [indicator setImage:[UIImage imageNamed:@"stat_sys_signal_4.png"]];
- } else if (quality >= 3) {
- [indicator setImage:[UIImage imageNamed:@"stat_sys_signal_3.png"]];
- } else if (quality >= 2) {
- [indicator setImage:[UIImage imageNamed:@"stat_sys_signal_2.png"]];
- } else if (quality >= 1) {
- [indicator setImage:[UIImage imageNamed:@"stat_sys_signal_1.png"]];
- } else {
- [indicator setImage:[UIImage imageNamed:@"stat_sys_signal_0.png"]];
- }
-}
-
-bool isInConference(LinphoneCall* call) {
- if (!call)
- return false;
- return linphone_call_get_current_params(call)->in_conference;
-}
-
-int callCount(LinphoneCore* lc) {
- int count = 0;
- const MSList* calls = linphone_core_get_calls(lc);
-
- while (calls != 0) {
- if (!isInConference((LinphoneCall*)calls->data)) {
- count++;
- }
- calls = calls->next;
- }
- return count;
-}
-
-
-
-void addAnimationFadeTransition(UIView* view, float duration) {
- CATransition* animation = [CATransition animation];
- animation.type = kCATransitionFromBottom; // kCATransitionFade;
- animation.duration = duration;
- [view.layer addAnimation:animation forKey:nil];
-}
-
--(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;
- }
- 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];
- 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;
- videoCallQuality.transform = transform;
- [UIView commitAnimations];
- }
- }
-}
-
--(void) showControls:(id)sender {
- if (hideControlsTimer) {
- [hideControlsTimer invalidate];
- hideControlsTimer = nil;
- }
- // show controls
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:0.3];
- [controlSubView setAlpha:1.0];
- [hangUpView setAlpha:1.0];
- if ([LinphoneManager instance].frontCamId !=nil ) {
- // only show camera switch button if we have more than 1 camera
- [videoCameraSwitch setAlpha:1.0];
- }
- [UIView commitAnimations];
-
- // hide controls in 5 sec
- hideControlsTimer = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(hideControls:) userInfo:nil repeats:NO];
-}
-
--(void) hideControls:(id)sender {
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:0.3];
- [controlSubView setAlpha:0.0];
- [hangUpView setAlpha:0.0];
- [videoCameraSwitch setAlpha:0.0];
- [UIView commitAnimations];
-
- hideControlsTimer = nil;
-}
-
--(void) batteryLevelChanged: (NSNotification*) notif {
- LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
- if (!call || !linphone_call_params_video_enabled(linphone_call_get_current_params(call)))
- return;
- LinphoneCallAppData* appData = (LinphoneCallAppData*) linphone_call_get_user_pointer(call);
- if ([UIDevice currentDevice].batteryState == UIDeviceBatteryStateUnplugged) {
- float level = [UIDevice currentDevice].batteryLevel;
- ms_message("Video call is running. Battery level: %.2f", level);
- if (level < 0.1 && !appData->batteryWarningShown) {
- // notify user
- CallDelegate* cd = [[CallDelegate alloc] init];
- cd.eventType = CD_STOP_VIDEO_ON_LOW_BATTERY;
- cd.delegate = self;
- cd.call = call;
-
- if (visibleActionSheet != nil) {
- [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
- }
- NSString* title = NSLocalizedString(@"Battery is running low. Stop video ?",nil);
- visibleActionSheet = [[UIActionSheet alloc] initWithTitle:title
- delegate:cd
- cancelButtonTitle:NSLocalizedString(@"Continue video",nil)
- destructiveButtonTitle:NSLocalizedString(@"Stop video",nil)
- otherButtonTitles:nil];
-
- visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
- [visibleActionSheet showInView:self.view];
- appData->batteryWarningShown = TRUE;
- }
- }
-}
-
--(void) enableVideoDisplay {
- [self orientationChanged:nil];
-
- [videoZoomHandler resetZoom];
-
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:1.0];
- [videoGroup setAlpha:1.0];
- [controlSubView setAlpha:0.0];
- [hangUpView setAlpha:0.0];
- [callTableView setAlpha:0.0];
- [UIView commitAnimations];
-
- videoView.alpha = 1.0;
- videoView.hidden = FALSE;
-
- linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)videoView);
- linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)videoPreview);
-
- [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
-
-
- [self batteryLevelChanged:nil];
-}
-
--(void) disableVideoDisplay {
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:1.0];
- [videoGroup setAlpha:0.0];
- [controlSubView setAlpha:1.0];
- [hangUpView setAlpha:1.0];
- [callTableView setAlpha:1.0];
- [videoCameraSwitch setAlpha:0.0];
- [UIView commitAnimations];
-
- if (hideControlsTimer != nil) {
- [hideControlsTimer invalidate];
- hideControlsTimer = nil;
- }
-
- /* restore buttons orientation */
- endCtrl.imageView.transform = CGAffineTransformIdentity;
- mute.imageView.transform = CGAffineTransformIdentity;
- speaker.imageView.transform = CGAffineTransformIdentity;
- pause.imageView.transform = CGAffineTransformIdentity;
- contacts.imageView.transform = CGAffineTransformIdentity;
- addCall.imageView.transform = CGAffineTransformIdentity;
- dialer.imageView.transform = CGAffineTransformIdentity;
- videoCallQuality.transform = CGAffineTransformIdentity;
-
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
-}
-
-/* Update in call view buttons (visibility, state, ...) and call duration text.
- This is called periodically. The fullUpdate boolean is set when called after an event (call state change for instance) */
--(void) updateUIFromLinphoneState:(BOOL) fullUpdate {
- activeCallCell = nil;
-
- // check LinphoneCore is initialized
- LinphoneCore* lc = nil;
- @try {
- lc = [LinphoneManager getLc];
- } @catch (NSException* exc) {
- return;
- }
- // 1 call: show pause button, otherwise show merge btn
- [LinphoneManager set:pause hidden:(callCount(lc) > 1) withName:"PAUSE button" andReason:"call count"];
- [LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:"call count"];
- // reload table (glow update + call duration)
- [callTableView reloadData];
-
- LinphoneCall* currentCall = linphone_core_get_current_call([LinphoneManager getLc]);
- int callsCount = linphone_core_get_calls_nb(lc);
-
- // hide pause/resume if in conference
- if (currentCall) {
- [mute reset];
- if (linphone_core_is_in_conference(lc)) {
- [LinphoneManager set:pause hidden:YES withName:"PAUSE button" andReason:"is in conference"];
- }
- else if (callCount(lc) == callsCount && callsCount == 1) {
- [LinphoneManager set:pause hidden:NO withName:"PAUSE button" andReason:"call count == 1"];
- pause.selected = NO;
- } else {
- [LinphoneManager set:pause hidden:YES withName:"PAUSE button" andReason:AT];
- }
-
- if (fullUpdate) {
- videoUpdateIndicator.hidden = YES;
- LinphoneCallState state = linphone_call_get_state(currentCall);
- if (state == LinphoneCallStreamsRunning || state == LinphoneCallUpdated || state == LinphoneCallUpdatedByRemote) {
- if (linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall))) {
- [addVideo setTitle:NSLocalizedString(@"-video", nil) forState:UIControlStateNormal];
- [IncallViewController updateIndicator: videoCallQuality withCallQuality:linphone_call_get_average_quality(currentCall)];
- } else {
- [addVideo setTitle:NSLocalizedString(@"+video", nil) forState:UIControlStateNormal];
- }
- [addVideo setEnabled:YES];
- } else {
- [addVideo setEnabled:NO];
- [videoCallQuality setImage:nil];
- }
- }
- } else {
- if (callsCount == 1) {
- LinphoneCall* c = (LinphoneCall*)linphone_core_get_calls(lc)->data;
- if (linphone_call_get_state(c) == LinphoneCallPaused ||
- linphone_call_get_state(c) == LinphoneCallPausing) {
- pause.selected = YES;
- }
- [LinphoneManager set:pause hidden:NO withName:"PAUSE button" andReason:AT];
- } else {
- [LinphoneManager set:pause hidden:YES withName:"PAUSE button" andReason:AT];
- }
- [addVideo setEnabled:NO];
- }
- [LinphoneManager set:mergeCalls hidden:!pause.hidden withName:"MERGE button" andReason:AT];
-
- // update conference details view if displayed
- if (self.presentedViewController == conferenceDetail) {
- if (!linphone_core_is_in_conference(lc))
- [self dismissModalViewControllerAnimated:YES];
- else
- [conferenceDetail.table reloadData];
- }
-}
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
- [super viewDidLoad];
- //Controls
- [mute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE button"];
- [speaker initWithOnImage:[UIImage imageNamed:@"HP_inverse.png"] offImage:[UIImage imageNamed:@"HP.png"] debugName:"SPEAKER button"];
-
- verified = [[UIImage imageNamed:@"secured.png"] retain];
- unverified = [[UIImage imageNamed:@"unverified.png"] retain];
-
- //Dialer init
- [zero initWithNumber:'0'];
- [one initWithNumber:'1'];
- [two initWithNumber:'2'];
- [three initWithNumber:'3'];
- [four initWithNumber:'4'];
- [five initWithNumber:'5'];
- [six initWithNumber:'6'];
- [seven initWithNumber:'7'];
- [eight initWithNumber:'8'];
- [nine initWithNumber:'9'];
- [star initWithNumber:'*'];
- [hash initWithNumber:'#'];
-
- [addCall addTarget:self action:@selector(addCallPressed) forControlEvents:UIControlEventTouchUpInside];
- [mergeCalls addTarget:self action:@selector(mergeCallsPressed) forControlEvents:UIControlEventTouchUpInside];
- [pause addTarget:self action:@selector(pauseCallPressed) forControlEvents:UIControlEventTouchUpInside];
- [LinphoneManager set:mergeCalls hidden:YES withName:"MERGE button" andReason:"initialisation"];
-
- if ([LinphoneManager runningOnIpad]) {
- ms_message("Running on iPad");
- mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController-ipad"
- bundle:[NSBundle mainBundle]];
- conferenceDetail = [[ConferenceCallDetailView alloc] initWithNibName:@"ConferenceCallDetailView-ipad"
- bundle:[NSBundle mainBundle]];
-
- } else {
- mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
- bundle:[NSBundle mainBundle]];
- conferenceDetail = [[ConferenceCallDetailView alloc] initWithNibName:@"ConferenceCallDetailView"
- bundle:[NSBundle mainBundle]];
-
- }
-
- UITapGestureRecognizer* singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)];
- [singleFingerTap setNumberOfTapsRequired:1];
- [videoGroup addGestureRecognizer:singleFingerTap];
- [singleFingerTap release];
-
- videoZoomHandler = [[VideoZoomHandler alloc] init];
- [videoZoomHandler setup:videoGroup];
- videoGroup.alpha = 0;
-
- mVideoShown=FALSE;
- mIncallViewIsReady=FALSE;
- mVideoIsPending=FALSE;
- //selectedCall = nil;
-
- callTableView.rowHeight = 80;
-
- [[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];
- addVideo.videoUpdateIndicator = videoUpdateIndicator;
-
- [transfer addTarget:self action:@selector(transferPressed) forControlEvents:UIControlEventTouchUpInside];
-
- // prevent buttons resizing
- /*
- endCtrl.imageView.contentMode = UIViewContentModeCenter;
- mute.imageView.contentMode = UIViewContentModeCenter;
- speaker.imageView.contentMode = UIViewContentModeCenter;
- pause.imageView.contentMode = UIViewContentModeCenter;
- contacts.imageView.contentMode = UIViewContentModeCenter;
- addCall.imageView.contentMode = UIViewContentModeCenter;
- dialer.imageView.contentMode = UIViewContentModeCenter;*/
-
-}
-
--(void) transferPressed {
- /* allow only if call is active */
- if (!linphone_core_get_current_call([LinphoneManager getLc]))
- return;
-
- /* build UIActionSheet */
- if (visibleActionSheet != nil) {
- [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
- }
-
- CallDelegate* cd = [[CallDelegate alloc] init];
- cd.eventType = CD_TRANSFER_CALL;
- cd.delegate = self;
- cd.call = linphone_core_get_current_call([LinphoneManager getLc]);
- NSString* title = NSLocalizedString(@"Transfer to ...",nil);
- visibleActionSheet = [[UIActionSheet alloc] initWithTitle:title
- delegate:cd
- cancelButtonTitle:nil
- destructiveButtonTitle:nil // NSLocalizedString(@"Other...",nil)
- otherButtonTitles:nil];
-
- // add button for each trasnfer-to valid call
- const MSList* calls = linphone_core_get_calls([LinphoneManager getLc]);
- while (calls) {
- LinphoneCall* call = (LinphoneCall*) calls->data;
- LinphoneCallAppData* data = ((LinphoneCallAppData*)linphone_call_get_user_pointer(call));
- if (call != cd.call && !linphone_call_get_current_params(call)->in_conference) {
- const LinphoneAddress* addr = linphone_call_get_remote_address(call);
- NSString* btnTitle = [NSString stringWithFormat : NSLocalizedString(@"%s",nil), (linphone_address_get_display_name(addr) ?linphone_address_get_display_name(addr):linphone_address_get_username(addr))];
- data->transferButtonIndex = [visibleActionSheet addButtonWithTitle:btnTitle];
- } else {
- data->transferButtonIndex = -1;
- }
- calls = calls->next;
- }
-
- if (visibleActionSheet.numberOfButtons == 0) {
- [visibleActionSheet release];
- visibleActionSheet = nil;
-
- [UICallButton enableTransforMode:YES];
- [[LinphoneManager instance] displayDialer];
- } else {
- // add 'Other' option
- [visibleActionSheet addButtonWithTitle:NSLocalizedString(@"Other...",nil)];
-
- // add cancel button on iphone
- if (![LinphoneManager runningOnIpad]) {
- [visibleActionSheet addButtonWithTitle:NSLocalizedString(@"Cancel",nil)];
- }
-
- visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
- if ([LinphoneManager runningOnIpad])
- [visibleActionSheet showFromRect:transfer.bounds inView:transfer animated:NO];
- else
- [visibleActionSheet showInView:self.view];
- }
-}
-
--(void) addCallPressed {
- [LinphoneManager logUIElementPressed:"CALL button"];
- [[LinphoneManager instance] displayDialer];
-}
-
-
--(void) mergeCallsPressed {
- [LinphoneManager logUIElementPressed:"MERGE button"];
- LinphoneCore* lc = [LinphoneManager getLc];
- linphone_core_add_all_to_conference(lc);
-}
-
--(void) pauseCallPressed {
- [LinphoneManager logUIElementPressed:"PAUSE button"];
- LinphoneCore* lc = [LinphoneManager getLc];
-
- LinphoneCall* currentCall = linphone_core_get_current_call(lc);
- if (currentCall) {
- if (linphone_call_get_state(currentCall) == LinphoneCallStreamsRunning) {
- [pause setSelected:NO];
- linphone_core_pause_call(lc, currentCall);
-
- // hide video view
- [self disableVideoDisplay];
- }
- } else {
- if (linphone_core_get_calls_nb(lc) == 1) {
- LinphoneCall* c = (LinphoneCall*) linphone_core_get_calls(lc)->data;
- if (linphone_call_get_state(c) == LinphoneCallPaused) {
- linphone_core_resume_call(lc, c);
- [pause setSelected:YES];
-
- const LinphoneCallParams* p = linphone_call_get_current_params(c);
- if (linphone_call_params_video_enabled(p)) {
- [self enableVideoDisplay];
- }
- }
- }
- }
-}
-
-
--(void)updateCallsDurations {
- [self updateUIFromLinphoneState: NO];
-}
-
--(void) awakeFromNib
-{
-
-}
-
--(void)viewDidAppear:(BOOL)animated {
- [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
- [super viewDidAppear:animated];
- if (dismissed) {
- [self dismissModalViewControllerAnimated:true];
- } else {
- [self updateCallsDurations];
- durationRefreasher = [NSTimer scheduledTimerWithTimeInterval:1
- target:self
- selector:@selector(updateCallsDurations)
- userInfo:nil
- repeats:YES];
- glowingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
- target:self
- selector:@selector(updateGlow)
- userInfo:nil
- repeats:YES];
- glow = 0;
- mIncallViewIsReady=TRUE;
- if (mVideoIsPending) {
- mVideoIsPending=FALSE;
- [self displayVideoCall:nil FromUI:self
- forUser:nil
- withDisplayName:nil];
-
- }
-
-
- UIDevice* device = [UIDevice currentDevice];
- if ([device respondsToSelector:@selector(isMultitaskingSupported)]
- && [device isMultitaskingSupported]) {
- bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"];
-
- [LinphoneManager set:contacts hidden:enableVideo withName:"CONTACT button" andReason:AT];
- [LinphoneManager set:addVideo hidden:!contacts.hidden withName:"ADD_VIDEO button" andReason:AT];
- }
- }
-}
-
--(void) viewWillDisappear:(BOOL)animated {
- if (visibleActionSheet != nil) {
- [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:NO];
- }
-}
-
-- (void) viewDidDisappear:(BOOL)animated {
- if (durationRefreasher != nil) {
- [durationRefreasher invalidate];
- durationRefreasher=nil;
- [glowingTimer invalidate];
- glowingTimer = nil;
- }
- if (!mVideoShown) [[UIApplication sharedApplication] setIdleTimerDisabled:false];
- mIncallViewIsReady=FALSE;
- dismissed = false;
-}
-
-- (void)viewDidUnload {
- [verified release];
- [unverified release];
-}
-
-
-
--(void) displayStatus:(NSString*) message; {
-
-}
-
--(void) displayPad:(bool) enable {
- if (videoView.hidden)
- [LinphoneManager set:callTableView hidden:enable withName:"CALL_TABLE view" andReason:AT];
- [LinphoneManager set:hangUpView hidden:enable withName:"HANG_UP view" andReason:AT];
- [LinphoneManager set:controlSubView hidden:enable withName:"CONTROL view" andReason:AT];
- [LinphoneManager set:padSubView hidden:!enable withName:"PAD view" andReason:AT];
-}
--(void) displayCall:(LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- //restore view
- [self displayPad:false];
- dismissed = false;
- UIDevice *device = [UIDevice currentDevice];
- device.proximityMonitoringEnabled = YES;
- if ([speaker isOn])
- [speaker toggle];
- [self updateUIFromLinphoneState: YES];
-}
-
--(void) displayIncomingCall:(LinphoneCall *)call NotificationFromUI:(UIViewController *)viewCtrl forUser:(NSString *)username withDisplayName:(NSString *)displayName {
-
-}
-
--(void) displayInCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- dismissed = false;
- UIDevice *device = [UIDevice currentDevice];
- device.proximityMonitoringEnabled = YES;
- if (call !=nil && linphone_call_get_dir(call)==LinphoneCallIncoming) {
- if ([speaker isOn]) [speaker toggle];
- }
- [self updateUIFromLinphoneState: YES];
-
- [self disableVideoDisplay];
-}
--(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [self disableVideoDisplay];
- UIViewController* modalVC = self.modalViewController;
- UIDevice *device = [UIDevice currentDevice];
- device.proximityMonitoringEnabled = NO;
- dismissed = true;
- if (modalVC != nil) {
- mVideoIsPending=FALSE;
- // clear previous native window ids
- if (modalVC == mVideoViewController) {
- mVideoShown=FALSE;
- linphone_core_set_native_video_window_id([LinphoneManager getLc],0);
- linphone_core_set_native_preview_window_id([LinphoneManager getLc],0);
- }
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
- [self dismissModalViewControllerAnimated:FALSE];//just in case
- }
-
- [self dismissModalViewControllerAnimated:FALSE]; //disable animation to avoid blanc bar just below status bar*/
- [self updateUIFromLinphoneState: YES];
-}
-
-static void hideSpinner(LinphoneCall* lc, void* user_data);
-
--(void) hideSpinnerIndicator: (LinphoneCall*)call {
- if (!videoWaitingForFirstImage.hidden) {
- videoWaitingForFirstImage.hidden = TRUE;
- } /*else {
- linphone_call_set_next_video_frame_decoded_callback(call, hideSpinner, self);
- }*/
-}
-
-static void hideSpinner(LinphoneCall* call, void* user_data) {
- IncallViewController* thiz = (IncallViewController*) user_data;
- [thiz hideSpinnerIndicator:call];
-}
-
--(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
-
- [self enableVideoDisplay];
-
- [self updateUIFromLinphoneState: YES];
- videoWaitingForFirstImage.hidden = NO;
- [videoWaitingForFirstImage startAnimating];
-
- if (call->videostream) {
- linphone_call_set_next_video_frame_decoded_callback(call, hideSpinner, self);
- }
- return;
-
- if (mIncallViewIsReady) {
- [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
- mVideoShown=TRUE;
- if (self.modalViewController != mVideoViewController)
- [self presentModalViewController:mVideoViewController animated:true];
- else
- ms_message("Do not present again videoViewController");
- } else {
- //postpone presentation
- mVideoIsPending=TRUE;
- }
-}
-
--(void) dismissActionSheet: (id)o {
- if (visibleActionSheet != nil) {
- [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
- visibleActionSheet = nil;
- }
-}
-
--(void) displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- if (linphone_core_get_video_policy([LinphoneManager getLc])->automatically_accept)
- return;
-
- // ask the user if he agrees
- CallDelegate* cd = [[CallDelegate alloc] init];
- cd.eventType = CD_VIDEO_UPDATE;
- cd.delegate = self;
- cd.call = call;
-
- if (visibleActionSheet != nil) {
- [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
- }
- NSString* title = [NSString stringWithFormat : NSLocalizedString(@"'%@' would like to enable video",nil), ([displayName length] > 0) ?displayName:username];
- visibleActionSheet = [[UIActionSheet alloc] initWithTitle:title
- delegate:cd
- cancelButtonTitle:NSLocalizedString(@"Decline",nil)
- destructiveButtonTitle:NSLocalizedString(@"Accept",nil)
- otherButtonTitles:nil];
-
- visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
- [visibleActionSheet showInView:self.view];
-
- /* start cancel timer */
- cd.timeout = [NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(dismissActionSheet:) userInfo:nil repeats:NO];
- [visibleActionSheet release];
-}
-
--(void) firstVideoFrameDecoded: (LinphoneCall*) call {
- // hide video in progress view indicator
- videoWaitingForFirstImage.hidden = TRUE;
-}
-
-- (IBAction)doAction:(id)sender {
-
- if (sender == dialer) {
- [self displayPad:true];
-
- } else if (sender == contacts) {
- // start people picker
- myPeoplePickerController = [[[ABPeoplePickerNavigationController alloc] init] autorelease];
- [myPeoplePickerController setPeoplePickerDelegate:[[ContactPickerDelegate alloc] init] ];
-
- [self presentModalViewController: myPeoplePickerController animated:true];
- } else if (sender == close) {
- [self displayPad:false];
- }
-}
-
-// handle people picker behavior
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
- shouldContinueAfterSelectingPerson:(ABRecordRef)person {
- return true;
-
-}
-
-- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
- shouldContinueAfterSelectingPerson:(ABRecordRef)person
- property:(ABPropertyID)property
- identifier:(ABMultiValueIdentifier)identifier {
-
- return false;
-}
-
-- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
- [self dismissModalViewControllerAnimated:true];
-}
-
-
-
-
-- (void)dealloc {
- [super dealloc];
-}
-
-+(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf{
- const MSList* calls = linphone_core_get_calls([LinphoneManager getLc]);
-
- if (!conf && linphone_core_get_conference_size([LinphoneManager getLc]))
- index--;
-
- while (calls != 0) {
- if (isInConference((LinphoneCall*)calls->data) == conf) {
- if (index == 0)
- break;
- index--;
- }
- calls = calls->next;
- }
-
- if (calls == 0) {
- ms_error("Cannot find call with index %d (in conf: %d)", index, conf);
- return nil;
- } else {
- return (LinphoneCall*)calls->data;
- }
-}
-
--(void) updateActive:(bool_t)active cell:(UITableViewCell*) cell {
- if (!active) {
-
- cell.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.2];
-
- UIColor* c = [[UIColor blackColor] colorWithAlphaComponent:0.5];
- [cell.textLabel setTextColor:c];
- [cell.detailTextLabel setTextColor:c];
- } else {
- cell.backgroundColor = [UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:(0.7+sin(2*glow)*0.3)];
- [cell.textLabel setTextColor:[UIColor whiteColor]];
- [cell.detailTextLabel setTextColor:[UIColor whiteColor]];
- }
- [cell.textLabel setBackgroundColor:[UIColor clearColor]];
- [cell.detailTextLabel setBackgroundColor:[UIColor clearColor]];
-}
-
--(void) updateGlow {
- if (!activeCallCell)
- return;
-
- glow += 0.1;
-
- [self updateActive:YES cell:activeCallCell];
- [activeCallCell.backgroundView setNeedsDisplay];
- [activeCallCell setNeedsDisplay];
- [callTableView setNeedsDisplay];
-}
-
--(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
- [self updateActive:(cell == activeCallCell) cell:cell];
-}
-
-+ (void) updateCellImageView:(UIImageView*)imageView Label:(UILabel*)label DetailLabel:(UILabel*)detailLabel AndAccessoryView:(UIView*)accessoryView withCall:(LinphoneCall*) call {
- if (call == NULL) {
- ms_warning("UpdateCell called with null call");
- [label setText:@""];
- return;
- }
- const LinphoneAddress* addr = linphone_call_get_remote_address(call);
-
- label.adjustsFontSizeToFitWidth = YES;
-
- if (addr) {
- const char* lUserNameChars=linphone_address_get_username(addr);
- NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil);
- NSMutableString* mss = [[NSMutableString alloc] init];
- /* contact name */
- const char* n = linphone_address_get_display_name(addr);
- if (n)
- [mss appendFormat:@"%s", n, nil];
- else
- [mss appendFormat:@"%@",lUserName , nil];
-
- if ([mss compare:label.text] != 0 || imageView.image == nil) {
- [label setText:mss];
-
- imageView.image = [[LinphoneManager instance] getImageFromAddressBook:lUserName];
- }
- [mss release];
- } else {
- [label setText:@"plop"];
- imageView.image = nil;
- }
-
- if (detailLabel != nil) {
- NSMutableString* ms = [[NSMutableString alloc] init ];
- if (linphone_call_get_state(call) == LinphoneCallStreamsRunning) {
- int duration = linphone_call_get_duration(call);
- if (duration >= 60)
- [ms appendFormat:@"%02i:%02i", (duration/60), duration - 60*(duration/60), nil];
- else
- [ms appendFormat:@"%02i sec", duration, nil];
- } else {
- switch (linphone_call_get_state(call)) {
- case LinphoneCallPaused:
- [ms appendFormat:@"%@", NSLocalizedString(@"Paused (tap to resume)", nil), nil];
- break;
- case LinphoneCallOutgoingInit:
- case LinphoneCallOutgoingProgress:
- [ms appendFormat:@"%@...", NSLocalizedString(@"In progress", nil), nil];
- break;
- case LinphoneCallOutgoingRinging:
- [ms appendFormat:@"%@...", NSLocalizedString(@"Ringing...", nil), nil];
- break;
- case LinphoneCallPausedByRemote:
- {
- switch (linphone_call_get_transfer_state(call)) {
- case LinphoneCallOutgoingInit:
- case LinphoneCallOutgoingProgress:
- [ms appendFormat:@"%@...", NSLocalizedString(@"Transfer in progress", nil), nil];
- break;
- case LinphoneCallConnected:
- [ms appendFormat:@"%@", NSLocalizedString(@"Transfer successful", nil), nil];
- break;
- case LinphoneCallError:
- [ms appendFormat:@"%@", NSLocalizedString(@"Transfer failed", nil), nil];
- break;
- case LinphoneCallIdle:
- default:
- [ms appendFormat:@"%@...", NSLocalizedString(@"Paused by remote", nil), nil];
- break;
- }
- break;
- default:
- break;
- }
- }
- }
- [detailLabel setText:ms];
- [ms release];
- }
-}
-
-
--(void) updateConferenceCell:(UITableViewCell*) cell at:(NSIndexPath*)indexPath {
- LinphoneCore* lc = [LinphoneManager getLc];
-
- NSString* t= [NSString stringWithFormat:
- NSLocalizedString(@"Conference", nil),
- linphone_core_get_conference_size(lc) - linphone_core_is_in_conference(lc)];
- [cell.textLabel setText:t];
-
- [self updateActive:NO cell:cell];
- cell.selected = NO;
-
- [callTableView deselectRowAtIndexPath:indexPath animated:NO];
-
- if (!linphone_core_is_in_conference(lc)) {
- [cell.detailTextLabel setText:NSLocalizedString(@"(tap to enter conference)", nil)];
- } else {
- [cell.detailTextLabel setText:
- [NSString stringWithFormat:NSLocalizedString(@"(me + %d participants)", nil), linphone_core_get_conference_size(lc) - linphone_core_is_in_conference(lc)]];
- }
- cell.imageView.image = nil;
-}
-
--(void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
-{
- // show conference detail view
- [self presentModalViewController:conferenceDetail animated:true];
-
-}
-
-// UITableViewDataSource (required)
-- (UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- UITableViewCell *cell = [callTableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"] autorelease];
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
-
- cell.textLabel.font = [UIFont systemFontOfSize:40];
- cell.textLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight;
- }
-
- LinphoneCore* lc = [LinphoneManager getLc];
-
- if (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0) {
- [self updateConferenceCell:cell at:indexPath];
- if (linphone_core_is_in_conference(lc))
- activeCallCell = cell;
- cell.accessoryView = nil;
- if (linphone_core_is_in_conference(lc))
- cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
- else
- cell.accessoryType = UITableViewCellAccessoryNone;
- } else {
- LinphoneCall* call = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:NO];
- if (call == nil)
- return cell; // return dummy cell
- LinphoneMediaEncryption enc = linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
- if (cell.accessoryView == nil) {
- UIView *containerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 28, 28)] autorelease];
- cell.accessoryView = containerView;
- }
- else {
- for (UIView *view in cell.accessoryView.subviews) {
- [view removeFromSuperview];
- }
- }
- [IncallViewController updateCellImageView:cell.imageView Label:cell.textLabel DetailLabel:cell.detailTextLabel AndAccessoryView:(UIView*)cell.accessoryView withCall:call];
- if (linphone_core_get_current_call(lc) == call)
- activeCallCell = cell;
- cell.accessoryType = UITableViewCellAccessoryNone;
-
- // Call Quality Indicator
- UIImageView* callquality = [UIImageView new];
- [callquality setFrame:CGRectMake(0, 0, 28, 28)];
- if (call->state == LinphoneCallStreamsRunning)
- {
- [IncallViewController updateIndicator: callquality withCallQuality:linphone_call_get_average_quality(call)];
- }
- else {
- [callquality setImage:nil];
- }
-
- if (enc != LinphoneMediaEncryptionNone) {
- cell.accessoryView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 60, 28)] autorelease];
- UIButton* accessoryBtn = [UIButton buttonWithType:UIButtonTypeCustom];
- [accessoryBtn setFrame:CGRectMake(30, 0, 28, 28)];
- [accessoryBtn setImage:nil forState:UIControlStateNormal];
- [accessoryBtn setTag:SECURE_BUTTON_TAG];
- accessoryBtn.backgroundColor = [UIColor clearColor];
- accessoryBtn.userInteractionEnabled = YES;
-
- if (enc == LinphoneMediaEncryptionSRTP || linphone_call_get_authentication_token_verified(call)) {
- [accessoryBtn setImage: verified forState:UIControlStateNormal];
- } else {
- [accessoryBtn setImage: unverified forState:UIControlStateNormal];
- }
- [cell.accessoryView addSubview:accessoryBtn];
-
- if (((UIButton*)accessoryBtn).imageView.image != nil && linphone_call_params_get_media_encryption(linphone_call_get_current_params(call)) == LinphoneMediaEncryptionZRTP) {
- [((UIButton*)accessoryBtn) addTarget:self action:@selector(secureIconPressed:withEvent:) forControlEvents:UIControlEventTouchUpInside];
- }
- }
-
- [cell.accessoryView addSubview:callquality];
- [callquality release];
- }
-
- cell.userInteractionEnabled = YES;
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- return cell;
-}
-
--(void) secureIconPressed:(UIControl*) button withEvent: (UIEvent*) evt {
- NSSet* touches = [evt allTouches];
- UITouch* touch = [touches anyObject];
- CGPoint currentTouchPos = [touch locationInView:self.callTableView];
- NSIndexPath *path = [self.callTableView indexPathForRowAtPoint:currentTouchPos];
- if (path) {
- LinphoneCall* call = [IncallViewController retrieveCallAtIndex:path.row inConference:NO];
- // start action sheet to validate/unvalidate zrtp code
- CallDelegate* cd = [[CallDelegate alloc] init];
- cd.eventType = CD_ZRTP;
- cd.delegate = self;
- cd.call = call;
- UIView* container=(UIView*)[callTableView cellForRowAtIndexPath:path].accessoryView;
- UIButton *button=(UIButton*)[container viewWithTag:SECURE_BUTTON_TAG];
- [button setImage:nil forState:UIControlStateNormal];
-
- if (visibleActionSheet != nil) {
- [visibleActionSheet dismissWithClickedButtonIndex:visibleActionSheet.cancelButtonIndex animated:TRUE];
- }
- visibleActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" Mark auth token '%s' as:",nil),linphone_call_get_authentication_token(call)]
- delegate:cd
- cancelButtonTitle:NSLocalizedString(@"Unverified",nil)
- destructiveButtonTitle:NSLocalizedString(@"Verified",nil)
- otherButtonTitles:nil];
-
- visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
- [visibleActionSheet showInView:self.view];
- [visibleActionSheet release];
- }
-}
-
--(void) actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas {
- LinphoneCall* call = (LinphoneCall*)datas;
- // maybe we could verify call validity
-
- switch (type) {
- case CD_ZRTP: {
- if (buttonIndex == 0)
- linphone_call_set_authentication_token_verified(call, YES);
- else if (buttonIndex == 1)
- linphone_call_set_authentication_token_verified(call, NO);
- visibleActionSheet = nil;
- break;
- }
- case CD_VIDEO_UPDATE: {
- LinphoneCall* call = (LinphoneCall*)datas;
- LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
- if ([visibleActionSheet destructiveButtonIndex] == buttonIndex) {
- // accept video
- linphone_call_params_enable_video(paramsCopy, TRUE);
- linphone_core_accept_call_update([LinphoneManager getLc], call, paramsCopy);
- } else {
- // decline video
- ms_message("User declined video proposal");
- linphone_core_accept_call_update([LinphoneManager getLc], call, NULL);
- }
- linphone_call_params_destroy(paramsCopy);
- visibleActionSheet = nil;
- break;
- }
- case CD_STOP_VIDEO_ON_LOW_BATTERY: {
- LinphoneCall* call = (LinphoneCall*)datas;
- LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
- if ([visibleActionSheet destructiveButtonIndex] == buttonIndex) {
- // stop video
- linphone_call_params_enable_video(paramsCopy, FALSE);
- linphone_core_update_call([LinphoneManager getLc], call, paramsCopy);
- }
- break;
- }
- case CD_TRANSFER_CALL: {
- LinphoneCall* call = (LinphoneCall*)datas;
- // browse existing call and trasnfer to the one matching the btn id
- const MSList* calls = linphone_core_get_calls([LinphoneManager getLc]);
- while (calls) {
- LinphoneCall* call2 = (LinphoneCall*) calls->data;
- LinphoneCallAppData* data = ((LinphoneCallAppData*)linphone_call_get_user_pointer(call2));
- if (data->transferButtonIndex == buttonIndex) {
- linphone_core_transfer_call_to_another([LinphoneManager getLc], call, call2);
- return;
- }
- data->transferButtonIndex = -1;
- calls = calls->next;
- }
- if (![LinphoneManager runningOnIpad] && buttonIndex == (actionSheet.numberOfButtons - 1)) {
- // cancel button
- return;
- }
- // user must jhave pressed 'other...' button as we did not find a call
- // with the correct indice
- [UICallButton enableTransforMode:YES];
- [[LinphoneManager instance] displayDialer];
- break;
- }
- default:
- ms_error("Unhandled CallDelegate event of type: %d received - ignoring", type);
- }
-}
-
-// UITableViewDataSource (required)
-- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
-{
- LinphoneCore* lc = [LinphoneManager getLc];
-
- return callCount(lc) + (int)(linphone_core_get_conference_size(lc) > 0);
-
- if (section == 0 && linphone_core_get_conference_size(lc) > 0)
- return linphone_core_get_conference_size(lc) - linphone_core_is_in_conference(lc);
-
- return callCount(lc);
-}
-
-// UITableViewDataSource
-- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
- return 1;
- LinphoneCore* lc = [LinphoneManager getLc];
- int count = 0;
-
- if (callCount(lc) > 0)
- count++;
-
- if (linphone_core_get_conference_size([LinphoneManager getLc]) > 0)
- count ++;
-
- return count;
-}
-
-// UITableViewDataSource
-- (NSString*) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
-{
- return nil;
-}
-
-// UITableViewDataSource
-- (NSString*) tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
-{
- return nil;
-}
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
-{
- [tableView deselectRowAtIndexPath:indexPath animated:NO];
-
- LinphoneCore* lc = [LinphoneManager getLc];
-
- bool inConf = (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0);
-
- LinphoneCall* selectedCall = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:inConf];
-
- if (inConf) {
- if (linphone_core_is_in_conference(lc))
- return;
- LinphoneCall* current = linphone_core_get_current_call(lc);
- if (current)
- linphone_core_pause_call(lc, current);
- linphone_core_enter_conference([LinphoneManager getLc]);
- } else if (selectedCall) {
- if (linphone_core_is_in_conference(lc)) {
- linphone_core_leave_conference(lc);
- }
- linphone_core_resume_call([LinphoneManager getLc], selectedCall);
- }
-
- [self updateUIFromLinphoneState: YES];
-}
-
-@end
diff --git a/Classes/IncallViewController.xib b/Classes/IncallViewController.xib
deleted file mode 100644
index 81185bcd5..000000000
--- a/Classes/IncallViewController.xib
+++ /dev/null
@@ -1,2226 +0,0 @@
-
-
-
- 784
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- YES
- IBUIButton
- IBUIImageView
- IBUIViewController
- IBProxyObject
- IBUIActivityIndicatorView
- IBUITableView
- IBUIView
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
- YES
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
-
-
- 274
-
- YES
-
-
- 292
-
- YES
-
-
- 292
- {320, 480}
-
-
-
- _NS:196
-
- 3
- MCAwAA
-
- IBCocoaTouchFramework
-
-
-
- 292
- {{240, 354}, {80, 106}}
-
-
-
-
- IBCocoaTouchFramework
-
-
-
- 292
- {{4, 428}, {28, 28}}
-
-
-
- _NS:567
- NO
- IBCocoaTouchFramework
-
-
-
- 292
- {{141, 212}, {37, 37}}
-
-
-
- _NS:1030
- NO
- IBCocoaTouchFramework
- NO
- YES
- 0
-
-
- {320, 460}
-
-
-
- _NS:196
-
- 2
- MC4wNTQ5MDE5NjA3OCAwLjA4MjM1Mjk0MTE4IDAuMTI5NDExNzY0NwA
-
- NO
- IBCocoaTouchFramework
-
-
-
- 292
- {320, 66}
-
-
-
-
- 1
- MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA
-
- NO
- NO
- 0.0
- IBCocoaTouchFramework
- 0
- 0
- Change camera
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
- 3
- MC41AA
-
-
- NSImage
- clavier-01-106px.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 274
- {320, 251}
-
-
-
- _NS:418
-
- YES
- IBCocoaTouchFramework
- YES
- NO
- 0
- YES
- 44
- 22
- 22
-
-
-
- 292
-
- YES
-
-
- 292
- {{0, 1}, {320, 66}}
-
-
-
-
- 1
- MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- stopcall-red.png
-
-
-
-
-
-
- {{0, 393.5}, {320, 77}}
-
-
-
- _NS:196
-
- IBCocoaTouchFramework
-
-
-
- 292
-
- YES
-
-
- 292
- {{80, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- grouper.png
-
-
- 2
- 17
-
-
- Helvetica-Bold
- 17
- 16
-
-
-
-
- 292
- {{0, 4}, {107, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- mic_active.png
-
-
- NSImage
- micro_inverse.png
-
-
- NSImage
- micro.png
-
-
- 2
- 2
-
-
- Helvetica-Bold
- 18
- 16
-
-
-
-
- 292
- {{0, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- ajouter.png
-
-
-
-
-
-
- 292
- {{160, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- Transfer
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
-
- 2
- 15
-
-
-
-
-
- 292
- {{240, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
- 1
- MCAwIDAAA
-
-
- NSImage
- contact.png
-
-
-
-
-
-
- -2147483356
- {{240, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 1
- video
-
-
- 3
- MC42NjY2NjY2NjY3AA
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
-
- NSImage
- clavier-01-160px.png
-
-
-
-
-
-
- -2147483356
- {{261.5, 84.5}, {37, 37}}
-
-
-
- _NS:1030
- NO
- IBCocoaTouchFramework
- NO
- 0
-
-
-
- 292
- {{107, 4}, {106, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- clavier.png
-
-
-
-
-
-
- 292
- {{213, 4}, {107, 66}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- HP_inverse.png
-
-
- NSImage
- HP.png
-
-
-
-
-
-
- 292
- {{80, 70}, {80, 66}}
-
-
-
-
- NO
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
-
- NSImage
- pause_inactif.png
-
-
- NSImage
- pause.png
-
-
-
-
-
- {{0, 258.5}, {320, 135}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
-
-
-
- -2147483356
-
- YES
-
-
- 292
- {{119, 251}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- close
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 193}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 19}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 1
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 19}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 2
-
-
-
-
-
-
-
-
- 292
- {{207, 19}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 3
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 77}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 4
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 77}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 5
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{207, 77}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 6
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 135}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 7
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{119, 135}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 8
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{207, 135}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 9
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{31, 193}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- *
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
- 292
- {{207, 193}, {82, 52}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- #
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
- {{0, 71}, {320, 310}}
-
-
-
-
- 3
- MC4yNAA
-
- NO
- NO
- IBCocoaTouchFramework
-
-
- {{0, 20}, {320, 460}}
-
-
-
-
- NO
- IBCocoaTouchFramework
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
-
- YES
-
-
- videoCallQuality
-
-
-
- 138
-
-
-
- videoPreview
-
-
-
- 130
-
-
-
- videoView
-
-
-
- 133
-
-
-
- videoGroup
-
-
-
- 129
-
-
-
- addVideo
-
-
-
- 125
-
-
-
- mergeCalls
-
-
-
- 114
-
-
-
- mute
-
-
-
- 80
-
-
-
- addCall
-
-
-
- 112
-
-
-
- contacts
-
-
-
- 84
-
-
-
- dialer
-
-
-
- 49
-
-
-
- speaker
-
-
-
- 82
-
-
-
- pause
-
-
-
- 115
-
-
-
- controlSubView
-
-
-
- 44
-
-
-
- callTableView
-
-
-
- 109
-
-
-
- five
-
-
-
- 69
-
-
-
- nine
-
-
-
- 58
-
-
-
- seven
-
-
-
- 73
-
-
-
- six
-
-
-
- 71
-
-
-
- four
-
-
-
- 67
-
-
-
- three
-
-
-
- 60
-
-
-
- zero
-
-
-
- 55
-
-
-
- two
-
-
-
- 59
-
-
-
- close
-
-
-
- 51
-
-
-
- hash
-
-
-
- 57
-
-
-
- eight
-
-
-
- 75
-
-
-
- one
-
-
-
- 54
-
-
-
- star
-
-
-
- 56
-
-
-
- padSubView
-
-
-
- 45
-
-
-
- endCtrl
-
-
-
- 99
-
-
-
- hangUpView
-
-
-
- 122
-
-
-
- view
-
-
-
- 23
-
-
-
- videoCameraSwitch
-
-
-
- 141
-
-
-
- videoUpdateIndicator
-
-
-
- 143
-
-
-
- videoWaitingForFirstImage
-
-
-
- 145
-
-
-
- transfer
-
-
-
- 150
-
-
-
- doAction:
-
-
- 7
-
- 103
-
-
-
- doAction:
-
-
- 7
-
- 100
-
-
-
- doAction:
-
-
- 7
-
- 101
-
-
-
- dataSource
-
-
-
- 107
-
-
-
- delegate
-
-
-
- 108
-
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 2
-
-
- YES
-
-
-
-
-
- 9
-
-
- YES
-
-
-
-
-
-
-
-
-
-
- 126
-
-
- YES
-
-
-
-
-
-
- video
-
-
- 137
-
-
- videocallquality
-
-
- 127
-
-
- preview
-
-
- 132
-
-
- display
-
-
- 26
-
-
- YES
-
-
-
-
-
-
-
-
-
-
-
-
- controls
-
-
- 123
-
-
- video
-
-
- 104
-
-
- merge
-
-
- 16
-
-
- mute
-
-
- 111
-
-
- addcall
-
-
- 15
-
-
- contacts
-
-
- 17
-
-
- dialer
-
-
- 13
-
-
- speaker
-
-
- 113
-
-
- pauseresume
-
-
- 106
-
-
-
-
- 27
-
-
- YES
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pad
-
-
- 36
-
-
- 5
-
-
- 32
-
-
- 9
-
-
- 34
-
-
- 7
-
-
- 37
-
-
- 6
-
-
- 35
-
-
- 4
-
-
- 38
-
-
- 3
-
-
- 41
-
-
- 0
-
-
- 39
-
-
- 2
-
-
- 29
-
-
- close
-
-
- 40
-
-
- hash
-
-
- 33
-
-
- 8
-
-
- 30
-
-
- 1
-
-
- 31
-
-
- star
-
-
- 120
-
-
- YES
-
-
-
- hangupview
-
-
- 18
-
-
- end
-
-
- 140
-
-
- camswitch
-
-
- 142
-
-
- video_update_indicator
-
-
- 144
-
-
-
-
- 147
-
-
- transfer
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -1.IBPluginDependency
- -2.CustomClassName
- -2.IBPluginDependency
- 104.IBPluginDependency
- 104.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 106.IBPluginDependency
- 111.IBPluginDependency
- 111.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 113.IBPluginDependency
- 113.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 120.IBPluginDependency
- 123.CustomClassName
- 123.IBPluginDependency
- 123.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 126.IBPluginDependency
- 127.IBPluginDependency
- 13.CustomClassName
- 13.IBPluginDependency
- 13.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 132.IBPluginDependency
- 137.IBPluginDependency
- 140.CustomClassName
- 140.IBPluginDependency
- 142.IBPluginDependency
- 144.IBPluginDependency
- 147.IBPluginDependency
- 147.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 15.IBPluginDependency
- 16.CustomClassName
- 16.IBPluginDependency
- 16.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 17.IBPluginDependency
- 18.CustomClassName
- 18.IBPluginDependency
- 2.IBPluginDependency
- 26.IBPluginDependency
- 27.IBPluginDependency
- 29.IBPluginDependency
- 30.CustomClassName
- 30.IBPluginDependency
- 31.CustomClassName
- 31.IBPluginDependency
- 32.CustomClassName
- 32.IBPluginDependency
- 33.CustomClassName
- 33.IBPluginDependency
- 34.CustomClassName
- 34.IBPluginDependency
- 35.CustomClassName
- 35.IBPluginDependency
- 36.CustomClassName
- 36.IBPluginDependency
- 37.CustomClassName
- 37.IBPluginDependency
- 38.CustomClassName
- 38.IBPluginDependency
- 39.CustomClassName
- 39.IBPluginDependency
- 40.CustomClassName
- 40.IBPluginDependency
- 40.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 41.CustomClassName
- 41.IBPluginDependency
- 9.IBPluginDependency
-
-
- YES
- IncallViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIToggleVideoButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UISpeakerButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
-
-
-
-
- YES
-
-
-
-
- 150
-
-
-
- YES
-
- IncallViewController
- UIViewController
-
- doAction:
- id
-
-
- doAction:
-
- doAction:
- id
-
-
-
- YES
-
- YES
- addCall
- addVideo
- callTableView
- close
- conferenceDetail
- contacts
- controlSubView
- dialer
- eight
- endCtrl
- five
- four
- hangUpView
- hash
- mergeCalls
- mute
- nine
- one
- padSubView
- pause
- seven
- six
- speaker
- star
- three
- transfer
- two
- videoCallQuality
- videoCameraSwitch
- videoGroup
- videoPreview
- videoUpdateIndicator
- videoView
- videoViewController
- videoWaitingForFirstImage
- zero
-
-
- YES
- UIButton
- UIToggleVideoButton
- UITableView
- UIButton
- UIViewController
- UIButton
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UIImageView
- UICamSwitch
- UIView
- UIView
- UIActivityIndicatorView
- UIView
- VideoViewController
- UIActivityIndicatorView
- UIButton
-
-
-
- YES
-
- YES
- addCall
- addVideo
- callTableView
- close
- conferenceDetail
- contacts
- controlSubView
- dialer
- eight
- endCtrl
- five
- four
- hangUpView
- hash
- mergeCalls
- mute
- nine
- one
- padSubView
- pause
- seven
- six
- speaker
- star
- three
- transfer
- two
- videoCallQuality
- videoCameraSwitch
- videoGroup
- videoPreview
- videoUpdateIndicator
- videoView
- videoViewController
- videoWaitingForFirstImage
- zero
-
-
- YES
-
- addCall
- UIButton
-
-
- addVideo
- UIToggleVideoButton
-
-
- callTableView
- UITableView
-
-
- close
- UIButton
-
-
- conferenceDetail
- UIViewController
-
-
- contacts
- UIButton
-
-
- controlSubView
- UIView
-
-
- dialer
- UIButton
-
-
- eight
- UIButton
-
-
- endCtrl
- UIButton
-
-
- five
- UIButton
-
-
- four
- UIButton
-
-
- hangUpView
- UIView
-
-
- hash
- UIButton
-
-
- mergeCalls
- UIButton
-
-
- mute
- UIButton
-
-
- nine
- UIButton
-
-
- one
- UIButton
-
-
- padSubView
- UIView
-
-
- pause
- UIButton
-
-
- seven
- UIButton
-
-
- six
- UIButton
-
-
- speaker
- UIButton
-
-
- star
- UIButton
-
-
- three
- UIButton
-
-
- transfer
- UIButton
-
-
- two
- UIButton
-
-
- videoCallQuality
- UIImageView
-
-
- videoCameraSwitch
- UICamSwitch
-
-
- videoGroup
- UIView
-
-
- videoPreview
- UIView
-
-
- videoUpdateIndicator
- UIActivityIndicatorView
-
-
- videoView
- UIView
-
-
- videoViewController
- VideoViewController
-
-
- videoWaitingForFirstImage
- UIActivityIndicatorView
-
-
- zero
- UIButton
-
-
-
-
- IBProjectSource
- ./Classes/IncallViewController.h
-
-
-
- UICamSwitch
- UIButton
-
- preview
- UIView
-
-
- preview
-
- preview
- UIView
-
-
-
- IBProjectSource
- ./Classes/UICamSwitch.h
-
-
-
- UIDigitButton
- UIButton
-
- IBProjectSource
- ./Classes/UIDigitButton.h
-
-
-
- UIHangUpButton
- UIButton
-
- IBProjectSource
- ./Classes/UIHangUpButton.h
-
-
-
- UIMuteButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UIMuteButton.h
-
-
-
- UISpeakerButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UISpeakerButton.h
-
-
-
- UIToggleButton
- UIButton
-
- IBProjectSource
- ./Classes/UIToggleButton.h
-
-
-
- UIToggleVideoButton
- UIButton
-
- videoUpdateIndicator
- UIActivityIndicatorView
-
-
- videoUpdateIndicator
-
- videoUpdateIndicator
- UIActivityIndicatorView
-
-
-
- IBProjectSource
- ./Classes/UIToggleVideoButton.h
-
-
-
- VideoViewController
- UIViewController
-
- YES
-
- YES
- mCallQuality
- mCallQualityLandLeft
- mCallQualityLandRight
- mCamSwitch
- mCamSwitchLandLeft
- mCamSwitchLandRight
- mDisplay
- mDisplayLandLeft
- mDisplayLandRight
- mHangUp
- mHangUpLandLeft
- mHangUpLandRight
- mLandscapeLeft
- mLandscapeRight
- mMute
- mMuteLandLeft
- mMuteLandRight
- mPortrait
- mPreview
- mPreviewLandLeft
- mPreviewLandRight
-
-
- YES
- UIImageView
- UIImageView
- UIImageView
- UICamSwitch
- UICamSwitch
- UICamSwitch
- UIView
- UIView
- UIView
- UIHangUpButton
- UIHangUpButton
- UIHangUpButton
- UIView
- UIView
- UIMuteButton
- UIMuteButton
- UIMuteButton
- UIView
- UIView
- UIView
- UIView
-
-
-
- YES
-
- YES
- mCallQuality
- mCallQualityLandLeft
- mCallQualityLandRight
- mCamSwitch
- mCamSwitchLandLeft
- mCamSwitchLandRight
- mDisplay
- mDisplayLandLeft
- mDisplayLandRight
- mHangUp
- mHangUpLandLeft
- mHangUpLandRight
- mLandscapeLeft
- mLandscapeRight
- mMute
- mMuteLandLeft
- mMuteLandRight
- mPortrait
- mPreview
- mPreviewLandLeft
- mPreviewLandRight
-
-
- YES
-
- mCallQuality
- UIImageView
-
-
- mCallQualityLandLeft
- UIImageView
-
-
- mCallQualityLandRight
- UIImageView
-
-
- mCamSwitch
- UICamSwitch
-
-
- mCamSwitchLandLeft
- UICamSwitch
-
-
- mCamSwitchLandRight
- UICamSwitch
-
-
- mDisplay
- UIView
-
-
- mDisplayLandLeft
- UIView
-
-
- mDisplayLandRight
- UIView
-
-
- mHangUp
- UIHangUpButton
-
-
- mHangUpLandLeft
- UIHangUpButton
-
-
- mHangUpLandRight
- UIHangUpButton
-
-
- mLandscapeLeft
- UIView
-
-
- mLandscapeRight
- UIView
-
-
- mMute
- UIMuteButton
-
-
- mMuteLandLeft
- UIMuteButton
-
-
- mMuteLandRight
- UIMuteButton
-
-
- mPortrait
- UIView
-
-
- mPreview
- UIView
-
-
- mPreviewLandLeft
- UIView
-
-
- mPreviewLandRight
- UIView
-
-
-
-
- IBProjectSource
- ./Classes/VideoViewController.h
-
-
-
-
- 0
- IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
-
-
- YES
- 3
-
- YES
-
- YES
- HP.png
- HP_inverse.png
- ajouter.png
- clavier-01-106px.png
- clavier-01-160px.png
- clavier.png
- contact.png
- grouper.png
- mic_active.png
- micro.png
- micro_inverse.png
- pause.png
- pause_inactif.png
- stopcall-red.png
-
-
- YES
- {107, 67}
- {107, 67}
- {107, 67}
- {106, 60}
- {160, 60}
- {106, 67}
- {107, 67}
- {106, 67}
- {82, 82}
- {107, 67}
- {107, 67}
- {106, 67}
- {106, 67}
- {62, 54}
-
-
- 933
-
-
diff --git a/Classes/LinphoneAppDelegate.h b/Classes/LinphoneAppDelegate.h
index f5e9508a1..50cb4bc0a 100644
--- a/Classes/LinphoneAppDelegate.h
+++ b/Classes/LinphoneAppDelegate.h
@@ -1,4 +1,4 @@
-/* linphoneAppDelegate.h
+/* LinphoneAppDelegate.h
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
@@ -17,44 +17,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
#import
#import
-#import "CoreTelephony/CTCallCenter.h"
-
-#define DIALER_TAB_INDEX 1
-#define CONTACTS_TAB_INDEX 2
-#define HISTORY_TAB_INDEX 0
-#define MORE_TAB_INDEX 3
-
-@class ContactPickerDelegate;
-@class IncallViewController;
-@class PhoneViewController;
-@class CallHistoryTableViewController;
-
-
-@interface linphoneAppDelegate : NSObject {
- UIWindow *window;
- IBOutlet UITabBarController* myTabBarController;
- IBOutlet ABPeoplePickerNavigationController* myPeoplePickerController;
- IBOutlet PhoneViewController* myPhoneViewController;
- CallHistoryTableViewController* myCallHistoryTableViewController;
- ContactPickerDelegate* myContactPickerDelegate;
-
- CTCallCenter* callCenter;
-}
-
-- (void) loadDefaultSettings:(NSDictionary *) appDefaults;
--(void) setupUI;
--(void) setupGSMInteraction;
-
--(void) startApplication;
-
-@property (nonatomic, retain) IBOutlet UIWindow *window;
-@property (nonatomic, retain) IBOutlet UITabBarController* myTabBarController;
-@property (nonatomic, retain) ABPeoplePickerNavigationController* myPeoplePickerController;
-@property (nonatomic, retain) IBOutlet PhoneViewController* myPhoneViewController;
+#import
+@interface UILinphoneWindow : UIWindow
+
+@end
+
+@interface LinphoneAppDelegate : NSObject {
+ UIWindow *window;
+ CTCallCenter* callCenter;
+ BOOL started;
+}
+
+@property (assign) BOOL started;
@end
diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m
index 8162f851d..a6673af65 100644
--- a/Classes/LinphoneAppDelegate.m
+++ b/Classes/LinphoneAppDelegate.m
@@ -1,4 +1,4 @@
-/* linphoneAppDelegate.m
+/* LinphoneAppDelegate.m
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
@@ -17,18 +17,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#import "PhoneViewController.h"
#import "linphoneAppDelegate.h"
-#import "ContactPickerDelegate.h"
#import "AddressBook/ABPerson.h"
+#import "BuschJaegerMainView.h"
#import "CoreTelephony/CTCallCenter.h"
#import "CoreTelephony/CTCall.h"
-#import "ConsoleViewController.h"
-#import "MoreViewController.h"
-#include "CallHistoryTableViewController.h"
-
#include "LinphoneManager.h"
#include "linphonecore.h"
@@ -39,51 +34,77 @@ int __aeabi_idiv(int a, int b) {
}
#endif
-@implementation linphoneAppDelegate
+@implementation UILinphoneWindow
-@synthesize window;
-@synthesize myTabBarController;
-@synthesize myPeoplePickerController;
-@synthesize myPhoneViewController;
+@end
--(void) handleGSMCallInteration: (id) cCenter {
+@implementation LinphoneAppDelegate
+
+@synthesize started;
+
+
+#pragma mark - Lifecycle Functions
+
+- (id)init {
+ self = [super init];
+ if(self != nil) {
+ self->started = FALSE;
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+
+#pragma mark -
+
+- (void)handleGSMCallInteration: (id) cCenter {
CTCallCenter* ct = (CTCallCenter*) cCenter;
int callCount = [ct.currentCalls count];
if (!callCount) {
- NSLog(@"No GSM call -> enabling SIP calls");
+ [LinphoneLogger logc:LinphoneLoggerLog format:"No GSM call -> enabling SIP calls"];
linphone_core_set_max_calls([LinphoneManager getLc], 3);
} else {
- NSLog(@"%d GSM call(s) -> disabling SIP calls", callCount);
+ [LinphoneLogger logc:LinphoneLoggerLog format:"%d GSM call(s) -> disabling SIP calls", callCount];
/* pause current call, if any */
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
if (call) {
- NSLog(@"Pausing SIP call");
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Pausing SIP call"];
linphone_core_pause_call([LinphoneManager getLc], call);
}
linphone_core_set_max_calls([LinphoneManager getLc], 0);
}
}
--(void)applicationWillResignActive:(UIApplication *)application {
+- (void)applicationDidEnterBackground:(UIApplication *)application{
+ [LinphoneLogger logc:LinphoneLoggerLog format:"applicationDidEnterBackground"];
+ if(![LinphoneManager isLcReady]) return;
+ [[LinphoneManager instance] enterBackgroundMode];
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"applicationWillResignActive"];
+ if(![LinphoneManager isLcReady]) return;
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* call = linphone_core_get_current_call(lc);
- if (call == NULL)
- return;
+
+
+ if (call){
+ /* save call context */
+ LinphoneManager* instance = [LinphoneManager instance];
+ instance->currentCallContextBeforeGoingBackground.call = call;
+ instance->currentCallContextBeforeGoingBackground.cameraIsEnabled = linphone_call_camera_enabled(call);
- /* save call context */
- LinphoneManager* instance = [LinphoneManager instance];
- instance->currentCallContextBeforeGoingBackground.call = call;
- instance->currentCallContextBeforeGoingBackground.cameraIsEnabled = linphone_call_camera_enabled(call);
+ const LinphoneCallParams* params = linphone_call_get_current_params(call);
+ if (linphone_call_params_video_enabled(params)) {
+ linphone_call_enable_camera(call, false);
+ }
+ }
- const LinphoneCallParams* params = linphone_call_get_current_params(call);
- if (linphone_call_params_video_enabled(params)) {
- linphone_call_enable_camera(call, false);
- }
-
-}
-- (void)applicationDidEnterBackground:(UIApplication *)application {
- if (![[LinphoneManager instance] enterBackgroundMode]) {
+ if (![[LinphoneManager instance] resignActive]) {
// destroying eventHandler if app cannot go in background.
// Otherwise if a GSM call happen and Linphone is resumed,
// the handler will be called before LinphoneCore is built.
@@ -92,50 +113,48 @@ int __aeabi_idiv(int a, int b) {
[callCenter release];
callCenter = nil;
}
+
}
+
- (void)applicationDidBecomeActive:(UIApplication *)application {
- if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
- && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground
- && [[NSUserDefaults standardUserDefaults] boolForKey:@"disable_autoboot_preference"]) {
- // autoboot disabled, doing nothing
- return;
- } else if ([LinphoneManager instance] == nil) {
- [self startApplication];
- }
+ [LinphoneLogger logc:LinphoneLoggerLog format:"applicationDidBecomeActive"];
+ [self startApplication];
[[LinphoneManager instance] becomeActive];
- if (callCenter == nil) {
- callCenter = [[CTCallCenter alloc] init];
- callCenter.callEventHandler = ^(CTCall* call) {
- // post on main thread
- [self performSelectorOnMainThread:@selector(handleGSMCallInteration:)
- withObject:callCenter
- waitUntilDone:YES];
- };
- }
// check call state at startup
[self handleGSMCallInteration:callCenter];
LinphoneCore* lc = [LinphoneManager getLc];
LinphoneCall* call = linphone_core_get_current_call(lc);
- if (call == NULL)
- return;
- LinphoneManager* instance = [LinphoneManager instance];
- if (call == instance->currentCallContextBeforeGoingBackground.call) {
- const LinphoneCallParams* params = linphone_call_get_current_params(call);
- if (linphone_call_params_video_enabled(params)) {
- linphone_call_enable_camera(
+ if (call){
+ LinphoneManager* instance = [LinphoneManager instance];
+ if (call == instance->currentCallContextBeforeGoingBackground.call) {
+ const LinphoneCallParams* params = linphone_call_get_current_params(call);
+ if (linphone_call_params_video_enabled(params)) {
+ linphone_call_enable_camera(
call,
instance->currentCallContextBeforeGoingBackground.cameraIsEnabled);
- }
- instance->currentCallContextBeforeGoingBackground.call = 0;
+ }
+ instance->currentCallContextBeforeGoingBackground.call = 0;
+ }
+ }
+}
+
+- (void)setupGSMInteraction {
+ if (callCenter == nil) {
+ callCenter = [[CTCallCenter alloc] init];
+ callCenter.callEventHandler = ^(CTCall* call) {
+ // post on main thread
+ [self performSelectorOnMainThread:@selector(handleGSMCallInteration:)
+ withObject:callCenter
+ waitUntilDone:YES];
+ };
}
}
-- (void) loadDefaultSettings:(NSDictionary *) appDefaults {
-
+- (void) loadDefaultSettings {
NSString *settingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"];
if(!settingsBundle) {
NSLog(@"Could not find Settings.bundle");
@@ -143,145 +162,137 @@ int __aeabi_idiv(int a, int b) {
}
NSMutableDictionary *rootSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Root.plist"]];
- NSMutableDictionary *audioSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"audio.plist"]];
- NSMutableDictionary *videoSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"video.plist"]];
- NSMutableDictionary *advancedSettings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Advanced.plist"]];
-
NSMutableArray *preferences = [rootSettings objectForKey:@"PreferenceSpecifiers"];
- [preferences addObjectsFromArray:[audioSettings objectForKey:@"PreferenceSpecifiers"]];
- [preferences addObjectsFromArray:[videoSettings objectForKey:@"PreferenceSpecifiers"]];
- [preferences addObjectsFromArray:[advancedSettings objectForKey:@"PreferenceSpecifiers"]];
-
NSMutableDictionary *defaultsToRegister = [[NSMutableDictionary alloc] initWithCapacity:[preferences count]];
-
- for(NSDictionary *prefSpecification in preferences) {
- NSString *key = [prefSpecification objectForKey:@"Key"];
- if(key && [prefSpecification objectForKey:@"DefaultValue"]) {
- [defaultsToRegister setObject:[prefSpecification objectForKey:@"DefaultValue"] forKey:key];
- }
- }
+
+ NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"YES", @"debugenable_preference",
+ @"YES", @"enable_video_preference",
+ @"YES", @"start_video_preference",
+ @"YES", @"h264_preference",
+ @"YES", @"vp8_preference",
+ @"NO", @"mpeg4_preference",
+ @"YES", @"pcmu_preference",
+ @"YES", @"pcma_preference",
+ @"tcp", @"transport_preference",
+ @"NO", @"enable_srtp_preference",
+ @"YES", @"backgroundmode_preference",
+ @"YES", @"outbound_proxy_preference",
+ nil];
+
[defaultsToRegister addEntriesFromDictionary:appDefaults];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultsToRegister];
[defaultsToRegister release];
[[NSUserDefaults standardUserDefaults] synchronize];
+
}
--(void) setupUI {
- //as defined in PhoneMainView.xib
- //dialer
- myPhoneViewController = (PhoneViewController*) [myTabBarController.viewControllers objectAtIndex: DIALER_TAB_INDEX];
- myPhoneViewController.myTabBarController = myTabBarController;
- //Call history
- myCallHistoryTableViewController = [[CallHistoryTableViewController alloc] initWithNibName:@"CallHistoryTableViewController"
- bundle:[NSBundle mainBundle]];
- UINavigationController *aCallHistNavigationController = [[UINavigationController alloc] initWithRootViewController:myCallHistoryTableViewController];
- aCallHistNavigationController.tabBarItem = [(UIViewController*)[myTabBarController.viewControllers objectAtIndex:HISTORY_TAB_INDEX] tabBarItem];
-
- //people picker delegates
- myContactPickerDelegate = [[ContactPickerDelegate alloc] init];
- //people picker
- myPeoplePickerController = [[[ABPeoplePickerNavigationController alloc] init] autorelease];
- [myPeoplePickerController setDisplayedProperties:[NSArray arrayWithObject:[NSNumber numberWithInt:kABPersonPhoneProperty]]];
- [myPeoplePickerController setPeoplePickerDelegate:myContactPickerDelegate];
- //copy tab bar item
- myPeoplePickerController.tabBarItem = [(UIViewController*)[myTabBarController.viewControllers objectAtIndex:CONTACTS_TAB_INDEX] tabBarItem];
-
- //more tab
- MoreViewController *moreViewController = [[MoreViewController alloc] initWithNibName:@"MoreViewController" bundle:[NSBundle mainBundle]];
- UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:moreViewController];
- [moreViewController release];
- //copy tab bar item
- aNavigationController.tabBarItem = [(UIViewController*)[myTabBarController.viewControllers objectAtIndex:MORE_TAB_INDEX] tabBarItem];
-
- //insert contact controller
- NSMutableArray* newArray = [NSMutableArray arrayWithArray:self.myTabBarController.viewControllers];
- [newArray replaceObjectAtIndex:CONTACTS_TAB_INDEX withObject:myPeoplePickerController];
- [newArray replaceObjectAtIndex:MORE_TAB_INDEX withObject:aNavigationController];
- [aNavigationController release];
- [newArray replaceObjectAtIndex:HISTORY_TAB_INDEX withObject:aCallHistNavigationController];
- [aCallHistNavigationController release];
-
- [myTabBarController setSelectedIndex:DIALER_TAB_INDEX];
- [myTabBarController setViewControllers:newArray animated:NO];
-
- [window addSubview:myTabBarController.view];
-
- [window makeKeyAndVisible];
-
- [[LinphoneManager instance] setCallDelegate:myPhoneViewController];
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [self loadDefaultSettings];
- [UIDevice currentDevice].batteryMonitoringEnabled = YES;
-}
-
--(void) setupGSMInteraction {
- 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{
- NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
- @"NO", @"enable_first_login_view_preference", //
-#ifdef HAVE_AMR
- @"YES",@"amr_8k_preference", // enable amr by default if compiled with
-#endif
-#ifdef HAVE_G729
- @"YES",@"g729_preference", // enable amr by default if compiled with
-#endif
- //@"+33",@"countrycode_preference",
- nil];
+ [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound];
- [self loadDefaultSettings: appDefaults];
+ if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
+ && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground
+ && (![[NSUserDefaults standardUserDefaults] boolForKey:@"start_at_boot_preference"] ||
+ ![[NSUserDefaults standardUserDefaults] boolForKey:@"backgroundmode_preference"])) {
+ // autoboot disabled, doing nothing
+ return YES;
+ }
+
+ [self startApplication];
- if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
- && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground
- && [[NSUserDefaults standardUserDefaults] boolForKey:@"disable_autoboot_preference"]) {
- // autoboot disabled, doing nothing
- } else {
- [self startApplication];
- }
-
return YES;
}
--(void) startApplication {
- /* explicitely instanciate LinphoneManager */
- LinphoneManager* lm = [[LinphoneManager alloc] init];
- assert(lm == [LinphoneManager instance]);
-
- [self setupUI];
-
- [[LinphoneManager instance] startLibLinphone];
-
- [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound];
-
- [self setupGSMInteraction];
+- (void)startApplication {
+ // Restart Linphone Core if needed
+ if(![LinphoneManager isLcReady]) {
+ [[LinphoneManager instance] startLibLinphone];
+ }
+ if([LinphoneManager isLcReady]) {
+ [self setupGSMInteraction];
+
+ // Only execute one time at application start
+ if(!started) {
+ started = TRUE;
+ [window setRootViewController:[[[BuschJaegerMainView alloc] initWithNibName:@"BuschJaegerMainView" bundle:[NSBundle mainBundle]] autorelease]];
+ //[[PhoneMainView instance] startUp];
+ }
+ }
}
- (void)applicationWillTerminate:(UIApplication *)application {
}
-- (void)dealloc {
- [window release];
- [myPeoplePickerController release];
- [super dealloc];
+- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
+ [self startApplication];
+ if([LinphoneManager isLcReady]) {
+ if([[url scheme] isEqualToString:@"sip"]) {
+ /*
+ // Go to ChatRoom view
+ DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController);
+ if(controller != nil) {
+ [controller setAddress:[url absoluteString]];
+ }
+ */
+ }
+ }
+ return YES;
+}
+
+- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
+ [LinphoneLogger log:LinphoneLoggerDebug format:@"PushNotification: Receive %@", userInfo];
+ NSDictionary *aps = [userInfo objectForKey:@"aps"];
+ if(aps != nil) {
+ NSDictionary *alert = [aps objectForKey:@"alert"];
+ if(alert != nil) {
+ NSString *loc_key = [alert objectForKey:@"loc-key"];
+ if(loc_key != nil) {
+ if([loc_key isEqualToString:@"IM_MSG"]) {
+ /*
+ [[LinphoneManager instance] addInhibitedEvent:kLinphoneTextReceivedSound];
+ [[PhoneMainView instance] changeCurrentView:[ChatViewController compositeViewDescription]];
+ */
+ }
+ }
+ }
+ }
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
- LinphoneCall* call;
- [(NSData*)([notification.userInfo objectForKey:@"call"]) getBytes:&call];
- if (!call) {
- ms_warning("Local notification received with nil call");
- return;
+ if([notification.userInfo objectForKey:@"call"] != nil) {
+ LinphoneCall* call;
+ [(NSData*)[notification.userInfo objectForKey:@"call"] getBytes:&call];
+ if (!call) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Local notification received with nil call"];
+ return;
+ }
+ linphone_core_accept_call([LinphoneManager getLc], call);
+ } else if([notification.userInfo objectForKey:@"chat"] != nil) {
+ /*
+ NSString *remoteContact = (NSString*)[notification.userInfo objectForKey:@"chat"];
+ // Go to ChatRoom view
+ ChatRoomViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[ChatRoomViewController compositeViewDescription] push:TRUE], ChatRoomViewController);
+ if(controller != nil) {
+ [controller setRemoteAddress:remoteContact];
+ }
+ */
}
- linphone_core_accept_call([LinphoneManager getLc], call);
}
+#pragma mark - PushNotification Functions
+
+- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken {
+ [LinphoneLogger log:LinphoneLoggerDebug format:@"PushNotification: Token %@", deviceToken];
+ [[LinphoneManager instance] setPushNotificationToken:deviceToken];
+}
+
+- (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error {
+ [LinphoneLogger log:LinphoneLoggerDebug format:@"PushNotification: Error %@", error];
+ [[LinphoneManager instance] setPushNotificationToken:nil];
+}
@end
diff --git a/Classes/LinphoneUI/LinphoneManager.h b/Classes/LinphoneManager.h
similarity index 54%
rename from Classes/LinphoneUI/LinphoneManager.h
rename to Classes/LinphoneManager.h
index 92fc3056d..c9566dbb6 100644
--- a/Classes/LinphoneUI/LinphoneManager.h
+++ b/Classes/LinphoneManager.h
@@ -20,16 +20,30 @@
#import
#import
#import
-#include "linphonecore.h"
+#import
+#import
+
#import "LogView.h"
-#import "LinphoneUIDelegates.h"
+#import "FastAddressBook.h"
+#import "Utils.h"
+#import "BuschJaegerConfigParser.h"
+
+#include "linphonecore.h"
+
+extern NSString *const kLinphoneTextReceived;
+extern NSString *const kLinphoneTextReceivedSound;
+extern NSString *const kLinphoneCallUpdate;
+extern NSString *const kLinphoneRegistrationUpdate;
+extern NSString *const kLinphoneMainViewChange;
+extern NSString *const kLinphoneAddressBookUpdate;
+
+extern NSString *const kContactSipField;
typedef enum _Connectivity {
wifi,
wwan
,none
} Connectivity;
-@class FastAddressBook;
/* Application specific call context */
typedef struct _CallContext {
@@ -44,59 +58,74 @@ struct NetworkReachabilityContext {
typedef struct _LinphoneCallAppData {
bool_t batteryWarningShown;
- // transfer data
- int transferButtonIndex;
+ UILocalNotification *notification;
} LinphoneCallAppData;
+typedef struct _LinphoneManagerSounds {
+ SystemSoundID call;
+ SystemSoundID message;
+} LinphoneManagerSounds;
@interface LinphoneManager : NSObject {
@protected
SCNetworkReachabilityRef proxyReachability;
+
@private
NSTimer* mIterateTimer;
- id mLogView;
bool isbackgroundModeEnabled;
- id callDelegate;
- id registrationDelegate;
-
- UIViewController* mCurrentViewController;
+
Connectivity connectivity;
- FastAddressBook* mFastAddressBook;
const char* frontCamId;
const char* backCamId;
- NSDictionary* currentSettings;
+ FastAddressBook* fastAddressBook;
+
+ LinphoneManagerSounds sounds;
+ NSMutableArray *inhibitedEvent;
+ sqlite3 *database;
@public
CallContext currentCallContextBeforeGoingBackground;
}
-+(LinphoneManager*) instance;
-+(LinphoneCore*) getLc;
-+(BOOL) runningOnIpad;
-+(void) set:(UIView*)view hidden: (BOOL) hidden withName:(const char*)name andReason:(const char*) reason;
-+(void) logUIElementPressed:(const char*) name;
++ (LinphoneManager*)instance;
+#ifdef DEBUG
++ (void)instanceRelease;
+#endif
++ (LinphoneCore*) getLc;
++ (BOOL)isLcReady;
++ (BOOL)runningOnIpad;
++ (BOOL)isNotIphone3G;
++ (NSString *)getPreferenceForCodec: (const char*) name withRate: (int) rate;
++ (NSSet *)unsupportedCodecs;
++ (NSString *)getUserAgent;
--(void) displayDialer;
+- (void)startLibLinphone;
+- (void)destroyLibLinphone;
+- (BOOL)resignActive;
+- (void)becomeActive;
+- (BOOL)enterBackgroundMode;
--(void) registerLogView:(id) view;
++ (void)kickOffNetworkConnection;
+- (void)setupNetworkReachabilityCallback;
--(void) startLibLinphone;
--(BOOL) isNotIphone3G;
--(void) destroyLibLinphone;
-
--(BOOL) enterBackgroundMode;
--(void) becomeActive;
--(void) kickOffNetworkConnection;
--(NSString*) getDisplayNameFromAddressBook:(NSString*) number andUpdateCallLog:(LinphoneCallLog*)log;
--(UIImage*) getImageFromAddressBook:(NSString*) number;
+- (void)refreshRegisters;
--(BOOL) reconfigureLinphoneIfNeeded:(NSDictionary *)oldSettings;
--(void) setupNetworkReachabilityCallback: (const char*) nodeName withContext:(SCNetworkReachabilityContext*) ctx;
+- (void)enableSpeaker:(BOOL)enable;
+- (BOOL)isSpeakerEnabled;
-@property (nonatomic, retain) id callDelegate;
-@property (nonatomic, retain) id registrationDelegate;
+- (void)addInhibitedEvent:(NSString*)event;
+- (BOOL)removeInhibitedEvent:(NSString*)event;
+
+- (void)call:(NSString *)address displayName:(NSString*)displayName transfer:(BOOL)transfer;
+
+@property (readonly) FastAddressBook* fastAddressBook;
@property Connectivity connectivity;
+@property (nonatomic) int defaultExpires;
@property (readonly) const char* frontCamId;
@property (readonly) const char* backCamId;
+@property (readonly) sqlite3* database;
+@property (nonatomic, retain) NSData *pushNotificationToken;
+@property (readonly) LinphoneManagerSounds sounds;
+
@end
diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m
new file mode 100644
index 000000000..ce45aeffe
--- /dev/null
+++ b/Classes/LinphoneManager.m
@@ -0,0 +1,904 @@
+/* LinphoneManager.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.
+ */
+
+#include
+#include
+#include
+#include
+
+#import
+#import
+#import
+#import
+
+#import "LinphoneManager.h"
+
+#include "linphonecore_utils.h"
+#include "lpconfig.h"
+#include "private.h"
+
+static LinphoneCore* theLinphoneCore = nil;
+static LinphoneManager* theLinphoneManager = nil;
+
+NSString *const kLinphoneTextReceived = @"LinphoneTextReceived";
+NSString *const kLinphoneTextReceivedSound = @"LinphoneTextReceivedSound";
+NSString *const kLinphoneCallUpdate = @"LinphoneCallUpdate";
+NSString *const kLinphoneRegistrationUpdate = @"LinphoneRegistrationUpdate";
+NSString *const kLinphoneAddressBookUpdate = @"LinphoneAddressBookUpdate";
+NSString *const kLinphoneMainViewChange = @"LinphoneMainViewChange";
+NSString *const kContactSipField = @"SIP";
+
+extern void libmsilbc_init();
+#ifdef HAVE_AMR
+extern void libmsamr_init();
+#endif
+
+#ifdef HAVE_X264
+extern void libmsx264_init();
+#endif
+#define FRONT_CAM_NAME "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:1" /*"AV Capture: Front Camera"*/
+#define BACK_CAM_NAME "AV Capture: com.apple.avfoundation.avcapturedevice.built-in_video:0" /*"AV Capture: Back Camera"*/
+
+#if defined (HAVE_SILK)
+extern void libmssilk_init();
+#endif
+
+#if HAVE_G729
+extern void libmsbcg729_init();
+#endif
+
+@implementation LinphoneManager
+
+@synthesize connectivity;
+@synthesize frontCamId;
+@synthesize backCamId;
+@synthesize defaultExpires;
+@synthesize database;
+@synthesize fastAddressBook;
+@synthesize pushNotificationToken;
+@synthesize sounds;
+
+struct codec_name_pref_table{
+ const char *name;
+ int rate;
+ NSString *prefname;
+};
+
+struct codec_name_pref_table codec_pref_table[]={
+ { "speex", 8000, @"speex_8k_preference" },
+ { "speex", 16000, @"speex_16k_preference" },
+ { "silk", 24000, @"silk_24k_preference" },
+ { "silk", 16000, @"silk_16k_preference" },
+ { "amr", 8000, @"amr_8k_preference" },
+ { "ilbc", 8000, @"ilbc_preference"},
+ { "pcmu", 8000, @"pcmu_preference"},
+ { "pcma", 8000, @"pcma_preference"},
+ { "g722", 8000, @"g722_preference"},
+ { "g729", 8000, @"g729_preference"},
+ { "mp4v-es", 90000, @"mp4v-es_preference"},
+ { "h264", 90000, @"h264_preference"},
+ { "vp8", 90000, @"vp8_preference"},
+ { NULL,0,Nil }
+};
+
++ (NSString *)getPreferenceForCodec: (const char*) name withRate: (int) rate{
+ int i;
+ for(i=0;codec_pref_table[i].name!=NULL;++i){
+ if (strcasecmp(codec_pref_table[i].name,name)==0 && codec_pref_table[i].rate==rate)
+ return codec_pref_table[i].prefname;
+ }
+ return Nil;
+}
+
++ (NSSet *)unsupportedCodecs {
+ NSMutableSet *set = [NSMutableSet set];
+ for(int i=0;codec_pref_table[i].name!=NULL;++i) {
+ if(linphone_core_find_payload_type([LinphoneManager getLc],codec_pref_table[i].name, codec_pref_table[i].rate) == NULL) {
+ [set addObject:codec_pref_table[i].prefname];
+ }
+ }
+ return set;
+}
+
++ (BOOL)runningOnIpad {
+#ifdef UI_USER_INTERFACE_IDIOM
+ return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
+#else
+ return NO;
+#endif
+}
+
++ (BOOL)isNotIphone3G
+{
+ static BOOL done=FALSE;
+ static BOOL result;
+ if (!done){
+ size_t size;
+ sysctlbyname("hw.machine", NULL, &size, NULL, 0);
+ char *machine = malloc(size);
+ sysctlbyname("hw.machine", machine, &size, NULL, 0);
+ NSString *platform = [[NSString alloc ] initWithUTF8String:machine];
+ free(machine);
+
+ result = ![platform isEqualToString:@"iPhone1,2"];
+
+ [platform release];
+ done=TRUE;
+ }
+ return result;
+}
+
++ (NSString *)getUserAgent {
+ return [NSString stringWithFormat:@"LinphoneIphone/%@ (Linphone/%s; Apple %@/%@)",
+ [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey],
+ linphone_core_get_version(),
+ [UIDevice currentDevice].systemName,
+ [UIDevice currentDevice].systemVersion];
+}
+
++ (LinphoneManager*)instance {
+ if(theLinphoneManager == nil) {
+ theLinphoneManager = [LinphoneManager alloc];
+ [theLinphoneManager init];
+ }
+ return theLinphoneManager;
+}
+
+#ifdef DEBUG
++ (void)instanceRelease {
+ if(theLinphoneManager != nil) {
+ [theLinphoneManager release];
+ theLinphoneManager = nil;
+ }
+}
+#endif
+
+#pragma mark - Lifecycle Functions
+
+- (id)init {
+ if ((self = [super init])) {
+ fastAddressBook = [[FastAddressBook alloc] init];
+
+ {
+ NSString *path = [[NSBundle mainBundle] pathForResource:@"01" ofType:@"wav"];
+ sounds.call = 0;
+ OSStatus status = AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &sounds.call);
+ if(status != 0){
+ [LinphoneLogger log:LinphoneLoggerWarning format:@"Can't set \"call\" system sound"];
+ }
+ }
+ /*{
+ NSString *path = [[NSBundle mainBundle] pathForResource:@"msg" ofType:@"wav"];
+ sounds.message = 0;
+ OSStatus status = AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &sounds.message);
+ if(status != 0){
+ [LinphoneLogger log:LinphoneLoggerWarning format:@"Can't set \"message\" system sound"];
+ }
+ }*/
+ inhibitedEvent = [[NSMutableArray alloc] init];
+ database = NULL;
+ self.defaultExpires = 600;
+ [self openDatabase];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ if(sounds.call) {
+ AudioServicesDisposeSystemSoundID(sounds.call);
+ }
+ if(sounds.message) {
+ AudioServicesDisposeSystemSoundID(sounds.message);
+ }
+
+ [inhibitedEvent release];
+ [fastAddressBook release];
+ [self closeDatabase];
+
+ [super dealloc];
+}
+
+
+#pragma mark - Database Functions
+
+- (void)openDatabase {
+ /*NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSString *documentsPath = [paths objectAtIndex:0];
+ NSString *databaseDocumentPath = [documentsPath stringByAppendingPathComponent:@"database.txt"];
+
+ // Copy default database
+ NSFileManager *fileManager = [NSFileManager defaultManager];
+ NSError *error = nil;
+ //[fileManager removeItemAtPath:databaseDocumentPath error:&error]; //TODO REMOVE
+ if ([fileManager fileExistsAtPath:databaseDocumentPath] == NO) {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Create sqlite3 database"];
+ NSString *resourceDocumentPath = [[NSBundle mainBundle] pathForResource:@"database" ofType:@"sqlite"];
+ [fileManager copyItemAtPath:resourceDocumentPath toPath:databaseDocumentPath error:&error];
+ if(error != nil) {
+ [LinphoneLogger log:LinphoneLoggerError format:@"Can't copy database: %@", [error localizedDescription]];
+ return;
+ }
+ }
+
+ if(sqlite3_open([databaseDocumentPath UTF8String], &database) != SQLITE_OK) {
+ [LinphoneLogger log:LinphoneLoggerError format:@"Can't open \"%@\" sqlite3 database.", databaseDocumentPath];
+ }*/
+}
+
+- (void)closeDatabase {
+ /*if(database != NULL) {
+ if(sqlite3_close(database) != SQLITE_OK) {
+ [LinphoneLogger logc:LinphoneLoggerError format:"Can't close sqlite3 database."];
+ }
+ }*/
+}
+
+
+#pragma mark - Linphone Core Functions
+
++ (LinphoneCore*)getLc {
+ if (theLinphoneCore==nil) {
+ @throw([NSException exceptionWithName:@"LinphoneCoreException" reason:@"Linphone core not initialized yet" userInfo:nil]);
+ }
+ return theLinphoneCore;
+}
+
++ (BOOL)isLcReady {
+ return theLinphoneCore != nil;
+}
+
+
+#pragma mark - Logs Functions
+
+//generic log handler for debug version
+void linphone_iphone_log_handler(int lev, const char *fmt, va_list args){
+ NSString* format = [[NSString alloc] initWithUTF8String:fmt];
+ NSLogv(format, args);
+ NSString* formatedString = [[NSString alloc] initWithFormat:format arguments:args];
+ //[[LinphoneManager instance] addLog:formatedString];
+ [formatedString release];
+ [format release];
+}
+
+//Error/warning log handler
+static void linphone_iphone_log(struct _LinphoneCore * lc, const char * message) {
+ NSString* log = [NSString stringWithCString:message encoding:[NSString defaultCStringEncoding]];
+ NSLog(log, NULL);
+ //[[LinphoneManager instance] addLog:log];
+}
+
+
+#pragma mark - Display Status Functions
+
+- (void)displayStatus:(NSString*) message {
+ // Post event
+ NSDictionary* dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
+ message, @"message",
+ nil] autorelease];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneDisplayStatus" object:self userInfo:dict];
+}
+
+
+static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char * message) {
+ NSString* status = [[NSString alloc] initWithCString:message encoding:[NSString defaultCStringEncoding]];
+ [(LinphoneManager*)linphone_core_get_user_data(lc) displayStatus:status];
+ [status release];
+}
+
+
+#pragma mark - Call State Functions
+
+- (void)onCall:(LinphoneCall*)call StateChanged:(LinphoneCallState)state withMessage:(const char *)message {
+ // Handling wrapper
+ if(state == LinphoneCallReleased) {
+ if(linphone_call_get_user_pointer(call) != NULL) {
+ free (linphone_call_get_user_pointer(call));
+ linphone_call_set_user_pointer(call, NULL);
+ }
+ return;
+ }
+ if (!linphone_call_get_user_pointer(call)) {
+ LinphoneCallAppData* data = (LinphoneCallAppData*) malloc(sizeof(LinphoneCallAppData));
+ data->batteryWarningShown = FALSE;
+ data->notification = nil;
+ linphone_call_set_user_pointer(call, data);
+ }
+
+ // Disable speaker when no more call
+ if ((state == LinphoneCallEnd || state == LinphoneCallError)) {
+ if(linphone_core_get_calls_nb([LinphoneManager getLc]) == 0)
+ [self enableSpeaker:FALSE];
+ }
+
+ // Enable speaker when video
+ if(state == LinphoneCallIncomingReceived ||
+ state == LinphoneCallOutgoingInit ||
+ state == LinphoneCallConnected ||
+ state == LinphoneCallStreamsRunning ||
+ state == LinphoneCallUpdated) {
+ if (linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
+ [self enableSpeaker:TRUE];
+ }
+ }
+
+ // Post event
+ NSDictionary* dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
+ [NSValue valueWithPointer:call], @"call",
+ [NSNumber numberWithInt:state], @"state",
+ [NSString stringWithUTF8String:message], @"message", nil] autorelease];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneCallUpdate" object:self userInfo:dict];
+}
+
+static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, LinphoneCallState state,const char* message) {
+ [(LinphoneManager*)linphone_core_get_user_data(lc) onCall:call StateChanged: state withMessage: message];
+}
+
+
+#pragma mark - Transfert State Functions
+
+static void linphone_iphone_transfer_state_changed(LinphoneCore* lc, LinphoneCall* call, LinphoneCallState state) {
+}
+
+
+#pragma mark - Registration State Functions
+
+-(void) onRegister:(LinphoneCore *)lc cfg:(LinphoneProxyConfig*) cfg state:(LinphoneRegistrationState) state message:(const char*) message {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"NEW REGISTRATION STATE: '%s' (message: '%s')", linphone_registration_state_to_string(state), message];
+
+ // Post event
+ NSDictionary* dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
+ [NSNumber numberWithInt:state], @"state",
+ [NSValue valueWithPointer:cfg], @"cfg",
+ [NSString stringWithUTF8String:message], @"message",
+ nil] autorelease];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneRegistrationUpdate" object:self userInfo:dict];
+}
+
+static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyConfig* cfg, LinphoneRegistrationState state,const char* message) {
+ [(LinphoneManager*)linphone_core_get_user_data(lc) onRegister:lc cfg:cfg state:state message:message];
+}
+
+
+#pragma mark - Text Received Functions
+
+- (void)onTextReceived:(LinphoneCore *)lc room:(LinphoneChatRoom *)room from:(const LinphoneAddress *)from message:(const char *)message {
+
+ char *fromStr = linphone_address_as_string_uri_only(from);
+ if(fromStr == NULL)
+ return;
+}
+
+static void linphone_iphone_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message) {
+ [(LinphoneManager*)linphone_core_get_user_data(lc) onTextReceived:lc room:room from:from message:message];
+}
+
+
+#pragma mark - Network Functions
+
++ (void)kickOffNetworkConnection {
+ /*start a new thread to avoid blocking the main ui in case of peer host failure*/
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+ CFWriteStreamRef writeStream;
+ CFStreamCreatePairWithSocketToHost(NULL, (CFStringRef)@"192.168.0.200"/*"linphone.org"*/, 15000, nil, &writeStream);
+ CFWriteStreamOpen (writeStream);
+ const char* buff="hello";
+ CFWriteStreamWrite (writeStream,(const UInt8*)buff,strlen(buff));
+ CFWriteStreamClose (writeStream);
+ CFRelease(writeStream);
+ });
+}
+
+static void showNetworkFlags(SCNetworkReachabilityFlags flags){
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Network connection flags:"];
+ if (flags==0) [LinphoneLogger logc:LinphoneLoggerLog format:"no flags."];
+ if (flags & kSCNetworkReachabilityFlagsTransientConnection)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsTransientConnection"];
+ if (flags & kSCNetworkReachabilityFlagsReachable)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsReachable"];
+ if (flags & kSCNetworkReachabilityFlagsConnectionRequired)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsConnectionRequired"];
+ if (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsConnectionOnTraffic"];
+ if (flags & kSCNetworkReachabilityFlagsConnectionOnDemand)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsConnectionOnDemand"];
+ if (flags & kSCNetworkReachabilityFlagsIsLocalAddress)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsIsLocalAddress"];
+ if (flags & kSCNetworkReachabilityFlagsIsDirect)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsIsDirect"];
+ if (flags & kSCNetworkReachabilityFlagsIsWWAN)
+ [LinphoneLogger logc:LinphoneLoggerLog format:"kSCNetworkReachabilityFlagsIsWWAN"];
+}
+
+void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* nilCtx){
+ showNetworkFlags(flags);
+ LinphoneManager* lLinphoneMgr = [LinphoneManager instance];
+ SCNetworkReachabilityFlags networkDownFlags=kSCNetworkReachabilityFlagsConnectionRequired |kSCNetworkReachabilityFlagsConnectionOnTraffic | kSCNetworkReachabilityFlagsConnectionOnDemand;
+
+ if ([LinphoneManager getLc] != nil) {
+ LinphoneProxyConfig* proxy;
+ linphone_core_get_default_proxy([LinphoneManager getLc], &proxy);
+
+ struct NetworkReachabilityContext* ctx = nilCtx ? ((struct NetworkReachabilityContext*)nilCtx) : 0;
+ if ((flags == 0) || (flags & networkDownFlags)) {
+ linphone_core_set_network_reachable([LinphoneManager getLc],false);
+ lLinphoneMgr.connectivity = none;
+ [LinphoneManager kickOffNetworkConnection];
+ } else {
+ Connectivity newConnectivity;
+ BOOL isWifiOnly = lp_config_get_int(linphone_core_get_config([LinphoneManager getLc]),"app","wifi_only_preference",FALSE);
+ if (!ctx || ctx->testWWan)
+ newConnectivity = flags & kSCNetworkReachabilityFlagsIsWWAN ? wwan:wifi;
+ else
+ newConnectivity = wifi;
+
+ if (newConnectivity == wwan
+ && proxy
+ && isWifiOnly
+ && (lLinphoneMgr.connectivity == newConnectivity || lLinphoneMgr.connectivity == none)) {
+ linphone_proxy_config_expires(proxy, 0);
+ } else if (proxy){
+ linphone_proxy_config_expires(proxy, lLinphoneMgr.defaultExpires); //might be better to save the previous value
+ }
+
+ if (lLinphoneMgr.connectivity == none) {
+ linphone_core_set_network_reachable([LinphoneManager getLc],true);
+
+ } else if (lLinphoneMgr.connectivity != newConnectivity) {
+ // connectivity has changed
+ linphone_core_set_network_reachable([LinphoneManager getLc],false);
+ if (newConnectivity == wwan && proxy && isWifiOnly) {
+ linphone_proxy_config_expires(proxy, 0);
+ }
+ linphone_core_set_network_reachable([LinphoneManager getLc],true);
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Network connectivity changed to type [%s]",(newConnectivity==wifi?"wifi":"wwan")];
+ }
+ lLinphoneMgr.connectivity=newConnectivity;
+ }
+ if (ctx && ctx->networkStateChanged) {
+ (*ctx->networkStateChanged)(lLinphoneMgr.connectivity);
+ }
+ }
+}
+
+- (void)setupNetworkReachabilityCallback {
+ SCNetworkReachabilityContext *ctx=NULL;
+ const char *nodeName="linphone.org";
+
+ if (proxyReachability) {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Cancelling old network reachability"];
+ SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+ CFRelease(proxyReachability);
+ proxyReachability = nil;
+ }
+
+ proxyReachability = SCNetworkReachabilityCreateWithName(nil, nodeName);
+
+ //initial state is network off should be done as soon as possible
+ SCNetworkReachabilityFlags flags;
+ if (!SCNetworkReachabilityGetFlags(proxyReachability, &flags)) {
+ [LinphoneLogger logc:LinphoneLoggerError format:"Cannot get reachability flags: %s", SCErrorString(SCError())];
+ return;
+ }
+ networkReachabilityCallBack(proxyReachability, flags, ctx ? ctx->info : 0);
+
+ if (!SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack, ctx)){
+ [LinphoneLogger logc:LinphoneLoggerError format:"Cannot register reachability cb: %s", SCErrorString(SCError())];
+ return;
+ }
+ if(!SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)){
+ [LinphoneLogger logc:LinphoneLoggerError format:"Cannot register schedule reachability cb: %s", SCErrorString(SCError())];
+ return;
+ }
+}
+
+
+#pragma mark -
+
+static LinphoneCoreVTable linphonec_vtable = {
+ .show =NULL,
+ .call_state_changed =(LinphoneCallStateCb)linphone_iphone_call_state,
+ .registration_state_changed = linphone_iphone_registration_state,
+ .notify_recv = NULL,
+ .new_subscription_request = NULL,
+ .auth_info_requested = NULL,
+ .display_status = linphone_iphone_display_status,
+ .display_message=linphone_iphone_log,
+ .display_warning=linphone_iphone_log,
+ .display_url=NULL,
+ .text_received=linphone_iphone_text_received,
+ .dtmf_received=NULL,
+ .transfer_state_changed=linphone_iphone_transfer_state_changed
+};
+
+//scheduling loop
+- (void)iterate {
+ linphone_core_iterate(theLinphoneCore);
+}
+
+- (void)startLibLinphone {
+
+ //get default config from bundle
+ NSBundle* myBundle = [NSBundle mainBundle];
+ NSString* factoryConfig = [myBundle pathForResource:[LinphoneManager runningOnIpad]?@"linphonerc-ipad":@"linphonerc" ofType:nil] ;
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSString *confiFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/.linphonerc"];
+ NSString *zrtpSecretsFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/zrtp_secrets"];
+ const char* lRootCa = [[myBundle pathForResource:@"rootca"ofType:@"pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
+ connectivity=none;
+ signal(SIGPIPE, SIG_IGN);
+ //log management
+
+ libmsilbc_init();
+#if defined (HAVE_SILK)
+ libmssilk_init();
+#endif
+#ifdef HAVE_AMR
+ libmsamr_init(); //load amr plugin if present from the liblinphone sdk
+#endif
+#ifdef HAVE_X264
+ libmsx264_init(); //load x264 plugin if present from the liblinphone sdk
+#endif
+
+#if HAVE_G729
+ libmsbcg729_init(); // load g729 plugin
+#endif
+ /* Initialize linphone core*/
+
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Create linphonecore"];
+ theLinphoneCore = linphone_core_new (&linphonec_vtable
+ , [confiFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]
+ , [factoryConfig cStringUsingEncoding:[NSString defaultCStringEncoding]]
+ ,self);
+
+ linphone_core_set_root_ca(theLinphoneCore, lRootCa);
+ // Set audio assets
+ const char* lRing = [[myBundle pathForResource:@"ring"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
+ linphone_core_set_ring(theLinphoneCore, lRing );
+ const char* lRingBack = [[myBundle pathForResource:@"ringback"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
+ linphone_core_set_ringback(theLinphoneCore, lRingBack);
+ const char* lPlay = [[myBundle pathForResource:@"hold"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
+ linphone_core_set_play_file(theLinphoneCore, lPlay);
+
+ linphone_core_set_zrtp_secrets_file(theLinphoneCore, [zrtpSecretsFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
+
+ [self setupNetworkReachabilityCallback];
+
+ // start scheduler
+ mIterateTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
+ target:self
+ selector:@selector(iterate)
+ userInfo:nil
+ repeats:YES];
+ //init audio session
+ AVAudioSession *audioSession = [AVAudioSession sharedInstance];
+ BOOL bAudioInputAvailable= [audioSession inputIsAvailable];
+ [audioSession setDelegate:self];
+
+ NSError* err;
+ [audioSession setActive:NO error: &err];
+ if(!bAudioInputAvailable){
+ UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No microphone",nil)
+ message:NSLocalizedString(@"You need to plug a microphone to your device to use this application.",nil)
+ delegate:nil
+ cancelButtonTitle:NSLocalizedString(@"Ok",nil)
+ otherButtonTitles:nil ,nil];
+ [error show];
+ [error release];
+ }
+
+ NSString* path = [myBundle pathForResource:@"nowebcamCIF" ofType:@"jpg"];
+ if (path) {
+ const char* imagePath = [path cStringUsingEncoding:[NSString defaultCStringEncoding]];
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Using '%s' as source image for no webcam", imagePath];
+ linphone_core_set_static_picture(theLinphoneCore, imagePath);
+ }
+
+ /*DETECT cameras*/
+ frontCamId= backCamId=nil;
+ char** camlist = (char**)linphone_core_get_video_devices(theLinphoneCore);
+ for (char* cam = *camlist;*camlist!=NULL;cam=*++camlist) {
+ if (strcmp(FRONT_CAM_NAME, cam)==0) {
+ frontCamId = cam;
+ //great set default cam to front
+ linphone_core_set_video_device(theLinphoneCore, cam);
+ }
+ if (strcmp(BACK_CAM_NAME, cam)==0) {
+ backCamId = cam;
+ }
+
+ }
+
+ NSUInteger cpucount = [[NSProcessInfo processInfo] processorCount];
+ ms_set_cpu_count(cpucount);
+
+ if (![LinphoneManager isNotIphone3G]){
+ PayloadType *pt=linphone_core_find_payload_type(theLinphoneCore,"SILK",24000);
+ if (pt) {
+ linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"SILK/24000 and video disabled on old iPhone 3G"];
+ }
+ linphone_core_enable_video(theLinphoneCore, FALSE, FALSE);
+ }
+
+ if ([LinphoneManager runningOnIpad])
+ ms_set_cpu_count(2);
+ else
+ ms_set_cpu_count(1);
+
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Linphone [%s] started on [%s]"
+ ,linphone_core_get_version()
+ ,[[UIDevice currentDevice].model cStringUsingEncoding:[NSString defaultCStringEncoding]]];
+
+ if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
+ && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
+ //go directly to bg mode
+ [self resignActive];
+ }
+}
+
+
+- (void)destroyLibLinphone {
+ [mIterateTimer invalidate];
+ AVAudioSession *audioSession = [AVAudioSession sharedInstance];
+ [audioSession setDelegate:nil];
+#if 0
+ if (settingsStore != nil) {
+ [settingsStore release];
+ settingsStore = nil;
+ }
+#endif
+ if (theLinphoneCore != nil) { //just in case application terminate before linphone core initialization
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Destroy linphonecore"];
+ linphone_core_destroy(theLinphoneCore);
+ theLinphoneCore = nil;
+ SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+ if (proxyReachability)
+ CFRelease(proxyReachability);
+ proxyReachability=nil;
+
+ }
+}
+
+- (BOOL)resignActive {
+ linphone_core_stop_dtmf_stream(theLinphoneCore);
+ return YES;
+}
+
+- (BOOL)enterBackgroundMode {
+ LinphoneProxyConfig* proxyCfg;
+ linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg);
+
+
+ if (proxyCfg && [[NSUserDefaults standardUserDefaults] boolForKey:@"backgroundmode_preference"]) {
+ //For registration register
+ linphone_core_refresh_registers(theLinphoneCore);
+
+ //wait for registration answer
+ int i=0;
+ while (!linphone_proxy_config_is_registered(proxyCfg) && i++<40 ) {
+ linphone_core_iterate(theLinphoneCore);
+ usleep(100000);
+ }
+ //register keepalive
+ if ([[UIApplication sharedApplication] setKeepAliveTimeout:600/*(NSTimeInterval)linphone_proxy_config_get_expires(proxyCfg)*/
+ handler:^{
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"keepalive handler"];
+ if (theLinphoneCore == nil) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"It seems that Linphone BG mode was deactivated, just skipping"];
+ return;
+ }
+ //kick up network cnx, just in case
+ [LinphoneManager kickOffNetworkConnection];
+ [self refreshRegisters];
+ linphone_core_iterate(theLinphoneCore);
+ }
+ ]) {
+
+
+ [LinphoneLogger logc:LinphoneLoggerLog format:"keepalive handler succesfully registered"];
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"keepalive handler cannot be registered"];
+ }
+ LCSipTransports transportValue;
+ if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) {
+ [LinphoneLogger logc:LinphoneLoggerError format:"cannot get current transport"];
+ }
+ return YES;
+ }
+ else {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Entering lite bg mode"];
+ [self destroyLibLinphone];
+ return NO;
+ }
+}
+
+- (void)becomeActive {
+ [self refreshRegisters];
+
+ /*IOS specific*/
+ linphone_core_start_dtmf_stream(theLinphoneCore);
+}
+
+- (void)beginInterruption {
+ LinphoneCall* c = linphone_core_get_current_call(theLinphoneCore);
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Sound interruption detected!"];
+ if (c) {
+ linphone_core_pause_call(theLinphoneCore, c);
+ }
+}
+
+- (void)endInterruption {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Sound interruption ended!"];
+}
+
+- (void)refreshRegisters{
+ /*first check if network is available*/
+ if (proxyReachability){
+ SCNetworkReachabilityFlags flags=0;
+ if (!SCNetworkReachabilityGetFlags(proxyReachability, &flags)) {
+ [LinphoneLogger logc:LinphoneLoggerError format:"Cannot get reachability flags, re-creating reachability context."];
+ [self setupNetworkReachabilityCallback];
+ }else{
+ networkReachabilityCallBack(proxyReachability, flags, 0);
+ if (flags==0){
+ /*workaround iOS bug: reachability API cease to work after some time.*/
+ /*when flags==0, either we have no network, or the reachability object lies. To workaround, create a new one*/
+ [self setupNetworkReachabilityCallback];
+ }
+ }
+ }else [LinphoneLogger logc:LinphoneLoggerError format:"No proxy reachability context created !"];
+ linphone_core_refresh_registers(theLinphoneCore);//just to make sure REGISTRATION is up to date
+}
+
+
+#pragma mark - Speaker Functions
+
+- (void)enableSpeaker:(BOOL)enable {
+ //redirect audio to speaker
+ if(enable) {
+ UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
+ AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
+ , sizeof (audioRouteOverride)
+ , &audioRouteOverride);
+ } else {
+ UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_None;
+ AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
+ , sizeof (audioRouteOverride)
+ , &audioRouteOverride);
+ }
+}
+
+- (BOOL)isSpeakerEnabled {
+ bool enabled = false;
+ CFStringRef lNewRoute = CFSTR("Unknown");
+ UInt32 lNewRouteSize = sizeof(lNewRoute);
+ OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &lNewRouteSize, &lNewRoute);
+ if (!lStatus && lNewRouteSize > 0) {
+ NSString *route = (NSString *) lNewRoute;
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Current audio route is [%s]", [route cStringUsingEncoding:[NSString defaultCStringEncoding]]];
+ enabled = [route isEqualToString: @"Speaker"] || [route isEqualToString: @"SpeakerAndMicrophone"];
+ CFRelease(lNewRoute);
+ }
+ return enabled;
+}
+
+
+#pragma mark - Call Functions
+
+- (void)call:(NSString *)address displayName:(NSString*)displayName transfer:(BOOL)transfer {
+ if (!linphone_core_is_network_reachabled(theLinphoneCore)) {
+ UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil)
+ message:NSLocalizedString(@"There is no network connection available, enable WIFI or WWAN prior to place a call",nil)
+ delegate:nil
+ cancelButtonTitle:NSLocalizedString(@"Continue",nil)
+ otherButtonTitles:nil];
+ [error show];
+ [error release];
+ return;
+ }
+
+ CTCallCenter* ct = [[CTCallCenter alloc] init];
+ if ([ct.currentCalls count] > 0) {
+ [LinphoneLogger logc:LinphoneLoggerError format:"GSM call in progress, cancelling outgoing SIP call request"];
+ UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Cannot make call",nil)
+ message:NSLocalizedString(@"Please terminate GSM call",nil)
+ delegate:nil
+ cancelButtonTitle:NSLocalizedString(@"Continue",nil)
+ otherButtonTitles:nil];
+ [error show];
+ [error release];
+ [ct release];
+ return;
+ }
+ [ct release];
+
+ LinphoneProxyConfig* proxyCfg;
+ //get default proxy
+ linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
+ LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters([LinphoneManager getLc]);
+
+ if ([address length] == 0) return; //just return
+ if ([address hasPrefix:@"sip:"]) {
+ LinphoneAddress* linphoneAddress = linphone_address_new([address cStringUsingEncoding:[NSString defaultCStringEncoding]]);
+ if(displayName!=nil) {
+ linphone_address_set_display_name(linphoneAddress,[displayName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
+ }
+ if(transfer) {
+ linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), [address cStringUsingEncoding:[NSString defaultCStringEncoding]]);
+ } else {
+ linphone_core_invite_address_with_params([LinphoneManager getLc], linphoneAddress, lcallParams);
+ }
+ linphone_address_destroy(linphoneAddress);
+ } else if (proxyCfg==nil){
+ UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid sip address",nil)
+ message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)",nil)
+ delegate:nil
+ cancelButtonTitle:NSLocalizedString(@"Continue",nil)
+ otherButtonTitles:nil];
+ [error show];
+ [error release];
+ } else {
+ char normalizedUserName[256];
+ LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity([LinphoneManager getLc]));
+ linphone_proxy_config_normalize_number(proxyCfg,[address cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
+ linphone_address_set_username(linphoneAddress, normalizedUserName);
+ if(displayName!=nil) {
+ linphone_address_set_display_name(linphoneAddress, [displayName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
+ }
+ if(transfer) {
+ linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), normalizedUserName);
+ } else {
+ linphone_core_invite_address_with_params([LinphoneManager getLc], linphoneAddress, lcallParams);
+ }
+ linphone_address_destroy(linphoneAddress);
+ }
+ linphone_call_params_destroy(lcallParams);
+}
+
+
+#pragma mark - Property Functions
+
+- (void)setPushNotificationToken:(NSData *)apushNotificationToken {
+ if(apushNotificationToken == pushNotificationToken) {
+ return;
+ }
+ if(pushNotificationToken != nil) {
+ [pushNotificationToken release];
+ pushNotificationToken = nil;
+ }
+
+ if(apushNotificationToken != nil) {
+ pushNotificationToken = [apushNotificationToken retain];
+ }
+}
+
+- (void)addInhibitedEvent:(NSString*)event {
+ [inhibitedEvent addObject:event];
+}
+
+- (BOOL)removeInhibitedEvent:(NSString*)event {
+ NSUInteger index = [inhibitedEvent indexOfObject:kLinphoneTextReceivedSound];
+ if(index != NSNotFound) {
+ [inhibitedEvent removeObjectAtIndex:index];
+ return TRUE;
+ }
+ return FALSE;
+}
+
+@end
diff --git a/Classes/LinphoneUI/FastAddressBook.m b/Classes/LinphoneUI/FastAddressBook.m
deleted file mode 100644
index e1e3334c6..000000000
--- a/Classes/LinphoneUI/FastAddressBook.m
+++ /dev/null
@@ -1,101 +0,0 @@
-/* FastAddressBook.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 "FastAddressBook.h"
-@implementation FastAddressBook
-
-@synthesize addressBook;
-
- -(Contact*) getMatchingRecord:(NSString*) number {
- @synchronized (mAddressBookMap){
- return (Contact*) [mAddressBookMap objectForKey:number];
- }
-}
-
-+(NSString*) appendCountryCodeIfPossible:(NSString*) number {
- if (![number hasPrefix:@"+"] && ![number hasPrefix:@"00"]) {
- NSString* lCountryCode = [[NSUserDefaults standardUserDefaults] stringForKey:@"countrycode_preference"];
- if (lCountryCode && [lCountryCode length]>0) {
- //append country code
- return [lCountryCode stringByAppendingString:number];
- }
- }
- return number;
-}
-+(NSString*) normalizePhoneNumber:(NSString*) number {
- NSString* lNormalizedNumber = [(NSString*)number stringByReplacingOccurrencesOfString:@" " withString:@""];
- lNormalizedNumber = [lNormalizedNumber stringByReplacingOccurrencesOfString:@"(" withString:@""];
- lNormalizedNumber = [lNormalizedNumber stringByReplacingOccurrencesOfString:@")" withString:@""];
- lNormalizedNumber = [lNormalizedNumber stringByReplacingOccurrencesOfString:@"-" withString:@""];
- lNormalizedNumber = [FastAddressBook appendCountryCodeIfPossible:lNormalizedNumber];
- return lNormalizedNumber;
-}
-void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
- NSMutableDictionary* lAddressBookMap = (NSMutableDictionary*)context;
- @synchronized (lAddressBookMap) {
- [lAddressBookMap removeAllObjects];
-
- NSArray *lContacts = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
- for (id lPerson in lContacts) {
- ABMutableMultiValueRef lPhoneNumbers = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonPhoneProperty);
- for ( int i=0; i
-#include
-#include
-#import
-#import
-#import "FastAddressBook.h"
-#include
-
-static LinphoneCore* theLinphoneCore=nil;
-static LinphoneManager* theLinphoneManager=nil;
-
-extern void libmsilbc_init();
-#ifdef HAVE_AMR
-extern void libmsamr_init();
-#endif
-
-#ifdef HAVE_X264
-extern void libmsx264_init();
-#endif
-#define FRONT_CAM_NAME "AV Capture: Front Camera"
-#define BACK_CAM_NAME "AV Capture: Back Camera"
-#define DEFAULT_EXPIRES 600
-#if defined (HAVE_SILK)
-extern void libmssilk_init();
-#endif
-
-#if HAVE_G729
-extern void libmsbcg729_init();
-#endif
-@implementation LinphoneManager
-@synthesize callDelegate;
-@synthesize registrationDelegate;
-@synthesize connectivity;
-@synthesize frontCamId;
-@synthesize backCamId;
-
--(id) init {
- assert (!theLinphoneManager);
- if ((self= [super init])) {
- mFastAddressBook = [[FastAddressBook alloc] init];
- theLinphoneManager = self;
- }
- return self;
-}
-+(LinphoneManager*) instance {
- return theLinphoneManager;
-}
-
--(NSString*) getDisplayNameFromAddressBook:(NSString*) number andUpdateCallLog:(LinphoneCallLog*)log {
- //1 normalize
- NSString* lNormalizedNumber = [FastAddressBook normalizePhoneNumber:number];
- Contact* lContact = [mFastAddressBook getMatchingRecord:lNormalizedNumber];
- if (lContact) {
- CFStringRef lDisplayName = ABRecordCopyCompositeName(lContact.record);
-
- if (log) {
- //add phone type
- char ltmpString[256];
- CFStringRef lFormatedString = CFStringCreateWithFormat(NULL,NULL,CFSTR("phone_type:%@;"),lContact.numberType);
- CFStringGetCString(lFormatedString, ltmpString,sizeof(ltmpString), kCFStringEncodingUTF8);
- linphone_call_log_set_ref_key(log, ltmpString);
- CFRelease(lFormatedString);
- }
- return [(NSString*)lDisplayName autorelease];
- }
- //[number release];
-
- return nil;
-}
-
--(UIImage*) getImageFromAddressBook:(NSString *)number {
- NSString* lNormalizedNumber = [FastAddressBook normalizePhoneNumber:number];
- Contact* lContact = [mFastAddressBook getMatchingRecord:lNormalizedNumber];
- if (lContact) {
- ABRecordRef person = ABAddressBookGetPersonWithRecordID(mFastAddressBook.addressBook, ABRecordGetRecordID(lContact.record));
- if (ABPersonHasImageData(person)) {
- NSData* d;
- // ios 4.1+
- if ( &ABPersonCopyImageDataWithFormat != nil) {
- d = (NSData*)ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatThumbnail);
- } else {
- d = (NSData*)ABPersonCopyImageData(person);
- }
- return [UIImage imageWithData:[d autorelease]];
- }
- }
- /* return default image */
- return [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"contact_vide" ofType:@"png"]];
- //return nil;
-}
-
--(void) updateCallWithAddressBookData:(LinphoneCall*) call {
- //1 copy adress book
- LinphoneCallLog* lLog = linphone_call_get_call_log(call);
- LinphoneAddress* lAddress;
- if (lLog->dir == LinphoneCallIncoming) {
- lAddress=lLog->from;
- } else {
- lAddress=lLog->to;
- }
- const char* lUserName = linphone_address_get_username(lAddress);
- if (!lUserName) {
- //just return
- return;
- }
-
- NSString* lE164Number = [[NSString alloc] initWithCString:lUserName encoding:[NSString defaultCStringEncoding]];
- NSString* lDisplayName = [self getDisplayNameFromAddressBook:lE164Number andUpdateCallLog:lLog];
-
- if(lDisplayName) {
- linphone_address_set_display_name(lAddress, [lDisplayName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
- } else {
- ms_message("No contact entry found for [%s] in address book",lUserName);
- }
-
- [lE164Number release];
- return;
-}
-
--(void) onCall:(LinphoneCall*) call StateChanged: (LinphoneCallState) new_state withMessage: (const char *) message {
- const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(call));
- NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil);
- if (new_state == LinphoneCallIncomingReceived) {
- [self updateCallWithAddressBookData:call]; // display name is updated
- }
- const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(call));
- NSString* lDisplayName = [lDisplayNameChars?[[NSString alloc] initWithUTF8String:lDisplayNameChars]:@"" autorelease];
-
- bool canHideInCallView = (linphone_core_get_calls([LinphoneManager getLc]) == NULL);
-
- if (!linphone_call_get_user_pointer(call)) {
- LinphoneCallAppData* data = (LinphoneCallAppData*) malloc(sizeof(LinphoneCallAppData));
- data->batteryWarningShown = FALSE;
- linphone_call_set_user_pointer(call, data);
- }
-
- switch (new_state) {
- case LinphoneCallIncomingReceived:
- [callDelegate displayIncomingCall:call
- NotificationFromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName];
- break;
-
- case LinphoneCallOutgoingInit:
- [callDelegate displayCall:call
- InProgressFromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName];
- break;
- case LinphoneCallPausedByRemote:
- case LinphoneCallConnected:
- [callDelegate displayInCall: call
- FromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName];
- break;
- case LinphoneCallUpdatedByRemote:
- {
- const LinphoneCallParams* current = linphone_call_get_current_params(call);
- const LinphoneCallParams* remote = linphone_call_get_remote_params(call);
-
- /* remote wants to add video */
- if (!linphone_call_params_video_enabled(current) && linphone_call_params_video_enabled(remote) && !linphone_core_get_video_policy(theLinphoneCore)->automatically_accept) {
- linphone_core_defer_call_update(theLinphoneCore, call);
- [callDelegate displayAskToEnableVideoCall:call forUser:lUserName withDisplayName:lDisplayName];
- } else if (linphone_call_params_video_enabled(current) && !linphone_call_params_video_enabled(remote)) {
- [callDelegate displayInCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName];
- }
- break;
- }
- case LinphoneCallUpdated:
- {
- const LinphoneCallParams* current = linphone_call_get_current_params(call);
- if (linphone_call_params_video_enabled(current)) {
- [callDelegate displayVideoCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName];
- } else {
- [callDelegate displayInCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName];
- }
- break;
-
- }
- case LinphoneCallError: {
- /*
- NSString* lTitle= state->message!=nil?[NSString stringWithCString:state->message length:strlen(state->message)]: @"Error";
- NSString* lMessage=lTitle;
- */
- NSString* lMessage;
- NSString* lTitle;
- LinphoneProxyConfig* proxyCfg;
- //get default proxy
- linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
- if (proxyCfg == nil) {
- lMessage=NSLocalizedString(@"Please make sure your device is connected to the internet and double check your SIP account configuration in the settings.",nil);
- } else {
- lMessage=[NSString stringWithFormat : NSLocalizedString(@"Cannot call %@",nil),lUserName];
- }
-
- if (linphone_call_get_reason(call) == LinphoneReasonNotFound) {
- lMessage=[NSString stringWithFormat : NSLocalizedString(@"'%@' not registered to Service",nil), lUserName];
- } else {
- if (message!=nil){
- lMessage=[NSString stringWithFormat : NSLocalizedString(@"%@\nReason was: %s",nil),lMessage, message];
- }
- }
- lTitle=NSLocalizedString(@"Call failed",nil);
-
- UIAlertView* error = [[UIAlertView alloc] initWithTitle:lTitle
- message:lMessage
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"Dismiss",nil)
- otherButtonTitles:nil];
- [error show];
- [error release];
- if (canHideInCallView) {
- [callDelegate displayDialerFromUI:mCurrentViewController
- forUser:@""
- withDisplayName:@""];
- } else {
- [callDelegate displayInCall:call
- FromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName];
- }
- break;
- }
- case LinphoneCallEnd:
- if (canHideInCallView) {
- [callDelegate displayDialerFromUI:mCurrentViewController
- forUser:@""
- withDisplayName:@""];
- } else {
- [callDelegate displayInCall:call
- FromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName];
- }
- break;
- case LinphoneCallStreamsRunning:
- //check video
- if (linphone_call_params_video_enabled(linphone_call_get_current_params(call))) {
- [callDelegate displayVideoCall:call FromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName];
- } else {
- [callDelegate displayInCall:call FromUI:mCurrentViewController forUser:lUserName withDisplayName:lDisplayName];
- }
- break;
- case LinphoneCallReleased:
- free (linphone_call_get_user_pointer(call));
- break;
- default:
- break;
- }
-
-}
-
--(void) displayDialer {
- [callDelegate displayDialerFromUI:mCurrentViewController
- forUser:@""
- withDisplayName:@""];
-}
-
-+(LinphoneCore*) getLc {
- if (theLinphoneCore==nil) {
- @throw([NSException exceptionWithName:@"LinphoneCoreException" reason:@"Linphone core not initialized yet" userInfo:nil]);
- }
- return theLinphoneCore;
-}
-
--(void) addLog:(NSString*) log {
- [mLogView addLog:log];
-}
--(void)displayStatus:(NSString*) message {
- [callDelegate displayStatus:message];
-}
-//generic log handler for debug version
-static void linphone_iphone_log_handler(int lev, const char *fmt, va_list args){
- NSString* format = [[NSString alloc] initWithCString:fmt encoding:[NSString defaultCStringEncoding]];
- NSLogv(format,args);
- NSString* formatedString = [[NSString alloc] initWithFormat:format arguments:args];
- [[LinphoneManager instance] addLog:formatedString];
- [format release];
- [formatedString release];
-}
-
-//Error/warning log handler
-static void linphone_iphone_log(struct _LinphoneCore * lc, const char * message) {
- NSString* log = [NSString stringWithCString:message encoding:[NSString defaultCStringEncoding]];
- NSLog(log,NULL);
- [[LinphoneManager instance]addLog:log];
-}
-//status
-static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char * message) {
- NSString* status = [[NSString alloc] initWithCString:message encoding:[NSString defaultCStringEncoding]];
- [(LinphoneManager*)linphone_core_get_user_data(lc) displayStatus:status];
- [status release];
-}
-
-static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, LinphoneCallState state,const char* message) {
- /*LinphoneCallIdle,
- LinphoneCallIncomingReceived,
- LinphoneCallOutgoingInit,
- LinphoneCallOutgoingProgress,
- LinphoneCallOutgoingRinging,
- LinphoneCallOutgoingEarlyMedia,
- LinphoneCallConnected,
- LinphoneCallStreamsRunning,
- LinphoneCallPausing,
- LinphoneCallPaused,
- LinphoneCallResuming,
- LinphoneCallRefered,
- LinphoneCallError,
- LinphoneCallEnd,
- LinphoneCallPausedByRemote
- */
- [(LinphoneManager*)linphone_core_get_user_data(lc) onCall:call StateChanged: state withMessage: message];
-}
-
-static void linphone_iphone_transfer_state_changed(LinphoneCore* lc, LinphoneCall* call, LinphoneCallState state) {
- /*
- LinhoneCallOutgoingProgress -> SalReferTrying
- LinphoneCallConnected -> SalReferSuccess
- LinphoneCallError -> SalReferFailed | *
- */
-}
-
--(void) onRegister:(LinphoneCore *)lc cfg:(LinphoneProxyConfig*) cfg state:(LinphoneRegistrationState) state message:(const char*) message {
- ms_warning("NEW REGISTRATION STATE: '%s' (message: '%s')", linphone_registration_state_to_string(state), message);
-
- LinphoneAddress* lAddress = linphone_address_new(linphone_proxy_config_get_identity(cfg));
- NSString* lUserName = linphone_address_get_username(lAddress)? [[NSString alloc] initWithUTF8String:linphone_address_get_username(lAddress) ]:@"";
- NSString* lDisplayName = linphone_address_get_display_name(lAddress)? [[NSString alloc] initWithUTF8String:linphone_address_get_display_name(lAddress) ]:@"";
- NSString* lDomain = [[NSString alloc] initWithUTF8String:linphone_address_get_domain(lAddress)];
- linphone_address_destroy(lAddress);
-
- if (state == LinphoneRegistrationOk) {
- [[(LinphoneManager*)linphone_core_get_user_data(lc) registrationDelegate] displayRegisteredFromUI:nil
- forUser:lUserName
- withDisplayName:lDisplayName
- onDomain:lDomain ];
- } else if (state == LinphoneRegistrationProgress) {
- [registrationDelegate displayRegisteringFromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName
- onDomain:lDomain ];
-
- } else if (state == LinphoneRegistrationCleared || state == LinphoneRegistrationNone) {
- [registrationDelegate displayNotRegisteredFromUI:mCurrentViewController];
- } else if (state == LinphoneRegistrationFailed ) {
- NSString* lErrorMessage=nil;
- if (linphone_proxy_config_get_error(cfg) == LinphoneReasonBadCredentials) {
- lErrorMessage = NSLocalizedString(@"Bad credentials, check your account settings",nil);
- } else if (linphone_proxy_config_get_error(cfg) == LinphoneReasonNoResponse) {
- lErrorMessage = NSLocalizedString(@"SIP server unreachable",nil);
- }
- [registrationDelegate displayRegistrationFailedFromUI:mCurrentViewController
- forUser:lUserName
- withDisplayName:lDisplayName
- onDomain:lDomain
- forReason:lErrorMessage];
-
- if (lErrorMessage != nil
- && linphone_proxy_config_get_error(cfg) != LinphoneReasonNoResponse) { //do not report network connection issue on registration
- //default behavior if no registration delegates
- UIApplicationState s = [UIApplication sharedApplication].applicationState;
-
- // do not stack error message when going to backgroud
- if (s != UIApplicationStateBackground) {
- UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Registration failure",nil)
- message:lErrorMessage
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"Continue",nil)
- otherButtonTitles:nil ,nil];
- [error show];
- [error release];
- }
- }
-
- }
-
- [lUserName release];
- [lDisplayName release];
- [lDomain release];
-
-}
-static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyConfig* cfg, LinphoneRegistrationState state,const char* message) {
- [(LinphoneManager*)linphone_core_get_user_data(lc) onRegister:lc cfg:cfg state:state message:message];
-}
-
-static LinphoneCoreVTable linphonec_vtable = {
- .show =NULL,
- .call_state_changed =(LinphoneCallStateCb)linphone_iphone_call_state,
- .registration_state_changed = linphone_iphone_registration_state,
- .notify_recv = NULL,
- .new_subscription_request = NULL,
- .auth_info_requested = NULL,
- .display_status = linphone_iphone_display_status,
- .display_message=linphone_iphone_log,
- .display_warning=linphone_iphone_log,
- .display_url=NULL,
- .text_received=NULL,
- .dtmf_received=NULL,
- .transfer_state_changed=linphone_iphone_transfer_state_changed
-};
-
-
--(void) configurePayloadType:(const char*) type fromPrefKey: (NSString*)key withRate:(int)rate {
- if ([[NSUserDefaults standardUserDefaults] boolForKey:key]) {
- PayloadType* pt;
- if((pt = linphone_core_find_payload_type(theLinphoneCore,type,rate))) {
- linphone_core_enable_payload_type(theLinphoneCore,pt, TRUE);
- }
- }
-}
--(void) kickOffNetworkConnection {
- /*start a new thread to avoid blocking the main ui in case of peer host failure*/
- [NSThread detachNewThreadSelector:@selector(runNetworkConnection) toTarget:self withObject:nil];
-}
--(void) runNetworkConnection {
- CFWriteStreamRef writeStream;
- CFStreamCreatePairWithSocketToHost(NULL, (CFStringRef)@"192.168.0.200"/*"linphone.org"*/, 15000, nil, &writeStream);
- CFWriteStreamOpen (writeStream);
- const char* buff="hello";
- CFWriteStreamWrite (writeStream,(const UInt8*)buff,strlen(buff));
- CFWriteStreamClose (writeStream);
-}
-
-void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* nilCtx) {
- ms_message("Network connection flag [%x]",flags);
- LinphoneManager* lLinphoneMgr = [LinphoneManager instance];
- SCNetworkReachabilityFlags networkDownFlags=kSCNetworkReachabilityFlagsConnectionRequired |kSCNetworkReachabilityFlagsConnectionOnTraffic;
-
- if ([LinphoneManager getLc] != nil) {
- LinphoneProxyConfig* proxy;
- linphone_core_get_default_proxy([LinphoneManager getLc], &proxy);
-
- struct NetworkReachabilityContext* ctx = nilCtx ? ((struct NetworkReachabilityContext*)nilCtx) : 0;
- if ((flags == 0) | (flags & networkDownFlags)) {
- [[LinphoneManager instance] kickOffNetworkConnection];
- linphone_core_set_network_reachable([LinphoneManager getLc],false);
- lLinphoneMgr.connectivity = none;
- } else {
- Connectivity newConnectivity;
- BOOL isWifiOnly = [[NSUserDefaults standardUserDefaults] boolForKey:@"wifi_only_preference"];
- if (!ctx || ctx->testWWan)
- newConnectivity = flags & kSCNetworkReachabilityFlagsIsWWAN ? wwan:wifi;
- else
- newConnectivity = wifi;
-
- if (newConnectivity == wwan
- && proxy
- && isWifiOnly
- && (lLinphoneMgr.connectivity == newConnectivity || lLinphoneMgr.connectivity == none)) {
- linphone_proxy_config_expires(proxy, 0);
- } else if (proxy){
- linphone_proxy_config_expires(proxy, DEFAULT_EXPIRES); //might be better to save the previous value
- }
-
- if (lLinphoneMgr.connectivity == none) {
- linphone_core_set_network_reachable([LinphoneManager getLc],true);
- } else if (lLinphoneMgr.connectivity != newConnectivity) {
- // connectivity has changed
- linphone_core_set_network_reachable([LinphoneManager getLc],false);
- if (newConnectivity == wwan && proxy && isWifiOnly) {
- linphone_proxy_config_expires(proxy, 0);
- }
- linphone_core_set_network_reachable([LinphoneManager getLc],true);
- }
- lLinphoneMgr.connectivity=newConnectivity;
- ms_message("new network connectivity of type [%s]",(newConnectivity==wifi?"wifi":"wwan"));
- }
- if (ctx && ctx->networkStateChanged) {
- (*ctx->networkStateChanged)(lLinphoneMgr.connectivity);
- }
- }
-}
-
--(BOOL) reconfigureLinphoneIfNeeded:(NSDictionary *)settings {
- if (theLinphoneCore==nil) {
- ms_warning("cannot configure linphone because not initialized yet");
- return NO;
- }
-
- [[NSUserDefaults standardUserDefaults] synchronize];
- NSDictionary* newSettings = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
- if (settings != nil) {
- /* reconfigure only if newSettings != settings */
- if ([newSettings isEqualToDictionary:settings]) {
- ms_message("Same settings: no need to reconfigure linphone");
- return NO;
- }
- }
- NSLog(@"Configuring Linphone (new settings)");
-
-
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"debugenable_preference"]) {
- //redirect all traces to the iphone log framework
- linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
- }
- else {
- linphone_core_disable_logs();
- }
-
- NSBundle* myBundle = [NSBundle mainBundle];
-
- /* unregister before modifying any settings */
- {
- LinphoneProxyConfig* proxyCfg;
- linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg);
-
- if (proxyCfg) {
- // this will force unregister WITHOUT destorying the proxyCfg object
- linphone_proxy_config_edit(proxyCfg);
-
- int i=0;
- while (linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationNone &&
- linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationCleared &&
- linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationFailed &&
- i++<40 ) {
- linphone_core_iterate(theLinphoneCore);
- usleep(100000);
- }
- }
- }
-
- const char* lRootCa = [[myBundle pathForResource:@"rootca"ofType:@"pem"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
- linphone_core_set_root_ca(theLinphoneCore, lRootCa);
-
- NSString* transport = [[NSUserDefaults standardUserDefaults] stringForKey:@"transport_preference"];
-
- LCSipTransports transportValue;
- if (transport!=nil) {
- if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) {
- ms_error("cannot get current transport");
- }
- // Only one port can be set at one time, the others's value is 0
- if ([transport isEqualToString:@"tcp"]) {
- if (transportValue.tcp_port == 0) transportValue.tcp_port=transportValue.udp_port + transportValue.tls_port;
- transportValue.udp_port=0;
- transportValue.tls_port=0;
- } else if ([transport isEqualToString:@"udp"]){
- if (transportValue.udp_port == 0) transportValue.udp_port=transportValue.tcp_port + transportValue.tls_port;
- transportValue.tcp_port=0;
- transportValue.tls_port=0;
- } else if ([transport isEqualToString:@"tls"]){
- if (transportValue.tls_port == 0) transportValue.tls_port=transportValue.udp_port + transportValue.tcp_port;
- transportValue.tcp_port=0;
- transportValue.udp_port=0;
- } else {
- ms_error("unexpected transport [%s]",[transport cStringUsingEncoding:[NSString defaultCStringEncoding]]);
- }
- if (linphone_core_set_sip_transports(theLinphoneCore, &transportValue)) {
- ms_error("cannot set transport");
- }
- }
-
-
-
- // Set audio assets
- const char* lRing = [[myBundle pathForResource:@"01"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
- linphone_core_set_ring(theLinphoneCore, lRing );
- const char* lRingBack = [[myBundle pathForResource:@"01"ofType:@"wav"] cStringUsingEncoding:[NSString defaultCStringEncoding]];
- linphone_core_set_ringback(theLinphoneCore, lRingBack);
-
-
-
- //configure sip account
-
- //madatory parameters
-
- NSString* username = [[NSUserDefaults standardUserDefaults] stringForKey:@"username_preference"];
- NSString* domain = [[NSUserDefaults standardUserDefaults] stringForKey:@"domain_preference"];
- NSString* accountPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"];
- bool configCheckDisable = [[NSUserDefaults standardUserDefaults] boolForKey:@"check_config_disable_preference"];
- bool isOutboundProxy= [[NSUserDefaults standardUserDefaults] boolForKey:@"outbound_proxy_preference"];
-
-
- //clear auth info list
- linphone_core_clear_all_auth_info(theLinphoneCore);
- //clear existing proxy config
- linphone_core_clear_proxy_config(theLinphoneCore);
- if (username && [username length] >0 && domain && [domain length]>0) {
- const char* identity = [[NSString stringWithFormat:@"sip:%@@%@",username,domain] cStringUsingEncoding:[NSString defaultCStringEncoding]];
- const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];
-
- NSString* proxyAddress = [[NSUserDefaults standardUserDefaults] stringForKey:@"proxy_preference"];
- if ((!proxyAddress || [proxyAddress length] <1 ) && domain) {
- proxyAddress = [NSString stringWithFormat:@"sip:%@",domain] ;
- } else {
- proxyAddress = [NSString stringWithFormat:@"sip:%@",proxyAddress] ;
- }
-
- const char* proxy = [proxyAddress cStringUsingEncoding:[NSString defaultCStringEncoding]];
-
- NSString* prefix = [[NSUserDefaults standardUserDefaults] stringForKey:@"prefix_preference"];
- bool substitute_plus_by_00 = [[NSUserDefaults standardUserDefaults] boolForKey:@"substitute_+_by_00_preference"];
- //possible valid config detected
- LinphoneProxyConfig* proxyCfg;
- proxyCfg = linphone_proxy_config_new();
-
- // add username password
- LinphoneAddress *from = linphone_address_new(identity);
- LinphoneAuthInfo *info;
- if (from !=0){
- info=linphone_auth_info_new(linphone_address_get_username(from),NULL,password,NULL,NULL);
- linphone_core_add_auth_info(theLinphoneCore,info);
- }
- linphone_address_destroy(from);
-
- // configure proxy entries
- linphone_proxy_config_set_identity(proxyCfg,identity);
- linphone_proxy_config_set_server_addr(proxyCfg,proxy);
- linphone_proxy_config_enable_register(proxyCfg,true);
- linphone_proxy_config_expires(proxyCfg, DEFAULT_EXPIRES);
-
- if (isOutboundProxy)
- linphone_proxy_config_set_route(proxyCfg,proxy);
-
- if ([prefix length]>0) {
- linphone_proxy_config_set_dial_prefix(proxyCfg, [prefix cStringUsingEncoding:[NSString defaultCStringEncoding]]);
- }
- linphone_proxy_config_set_dial_escape_plus(proxyCfg,substitute_plus_by_00);
-
- linphone_core_add_proxy_config(theLinphoneCore,proxyCfg);
- //set to default proxy
- linphone_core_set_default_proxy(theLinphoneCore,proxyCfg);
-
- } else {
- if (configCheckDisable == false ) {
- UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Warning",nil)
- message:NSLocalizedString(@"It seems you have not configured any proxy server from settings",nil)
- delegate:self
- cancelButtonTitle:NSLocalizedString(@"Continue",nil)
- otherButtonTitles:NSLocalizedString(@"Never remind",nil),nil];
- [error show];
- [error release];
- }
- }
-
- //Configure Codecs
-
- PayloadType *pt;
- //get codecs from linphonerc
- const MSList *audioCodecs=linphone_core_get_audio_codecs(theLinphoneCore);
- const MSList *elem;
- //disable all codecs
- for (elem=audioCodecs;elem!=NULL;elem=elem->next){
- pt=(PayloadType*)elem->data;
- linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
- }
-
- //read codecs from setting bundle and enable them one by one
- if ([self isNotIphone3G]) {
- [self configurePayloadType:"SILK" fromPrefKey:@"silk_24k_preference" withRate:24000];
- }
- else {
- ms_message("SILK 24khz codec deactivated");
- }
- [self configurePayloadType:"speex" fromPrefKey:@"speex_16k_preference" withRate:16000];
- [self configurePayloadType:"speex" fromPrefKey:@"speex_8k_preference" withRate:8000];
- [self configurePayloadType:"SILK" fromPrefKey:@"silk_16k_preference" withRate:16000];
- [self configurePayloadType:"AMR" fromPrefKey:@"amr_8k_preference" withRate:8000];
- [self configurePayloadType:"GSM" fromPrefKey:@"gsm_8k_preference" withRate:8000];
- [self configurePayloadType:"iLBC" fromPrefKey:@"ilbc_preference" withRate:8000];
- [self configurePayloadType:"PCMU" fromPrefKey:@"pcmu_preference" withRate:8000];
- [self configurePayloadType:"PCMA" fromPrefKey:@"pcma_preference" withRate:8000];
- [self configurePayloadType:"G722" fromPrefKey:@"g722_preference" withRate:8000];
- [self configurePayloadType:"G729" fromPrefKey:@"g729_preference" withRate:8000];
-
- //get video codecs from linphonerc
- const MSList *videoCodecs=linphone_core_get_video_codecs(theLinphoneCore);
- //disable video all codecs
- for (elem=videoCodecs;elem!=NULL;elem=elem->next){
- pt=(PayloadType*)elem->data;
- linphone_core_enable_payload_type(theLinphoneCore,pt,FALSE);
- }
- [self configurePayloadType:"MP4V-ES" fromPrefKey:@"mp4v-es_preference" withRate:90000];
- [self configurePayloadType:"H264" fromPrefKey:@"h264_preference" withRate:90000];
- [self configurePayloadType:"VP8" fromPrefKey:@"vp8_preference" withRate:90000];
-
- if ([self isNotIphone3G]) {
- bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"];
- linphone_core_enable_video(theLinphoneCore, enableVideo, enableVideo);
- } else {
- linphone_core_enable_video(theLinphoneCore, FALSE, FALSE);
- ms_warning("Disable video for phones prior to iPhone 3GS");
- }
- bool enableSrtp = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_srtp_preference"];
- linphone_core_set_media_encryption(theLinphoneCore, enableSrtp?LinphoneMediaEncryptionSRTP:LinphoneMediaEncryptionZRTP);
-
- NSString* stun_server = [[NSUserDefaults standardUserDefaults] stringForKey:@"stun_preference"];
- if ([stun_server length]>0){
- linphone_core_set_stun_server(theLinphoneCore,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]);
- linphone_core_set_firewall_policy(theLinphoneCore, LinphonePolicyUseStun);
- }else{
- linphone_core_set_stun_server(theLinphoneCore, NULL);
- linphone_core_set_firewall_policy(theLinphoneCore, LinphonePolicyNoFirewall);
- }
-
- LinphoneVideoPolicy policy;
- policy.automatically_accept = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"];;
- policy.automatically_initiate = [[NSUserDefaults standardUserDefaults] boolForKey:@"start_video_preference"];
- linphone_core_set_video_policy(theLinphoneCore, &policy);
-
- UIDevice* device = [UIDevice currentDevice];
- bool backgroundSupported = false;
- if ([device respondsToSelector:@selector(isMultitaskingSupported)])
- backgroundSupported = [device isMultitaskingSupported];
-
- if (backgroundSupported) {
- isbackgroundModeEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"backgroundmode_preference"];
- } else {
- isbackgroundModeEnabled=false;
- }
-
- [currentSettings release];
- currentSettings = newSettings;
- [currentSettings retain];
-
- return YES;
-}
-- (BOOL)isNotIphone3G
-{
- size_t size;
- sysctlbyname("hw.machine", NULL, &size, NULL, 0);
- char *machine = malloc(size);
- sysctlbyname("hw.machine", machine, &size, NULL, 0);
- NSString *platform = [[NSString alloc ] initWithUTF8String:machine];
- free(machine);
-
- BOOL result = ![platform isEqualToString:@"iPhone1,2"];
-
- [platform release];
- return result;
-}
-
-// no proxy configured alert
-- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
- if (buttonIndex == 1) {
- [[NSUserDefaults standardUserDefaults] setBool:true forKey:@"check_config_disable_preference"];
- }
-}
--(void) destroyLibLinphone {
- NSLog(@"destroyLibLinphone");
- [mIterateTimer invalidate];
- AVAudioSession *audioSession = [AVAudioSession sharedInstance];
- [audioSession setDelegate:nil];
- if (theLinphoneCore != nil) { //just in case application terminate before linphone core initialization
- NSLog(@"Destroy linphonecore");
- linphone_core_destroy(theLinphoneCore);
- theLinphoneCore = nil;
- SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
- if (proxyReachability)
- CFRelease(proxyReachability);
- proxyReachability=nil;
-
- }
-
-}
-
-//**********************BG mode management*************************///////////
--(BOOL) enterBackgroundMode {
- LinphoneProxyConfig* proxyCfg;
- linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg);
- linphone_core_stop_dtmf_stream(theLinphoneCore);
-
- if (isbackgroundModeEnabled && proxyCfg) {
- //For registration register
- linphone_core_refresh_registers(theLinphoneCore);
-
-
- //wait for registration answer
- int i=0;
- while (!linphone_proxy_config_is_registered(proxyCfg) && i++<40 ) {
- linphone_core_iterate(theLinphoneCore);
- usleep(100000);
- }
- //register keepalive
- if ([[UIApplication sharedApplication] setKeepAliveTimeout:600/*(NSTimeInterval)linphone_proxy_config_get_expires(proxyCfg)*/
- handler:^{
- ms_warning("keepalive handler");
- if (theLinphoneCore == nil) {
- ms_warning("It seam that Linphone BG mode was deacticated, just skipping");
- return;
- }
- //kick up network cnx, just in case
- [self kickOffNetworkConnection];
- linphone_core_refresh_registers(theLinphoneCore);
- linphone_core_iterate(theLinphoneCore);
- }
- ]) {
-
-
- ms_warning("keepalive handler succesfully registered");
- } else {
- ms_warning("keepalive handler cannot be registered");
- }
- LCSipTransports transportValue;
- if (linphone_core_get_sip_transports(theLinphoneCore, &transportValue)) {
- ms_error("cannot get current transport");
- }
- return YES;
- }
- else {
- ms_warning("Entering lite bg mode");
- [self destroyLibLinphone];
- return NO;
- }
-}
-
-
-//scheduling loop
--(void) iterate {
- linphone_core_iterate(theLinphoneCore);
-}
-
-
--(void) setupNetworkReachabilityCallback: (const char*) nodeName withContext:(SCNetworkReachabilityContext*) ctx {
- if (proxyReachability) {
- ms_message("Cancel old network reachability check");
- SCNetworkReachabilityUnscheduleFromRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
- CFRelease(proxyReachability);
- proxyReachability = nil;
- }
-
- proxyReachability = SCNetworkReachabilityCreateWithName(nil, nodeName);
-
- //initial state is network off should be done as soon as possible
- SCNetworkReachabilityFlags flags;
- if (!SCNetworkReachabilityGetFlags(proxyReachability, &flags)) {
- ms_error("Cannot get reachability flags");
- };
- networkReachabilityCallBack(proxyReachability, flags, ctx ? ctx->info : 0);
-
- if (!SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack, ctx)){
- ms_error("Cannot register reachability cb");
- };
- if(!SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)){
- ms_error("Cannot register schedule reachability cb");
- };
-}
-
-
-/*************
- *lib linphone init method
- */
--(void)startLibLinphone {
-
- //get default config from bundle
- NSBundle* myBundle = [NSBundle mainBundle];
- NSString* factoryConfig = [myBundle pathForResource:[LinphoneManager runningOnIpad]?@"linphonerc-ipad":@"linphonerc" ofType:nil] ;
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString *confiFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/.linphonerc"];
- NSString *zrtpSecretsFileName = [[paths objectAtIndex:0] stringByAppendingString:@"/zrtp_secrets"];
- connectivity=none;
- signal(SIGPIPE, SIG_IGN);
- //log management
-
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"debugenable_preference"]) {
- //redirect all traces to the iphone log framework
- linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
- }
- else {
- linphone_core_disable_logs();
- }
-
- libmsilbc_init();
-#if defined (HAVE_SILK)
- libmssilk_init();
-#endif
-#ifdef HAVE_AMR
- libmsamr_init(); //load amr plugin if present from the liblinphone sdk
-#endif
-#ifdef HAVE_X264
- libmsx264_init(); //load x264 plugin if present from the liblinphone sdk
-#endif
-
-#if HAVE_G729
- libmsbcg729_init(); // load g729 plugin
-#endif
- /* Initialize linphone core*/
-
- NSLog(@"Create linphonecore");
- theLinphoneCore = linphone_core_new (&linphonec_vtable
- , [confiFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]
- , [factoryConfig cStringUsingEncoding:[NSString defaultCStringEncoding]]
- ,self);
-
- [[NSUserDefaults standardUserDefaults] synchronize];//sync before loading config
-
- linphone_core_set_zrtp_secrets_file(theLinphoneCore, [zrtpSecretsFileName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
-
- [self setupNetworkReachabilityCallback: "linphone.org" withContext:nil];
-
- [self reconfigureLinphoneIfNeeded:nil];
-
- // start scheduler
- mIterateTimer = [NSTimer scheduledTimerWithTimeInterval:0.1
- target:self
- selector:@selector(iterate)
- userInfo:nil
- repeats:YES];
- //init audio session
- AVAudioSession *audioSession = [AVAudioSession sharedInstance];
- BOOL bAudioInputAvailable= [audioSession inputIsAvailable];
- [audioSession setDelegate:self];
-
- NSError* err;
- [audioSession setActive:NO error: &err];
- if(!bAudioInputAvailable){
- UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No microphone",nil)
- message:NSLocalizedString(@"You need to plug a microphone to your device to use this application.",nil)
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"Ok",nil)
- otherButtonTitles:nil ,nil];
- [error show];
- [error release];
- }
-
- NSString* path = [myBundle pathForResource:@"nowebcamCIF" ofType:@"jpg"];
- if (path) {
- const char* imagePath = [path cStringUsingEncoding:[NSString defaultCStringEncoding]];
- ms_message("Using '%s' as source image for no webcam", imagePath);
- linphone_core_set_static_picture(theLinphoneCore, imagePath);
- }
-
- /*DETECT cameras*/
- frontCamId= backCamId=nil;
- char** camlist = (char**)linphone_core_get_video_devices(theLinphoneCore);
- for (char* cam = *camlist;*camlist!=NULL;cam=*++camlist) {
- if (strcmp(FRONT_CAM_NAME, cam)==0) {
- frontCamId = cam;
- //great set default cam to front
- linphone_core_set_video_device(theLinphoneCore, cam);
- }
- if (strcmp(BACK_CAM_NAME, cam)==0) {
- backCamId = cam;
- }
-
- }
-
- if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
- && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
- //go directly to bg mode
- [self enterBackgroundMode];
- }
-
- if ([LinphoneManager runningOnIpad])
- ms_set_cpu_count(2);
- else
- ms_set_cpu_count(1);
-
- ms_warning("Linphone [%s] started on [%s]"
- ,linphone_core_get_version()
- ,[[UIDevice currentDevice].model cStringUsingEncoding:[NSString defaultCStringEncoding]] );
-
-}
--(void) becomeActive {
- if (theLinphoneCore == nil) {
- //back from standby and background mode is disabled
- [self startLibLinphone];
- } else {
- if (![self reconfigureLinphoneIfNeeded:currentSettings]) {
- ms_message("becoming active with no config modification, make sure we are registered");
- linphone_core_refresh_registers(theLinphoneCore);//just to make sure REGISTRATION is up to date
- }
-
- }
- /*IOS specific*/
- linphone_core_start_dtmf_stream(theLinphoneCore);
-
-}
--(void) registerLogView:(id) view {
- mLogView = view;
-}
-
--(void) beginInterruption {
- LinphoneCall* c = linphone_core_get_current_call(theLinphoneCore);
- ms_message("Sound interruption detected!");
- if (c) {
- linphone_core_pause_call(theLinphoneCore, c);
- }
-}
-
--(void) endInterruption {
- ms_message("Sound interruption ended!");
- //let the user resume the call manually.
-}
-+(BOOL) runningOnIpad {
-#ifdef UI_USER_INTERFACE_IDIOM
- return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
-#endif
- return NO;
-}
-
-+(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
diff --git a/Classes/LinphoneUI/LinphoneUIDelegates.h b/Classes/LinphoneUI/LinphoneUIDelegates.h
deleted file mode 100644
index 4d6b0477d..000000000
--- a/Classes/LinphoneUI/LinphoneUIDelegates.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* LinphoneUIControler.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
-#include "linphonecore.h"
-
-@protocol LinphoneUICallDelegate
-// UI changes
--(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
--(void) displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
--(void) displayIncomingCall: (LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
--(void) displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
--(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName;
-//status reporting
--(void) displayStatus:(NSString*) message;
--(void) displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName;
--(void) firstVideoFrameDecoded:(LinphoneCall*) call;
-@end
-
-
-@protocol LinphoneUIRegistrationDelegate
-// UI changes for registration
--(void) displayRegisteredFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain ;
--(void) displayRegisteringFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain ;
--(void) displayRegistrationFailedFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain forReason:(NSString*) reason;
--(void) displayNotRegisteredFromUI:(UIViewController*) viewCtrl;
-@end
-
diff --git a/Classes/LinphoneUI/UIAddressTextField.h b/Classes/LinphoneUI/UIAddressTextField.h
new file mode 100644
index 000000000..b08c462a3
--- /dev/null
+++ b/Classes/LinphoneUI/UIAddressTextField.h
@@ -0,0 +1,24 @@
+/* UIAddressTextField.h
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import
+
+@interface UIAddressTextField : UITextField
+
+@end
diff --git a/Classes/LinphoneUI/UIAddressTextField.m b/Classes/LinphoneUI/UIAddressTextField.m
new file mode 100644
index 000000000..aefc0cf8b
--- /dev/null
+++ b/Classes/LinphoneUI/UIAddressTextField.m
@@ -0,0 +1,29 @@
+/* UIAddressTextField.h
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import "UIAddressTextField.h"
+
+@implementation UIAddressTextField
+
+- (void)setText:(NSString *)text {
+ [super setText:text];
+ [self sendActionsForControlEvents:UIControlEventEditingChanged];
+}
+
+@end
diff --git a/Classes/LinphoneUI/UIBluetoothButton.m b/Classes/LinphoneUI/UIBluetoothButton.m
index c565779be..634fb4206 100644
--- a/Classes/LinphoneUI/UIBluetoothButton.m
+++ b/Classes/LinphoneUI/UIBluetoothButton.m
@@ -19,13 +19,15 @@
#import "UIBluetoothButton.h"
#import
+#import "Utils.h"
+
#include "linphonecore.h"
@implementation UIBluetoothButton
#define check_auresult(au,method) \
-if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%ld",method,au)
+if (au!=0) [LinphoneLogger logc:LinphoneLoggerError format:"UIBluetoothButton error for %s: ret=%ld",method,au]
--(void) onOn {
+- (void)onOn {
//redirect audio to bluetooth
UInt32 size = sizeof(CFStringRef);
@@ -42,7 +44,8 @@ if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%ld",method,au)
check_auresult(result,"set kAudioSessionProperty_OverrideCategoryEnableBluetoothInput 1");
}
--(void) onOff {
+
+- (void)onOff {
//redirect audio to bluetooth
int allowBluetoothInput = 0;
OSStatus result = AudioSessionSetProperty (
@@ -58,22 +61,13 @@ if (au!=0) ms_error("UIBluetoothButton error for %s: ret=%ld",method,au)
}
--(bool) isInitialStateOn {
+
+- (bool)onUpdate {
return false;
}
-
-/*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code.
- }
- */
-
- (void)dealloc {
[super dealloc];
}
-
@end
diff --git a/Classes/LinphoneUI/UICallButton.h b/Classes/LinphoneUI/UICallButton.h
index 5fc1547fb..955d9a4ee 100644
--- a/Classes/LinphoneUI/UICallButton.h
+++ b/Classes/LinphoneUI/UICallButton.h
@@ -22,11 +22,9 @@
@interface UICallButton : UIButton {
@private
- UITextField* mAddress;
+ UITextField* addressField;
}
--(void) initWithAddress:(UITextField*) address;
-+(void) enableTransforMode:(BOOL) enable;
-+(BOOL) transforModeEnabled;
+@property (nonatomic, retain) IBOutlet UITextField* addressField;
@end
diff --git a/Classes/LinphoneUI/UICallButton.m b/Classes/LinphoneUI/UICallButton.m
index 6957344e5..48bd02962 100644
--- a/Classes/LinphoneUI/UICallButton.m
+++ b/Classes/LinphoneUI/UICallButton.m
@@ -19,116 +19,61 @@
#import "UICallButton.h"
#import "LinphoneManager.h"
-#import "CoreTelephony/CTCallCenter.h"
+#import
@implementation UICallButton
-static BOOL transferMode = NO;
+@synthesize addressField;
-+(void) enableTransforMode:(BOOL) enable {
- transferMode = enable;
+
+#pragma mark - Lifecycle Functions
+
+- (void)initUICallButton {
+ [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
}
-+(BOOL) transforModeEnabled {
- return transferMode;
-}
-
--(void) touchUp:(id) sender {
- if (!linphone_core_is_network_reachabled([LinphoneManager getLc])) {
- UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil)
- message:NSLocalizedString(@"There is no network connection available, enable WIFI or WWAN prior to place a call",nil)
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"Continue",nil)
- otherButtonTitles:nil];
- [error show];
- [error release];
- return;
- }
-
- CTCallCenter* ct = [[CTCallCenter alloc] init];
- if ([ct.currentCalls count] > 0) {
- ms_error("GSM call in progress, cancelling outgoing SIP call request");
- UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Cannot make call",nil)
- message:NSLocalizedString(@"Please terminate GSM call",nil)
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"Continue",nil)
- otherButtonTitles:nil];
- [error show];
- [error release];
- [ct release];
- return;
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initUICallButton];
}
- [ct release];
-
- if (TRUE /*!linphone_core_in_call([LinphoneManager getLc])*/) {
- LinphoneProxyConfig* proxyCfg;
- //get default proxy
- linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
- LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters([LinphoneManager getLc]);
-
- if ([mAddress.text length] == 0) return; //just return
- if ([mAddress.text hasPrefix:@"sip:"]) {
- if (transferMode) {
- linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), [mAddress.text cStringUsingEncoding:[NSString defaultCStringEncoding]]);
- } else {
- linphone_core_invite_with_params([LinphoneManager getLc],[mAddress.text cStringUsingEncoding:[NSString defaultCStringEncoding]],lcallParams);
- }
- [UICallButton enableTransforMode:NO];
- } else if ( proxyCfg==nil){
- UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid sip address",nil)
- message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)",nil)
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"Continue",nil)
- otherButtonTitles:nil];
- [error show];
- [error release];
- } else {
- char normalizedUserName[256];
- NSString* toUserName = [NSString stringWithString:[mAddress text]];
- NSString* lDisplayName = [[LinphoneManager instance] getDisplayNameFromAddressBook:toUserName andUpdateCallLog:nil];
-
- linphone_proxy_config_normalize_number(proxyCfg,[toUserName cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
- LinphoneAddress* tmpAddress = linphone_address_new(linphone_core_get_identity([LinphoneManager getLc]));
- linphone_address_set_username(tmpAddress,normalizedUserName);
- linphone_address_set_display_name(tmpAddress,(lDisplayName)?[lDisplayName cStringUsingEncoding:[NSString defaultCStringEncoding]]:nil);
+ return self;
+}
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUICallButton];
+ }
+ return self;
+}
- if (transferMode) {
- linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), normalizedUserName);
- } else {
- linphone_core_invite_address_with_params([LinphoneManager getLc],tmpAddress,lcallParams) ;
- }
-
- linphone_address_destroy(tmpAddress);
- }
- linphone_call_params_destroy(lcallParams);
- [UICallButton enableTransforMode:NO];
- } else if (linphone_core_inc_invite_pending([LinphoneManager getLc])) {
- linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initUICallButton];
}
-
-}
-
-
-/*
- // 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];
-}
+ return self;
+}
- (void)dealloc {
+ [addressField release];
+
[super dealloc];
- [mAddress release];
-
}
+#pragma mark -
+
+- (void)touchUp:(id) sender {
+ NSString *address = [addressField text];
+ NSString *displayName = nil;
+ ABRecordRef contact = [[[LinphoneManager instance] fastAddressBook] getContact:address];
+ if(contact) {
+ displayName = [FastAddressBook getContactDisplayName:contact];
+ }
+ [[LinphoneManager instance] call:address displayName:displayName transfer:FALSE];
+}
+
@end
diff --git a/Classes/LinphoneUI/UICamSwitch.m b/Classes/LinphoneUI/UICamSwitch.m
index aa0f5e51d..bc4a621c3 100644
--- a/Classes/LinphoneUI/UICamSwitch.m
+++ b/Classes/LinphoneUI/UICamSwitch.m
@@ -20,24 +20,13 @@
#import "UICamSwitch.h"
#include "LinphoneManager.h"
-
@implementation UICamSwitch
@synthesize preview;
--(void) touchUp:(id) sender {
- if (nextCamId!=currentCamId) {
- ms_message("Switching from [%s] to [%s]",currentCamId,nextCamId);
- linphone_core_set_video_device([LinphoneManager getLc], nextCamId);
- nextCamId=currentCamId;
- currentCamId = linphone_core_get_video_device([LinphoneManager getLc]);
- linphone_core_update_call([LinphoneManager getLc]
- , linphone_core_get_current_call([LinphoneManager getLc])
- ,NULL);
- linphone_core_set_native_preview_window_id([LinphoneManager getLc],
- (unsigned long)preview);
- }
-}
-- (id) init {
+
+#pragma mark - Lifecycle Functions
+
+- (id)initUICamSwitch {
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
currentCamId = (char*)linphone_core_get_video_device([LinphoneManager getLc]);
if ([LinphoneManager instance].frontCamId !=nil ) {
@@ -52,18 +41,28 @@
}
return self;
}
+
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initUICamSwitch];
+ }
+ return self;
+}
+
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
- [self init];
+ [self initUICamSwitch];
}
return self;
}
+
- (id)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
if (self) {
- [self init];
+ [self initUICamSwitch];
}
return self;
}
@@ -75,7 +74,24 @@
}
+#pragma mark -
-
+-(void) touchUp:(id) sender {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot tigger camswitch button: Linphone core not ready"];
+ return;
+ }
+ if (nextCamId != currentCamId) {
+ [LinphoneLogger logc:LinphoneLoggerLog format:"Switching from [%s] to [%s]",currentCamId,nextCamId];
+ linphone_core_set_video_device([LinphoneManager getLc], nextCamId);
+ nextCamId=currentCamId;
+ currentCamId = linphone_core_get_video_device([LinphoneManager getLc]);
+ linphone_core_update_call([LinphoneManager getLc]
+ , linphone_core_get_current_call([LinphoneManager getLc])
+ , NULL);
+ /*linphone_core_set_native_preview_window_id([LinphoneManager getLc],
+ (unsigned long)preview);*/
+ }
+}
@end
diff --git a/Classes/LinphoneUI/UIDigitButton.h b/Classes/LinphoneUI/UIDigitButton.h
index d18c94a7e..65f2d20a5 100644
--- a/Classes/LinphoneUI/UIDigitButton.h
+++ b/Classes/LinphoneUI/UIDigitButton.h
@@ -16,24 +16,21 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#import
-#include "linphonecore.h"
-@interface UIDigitButton : UIButton {
+#import "UILongTouchButton.h"
+
+
+@interface UIDigitButton : UILongTouchButton {
@private
- char mDigit;
- UITextField* mAddress;
-
- bool_t sendDtmfDuringCall;
-
-@public
- LinphoneChatRoom* chatRoom;
-
+ char digit;
+ bool dtmf;
+ UITextField* addressField;
}
--(void) initWithNumber:(char)digit ;
--(void) initWithNumber:(char)digit addressField:(UITextField*) address dtmf:(bool_t)send;
-
-@property bool_t sendDtmfDuringCall;
+@property (nonatomic, retain) IBOutlet UITextField* addressField;
+@property char digit;
+@property bool dtmf;
@end
diff --git a/Classes/LinphoneUI/UIDigitButton.m b/Classes/LinphoneUI/UIDigitButton.m
index 7d73893da..dcafad7b6 100644
--- a/Classes/LinphoneUI/UIDigitButton.m
+++ b/Classes/LinphoneUI/UIDigitButton.m
@@ -23,60 +23,85 @@
@implementation UIDigitButton
-@synthesize sendDtmfDuringCall;
+@synthesize dtmf;
+@synthesize digit;
+@synthesize addressField;
+#pragma mark - Lifecycle Functions
--(void) touchDown:(id) sender {
- LinphoneCall *call=linphone_core_get_current_call([LinphoneManager getLc]);
- if (call && linphone_call_get_state(call)==LinphoneCallStreamsRunning) {
- linphone_core_send_dtmf([LinphoneManager getLc],mDigit);
- } else if (chatRoom) {
- char msg[] = {mDigit, '\0'};
- linphone_chat_room_send_message(chatRoom, msg);
- }
-}
-
--(void) touchUp:(id) sender {
- linphone_core_stop_dtmf([LinphoneManager getLc]);
- if (mDigit == '0') {
- //cancel timer for +
- [NSObject cancelPreviousPerformRequestsWithTarget:self
- selector:@selector(doKeyZeroLongPress)
- object:nil];
- }
-
-
-}
-
--(void)doKeyZeroLongPress {
- NSString* newAddress = [[mAddress.text substringToIndex: [mAddress.text length]-1] stringByAppendingString:@"+"];
- [mAddress setText:newAddress];
-
-}
-
--(void) initWithNumber:(char)digit {
- [self initWithNumber:digit addressField:nil dtmf:true];
-}
--(void) initWithNumber:(char)digit addressField:(UITextField*) address dtmf:(bool_t)sendDtmf{
- sendDtmfDuringCall = sendDtmf;
- mDigit=digit ;
- mAddress=address?[address retain]:nil;
+- (void)initUIDigitButton {
+ self->dtmf = FALSE;
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside];
}
-/*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code.
- }
- */
+
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initUIDigitButton];
+ }
+ return self;
+}
+
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUIDigitButton];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initUIDigitButton];
+ }
+ return self;
+}
- (void)dealloc {
[super dealloc];
- [mAddress release];
+ [addressField release];
}
+#pragma mark - Actions Functions
+
+- (void)touchDown:(id) sender {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot trigger digit button: Linphone core not ready"];
+ return;
+ }
+ if (addressField && (!dtmf || !linphone_core_in_call([LinphoneManager getLc]))) {
+ NSString* newAddress = [NSString stringWithFormat:@"%@%c",addressField.text, digit];
+ [addressField setText:newAddress];
+ linphone_core_play_dtmf([LinphoneManager getLc], digit, -1);
+ } else {
+ linphone_core_send_dtmf([LinphoneManager getLc], digit);
+ linphone_core_play_dtmf([LinphoneManager getLc], digit, 100);
+ }
+}
+
+- (void)touchUp:(id) sender {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot trigger digit button: Linphone core not ready"];
+ return;
+ }
+ linphone_core_stop_dtmf([LinphoneManager getLc]);
+}
+
+
+#pragma mark - UILongTouchButtonDelegate Functions
+
+- (void)onRepeatTouch {
+}
+
+- (void)onLongTouch {
+ if (digit == '0') {
+ NSString* newAddress = [[addressField.text substringToIndex: [addressField.text length]-1] stringByAppendingString:@"+"];
+ [addressField setText:newAddress];
+ }
+}
+
@end
diff --git a/Classes/CallHistoryTableViewController.h b/Classes/LinphoneUI/UIEditableTableViewCell.h
similarity index 75%
rename from Classes/CallHistoryTableViewController.h
rename to Classes/LinphoneUI/UIEditableTableViewCell.h
index 334c5d3d1..5549da4b0 100644
--- a/Classes/CallHistoryTableViewController.h
+++ b/Classes/LinphoneUI/UIEditableTableViewCell.h
@@ -1,6 +1,6 @@
-/* CallHistoryTableViewController.h
+/* UIEditableTableViewCell.h
*
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,15 +15,14 @@
* 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
-#import "GenericTabViewController.h"
-
-@interface CallHistoryTableViewController : GenericTabViewController {
- UIButton* clear;
+@interface UIEditableTableViewCell : UITableViewCell {
+ UITextField *detailTextField;
}
--(void) doAction:(id) sender;
-@property (nonatomic, retain) IBOutlet UIButton* clear;
+@property (nonatomic, retain) IBOutlet UITextField *detailTextField;
+
@end
diff --git a/Classes/LinphoneUI/UIEditableTableViewCell.m b/Classes/LinphoneUI/UIEditableTableViewCell.m
new file mode 100644
index 000000000..eabd28611
--- /dev/null
+++ b/Classes/LinphoneUI/UIEditableTableViewCell.m
@@ -0,0 +1,96 @@
+/* UIEditableTableViewCell.m
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import "UIEditableTableViewCell.h"
+
+@implementation UIEditableTableViewCell
+
+@synthesize detailTextField;
+
+
+#pragma mark - Lifecycle Functions
+
+- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
+{
+ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+ if (self) {
+ UIView *parent = [self.detailTextLabel superview];
+ self.detailTextField = [[UITextField alloc] init];
+ [self.detailTextField setHidden:TRUE];
+ [self.detailTextField setClearButtonMode: UITextFieldViewModeWhileEditing];
+ [self.detailTextField setContentVerticalAlignment: UIControlContentVerticalAlignmentCenter];
+
+ UIFont *font = [UIFont fontWithName:@"Helvetica-Bold" size:[UIFont systemFontSize]];
+ [self.detailTextLabel setFont:font];
+ [self.detailTextField setFont:font];
+ [parent addSubview:detailTextField];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [self.detailTextField release];
+ [super dealloc];
+}
+
+
+#pragma mark - View Functions
+
+- (void)layoutSubviews {
+ [super layoutSubviews];
+
+ CGRect fieldframe;
+ fieldframe.origin.x = 15;
+ fieldframe.origin.y = 0;
+ fieldframe.size.height = 44;
+ if([[self.textLabel text] length] != 0)
+ fieldframe.origin.x += [self.textLabel frame].size.width;
+ CGRect superframe = [[self.detailTextField superview]frame];
+ fieldframe.size.width = superframe.size.width - fieldframe.origin.x;
+ [self.detailTextField setFrame:fieldframe];
+
+ CGRect labelFrame = [self.detailTextLabel frame];
+ labelFrame.origin.x = fieldframe.origin.x;
+ [self.detailTextLabel setFrame:labelFrame];
+}
+
+
+#pragma mark - UITableViewCell Functions
+
+- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
+ [super setEditing:editing animated:animated];
+ if(editing) {
+ [self.detailTextField setHidden:FALSE];
+ [self.detailTextLabel setHidden:TRUE];
+ } else {
+ [self.detailTextField setHidden:TRUE];
+ [self.detailTextLabel setHidden:FALSE];
+ }
+}
+
+- (void)setEditing:(BOOL)editing {
+ [self setEditing:editing animated:FALSE];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated
+{
+ [super setSelected:selected animated:animated];
+}
+
+@end
diff --git a/Classes/LinphoneUI/UIEraseButton.h b/Classes/LinphoneUI/UIEraseButton.h
index 168d930f1..0e9e2af51 100644
--- a/Classes/LinphoneUI/UIEraseButton.h
+++ b/Classes/LinphoneUI/UIEraseButton.h
@@ -19,11 +19,13 @@
#import
+#import "UILongTouchButton.h"
-@interface UIEraseButton : UIButton {
+@interface UIEraseButton : UILongTouchButton {
@private
- UITextField* mAddress;
-
+ UITextField* addressField;
}
--(void) initWithAddressField:(UITextField*) address;
+
+@property (nonatomic, retain) IBOutlet UITextField* addressField;
+
@end
diff --git a/Classes/LinphoneUI/UIEraseButton.m b/Classes/LinphoneUI/UIEraseButton.m
index 1113ba817..d271a2727 100644
--- a/Classes/LinphoneUI/UIEraseButton.m
+++ b/Classes/LinphoneUI/UIEraseButton.m
@@ -21,20 +21,62 @@
@implementation UIEraseButton
--(void) touchUp:(id) sender {
- if ([mAddress.text length] > 0) {
- [mAddress setText:[mAddress.text substringToIndex:[mAddress.text length]-1]];
- }
+
+@synthesize addressField;
+
+
+#pragma mark - Lifecycle Functions
+
+- (void)initUIEraseButton {
+ [self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
}
--(void) initWithAddressField:(UITextField*) address {
- mAddress = address;
- [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initUIEraseButton];
+ }
+ return self;
}
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUIEraseButton];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initUIEraseButton];
+ }
+ return self;
+}
+
- (void)dealloc {
[super dealloc];
+ [addressField release];
}
+#pragma mark - Action Functions
+
+-(void) touchDown:(id) sender {
+ if ([addressField.text length] > 0) {
+ [addressField setText:[addressField.text substringToIndex:[addressField.text length]-1]];
+ }
+}
+
+
+#pragma mark - UILongTouchButtonDelegate Functions
+
+- (void)onRepeatTouch {
+}
+
+- (void)onLongTouch {
+ [addressField setText:@""];
+}
+
@end
diff --git a/Classes/LinphoneUI/UIHangUpButton.h b/Classes/LinphoneUI/UIHangUpButton.h
index d279493a3..596a81213 100644
--- a/Classes/LinphoneUI/UIHangUpButton.h
+++ b/Classes/LinphoneUI/UIHangUpButton.h
@@ -16,11 +16,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#import
+#import
@interface UIHangUpButton : UIButton {
}
+- (void)update;
+
@end
diff --git a/Classes/LinphoneUI/UIHangUpButton.m b/Classes/LinphoneUI/UIHangUpButton.m
index a7a291e61..61e4f38a1 100644
--- a/Classes/LinphoneUI/UIHangUpButton.m
+++ b/Classes/LinphoneUI/UIHangUpButton.m
@@ -20,57 +20,109 @@
#import "UIHangUpButton.h"
#import "LinphoneManager.h"
+#import "private.h"
+
@implementation UIHangUpButton
--(void) touchUp:(id) sender {
- LinphoneCore* lc = [LinphoneManager getLc];
- if (!lc)
- return;
- LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
-
- if (call)
- linphone_core_terminate_call(lc,call);
- else if (linphone_core_is_in_conference(lc)) {
- linphone_core_terminate_conference(lc);
- } else {
- const MSList* calls = linphone_core_get_calls(lc);
- if (ms_list_size(calls) == 1
- && !linphone_call_params_local_conference_mode(linphone_call_get_current_params((LinphoneCall*)(calls->data)))) {
- //Only one call in the list, hangin up!
- linphone_core_terminate_call(lc,(LinphoneCall*)(calls->data));
- } else {
- ms_message("Cannot make a decision on which call to terminate");
- }
- }
+
+#pragma mark - Static Functions
+
++ (bool)isInConference:(LinphoneCall*) call {
+ if (!call)
+ return false;
+ return linphone_call_get_current_params(call)->in_conference;
}
-- (id)initWithFrame:(CGRect)frame {
++ (int)callCount:(LinphoneCore*) lc {
+ int count = 0;
+ const MSList* calls = linphone_core_get_calls(lc);
- self = [super initWithFrame:frame];
+ while (calls != 0) {
+ if (![UIHangUpButton isInConference:((LinphoneCall*)calls->data)]) {
+ count++;
+ }
+ calls = calls->next;
+ }
+ return count;
+}
+
+
+#pragma mark - Lifecycle Functions
+
+- (void)initUIHangUpButton {
+ [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
+}
+
+- (id)init{
+ self = [super init];
if (self) {
- [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
+ [self initUIHangUpButton];
}
return self;
}
+
- (id)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
if (self) {
- [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
- }
+ [self initUIHangUpButton];
+ }
return self;
}
-/*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code.
- }
- */
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUIHangUpButton];
+ }
+ return self;
+}
- (void)dealloc {
[super dealloc];
}
+#pragma mark -
+
+- (void)update {
+ if([LinphoneManager isLcReady]) {
+ LinphoneCore * lc = [LinphoneManager getLc];
+ if(linphone_core_get_calls_nb(lc) == 1 || // One call
+ linphone_core_get_current_call(lc) != NULL || // In call
+ linphone_core_is_in_conference(lc) || // In conference
+ (linphone_core_get_conference_size(lc) > 0 && [UIHangUpButton callCount:lc] == 0) // Only one conf
+ ) {
+ [self setEnabled:true];
+ return;
+ }
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot update hangup button: Linphone core not ready"];
+ }
+ [self setEnabled:false];
+}
+
+
+#pragma mark - Action Functions
+
+-(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));
+ }
+ }
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot trigger hangup button: Linphone core not ready"];
+ }
+}
+
@end
diff --git a/Classes/UILightButton.h b/Classes/LinphoneUI/UILightButton.h
similarity index 100%
rename from Classes/UILightButton.h
rename to Classes/LinphoneUI/UILightButton.h
diff --git a/Classes/UILightButton.m b/Classes/LinphoneUI/UILightButton.m
similarity index 100%
rename from Classes/UILightButton.m
rename to Classes/LinphoneUI/UILightButton.m
diff --git a/Classes/LinphoneUI/UILinphone.h b/Classes/LinphoneUI/UILinphone.h
index a65b21951..01a93958b 100644
--- a/Classes/LinphoneUI/UILinphone.h
+++ b/Classes/LinphoneUI/UILinphone.h
@@ -1,6 +1,6 @@
/* UILinphone.h
*
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -10,21 +10,28 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
+ */
-#import "UICallButton.h"
-#import "UIHangUpButton.h"
-#import "UIDigitButton.h"
-#import "UIToggleButton.h"
-#import "UIMuteButton.h"
-#import "UISpeakerButton.h"
-#import "UIDuration.h"
-#import "UIEraseButton.h"
-#import "LinphoneUIDelegates.h"
-#import "UICamSwitch.h"
-#import "UIPauseResumeButton.h"
+#import
+
+#define LINPHONE_MAIN_COLOR [UIColor colorWithRed:207.0f/255.0f green:76.0f/255.0f blue:41.0f/255.0f alpha:1.0f]
+#define LINPHONE_TABLE_CELL_BACKGROUND_COLOR [UIColor colorWithRed:207.0f/255.0f green:76.0f/255.0f blue:41.0f/255.0f alpha:1.0f]
+
+@interface UIColor (LightAndDark)
+
+- (UIColor *)adjustHue:(float)hm saturation:(float)sm brightness:(float)bm alpha:(float)am;
+
+- (UIColor *)lumColor:(float)mult;
+
+- (UIColor *)lighterColor;
+
+- (UIColor *)darkerColor;
+
+@end
+
+void removeTableBackground(UIView* view);
diff --git a/Classes/LinphoneUI/UILinphone.m b/Classes/LinphoneUI/UILinphone.m
new file mode 100644
index 000000000..b1788b19e
--- /dev/null
+++ b/Classes/LinphoneUI/UILinphone.m
@@ -0,0 +1,106 @@
+/* UILinphone.m
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import "UILinphone.h"
+#import "ColorSpaceUtilities.h"
+#import "Utils.h"
+
+#import
+
+@implementation UIColor (LightAndDark)
+
+- (UIColor *)lumColor:(float)mult {
+ float hsbH, hsbS, hsbB;
+ float rgbaR, rgbaG, rgbaB, rgbaA;
+
+ // Get RGB
+ CGColorRef cgColor = [self CGColor];
+ CGColorSpaceRef cgColorSpace = CGColorGetColorSpace(cgColor);
+ if(CGColorSpaceGetModel(cgColorSpace) != kCGColorSpaceModelRGB) {
+ [LinphoneLogger log:LinphoneLoggerWarning format:@"Can't convert not RGB color"];
+ return self;
+ } else {
+ const float *colors = CGColorGetComponents(cgColor);
+ rgbaR = colors[0];
+ rgbaG = colors[1];
+ rgbaB = colors[2];
+ rgbaA = CGColorGetAlpha(cgColor);
+ }
+
+ RGB2HSL(rgbaR, rgbaG, rgbaB, &hsbH, &hsbS, &hsbB);
+
+ hsbB = MIN(MAX(hsbB * mult, 0.0), 1.0);
+
+ HSL2RGB(hsbH, hsbS, hsbB, &rgbaR, &rgbaG, &rgbaB);
+
+ return [UIColor colorWithRed:rgbaR green:rgbaG blue:rgbaB alpha:rgbaA];
+}
+
+- (UIColor *)adjustHue:(float)hm saturation:(float)sm brightness:(float)bm alpha:(float)am {
+ float hsbH, hsbS, hsbB;
+ float rgbaR, rgbaG, rgbaB, rgbaA;
+
+
+ // Get RGB
+ CGColorRef cgColor = [self CGColor];
+ CGColorSpaceRef cgColorSpace = CGColorGetColorSpace(cgColor);
+ if(CGColorSpaceGetModel(cgColorSpace) != kCGColorSpaceModelRGB) {
+ [LinphoneLogger log:LinphoneLoggerWarning format:@"Can't convert not RGB color"];
+ return self;
+ } else {
+ const float *colors = CGColorGetComponents(cgColor);
+ rgbaR = colors[0];
+ rgbaG = colors[1];
+ rgbaB = colors[2];
+ rgbaA = CGColorGetAlpha(cgColor);
+ }
+
+ RGB2HSL(rgbaR, rgbaG, rgbaB, &hsbH, &hsbS, &hsbB);
+
+ hsbH = MIN(MAX(hsbH + hm, 0.0), 1.0);
+ hsbS = MIN(MAX(hsbS + sm, 0.0), 1.0);
+ hsbB = MIN(MAX(hsbB + bm, 0.0), 1.0);
+ rgbaA = MIN(MAX(rgbaA + am, 0.0), 1.0);
+
+ HSL2RGB(hsbH, hsbS, hsbB, &rgbaR, &rgbaG, &rgbaB);
+
+ return [UIColor colorWithRed:rgbaR green:rgbaG blue:rgbaB alpha:rgbaA];
+}
+
+- (UIColor *)lighterColor {
+ return [self lumColor:1.3];
+}
+
+- (UIColor *)darkerColor {
+ return [self lumColor:0.75];
+}
+
+@end
+
+void removeTableBackground(UIView*view) {
+ if([view isKindOfClass:[UITableView class]]) {
+ [view setBackgroundColor:[UIColor clearColor]];
+ }
+ if([view isKindOfClass:[UIImageView class]] && [[view superview] isKindOfClass:[UITableView class]]) {
+ [(UIImageView*)view setImage:nil];
+ }
+ for(UIView *subview in [view subviews]) {
+ removeTableBackground(subview);
+ }
+}
diff --git a/Classes/LinphoneUI/UILongTouchButton.h b/Classes/LinphoneUI/UILongTouchButton.h
new file mode 100644
index 000000000..e7fa2efb8
--- /dev/null
+++ b/Classes/LinphoneUI/UILongTouchButton.h
@@ -0,0 +1,31 @@
+/* UILongTouchButton.h
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import
+
+@protocol UILongTouchButtonDelegate
+-(void) onRepeatTouch;
+-(void) onLongTouch;
+@end
+
+@interface UILongTouchButton : UIButton {
+
+}
+
+@end
diff --git a/Classes/LinphoneUI/UILongTouchButton.m b/Classes/LinphoneUI/UILongTouchButton.m
new file mode 100644
index 000000000..c4f1b0a21
--- /dev/null
+++ b/Classes/LinphoneUI/UILongTouchButton.m
@@ -0,0 +1,89 @@
+/* UILongTouchButton.h
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import "UILongTouchButton.h"
+
+@implementation UILongTouchButton
+
+
+#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)dealloc {
+ [self removeTarget:self action:@selector(___touchDown:) forControlEvents:UIControlEventTouchDown];
+ [self removeTarget:self action:@selector(___touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside];
+ [super dealloc];
+}
+
+- (void)___touchDown:(id) sender {
+ [self performSelector:@selector(doLongTouch) withObject:nil afterDelay:0.5];
+}
+
+- (void)___touchUp:(id) sender {
+ [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doLongTouch) object:nil];
+ [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doRepeatTouch) object:nil];
+}
+
+- (void)doLongTouch {
+ [self onLongTouch];
+ [self onRepeatTouch];
+ [self performSelector:@selector(doRepeatTouch) withObject:nil afterDelay:0.1];
+}
+
+- (void)doRepeatTouch {
+ [self onRepeatTouch];
+ [self performSelector:@selector(doRepeatTouch) withObject:nil afterDelay:0.1];
+}
+
+- (void)onRepeatTouch {
+}
+
+- (void)onLongTouch {
+}
+
+@end
diff --git a/Classes/LinphoneUI/UIMuteButton.h b/Classes/LinphoneUI/UIMicroButton.h
similarity index 92%
rename from Classes/LinphoneUI/UIMuteButton.h
rename to Classes/LinphoneUI/UIMicroButton.h
index cef92d8a4..40a208b0f 100644
--- a/Classes/LinphoneUI/UIMuteButton.h
+++ b/Classes/LinphoneUI/UIMicroButton.h
@@ -1,4 +1,4 @@
-/* UIMuteButton.h
+/* UIMicroButton.h
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
@@ -18,10 +18,10 @@
*/
#import
+
#import "UIToggleButton.h"
-
-@interface UIMuteButton : UIToggleButton {
+@interface UIMicroButton : UIToggleButton {
}
diff --git a/Classes/LinphoneUI/UIMuteButton.m b/Classes/LinphoneUI/UIMicroButton.m
similarity index 61%
rename from Classes/LinphoneUI/UIMuteButton.m
rename to Classes/LinphoneUI/UIMicroButton.m
index 033d5bdb7..5c321134d 100644
--- a/Classes/LinphoneUI/UIMuteButton.m
+++ b/Classes/LinphoneUI/UIMicroButton.m
@@ -1,4 +1,4 @@
-/* UIMuteButton.m
+/* UIMicroButton.m
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
@@ -15,42 +15,41 @@
* 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 "UIMuteButton.h"
-#include "LinphoneManager.h"
+ */
+#import "UIMicroButton.h"
-@implementation UIMuteButton
+#import "LinphoneManager.h"
+@implementation UIMicroButton
-
--(void) onOn {
- linphone_core_mute_mic([LinphoneManager getLc], true);
-}
--(void) onOff {
+- (void)onOn {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle mic button: Linphone core not ready"];
+ return;
+ }
linphone_core_mute_mic([LinphoneManager getLc], false);
}
--(bool) isInitialStateOn {
- @try {
- return true == linphone_core_is_mic_muted([LinphoneManager getLc]);
- } @catch(NSException* e) {
- //not ready yet
- return false;
- }
-
+
+- (void)onOff {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle mic button: Linphone core not ready"];
+ return;
+ }
+ linphone_core_mute_mic([LinphoneManager getLc], true);
}
-/*
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect {
- // Drawing code.
+- (bool)onUpdate {
+ if([LinphoneManager isLcReady]) {
+ return linphone_core_is_mic_muted([LinphoneManager getLc]) == false;
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot update mic button: Linphone core not ready"];
+ return true;
+ }
}
-*/
- (void)dealloc {
[super dealloc];
}
-
@end
diff --git a/Classes/GenericTabViewController.h b/Classes/LinphoneUI/UIPauseButton.h
similarity index 66%
rename from Classes/GenericTabViewController.h
rename to Classes/LinphoneUI/UIPauseButton.h
index 206a3bb6a..105b8b828 100644
--- a/Classes/GenericTabViewController.h
+++ b/Classes/LinphoneUI/UIPauseButton.h
@@ -1,6 +1,6 @@
-/* GenericTabViewController.h
+/* UIPauseButton.h
*
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,15 +17,22 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#import
-#include "linphonecore.h"
-#import "PhoneViewController.h"
-#import "linphoneAppDelegate.h"
+#import "UIToggleButton.h"
-@interface GenericTabViewController : UITableViewController {
- LinphoneCore* myLinphoneCore;
- IBOutlet UIView* header;
+#import "linphonecore.h"
+
+typedef enum _UIPauseButtonType {
+ UIPauseButtonType_CurrentCall,
+ UIPauseButtonType_Call,
+ UIPauseButtonType_Conference
+} UIPauseButtonType;
+
+@interface UIPauseButton : UIToggleButton {
+ @private
+ UIPauseButtonType type;
+ LinphoneCall* call;
}
-@property (nonatomic, retain) IBOutlet UIView* header;
-@end
+- (void)setType:(UIPauseButtonType) type call:(LinphoneCall*)call;
+
+@end
diff --git a/Classes/LinphoneUI/UIPauseButton.m b/Classes/LinphoneUI/UIPauseButton.m
new file mode 100644
index 000000000..d7d747961
--- /dev/null
+++ b/Classes/LinphoneUI/UIPauseButton.m
@@ -0,0 +1,224 @@
+/* UIPauseButton.m
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import "UIPauseButton.h"
+#import "LinphoneManager.h"
+
+#include "linphonecore.h"
+#include "private.h"
+
+@implementation UIPauseButton
+
+
+#pragma mark - Lifecycle Functions
+
+- (void)initUIPauseButton {
+ self->type = UIPauseButtonType_CurrentCall;
+}
+
+- (id)init{
+ self = [super init];
+ if (self) {
+ [self initUIPauseButton];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initUIPauseButton];
+ }
+ return self;
+}
+
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUIPauseButton];
+ }
+ 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 {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle pause button: Linphone core not ready"];
+ return;
+ }
+ switch (type) {
+ case UIPauseButtonType_Call:
+ {
+ if (call != nil) {
+ linphone_core_pause_call([LinphoneManager getLc], call);
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle pause buttton, because no current call"];
+ }
+ break;
+ }
+ case UIPauseButtonType_Conference:
+ {
+ linphone_core_leave_conference([LinphoneManager getLc]);
+
+ // Fake event
+ [[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneCallUpdate object:self];
+ break;
+ }
+ case UIPauseButtonType_CurrentCall:
+ {
+ LinphoneCall* currentCall = [UIPauseButton getCall];
+ if (currentCall != nil) {
+ linphone_core_pause_call([LinphoneManager getLc], currentCall);
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle pause buttton, because no current call"];
+ }
+ break;
+ }
+ }
+}
+
+- (void)onOff {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle pause button: Linphone core not ready"];
+ return;
+ }
+ switch (type) {
+ case UIPauseButtonType_Call:
+ {
+ if (call != nil) {
+ linphone_core_resume_call([LinphoneManager getLc], call);
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle pause buttton, because no current call"];
+ }
+ break;
+ }
+ case UIPauseButtonType_Conference:
+ {
+ linphone_core_enter_conference([LinphoneManager getLc]);
+ // Fake event
+ [[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneCallUpdate object:self];
+ break;
+ }
+ case UIPauseButtonType_CurrentCall:
+ {
+ LinphoneCall* currentCall = [UIPauseButton getCall];
+ if (currentCall != nil) {
+ linphone_core_resume_call([LinphoneManager getLc], currentCall);
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle pause buttton, because no current call"];
+ }
+ break;
+ }
+ }
+}
+
+- (bool)onUpdate {
+ bool ret = false;
+ // TODO: disable pause on not running call
+ if([LinphoneManager isLcReady]) {
+ LinphoneCore *lc = [LinphoneManager getLc];
+ switch (type) {
+ case UIPauseButtonType_Call:
+ {
+ if (call != nil) {
+ LinphoneCallState state = linphone_call_get_state(call);
+ if(state == LinphoneCallPaused || state == LinphoneCallPausing) {
+ ret = true;
+ }
+ [self setEnabled:TRUE];
+ } else {
+ [self setEnabled:FALSE];
+ }
+ break;
+ }
+ case UIPauseButtonType_Conference:
+ {
+ if(linphone_core_get_conference_size(lc) > 0) {
+ if (!linphone_core_is_in_conference(lc)) {
+ ret = true;
+ }
+ [self setEnabled:TRUE];
+ } else {
+ [self setEnabled:FALSE];
+ }
+ break;
+ }
+ case UIPauseButtonType_CurrentCall:
+ {
+ LinphoneCall* currentCall = [UIPauseButton getCall];
+ if (currentCall != nil) {
+ LinphoneCallState state = linphone_call_get_state(currentCall);
+ if(state == LinphoneCallPaused || state == LinphoneCallPausing) {
+ ret = true;
+ }
+ [self setEnabled:TRUE];
+ } else {
+ [self setEnabled:FALSE];
+ }
+ break;
+ }
+ }
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot update pause button: Linphone core not ready"];
+ }
+ return ret;
+}
+
+@end
diff --git a/Classes/LinphoneUI/UIPauseResumeButton.m b/Classes/LinphoneUI/UIPauseResumeButton.m
deleted file mode 100644
index 22f7db8b3..000000000
--- a/Classes/LinphoneUI/UIPauseResumeButton.m
+++ /dev/null
@@ -1,69 +0,0 @@
-/* UIMuteButton.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 "UIPauseResumeButton.h"
-#include "LinphoneManager.h"
-
-
-@implementation UIPauseResumeButton
-
-
-
--(void) onOn {
- LinphoneCall* c = linphone_core_get_current_call([LinphoneManager getLc]);
- if (c) {
- linphone_core_pause_call([LinphoneManager getLc], c);
- }
-}
--(void) onOff {
- const MSList* c = linphone_core_get_calls([LinphoneManager getLc]);
- if (c) {
- linphone_core_resume_call([LinphoneManager getLc], (LinphoneCall*) c->data);
- }
-}
--(bool) isInitialStateOn {
- @try {
- LinphoneCall* c = linphone_core_get_current_call([LinphoneManager getLc]);
-
- if (c) {
- return linphone_call_get_state(c) == LinphoneCallPaused;
- } else {
- /* if current call is paused -> c == null */
- return true;
- }
- } @catch(NSException* e) {
- //not ready yet
- return false;
- }
-
-}
-
-/*
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect {
- // Drawing code.
-}
-*/
-
-- (void)dealloc {
- [super dealloc];
-}
-
-
-@end
diff --git a/Classes/LinphoneUI/UISpeakerButton.h b/Classes/LinphoneUI/UISpeakerButton.h
index fb64c3e1f..02e723c84 100644
--- a/Classes/LinphoneUI/UISpeakerButton.h
+++ b/Classes/LinphoneUI/UISpeakerButton.h
@@ -18,8 +18,8 @@
*/
#import
-#import "UIToggleButton.h"
+#import "UIToggleButton.h"
@interface UISpeakerButton : UIToggleButton {
diff --git a/Classes/LinphoneUI/UISpeakerButton.m b/Classes/LinphoneUI/UISpeakerButton.m
index 10fdf5b5f..9151ddbd7 100644
--- a/Classes/LinphoneUI/UISpeakerButton.m
+++ b/Classes/LinphoneUI/UISpeakerButton.m
@@ -17,12 +17,20 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#import "UISpeakerButton.h"
#import
+#import "UISpeakerButton.h"
+#import "Utils.h"
+#import "LinphoneManager.h"
+
#include "linphonecore.h"
@implementation UISpeakerButton
+
+#pragma mark - Static Functions
+
+static AudioSessionPropertyID routeChangeID = kAudioSessionProperty_AudioRouteChange;
+
static void audioRouteChangeListenerCallback (
void *inUserData, // 1
AudioSessionPropertyID inPropertyID, // 2
@@ -30,63 +38,62 @@ static void audioRouteChangeListenerCallback (
const void *inPropertyValue // 4
) {
if (inPropertyID != kAudioSessionProperty_AudioRouteChange) return; // 5
- [(UISpeakerButton*)inUserData reset];
+ [(UISpeakerButton*)inUserData update];
}
--(void) initWithOnImage:(UIImage*) onImage offImage:(UIImage*) offImage debugName:(const char *)name{
- [super initWithOnImage:onImage offImage:offImage debugName:name];
- AudioSessionPropertyID routeChangeID = kAudioSessionProperty_AudioRouteChange;
- AudioSessionInitialize(NULL, NULL, NULL, NULL);
- OSStatus lStatus = AudioSessionAddPropertyListener(routeChangeID, audioRouteChangeListenerCallback, self);
- if (lStatus) {
- ms_error ("cannot register route change handler [%ld]",lStatus);
- }
+- (void)initUISpeakerButton {
+ AudioSessionInitialize(NULL, NULL, NULL, NULL);
+ OSStatus lStatus = AudioSessionAddPropertyListener(routeChangeID, audioRouteChangeListenerCallback, self);
+ if (lStatus) {
+ [LinphoneLogger logc:LinphoneLoggerError format:"cannot register route change handler [%ld]",lStatus];
+ }
}
-
--(void) onOn {
- //redirect audio to speaker
- UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
- AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
- , sizeof (audioRouteOverride)
- , &audioRouteOverride);
-
-}
--(void) onOff {
- UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_None;
- AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
- , sizeof (audioRouteOverride)
- , &audioRouteOverride);
-}
--(bool) isInitialStateOn {
- 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;
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initUISpeakerButton];
+ }
+ return self;
}
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUISpeakerButton];
+ }
+ return self;
+}
-/*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code.
- }
- */
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initUISpeakerButton];
+ }
+ return self;
+}
- (void)dealloc {
- [super dealloc];
+ OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(routeChangeID, audioRouteChangeListenerCallback, self);
+ if (lStatus) {
+ [LinphoneLogger logc:LinphoneLoggerError format:"cannot un register route change handler [%ld]",lStatus];
+ }
+ [super dealloc];
}
+#pragma mark - UIToggleButtonDelegate Functions
+
+- (void)onOn {
+ [[LinphoneManager instance] enableSpeaker:TRUE];
+}
+
+- (void)onOff {
+ [[LinphoneManager instance] enableSpeaker:FALSE];
+}
+
+- (bool)onUpdate {
+ return [[LinphoneManager instance] isSpeakerEnabled];
+}
@end
diff --git a/Classes/LinphoneUI/UIToggleButton.h b/Classes/LinphoneUI/UIToggleButton.h
index 6e37990d0..f3265e903 100644
--- a/Classes/LinphoneUI/UIToggleButton.h
+++ b/Classes/LinphoneUI/UIToggleButton.h
@@ -20,23 +20,17 @@
#import
@protocol UIToggleButtonDelegate
- -(void) onOn;
- -(void) onOff;
- -(bool) isInitialStateOn;
+ - (void)onOn;
+ - (void)onOff;
+ - (bool)onUpdate;
@end
-@interface UIToggleButton : UIButton {
-@private
- UIImage* mOnImage;
- UIImage* mOffImage;
- bool mIsOn;
- const char* debugName;
-
-
+@interface UIToggleButton : UIButton {
}
--(void) initWithOnImage:(UIImage*) onImage offImage:(UIImage*) offImage debugName:(const char*) name;
--(bool) reset;
--(bool) isOn;
--(bool) toggle;
+
+- (bool)update;
+- (void)setOn;
+- (void)setOff;
+- (bool)toggle;
@end
diff --git a/Classes/LinphoneUI/UIToggleButton.m b/Classes/LinphoneUI/UIToggleButton.m
index c6db043e3..a8b92feab 100644
--- a/Classes/LinphoneUI/UIToggleButton.m
+++ b/Classes/LinphoneUI/UIToggleButton.m
@@ -16,75 +16,99 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#import "UIToggleButton.h"
-#include "linphonecore.h"
@implementation UIToggleButton
--(void) touchUp:(id) sender {
- [self toggle];
-}
--(bool) isOn {
- return mIsOn;
-}
--(bool) toggle {
- ms_message("UI - Toggle button '%s' state change %d -> %d",
- debugName, mIsOn, !mIsOn);
- if (mIsOn) {
- [self setImage:mOffImage forState:UIControlStateNormal];
- mIsOn=!mIsOn;
- [self onOff];
- } else {
- [self setImage:mOnImage forState:UIControlStateNormal];
- mIsOn=!mIsOn;
- [self onOn];
- }
- return mIsOn;
-
-}
--(bool) reset {
- mIsOn = [self isInitialStateOn];
- [self setImage:mIsOn?mOnImage:mOffImage forState:UIControlStateNormal];
- return mIsOn;
-}
--(void) initWithOnImage:(UIImage*) onImage offImage:(UIImage*) offImage debugName:(const char *)name{
- mOnImage = [onImage retain];
- mOffImage = [offImage retain];
- mIsOn=false;
- debugName = name;
- [self reset];
+#pragma mark - Lifecycle Functions
+
+- (void)initUIToggleButton {
+ [self update];
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
-
}
-/*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code.
- }
- */
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initUIToggleButton];
+ }
+ return self;
+}
+
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUIToggleButton];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initUIToggleButton];
+ }
+ return self;
+}
- (void)dealloc {
[super dealloc];
- [mOffImage release];
- [mOffImage release];
}
+
+#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)];
+ /*[NSException raise:NSInternalInconsistencyException
+ format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];*/
}
+
-(void) onOff {
- [NSException raise:NSInternalInconsistencyException
- format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
+ /*[NSException raise:NSInternalInconsistencyException
+ format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];*/
}
--(bool) isInitialStateOn {
- [NSException raise:NSInternalInconsistencyException
- format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];
+
+-(bool) onUpdate {
+ /*[NSException raise:NSInternalInconsistencyException
+ format:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)];*/
return false;
}
-
@end
diff --git a/Classes/LinphoneUI/UIToggleVideoButton.m b/Classes/LinphoneUI/UIToggleVideoButton.m
deleted file mode 100644
index 1c96079a3..000000000
--- a/Classes/LinphoneUI/UIToggleVideoButton.m
+++ /dev/null
@@ -1,74 +0,0 @@
-/* UIToggleVideoButton.m
- *
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#import "UIToggleVideoButton.h"
-#include "LinphoneManager.h"
-
-@implementation UIToggleVideoButton
-
-@synthesize videoUpdateIndicator;
-
--(void) touchUp:(id) sender {
- LinphoneCore* lc = [LinphoneManager getLc];
-
- if (!linphone_core_video_enabled(lc))
- return;
-
- [videoUpdateIndicator startAnimating];
- videoUpdateIndicator.hidden = NO;
- self.enabled = NO;
-
- LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
- if (call) {
- LinphoneCallParams* call_params = linphone_call_params_copy(linphone_call_get_current_params(call));
- if (linphone_call_params_video_enabled(call_params)) {
- ms_message("Disabling video");
- linphone_call_params_enable_video(call_params, FALSE);
- } else {
- ms_message("Enabling video");
- linphone_call_params_enable_video(call_params, TRUE);
- }
- linphone_core_update_call(lc, call, call_params);
- linphone_call_params_destroy(call_params);
- } else {
- ms_warning("Cannot toggle video, because no current call");
- }
-}
-
-- (id) init {
- [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
- return self;
-}
-- (id)initWithFrame:(CGRect)frame {
-
- self = [super initWithFrame:frame];
- if (self) {
- [self init];
- }
- return self;
-}
-- (id)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (self) {
- [self init];
- }
- return self;
-}
-
-@end
diff --git a/Classes/LinphoneUI/UIDuration.h b/Classes/LinphoneUI/UITransferButton.h
similarity index 80%
rename from Classes/LinphoneUI/UIDuration.h
rename to Classes/LinphoneUI/UITransferButton.h
index 9493d43cd..f6178358e 100644
--- a/Classes/LinphoneUI/UIDuration.h
+++ b/Classes/LinphoneUI/UITransferButton.h
@@ -1,6 +1,6 @@
-/* UIDuration.h
+/* UITransferButton.h
*
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,19 +15,15 @@
* 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
-
-@interface UIDuration : UILabel {
-@private
- NSTimer *durationRefreasher;
+@interface UITransferButton : UIButton {
+@private
+ UITextField* addressField;
}
--(void) start;
--(void) stop;
+@property (nonatomic, retain) IBOutlet UITextField* addressField;
@end
diff --git a/Classes/LinphoneUI/UIDuration.m b/Classes/LinphoneUI/UITransferButton.m
similarity index 50%
rename from Classes/LinphoneUI/UIDuration.m
rename to Classes/LinphoneUI/UITransferButton.m
index 54351b929..564e14a4f 100644
--- a/Classes/LinphoneUI/UIDuration.m
+++ b/Classes/LinphoneUI/UITransferButton.m
@@ -1,6 +1,6 @@
-/* UIDuration.m
+/* UITransferButton.m
*
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,52 +15,57 @@
* 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 "UITransferButton.h"
#import "LinphoneManager.h"
+#import
-@implementation UIDuration
+@implementation UITransferButton
--(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)]];
+@synthesize addressField;
+
+#pragma mark - Lifecycle Functions
+
+- (void)initUICallButton {
+ [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
+}
+
+- (id)init {
+ self = [super init];
+ if (self) {
+ [self initUICallButton];
+ }
+ return self;
+}
+
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initUICallButton];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)decoder {
+ self = [super initWithCoder:decoder];
+ if (self) {
+ [self initUICallButton];
}
-}
-
--(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.
- }
- */
+ return self;
+}
- (void)dealloc {
+ [addressField release];
+
[super dealloc];
- [durationRefreasher invalidate];
}
+#pragma mark -
+
+- (void)touchUp:(id) sender {
+ [[LinphoneManager instance] call:[addressField text] displayName:nil transfer:TRUE];
+}
+
@end
diff --git a/Classes/LinphoneUI/UIPauseResumeButton.h b/Classes/LinphoneUI/UITransparentView.h
similarity index 84%
rename from Classes/LinphoneUI/UIPauseResumeButton.h
rename to Classes/LinphoneUI/UITransparentView.h
index fe5a80e30..8d12e22b6 100644
--- a/Classes/LinphoneUI/UIPauseResumeButton.h
+++ b/Classes/LinphoneUI/UITransparentView.h
@@ -1,6 +1,6 @@
-/* UIMuteButton.h
+/* UITransparentView.h
*
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,11 +18,7 @@
*/
#import
-#import "UIToggleButton.h"
-
-@interface UIPauseResumeButton : UIToggleButton {
-
-}
+@interface UITransparentView : UIView
@end
diff --git a/Classes/FirstLoginViewController.h b/Classes/LinphoneUI/UITransparentView.m
similarity index 56%
rename from Classes/FirstLoginViewController.h
rename to Classes/LinphoneUI/UITransparentView.m
index e7930a9db..40326e77b 100644
--- a/Classes/FirstLoginViewController.h
+++ b/Classes/LinphoneUI/UITransparentView.m
@@ -1,6 +1,6 @@
-/* FirstLoginViewController.h
+/* UITransparentView.m
*
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,26 +15,30 @@
* 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
-#import "LinphoneAppDelegate.h"
-#import "LinphoneUIDelegates.h"
+#import "UITransparentView.h"
+@implementation UITransparentView
-@interface FirstLoginViewController : UIViewController {
- UIButton* ok;
- UIButton* site;
- UITextField* username;
- UIView* activityIndicator;
-
-
+- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
+ BOOL pointInside = NO;
+
+ for(UIView *child in [self subviews]) {
+ if(![child isHidden]) {
+ if(CGRectContainsPoint(child.frame, point)) {
+ CGPoint newPoint = point;
+ newPoint.x -= child.frame.origin.x;
+ newPoint.y -= child.frame.origin.y;
+ if([child pointInside:newPoint withEvent:event]) {
+ pointInside = YES;
+ break;
+ }
+ }
+ }
+ }
+
+ return pointInside;
}
--(void) doOk:(id)sender;
-@property (nonatomic, retain) IBOutlet UIButton* ok;
-@property (nonatomic, retain) IBOutlet UIButton* site;
-@property (nonatomic, retain) IBOutlet UITextField* username;
-@property (nonatomic, retain) IBOutlet UITextField* passwd;
-@property (nonatomic, retain) IBOutlet UIView* activityIndicator;
@end
diff --git a/Classes/LinphoneUI/UIToggleVideoButton.h b/Classes/LinphoneUI/UIVideoButton.h
similarity index 80%
rename from Classes/LinphoneUI/UIToggleVideoButton.h
rename to Classes/LinphoneUI/UIVideoButton.h
index 37a712ddd..fbd07c43f 100644
--- a/Classes/LinphoneUI/UIToggleVideoButton.h
+++ b/Classes/LinphoneUI/UIVideoButton.h
@@ -1,4 +1,4 @@
-/* UIToggleVideoButton.h
+/* UIVideoButton.h
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
@@ -19,12 +19,17 @@
#import
-@interface UIToggleVideoButton : UIButton {
- UIActivityIndicatorView* videoUpdateIndicator;
+#import "UIToggleButton.h"
+
+@interface UIVideoButton : UIToggleButton {
+ BOOL locked;
+ BOOL unlockVideoState;
+ UIActivityIndicatorView *waitView;
}
-- (id)initWithCoder:(NSCoder *)decoder;
+@property (assign) BOOL locked;
+@property (assign) BOOL unlockVideoState;
-@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* videoUpdateIndicator;
+@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* waitView;
@end
diff --git a/Classes/LinphoneUI/UIVideoButton.m b/Classes/LinphoneUI/UIVideoButton.m
new file mode 100644
index 000000000..6de7c2842
--- /dev/null
+++ b/Classes/LinphoneUI/UIVideoButton.m
@@ -0,0 +1,162 @@
+/* UIToggleVideoButton.m
+ *
+ * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#import "UIVideoButton.h"
+#include "LinphoneManager.h"
+
+@implementation UIVideoButton
+
+@synthesize 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 {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle video button: Linphone core not ready"];
+ return;
+ }
+
+ LinphoneCore* lc = [LinphoneManager getLc];
+
+ if (!linphone_core_video_enabled(lc))
+ 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));
+ linphone_call_params_enable_video(call_params, TRUE);
+ linphone_core_update_call(lc, call, call_params);
+ linphone_call_params_destroy(call_params);
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle video button, because no current call"];
+ }
+}
+
+- (void)onOff {
+ if(![LinphoneManager isLcReady]) {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle video button: Linphone core not ready"];
+ return;
+ }
+
+ LinphoneCore* lc = [LinphoneManager getLc];
+
+ if (!linphone_core_video_enabled(lc))
+ 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));
+ linphone_call_params_enable_video(call_params, FALSE);
+ linphone_core_update_call(lc, call, call_params);
+ linphone_call_params_destroy(call_params);
+ } else {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot toggle video button, because no current call"];
+ }
+}
+
+- (bool)onUpdate {
+ if([LinphoneManager isLcReady]) {
+ bool val = false;
+ if(linphone_core_video_enabled([LinphoneManager getLc])) {
+ 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];
+ }
+ }
+ if(!locked) {
+ [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 {
+ [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot update video button: Linphone core not ready"];
+ return false;
+ }
+}
+
+- (void)dealloc {
+ [waitView release];
+ [super dealloc];
+}
+
+@end
diff --git a/Classes/LinphoneUI/VideoZoomHandler.h b/Classes/LinphoneUI/VideoZoomHandler.h
index 6065d2453..2b4bb3a86 100644
--- a/Classes/LinphoneUI/VideoZoomHandler.h
+++ b/Classes/LinphoneUI/VideoZoomHandler.h
@@ -1,10 +1,21 @@
-//
-// VideoZoomHandler.h
-// linphone
-//
-// Created by Pierre-Eric Pelloux-Prayer on 25/04/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
+/* VideoZoomHandler.h
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
#import
@@ -12,7 +23,8 @@
float zoomLevel, cx, cy;
UIView* videoView;
}
--(void) setup: (UIView*) videoView;
--(void) resetZoom;
+
+- (void) setup: (UIView*) videoView;
+- (void) resetZoom;
@end
diff --git a/Classes/LinphoneUI/VideoZoomHandler.m b/Classes/LinphoneUI/VideoZoomHandler.m
index 33c735f8f..ce529ba70 100644
--- a/Classes/LinphoneUI/VideoZoomHandler.m
+++ b/Classes/LinphoneUI/VideoZoomHandler.m
@@ -1,10 +1,21 @@
-//
-// VideoZoomHandler.m
-// linphone
-//
-// Created by Pierre-Eric Pelloux-Prayer on 25/04/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
+/* VideoZoomHandler.m
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
#import "VideoZoomHandler.h"
#include "linphonecore.h"
@@ -12,8 +23,7 @@
@implementation VideoZoomHandler
-
--(void) zoomInOut:(UITapGestureRecognizer*) reco {
+- (void)zoomInOut:(UITapGestureRecognizer*) reco {
if (zoomLevel != 1)
zoomLevel = 1;
else
@@ -29,7 +39,7 @@
linphone_call_zoom_video(linphone_core_get_current_call([LinphoneManager getLc]), zoomLevel, &cx, &cy);
}
--(void) videoPan:(UIPanGestureRecognizer*) reco {
+- (void)videoPan:(UIPanGestureRecognizer*) reco {
if (zoomLevel <= 1.0)
return;
@@ -53,7 +63,7 @@
cy = y;
}
--(void) pinch:(UIPinchGestureRecognizer*) reco {
+- (void)pinch:(UIPinchGestureRecognizer*) reco {
float s = zoomLevel;
// CGPoint point = [reco locationInView:videoGroup];
// float ccx = cx + (point.x / videoGroup.frame.size.width - 0.5) / s;
@@ -76,13 +86,12 @@
linphone_call_zoom_video(linphone_core_get_current_call([LinphoneManager getLc]), s, &cx, &cy);
}
--(void) resetZoom {
+- (void)resetZoom {
zoomLevel = 1;
cx = cy = 0.5;
}
-
--(void) setup: (UIView*) view {
+- (void)setup: (UIView*) view {
videoView = view;
UITapGestureRecognizer* doubleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(zoomInOut:)];
@@ -101,4 +110,5 @@
[self resetZoom];
}
+
@end
diff --git a/Classes/MainScreenWithVideoPreview.h b/Classes/MainScreenWithVideoPreview.h
deleted file mode 100644
index e981e7d63..000000000
--- a/Classes/MainScreenWithVideoPreview.h
+++ /dev/null
@@ -1,41 +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
-#import
-#import "PhoneViewController.h"
-
-@interface MainScreenWithVideoPreview : UIViewController {
- UIWindow *window;
- PhoneViewController* phoneMainView;
-
-
- AVCaptureSession* session;
- AVCaptureDeviceInput* input;
-
- int currentCamera;
-}
-
--(void) showPreview:(BOOL) show;
-
--(void) useCameraAtIndex:(NSInteger)camIndex startSession:(BOOL)start;
-
-@property (nonatomic, retain) IBOutlet PhoneViewController* phoneMainView;
-@property (nonatomic, retain) IBOutlet UIWindow *window;
-@end
diff --git a/Classes/MainScreenWithVideoPreview.m b/Classes/MainScreenWithVideoPreview.m
deleted file mode 100644
index c35983820..000000000
--- a/Classes/MainScreenWithVideoPreview.m
+++ /dev/null
@@ -1,182 +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 "MainScreenWithVideoPreview.h"
-#import
-#import "LinphoneUI/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;
- @try {
- lc = [LinphoneManager getLc];
- }
- @catch (NSException *exception) {
- return;
- }
-
- bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"];
-
- 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];
- [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
diff --git a/Classes/MainScreenWithVideoPreview.xib b/Classes/MainScreenWithVideoPreview.xib
deleted file mode 100644
index 4af39bdd9..000000000
--- a/Classes/MainScreenWithVideoPreview.xib
+++ /dev/null
@@ -1,390 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- IBProxyObject
- IBUITabBarItem
- IBUIViewController
- IBUICustomObject
- IBUITabBarController
- IBUIWindow
- IBUITabBar
- IBUIView
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
-
- IBFilesOwner
- IBIPadFramework
-
-
- IBFirstResponder
- IBIPadFramework
-
-
- IBIPadFramework
-
-
-
- 292
- {768, 1024}
-
- _NS:196
-
- 3
- MC42NjY2NjY2NjY3AA
-
- NO
- NO
-
- 2
-
- IBIPadFramework
- YES
-
-
-
-
- 2
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
- Dialer
-
- NSImage
- dialer-orange.png
-
- IBIPadFramework
-
-
- PhoneViewController-ipad
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
-
- History
-
- History
-
- NSImage
- history-orange.png
-
- IBIPadFramework
-
-
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
-
-
- IBIPadFramework
- 5
-
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
-
-
- IBIPadFramework
- 0
-
-
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
-
-
- 266
- {{0, 975}, {768, 49}}
-
-
- 3
- MCAwAA
-
- NO
- IBIPadFramework
-
-
-
-
-
- 274
- {{0, 20}, {768, 1004}}
-
- _NS:212
-
- 1
- MC40MzUwMTEzNDA3IDAuNjI1IDEAA
-
- IBIPadFramework
-
-
- 2
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
-
-
-
-
- delegate
-
-
-
- 30
-
-
-
- window
-
-
-
- 9
-
-
-
- phoneMainView
-
-
-
- 44
-
-
-
- window
-
-
-
- 27
-
-
-
- myTabBarController
-
-
-
- 28
-
-
-
- mMainScreenWithVideoPreview
-
-
-
- 31
-
-
-
-
-
- 0
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 3
-
-
-
-
-
- 6
-
-
-
-
-
-
-
- 16
-
-
- linphoneAppDelegate
-
-
- 17
-
-
-
-
-
-
-
-
-
-
-
- 18
-
-
-
-
-
- dialer
-
-
- 19
-
-
-
-
-
- history
-
-
- 20
-
-
-
-
-
- more
-
-
- 21
-
-
-
-
-
- Contacts
-
-
- 22
-
-
-
-
- 23
-
-
-
-
- 24
-
-
-
-
- 25
-
-
-
-
- 26
-
-
-
-
- 7
-
-
-
-
-
-
-
- UIApplication
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- linphoneAppDelegate
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- PhoneViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- CallHistoryTableViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- MoreViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- MainScreenWithVideoPreview
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
-
-
- 44
-
-
- 0
- IBIPadFramework
- YES
- 3
-
- {25, 24}
- {25, 23}
-
- 933
-
-
diff --git a/Classes/MoreViewController.h b/Classes/MoreViewController.h
deleted file mode 100644
index e907de322..000000000
--- a/Classes/MoreViewController.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* MoreViewController.h
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU 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
-#include "linphoneAppDelegate.h"
-
-
-
-
-@class ConsoleViewController;
-@interface MoreViewController : UITableViewController {
-
- bool isLogViewEnabled;
-
- UITableViewCell *credit;
- UITextView *creditText;
-
- UITableViewCell *web;
- UILabel *weburi;
- UITableViewCell *console;
-
- ConsoleViewController *consoleViewController;
- bool isDebug;
-}
-
-@property (nonatomic, retain) IBOutlet UITableViewCell* web;
-@property (nonatomic, retain) IBOutlet UITableViewCell* credit;
-@property (nonatomic, retain) IBOutlet UITableViewCell* console;
-@property (nonatomic, retain) IBOutlet UITextView *creditText;
-@property (nonatomic, retain) IBOutlet UILabel *weburi;
-
-@end
diff --git a/Classes/MoreViewController.m b/Classes/MoreViewController.m
deleted file mode 100644
index b2b9e4a96..000000000
--- a/Classes/MoreViewController.m
+++ /dev/null
@@ -1,141 +0,0 @@
-/* MoreViewController.m
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#import "MoreViewController.h"
-#include "ConsoleViewController.h"
-#import "LinphoneManager.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.
-- (void)viewDidLoad {
- [super viewDidLoad];
- [creditText setText: [NSString stringWithFormat:creditText.text,[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]];
- consoleViewController = [[ConsoleViewController alloc] initWithNibName:@"ConsoleViewController" bundle:[NSBundle mainBundle]];
- [[LinphoneManager instance] registerLogView:consoleViewController];
- isDebug = [[NSUserDefaults standardUserDefaults] boolForKey:@"debugenable_preference"];
-
-}
-
-
-
-/*
-// Override to allow orientations other than the default portrait orientation.
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-*/
-
-- (void)didReceiveMemoryWarning {
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-- (void)viewDidUnload {
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-
-- (void)dealloc {
- [super dealloc];
-}
-
-
-
--(void) enableLogView {
- isLogViewEnabled = true;
-
-}
-
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 2;
-}
-
-- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- if (indexPath.section == 0) {
- return 230;
- } else {
- return 44;
- }
-}
-
-// Customize the number of rows in the table view.
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- if (section == 0) {
- return 1;
- } else {
- if (isDebug) {
- return 2;
- } else {
- return 1;
- }
- }
-}
-
-
-
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- if (indexPath.section == 0) {
- return credit;
- } else {
- switch (indexPath.row) {
- case 0: return web;
- case 1: return console;
- }
- }
- return nil;
-}
-
-- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
-
- [self tableView:tableView didSelectRowAtIndexPath:indexPath];
-}
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
-
- [tableView deselectRowAtIndexPath:indexPath animated:NO];
-
- switch (indexPath.row) {
- case 0: {
- NSURL *url = [NSURL URLWithString:weburi.text];
- [[UIApplication sharedApplication] openURL:url];
- break;
- };
- case 1: {
- [self.navigationController pushViewController:consoleViewController animated:true];
- break;
- }
- }
-
-}
-
-@end
diff --git a/Classes/MoreViewController.xib b/Classes/MoreViewController.xib
deleted file mode 100644
index da9802a57..000000000
--- a/Classes/MoreViewController.xib
+++ /dev/null
@@ -1,807 +0,0 @@
-
-
-
- 784
- 10J567
- 823
- 1038.35
- 462.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 132
-
-
- YES
-
-
-
-
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- YES
-
- YES
-
-
- YES
-
-
-
- YES
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
-
-
- 274
- {{0, 106}, {320, 247}}
-
-
- 10
-
- 549453824
- {84, 1}
-
- YES
-
- YES
-
-
-
- TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
-y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
-xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
-xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
-xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
-xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB
-AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
-AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS
-AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA
-
-
-
-
-
- 3
- MCAwAA
-
-
- groupTableViewBackgroundColor
-
- NO
- YES
- NO
- IBCocoaTouchFramework
- NO
- 1
- 1
- 0
- YES
- 44
- 10
- 10
-
-
-
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
- 292
-
- YES
-
-
- 256
-
- YES
-
-
- 292
- {{20, 0}, {300, 44}}
-
- NO
- YES
- NO
- IBCocoaTouchFramework
- http://www.linphone.org
-
- 1
- MCAwLjUwMTk2MDgxIDEAA
-
-
- 1
- 10
-
-
- {300, 44}
-
-
- NO
- YES
- 4
- YES
- IBCocoaTouchFramework
-
-
- {320, 44}
-
-
- 1
- MSAxIDEAA
-
- NO
- IBCocoaTouchFramework
- 1
- 1
-
-
-
-
- 292
-
- YES
-
-
- 256
-
- YES
-
-
- 292
- {{20, 0}, {300, 44}}
-
- NO
- YES
- NO
- IBCocoaTouchFramework
- Console
-
- 1
- MCAwIDAAA
-
-
- 1
- 10
-
-
- {300, 44}
-
-
- NO
- YES
- 4
- YES
- IBCocoaTouchFramework
-
-
- {320, 44}
-
-
- NO
- IBCocoaTouchFramework
- 1
- 1
-
-
-
-
- 292
-
- YES
-
-
- 256
-
- YES
-
-
- 292
- {{28, -14}, {263, 154}}
-
- NO
- NO
- 1
- NO
- IBCocoaTouchFramework
-
- NSImage
- linphone-banner.png
-
-
-
-
- 292
- {{9, 109}, {301, 89}}
-
- NO
- YES
- YES
- IBCocoaTouchFramework
- NO
- NO
- NO
- NO
- Linphone %@ SIP (rfc3261) compatible phone under GNU General Public License V2
- 1
-
- 2
- IBCocoaTouchFramework
-
-
-
-
- 292
- {{28, 198}, {263, 21}}
-
- NO
- YES
- 7
- NO
- IBCocoaTouchFramework
- © 2010 Belledonne Communications
-
-
- 1
- 10
- 1
-
-
- {322, 230}
-
-
- NO
- YES
- 4
- YES
- IBCocoaTouchFramework
-
-
- {322, 230}
-
-
- NO
- NO
- IBCocoaTouchFramework
- 1
-
-
-
-
-
- YES
-
-
- web
-
-
-
- 32
-
-
-
- console
-
-
-
- 40
-
-
-
- credit
-
-
-
- 46
-
-
-
- view
-
-
-
- 47
-
-
-
- creditText
-
-
-
- 48
-
-
-
- weburi
-
-
-
- 50
-
-
-
-
- YES
-
- 0
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 4
-
-
- YES
-
-
-
-
-
- 25
-
-
- YES
-
-
-
- web
-
-
- 34
-
-
-
-
- 38
-
-
- YES
-
-
-
- console
-
-
- 39
-
-
-
-
- 42
-
-
- YES
-
-
-
-
-
- about
-
-
- 43
-
-
-
-
- 45
-
-
-
-
- 18
-
-
-
-
- 49
-
-
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -2.CustomClassName
- 18.IBEditorWindowLastContentRect
- 18.IBPluginDependency
- 25.IBEditorWindowLastContentRect
- 25.IBPluginDependency
- 34.IBPluginDependency
- 38.IBEditorWindowLastContentRect
- 38.IBPluginDependency
- 39.IBPluginDependency
- 4.IBEditorWindowLastContentRect
- 4.IBPluginDependency
- 42.IBEditorWindowLastContentRect
- 42.IBPluginDependency
- 43.IBPluginDependency
- 45.IBPluginDependency
- 49.IBPluginDependency
-
-
- YES
- MoreViewController
- UIResponder
- {{138, 864}, {320, 247}}
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- {{251, 502}, {320, 44}}
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- {{252, 1012}, {320, 44}}
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- {{79, 106}, {320, 480}}
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- {{100, 713}, {322, 230}}
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
-
- YES
-
-
-
-
- YES
-
-
- YES
-
-
-
- 50
-
-
-
- YES
-
- MoreViewController
- UITableViewController
-
- YES
-
- YES
- console
- credit
- creditText
- web
- weburi
-
-
- YES
- UITableViewCell
- UITableViewCell
- UITextView
- UITableViewCell
- UILabel
-
-
-
- YES
-
- YES
- console
- credit
- creditText
- web
- weburi
-
-
- YES
-
- console
- UITableViewCell
-
-
- credit
- UITableViewCell
-
-
- creditText
- UITextView
-
-
- web
- UITableViewCell
-
-
- weburi
- UILabel
-
-
-
-
- IBProjectSource
- Classes/MoreViewController.h
-
-
-
-
- YES
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSError.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSFileManager.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSKeyValueCoding.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSKeyValueObserving.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSKeyedArchiver.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSObject.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSRunLoop.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSThread.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSURL.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Foundation.framework/Headers/NSURLConnection.h
-
-
-
- NSObject
-
- IBFrameworkSource
- UIKit.framework/Headers/UIAccessibility.h
-
-
-
- NSObject
-
- IBFrameworkSource
- UIKit.framework/Headers/UINibLoading.h
-
-
-
- NSObject
-
- IBFrameworkSource
- UIKit.framework/Headers/UIResponder.h
-
-
-
- UIImageView
- UIView
-
- IBFrameworkSource
- UIKit.framework/Headers/UIImageView.h
-
-
-
- UILabel
- UIView
-
- IBFrameworkSource
- UIKit.framework/Headers/UILabel.h
-
-
-
- UIResponder
- NSObject
-
-
-
- UIScrollView
- UIView
-
- IBFrameworkSource
- UIKit.framework/Headers/UIScrollView.h
-
-
-
- UISearchBar
- UIView
-
- IBFrameworkSource
- UIKit.framework/Headers/UISearchBar.h
-
-
-
- UISearchDisplayController
- NSObject
-
- IBFrameworkSource
- UIKit.framework/Headers/UISearchDisplayController.h
-
-
-
- UITableView
- UIScrollView
-
- IBFrameworkSource
- UIKit.framework/Headers/UITableView.h
-
-
-
- UITableViewCell
- UIView
-
- IBFrameworkSource
- UIKit.framework/Headers/UITableViewCell.h
-
-
-
- UITableViewController
- UIViewController
-
- IBFrameworkSource
- UIKit.framework/Headers/UITableViewController.h
-
-
-
- UITextView
- UIScrollView
-
- IBFrameworkSource
- UIKit.framework/Headers/UITextView.h
-
-
-
- UIView
-
- IBFrameworkSource
- UIKit.framework/Headers/UIPrintFormatter.h
-
-
-
- UIView
-
- IBFrameworkSource
- UIKit.framework/Headers/UITextField.h
-
-
-
- UIView
- UIResponder
-
- IBFrameworkSource
- UIKit.framework/Headers/UIView.h
-
-
-
- UIViewController
-
- IBFrameworkSource
- UIKit.framework/Headers/UINavigationController.h
-
-
-
- UIViewController
-
- IBFrameworkSource
- UIKit.framework/Headers/UIPopoverController.h
-
-
-
- UIViewController
-
- IBFrameworkSource
- UIKit.framework/Headers/UISplitViewController.h
-
-
-
- UIViewController
-
- IBFrameworkSource
- UIKit.framework/Headers/UITabBarController.h
-
-
-
- UIViewController
- UIResponder
-
- IBFrameworkSource
- UIKit.framework/Headers/UIViewController.h
-
-
-
-
- 0
- IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
-
-
- YES
- ../linphone.xcodeproj
- 3
-
- linphone-banner.png
- {300, 100}
-
- 132
-
-
diff --git a/Classes/PhoneViewController-ipad.xib b/Classes/PhoneViewController-ipad.xib
deleted file mode 100644
index fc15c4af0..000000000
--- a/Classes/PhoneViewController-ipad.xib
+++ /dev/null
@@ -1,1136 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- IBUIViewController
- IBUIButton
- IBUIView
- IBUITextField
- IBProxyObject
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
-
- IBFilesOwner
- IBIPadFramework
-
-
- IBFirstResponder
- IBIPadFramework
-
-
-
-
- 274
-
-
-
- 292
-
-
-
- 292
- {{34, 20}, {699, 78}}
-
-
-
-
- 3
- MQA
-
- NO
- NO
- IBIPadFramework
- 0
-
- sip:
-
- 3
- MAA
-
- 2
-
-
- YES
- 15
-
- 1
- 3
- IBCocoaTouchFramework
-
- 1
-
- Helvetica
- Helvetica
- 0
- 36
-
-
- Helvetica
- 36
- 16
-
-
-
-
- 292
- {{660, 25}, {66, 68}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
- 3
- MC41AA
-
-
- NSImage
- effacer.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 292
- {{413, 277}, {322, 66}}
-
-
-
- _NS:241
- NO
- IBIPadFramework
- 0
- 0
- Switch camera
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
- NSImage
- clavier-01-108px.png
-
-
- 2
- 15
-
-
-
-
-
- -2147483356
- {{573, 112.5}, {160, 231}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- Back
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- clavier-01-160px.png
-
-
- 2
- 2
-
-
- Helvetica-Bold
- 18
- 16
-
-
-
-
- -2147483356
- {{415, 112}, {160, 231}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- startcall-green.png
-
-
-
-
-
-
-
- 292
- {{413, 111}, {320, 167}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- startcall-gray.png
-
-
-
-
-
-
-
-
- 292
- {{32, 112}, {107, 66}}
-
-
-
-
- 1
- MC40MDAwMDAwMSAxIDEgMAA
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 1
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- clavier-01-106px.png
-
-
-
-
-
-
- 292
- {{139, 112}, {106, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 2
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{245, 112}, {107, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 3
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{245, 178}, {107, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 4
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{139, 178}, {106, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 5
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{32, 178}, {107, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 6
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{32, 244}, {107, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 7
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{139, 244}, {106, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 8
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{245, 244}, {107, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 9
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{139, 309}, {106, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- 0+
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{32, 309}, {107, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- *
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{245, 309}, {107, 66}}
-
-
-
- NO
- NO
- IBIPadFramework
- 0
- 0
- #
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{415, 351}, {320, 20}}
-
-
- _NS:212
-
- 3
- MCAwAA
-
- IBIPadFramework
-
-
- {{0, 569}, {768, 386}}
-
-
-
- _NS:212
-
- 3
- MC4zMzMzMzMzMzMzIDAuNQA
-
- IBIPadFramework
-
-
- {{0, 20}, {768, 1004}}
-
-
-
- _NS:212
-
- IBIPadFramework
-
-
- 2
-
-
- 1
- 1
-
- IBIPadFramework
- NO
-
-
-
-
-
-
- eight
-
-
-
- 45
-
-
-
- five
-
-
-
- 47
-
-
-
- four
-
-
-
- 48
-
-
-
- hash
-
-
-
- 49
-
-
-
- nine
-
-
-
- 50
-
-
-
- one
-
-
-
- 51
-
-
-
- seven
-
-
-
- 52
-
-
-
- six
-
-
-
- 53
-
-
-
- star
-
-
-
- 54
-
-
-
- three
-
-
-
- 57
-
-
-
- two
-
-
-
- 58
-
-
-
- view
-
-
-
- 59
-
-
-
- zero
-
-
-
- 60
-
-
-
- address
-
-
-
- 39
-
-
-
- erase
-
-
-
- 46
-
-
-
- backToCallView
-
-
-
- 40
-
-
-
- switchCamera
-
-
-
- 56
-
-
-
- callShort
-
-
-
- 42
-
-
-
- callLarge
-
-
-
- 41
-
-
-
- statusViewHolder
-
-
-
- 62
-
-
-
-
-
- 0
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 3
-
-
-
-
-
-
-
- 4
-
-
-
-
-
-
-
- 24
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 33
-
-
-
-
- 28
-
-
-
-
- 34
-
-
-
-
- 27
-
-
-
-
- 26
-
-
-
-
- 35
-
-
-
-
- 29
-
-
-
-
- 36
-
-
-
-
- 32
-
-
-
-
- 31
-
-
-
-
- 25
-
-
-
-
- 30
-
-
-
-
- 23
-
-
- Address
-
-
- 22
-
-
- Erase
-
-
- 18
-
-
- back
-
-
- 38
-
-
-
-
- 19
-
-
- Call-short
-
-
- 20
-
-
- Call-large
-
-
- 61
-
-
- status_holder
-
-
-
-
- PhoneViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICallButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICallButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- UIEraseButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
-
-
- 62
-
-
-
-
- MainScreenWithVideoPreview
- UIViewController
-
- PhoneViewController
- UIWindow
-
-
-
- phoneMainView
- PhoneViewController
-
-
- window
- UIWindow
-
-
-
- IBProjectSource
- ./Classes/MainScreenWithVideoPreview.h
-
-
-
- PhoneViewController
- UIViewController
-
- UITextField
- UIButton
- UIButton
- UIButton
- UIView
- UIButton
- UIEraseButton
- UIButton
- UIButton
- UIButton
- MainScreenWithVideoPreview
- UITabBarController
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UILabel
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
-
-
-
- address
- UITextField
-
-
- backToCallView
- UIButton
-
-
- callLarge
- UIButton
-
-
- callShort
- UIButton
-
-
- dialerView
- UIView
-
-
- eight
- UIButton
-
-
- erase
- UIEraseButton
-
-
- five
- UIButton
-
-
- four
- UIButton
-
-
- hash
- UIButton
-
-
- mMainScreenWithVideoPreview
- MainScreenWithVideoPreview
-
-
- myTabBarController
- UITabBarController
-
-
- nine
- UIButton
-
-
- one
- UIButton
-
-
- seven
- UIButton
-
-
- six
- UIButton
-
-
- star
- UIButton
-
-
- status
- UILabel
-
-
- statusViewHolder
- UIView
-
-
- switchCamera
- UIButton
-
-
- three
- UIButton
-
-
- two
- UIButton
-
-
- zero
- UIButton
-
-
-
- IBProjectSource
- ./Classes/PhoneViewController.h
-
-
-
- UICallButton
- UIButton
-
- IBProjectSource
- ./Classes/UICallButton.h
-
-
-
- UIDigitButton
- UIButton
-
- IBProjectSource
- ./Classes/UIDigitButton.h
-
-
-
- UIEraseButton
- UIButton
-
- IBProjectSource
- ./Classes/UIEraseButton.h
-
-
-
-
- 0
- IBIPadFramework
- YES
- 3
-
- {106, 60}
- {108, 60}
- {160, 60}
- {66, 65}
- {60, 52}
- {60, 52}
-
- 933
-
-
diff --git a/Classes/PhoneViewController.h b/Classes/PhoneViewController.h
deleted file mode 100644
index 27b93562c..000000000
--- a/Classes/PhoneViewController.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* PhoneViewController.h
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU 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
-#import
-#import "linphonecore.h"
-#import "UILinphone.h"
-#import "CallDelegate.h"
-#import "StatusSubViewController.h"
-
-@class MainScreenWithVideoPreview;
-@class IncallViewController;
-@class FirstLoginViewController;
-
-
-@interface PhoneViewController : UIViewController {
-
-@private
- //UI definition
- UIView* dialerView;
- UITextField* address;
- UILabel* mDisplayName;
- UIEraseButton* erase;
- UICallButton* callShort;
- UICallButton* callLarge;
-
- UILabel* status;
-
- //key pad
- UIDigitButton* one;
- UIDigitButton* two;
- UIDigitButton* three;
- UIDigitButton* four;
- UIDigitButton* five;
- UIDigitButton* six;
- UIDigitButton* seven;
- UIDigitButton* eight;
- UIDigitButton* nine;
- UIDigitButton* star;
- UIDigitButton* zero;
- UIDigitButton* hash;
-
- UIButton* backToCallView;
- UIView* statusViewHolder;
-
- UITabBarController* myTabBarController;
-
- UIActionSheet *mIncomingCallActionSheet;
- FirstLoginViewController* myFirstLoginViewController;
- IncallViewController* mIncallViewController;
- MainScreenWithVideoPreview* mMainScreenWithVideoPreview;
- StatusSubViewController* statusSubViewController;
-
- UIButton* switchCamera;
-}
-
-@property (nonatomic, retain) IBOutlet UIView* dialerView;
-
-@property (nonatomic, retain) IBOutlet UITextField* address;
-@property (nonatomic, retain) IBOutlet UIButton* callShort;
-@property (nonatomic, retain) IBOutlet UIButton* callLarge;
-@property (nonatomic, retain) IBOutlet UILabel* status;
-@property (nonatomic, retain) IBOutlet UIEraseButton* erase;
-
-@property (nonatomic, retain) IBOutlet UIButton* one;
-@property (nonatomic, retain) IBOutlet UIButton* two;
-@property (nonatomic, retain) IBOutlet UIButton* three;
-@property (nonatomic, retain) IBOutlet UIButton* four;
-@property (nonatomic, retain) IBOutlet UIButton* five;
-@property (nonatomic, retain) IBOutlet UIButton* six;
-@property (nonatomic, retain) IBOutlet UIButton* seven;
-@property (nonatomic, retain) IBOutlet UIButton* eight;
-@property (nonatomic, retain) IBOutlet UIButton* nine;
-@property (nonatomic, retain) IBOutlet UIButton* star;
-@property (nonatomic, retain) IBOutlet UIButton* zero;
-@property (nonatomic, retain) IBOutlet UIButton* hash;
-
-@property (nonatomic, retain) IBOutlet UIView* statusViewHolder;
-
-@property (nonatomic, retain) IBOutlet UIButton* backToCallView;
-
-@property (nonatomic, retain) IBOutlet UIButton* switchCamera;
-
-@property (nonatomic, retain) IBOutlet UITabBarController* myTabBarController;
-@property (nonatomic, retain) IBOutlet MainScreenWithVideoPreview* mMainScreenWithVideoPreview;
-@end
diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m
deleted file mode 100644
index 7309144ad..000000000
--- a/Classes/PhoneViewController.m
+++ /dev/null
@@ -1,426 +0,0 @@
-/* PhoneViewController.h
- *
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU 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 "PhoneViewController.h"
-#import "linphoneAppDelegate.h"
-#import "IncallViewController.h"
-#import
-#import
-#import "LinphoneManager.h"
-#include "FirstLoginViewController.h"
-#include "MainScreenWithVideoPreview.h"
-#include "linphonecore.h"
-#include "private.h"
-
-@implementation PhoneViewController
-@synthesize dialerView ;
-@synthesize address ;
-@synthesize callShort;
-@synthesize callLarge;
-@synthesize status;
-@synthesize erase;
-
-@synthesize one;
-@synthesize two;
-@synthesize three;
-@synthesize four;
-@synthesize five;
-@synthesize six;
-@synthesize seven;
-@synthesize eight;
-@synthesize nine;
-@synthesize star;
-@synthesize zero;
-@synthesize hash;
-
-@synthesize statusViewHolder;
-
-@synthesize myTabBarController;
-@synthesize mMainScreenWithVideoPreview;
-@synthesize backToCallView;
-
-@synthesize switchCamera;
-
--(void) updateStatusSubView {
- LinphoneCore* lc = 0;
- @try {
- lc = [LinphoneManager getLc];
- } @catch (NSException* exc) {
- return;
- }
-
- if (!lc)
- return;
-
- BOOL enableCallButtons;
- LinphoneProxyConfig* config;
- linphone_core_get_default_proxy([LinphoneManager getLc], &config);
-
- LinphoneRegistrationState s;
- NSString* m = nil;
-
- if (config == NULL) {
- s = LinphoneRegistrationNone;
- m = linphone_core_is_network_reachabled([LinphoneManager getLc]) ? NSLocalizedString(@"No SIP account configured", nil) : NSLocalizedString(@"Network down", nil);
- } else {
- s = linphone_proxy_config_get_state(config);
-
- switch (s) {
- case LinphoneRegistrationOk: m = @"Registered"; break;
- case LinphoneRegistrationNone:
- case LinphoneRegistrationCleared:
- m=@"Not registered"; break;
- case LinphoneRegistrationFailed: m = @"Registration failed"; break;
- case LinphoneRegistrationProgress: m = @"Registration in progress"; break;
- //case LinphoneRegistrationCleared: m= @"No SIP account"; break;
- default: break;
- }
- }
-
- enableCallButtons = [statusSubViewController updateWithRegistrationState:s message:m];
-
- [callLarge setEnabled:enableCallButtons];
- [callShort setEnabled:enableCallButtons];
- [backToCallView setEnabled:enableCallButtons];
-}
-
--(void) updateCallAndBackButtons {
- @try {
- bool zeroCall = (linphone_core_get_calls_nb([LinphoneManager getLc]) == 0);
-
- [LinphoneManager set:callLarge hidden:!zeroCall withName:"CALL_LARGE button" andReason:__FUNCTION__];
- [LinphoneManager set:switchCamera hidden:!zeroCall withName:"SWITCH_CAM button" andReason:__FUNCTION__];
- [LinphoneManager set:callShort hidden:zeroCall withName:"CALL_SHORT button" andReason:__FUNCTION__];
- [LinphoneManager set:backToCallView hidden:zeroCall withName:"BACK button" andReason:__FUNCTION__];
-
- [callShort setTitle:[UICallButton transforModeEnabled] ? @"transfer":@"call" forState:UIControlStateNormal];
-
- if (!callShort.hidden)
- [callShort setEnabled:!linphone_core_sound_resources_locked([LinphoneManager getLc])];
- } @catch (NSException* exc) {
- // R.A.S: linphone core si simply not ready...
- ms_warning("Catched exception %s: %s",
- [exc.name cStringUsingEncoding:[NSString defaultCStringEncoding]],
- [exc.reason cStringUsingEncoding:[NSString defaultCStringEncoding]]);
- }
-
- [self updateStatusSubView];
-}
-
-
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == true) {
- myFirstLoginViewController = [[FirstLoginViewController alloc] initWithNibName:@"FirstLoginViewController"
- bundle:[NSBundle mainBundle]];
- [self presentModalViewController:myFirstLoginViewController animated:true];
- }
- [[LinphoneManager instance] setRegistrationDelegate:self];
-
- [mMainScreenWithVideoPreview showPreview:YES];
- [self updateCallAndBackButtons];
-}
-
--(void) viewDidDisappear:(BOOL)animated {
- [super viewDidDisappear:animated];
-}
-
-
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib : may be called twice
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- [mDisplayName release];
- mDisplayName = [UILabel alloc];
- [zero initWithNumber:'0' addressField:address dtmf:false];
- [one initWithNumber:'1' addressField:address dtmf:false];
- [two initWithNumber:'2' addressField:address dtmf:false];
- [three initWithNumber:'3' addressField:address dtmf:false];
- [four initWithNumber:'4' addressField:address dtmf:false];
- [five initWithNumber:'5' addressField:address dtmf:false];
- [six initWithNumber:'6' addressField:address dtmf:false];
- [seven initWithNumber:'7' addressField:address dtmf:false];
- [eight initWithNumber:'8' addressField:address dtmf:false];
- [nine initWithNumber:'9' addressField:address dtmf:false];
- [star initWithNumber:'*' addressField:address dtmf:false];
- [hash initWithNumber:'#' addressField:address dtmf:false];
- [callShort initWithAddress:address];
- [callLarge initWithAddress:address];
- [erase initWithAddressField:address];
- [backToCallView addTarget:self action:@selector(backToCallViewPressed) forControlEvents:UIControlEventTouchUpInside];
-
- if (mIncallViewController == nil)
- mIncallViewController = [[IncallViewController alloc] initWithNibName:[LinphoneManager runningOnIpad]?@"InCallViewController-ipad":@"IncallViewController"
- bundle:[NSBundle mainBundle]];
-
- if (statusSubViewController == nil) {
- statusSubViewController = [[StatusSubViewController alloc] initWithNibName:@"StatusSubViewController"
- bundle:[NSBundle mainBundle]];
- [statusViewHolder addSubview:statusSubViewController.view];
- }
-
- [self updateCallAndBackButtons];
-}
-
-- (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;
-}
-
-- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
- if (theTextField == address) {
- [address resignFirstResponder];
- [mDisplayName setText:@""]; //display name only relefvant
-
- }
- return YES;
-}
-
--(void)viewWillAppear:(BOOL)animated {
- [self updateCallAndBackButtons];
- [super viewWillAppear:animated];
-}
-
--(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
-
- //cancel local notification, just in case
- if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
- && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground ) {
- // cancel local notif if needed
- [[UIApplication sharedApplication] cancelAllLocalNotifications];
- } else {
- if (mIncomingCallActionSheet) {
- [mIncomingCallActionSheet dismissWithClickedButtonIndex:1 animated:true];
- mIncomingCallActionSheet=nil;
- }
- }
-
- if (username) {
- [address setText:username];
- } //else keep previous
-
- [mDisplayName setText:displayName];
-
- [self updateCallAndBackButtons];
-
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstlogindone_preference" ] == true) {
- //first login case, dismmis first login view
- [self dismissModalViewControllerAnimated:true];
- };
- [mIncallViewController displayDialerFromUI:viewCtrl
- forUser:username
- withDisplayName:displayName];
-
- [myTabBarController setSelectedIndex:DIALER_TAB_INDEX];
-
- [mMainScreenWithVideoPreview showPreview:YES];
-}
-
-//status reporting
--(void) displayStatus:(NSString*) message {
- [mIncallViewController displayStatus:message];
-}
-
-
--(void) displayIncomingCall:(LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [mMainScreenWithVideoPreview showPreview:NO];
- if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
- && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
- // Create a new notification
- UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease];
- if (notif)
- {
- notif.repeatInterval = 0;
- notif.alertBody =[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username];
- notif.alertAction = @"Answer";
- notif.soundName = @"oldphone-mono-30s.caf";
- NSData *callData = [NSData dataWithBytes:&call length:sizeof(call)];
- notif.userInfo = [NSDictionary dictionaryWithObject:callData forKey:@"call"];
-
- [[UIApplication sharedApplication] presentLocalNotificationNow:notif];
- }
- } else {
- CallDelegate* cd = [[CallDelegate alloc] init];
- cd.eventType = CD_NEW_CALL;
- cd.delegate = self;
- cd.call = call;
-
- mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username]
- delegate:cd
- cancelButtonTitle:NSLocalizedString(@"Decline",nil)
- destructiveButtonTitle:NSLocalizedString(@"Answer",nil)
- otherButtonTitles:nil];
-
- mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
- if ([LinphoneManager runningOnIpad]) {
- if (self.modalViewController != nil)
- [mIncomingCallActionSheet showInView:[self.modalViewController view]];
- else
- [mIncomingCallActionSheet showInView:self.parentViewController.view];
- } else {
- [mIncomingCallActionSheet showInView:self.parentViewController.view];
- }
- [mIncomingCallActionSheet release];
- }
-
- [mMainScreenWithVideoPreview showPreview:NO];
-}
-
--(void) backToCallViewPressed {
- [UICallButton enableTransforMode:NO];
- [self presentModalViewController:(UIViewController*)mIncallViewController animated:true];
-
- LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
-
- if (!call || !linphone_call_params_video_enabled(linphone_call_get_current_params(call)) || linphone_call_get_state(call) != LinphoneCallStreamsRunning) {
- [self displayInCall: call
- FromUI:nil
- forUser:nil
- withDisplayName:nil];
- } else {
- [self displayVideoCall:call FromUI:nil forUser:nil withDisplayName:nil];
- }
-}
-
--(void) displayCall: (LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [mMainScreenWithVideoPreview showPreview:NO];
- if (self.presentedViewController != (UIViewController*)mIncallViewController) {
- [self presentModalViewController:(UIViewController*)mIncallViewController animated:true];
- }
- [mIncallViewController displayCall:call InProgressFromUI:viewCtrl
- forUser:username
- withDisplayName:displayName];
-
- [mMainScreenWithVideoPreview showPreview:NO];
-
-}
-
--(void) displayInCall: (LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [mMainScreenWithVideoPreview showPreview:NO];
- if (self.presentedViewController != (UIViewController*)mIncallViewController && (call == 0x0 ||
- linphone_call_get_dir(call)==LinphoneCallIncoming)){
- [self presentModalViewController:(UIViewController*)mIncallViewController animated:true];
-
- }
-
- [mIncallViewController displayInCall:call FromUI:viewCtrl
- forUser:username
- withDisplayName:displayName];
-
- [LinphoneManager set:callLarge hidden:YES withName:"CALL_LARGE button" andReason:__FUNCTION__];
- [LinphoneManager set:switchCamera hidden:YES withName:"SWITCH_CAMERA button" andReason:__FUNCTION__];
- [LinphoneManager set:callShort hidden:NO withName:"CALL_SHORT button" andReason:__FUNCTION__];
- [LinphoneManager set:backToCallView hidden:NO withName:"CALL_BACK button" andReason:__FUNCTION__];
-
- [self updateCallAndBackButtons];
-}
-
-
--(void) displayVideoCall:(LinphoneCall*) call FromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [mMainScreenWithVideoPreview showPreview:NO];
- [mIncallViewController displayVideoCall:call FromUI:viewCtrl
- forUser:username
- withDisplayName:displayName];
-
- [mMainScreenWithVideoPreview showPreview:NO];
- [self updateCallAndBackButtons];
-}
-
--(void) displayAskToEnableVideoCall:(LinphoneCall*) call forUser:(NSString*) username withDisplayName:(NSString*) displayName {
- [mIncallViewController displayAskToEnableVideoCall:call forUser:username withDisplayName:displayName];
-}
-
-
-
-- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType)type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas {
- if (type != CD_NEW_CALL)
- return;
-
- LinphoneCall* call = (LinphoneCall*)datas;
- if (buttonIndex == actionSheet.destructiveButtonIndex ) {
- linphone_core_accept_call([LinphoneManager getLc],call);
- } else {
- linphone_core_terminate_call ([LinphoneManager getLc], call);
- }
- mIncomingCallActionSheet = nil;
-}
-
-- (void)dealloc {
- [address dealloc];
- [ mDisplayName dealloc];
- [dialerView dealloc];
- [callShort dealloc];
- [callLarge dealloc];
- [status dealloc];
- [one dealloc];
- [two dealloc];
- [three dealloc];
- [four dealloc];
- [five dealloc];
- [six dealloc];
- [seven dealloc];
- [eight dealloc];
- [nine dealloc];
- [star dealloc];
- [zero dealloc];
- [hash dealloc];
- [myTabBarController release];
- [mIncallViewController release];
- [super dealloc];
-}
-
--(void) displayRegisteredFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain {
- if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) {
- [myFirstLoginViewController displayRegisteredFromUI:viewCtrl forUser:username withDisplayName:displayName onDomain:domain];
- }
- [self updateStatusSubView];
-}
--(void) displayRegisteringFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain {
- if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) {
- [myFirstLoginViewController displayRegisteringFromUI:viewCtrl forUser:username withDisplayName:displayName onDomain:domain];
- }
- [self updateStatusSubView];
-}
--(void) displayRegistrationFailedFromUI:(UIViewController*) viewCtrl forUser:(NSString*) user withDisplayName:(NSString*) displayName onDomain:(NSString*)domain forReason:(NSString*) reason {
- if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) {
- [myFirstLoginViewController displayRegistrationFailedFromUI:viewCtrl forUser:user withDisplayName:displayName onDomain:domain forReason:reason];
- }
- [self updateStatusSubView];
-}
-
--(void) displayNotRegisteredFromUI:(UIViewController*) viewCtrl {
- if (myFirstLoginViewController != nil && self.modalViewController == myFirstLoginViewController) {
- [myFirstLoginViewController displayNotRegisteredFromUI:viewCtrl];
- }
- [self updateStatusSubView];
-}
-
--(void) firstVideoFrameDecoded: (LinphoneCall*) call {
- [mIncallViewController firstVideoFrameDecoded:call];
-}
-
-
-@end
diff --git a/Classes/PhoneViewController.xib b/Classes/PhoneViewController.xib
deleted file mode 100644
index 60f3013c1..000000000
--- a/Classes/PhoneViewController.xib
+++ /dev/null
@@ -1,1292 +0,0 @@
-
-
-
- 784
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- YES
- IBUIViewController
- IBUIButton
- IBUIView
- IBUITextField
- IBProxyObject
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
- YES
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
-
-
- 292
-
- YES
-
-
- 292
-
- YES
-
-
- 292
- {{254, 0}, {66, 81}}
-
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
- 3
- MC41AA
-
-
- NSImage
- effacer.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 292
- {{0, 1}, {255, 80}}
-
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
-
- sip:
-
- 3
- MAA
-
- YES
- 15
-
- 1
- 3
- IBCocoaTouchFramework
-
- 1
-
- Helvetica
- Helvetica
- 0
- 36
-
-
- Helvetica
- 36
- 16
-
-
-
- {320, 81}
-
-
-
-
- IBCocoaTouchFramework
-
-
-
- 292
- {255, 20}
-
-
-
- _NS:196
-
- 3
- MCAwAA
-
- IBCocoaTouchFramework
-
-
-
- 292
- {{0, 81}, {107, 66}}
-
-
-
-
- 1
- MC40MDAwMDAwMSAxIDEgMAA
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 1
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- clavier-01-106px.png
-
-
-
-
-
-
- 292
- {{107, 81}, {106, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 2
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- clavier-01-108px.png
-
-
-
-
-
-
- 292
- {{213, 81}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 3
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{0, 147}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 4
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{107, 147}, {106, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 5
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{213, 147}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 6
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{0, 213}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 7
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{107, 213}, {106, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 8
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{213, 213}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 9
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{0, 279}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- *
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{107, 279}, {106, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 0+
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{213, 279}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- #
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{160, 345}, {160, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 1
- Back
-
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
-
- NSImage
- clavier-01-160px.png
-
-
- 2
- 2
-
-
- Helvetica-Bold
- 18
- 16
-
-
-
-
- 292
- {{0, 345}, {160, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- startcall-gray.png
-
-
- NSImage
- startcall-green.png
-
-
-
-
-
-
-
-
- 292
- {{0, 345}, {320, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
-
-
- {{0, 20}, {320, 460}}
-
-
-
-
- 5
- IBCocoaTouchFramework
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
-
- YES
-
-
- address
-
-
-
- 12
-
-
-
- view
-
-
-
- 25
-
-
-
- eight
-
-
-
- 43
-
-
-
- five
-
-
-
- 44
-
-
-
- four
-
-
-
- 45
-
-
-
- hash
-
-
-
- 46
-
-
-
- nine
-
-
-
- 47
-
-
-
- one
-
-
-
- 48
-
-
-
- seven
-
-
-
- 49
-
-
-
- six
-
-
-
- 50
-
-
-
- star
-
-
-
- 51
-
-
-
- three
-
-
-
- 52
-
-
-
- two
-
-
-
- 53
-
-
-
- zero
-
-
-
- 54
-
-
-
- dialerView
-
-
-
- 158
-
-
-
- backToCallView
-
-
-
- 161
-
-
-
- callShort
-
-
-
- 163
-
-
-
- callLarge
-
-
-
- 164
-
-
-
- statusViewHolder
-
-
-
- 169
-
-
-
- erase
-
-
-
- 151
-
-
-
- delegate
-
-
-
- 19
-
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 80
-
-
- YES
-
-
-
-
-
- 1
-
-
- YES
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 38
-
-
-
-
- 37
-
-
-
-
- 29
-
-
-
-
- 39
-
-
-
-
- 5
-
-
- Call-short
-
-
- 35
-
-
-
-
- 41
-
-
-
-
- 40
-
-
-
-
- 36
-
-
-
-
- 34
-
-
-
-
- 33
-
-
-
-
- 31
-
-
-
-
- 30
-
-
-
-
- 157
-
-
- YES
-
-
-
-
- Dialer
-
-
- 4
-
-
- Address
-
-
- 160
-
-
- back
-
-
- 162
-
-
- Call-large
-
-
- 165
-
-
- status_view
-
-
- 150
-
-
- Erase
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -1.IBPluginDependency
- -2.CustomClassName
- -2.IBPluginDependency
- 1.IBPluginDependency
- 1.IBUserGuides
- 150.CustomClassName
- 150.IBPluginDependency
- 157.IBPluginDependency
- 160.IBPluginDependency
- 162.CustomClassName
- 162.IBPluginDependency
- 162.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 165.IBPluginDependency
- 29.CustomClassName
- 29.IBPluginDependency
- 30.CustomClassName
- 30.IBPluginDependency
- 31.CustomClassName
- 31.IBPluginDependency
- 33.CustomClassName
- 33.IBPluginDependency
- 34.CustomClassName
- 34.IBPluginDependency
- 35.CustomClassName
- 35.IBPluginDependency
- 36.CustomClassName
- 36.IBPluginDependency
- 37.CustomClassName
- 37.IBPluginDependency
- 38.CustomClassName
- 38.IBPluginDependency
- 39.CustomClassName
- 39.IBPluginDependency
- 4.IBPluginDependency
- 40.CustomClassName
- 40.IBPluginDependency
- 41.CustomClassName
- 41.IBPluginDependency
- 5.CustomClassName
- 5.IBPluginDependency
- 5.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
- 80.IBPluginDependency
-
-
- YES
- PhoneViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- YES
-
-
- 412
- 1
-
-
-
- 65
- 1
-
-
- UIEraseButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICallButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIDigitButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICallButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
-
-
-
-
- YES
-
-
-
-
- 169
-
-
-
- YES
-
- MainScreenWithVideoPreview
- UIViewController
-
- YES
-
- YES
- phoneMainView
- window
-
-
- YES
- PhoneViewController
- UIWindow
-
-
-
- YES
-
- YES
- phoneMainView
- window
-
-
- YES
-
- phoneMainView
- PhoneViewController
-
-
- window
- UIWindow
-
-
-
-
- IBProjectSource
- ./Classes/MainScreenWithVideoPreview.h
-
-
-
- PhoneViewController
- UIViewController
-
- YES
-
- YES
- address
- backToCallView
- callLarge
- callShort
- dialerView
- eight
- erase
- five
- four
- hash
- mMainScreenWithVideoPreview
- myTabBarController
- nine
- one
- seven
- six
- star
- status
- statusViewHolder
- switchCamera
- three
- two
- zero
-
-
- YES
- UITextField
- UIButton
- UIButton
- UIButton
- UIView
- UIButton
- UIEraseButton
- UIButton
- UIButton
- UIButton
- MainScreenWithVideoPreview
- UITabBarController
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UILabel
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
-
-
-
- YES
-
- YES
- address
- backToCallView
- callLarge
- callShort
- dialerView
- eight
- erase
- five
- four
- hash
- mMainScreenWithVideoPreview
- myTabBarController
- nine
- one
- seven
- six
- star
- status
- statusViewHolder
- switchCamera
- three
- two
- zero
-
-
- YES
-
- address
- UITextField
-
-
- backToCallView
- UIButton
-
-
- callLarge
- UIButton
-
-
- callShort
- UIButton
-
-
- dialerView
- UIView
-
-
- eight
- UIButton
-
-
- erase
- UIEraseButton
-
-
- five
- UIButton
-
-
- four
- UIButton
-
-
- hash
- UIButton
-
-
- mMainScreenWithVideoPreview
- MainScreenWithVideoPreview
-
-
- myTabBarController
- UITabBarController
-
-
- nine
- UIButton
-
-
- one
- UIButton
-
-
- seven
- UIButton
-
-
- six
- UIButton
-
-
- star
- UIButton
-
-
- status
- UILabel
-
-
- statusViewHolder
- UIView
-
-
- switchCamera
- UIButton
-
-
- three
- UIButton
-
-
- two
- UIButton
-
-
- zero
- UIButton
-
-
-
-
- IBProjectSource
- ./Classes/PhoneViewController.h
-
-
-
- UICallButton
- UIButton
-
- IBProjectSource
- ./Classes/UICallButton.h
-
-
-
- UIDigitButton
- UIButton
-
- IBProjectSource
- ./Classes/UIDigitButton.h
-
-
-
- UIEraseButton
- UIButton
-
- IBProjectSource
- ./Classes/UIEraseButton.h
-
-
-
-
- 0
- IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
-
-
- YES
- 3
-
- YES
-
- YES
- clavier-01-106px.png
- clavier-01-108px.png
- clavier-01-160px.png
- effacer.png
- startcall-gray.png
- startcall-green.png
-
-
- YES
- {106, 60}
- {108, 60}
- {160, 60}
- {66, 65}
- {60, 52}
- {60, 52}
-
-
- 933
-
-
diff --git a/Classes/StatusSubViewController.h b/Classes/StatusSubViewController.h
deleted file mode 100644
index 72e4997eb..000000000
--- a/Classes/StatusSubViewController.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* StatusSubViewController.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
-#include "linphonecore.h"
-
-@interface StatusSubViewController : UIViewController {
- UIImageView* image;
- UIActivityIndicatorView* spinner;
- UILabel* label;
-}
-
-@property (nonatomic, retain) IBOutlet UIImageView* image;
-@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* spinner;
-@property (nonatomic, retain) IBOutlet UILabel* label;
-
--(BOOL) updateWithRegistrationState:(LinphoneRegistrationState)state message:(NSString*) message;
-
-@end
diff --git a/Classes/StatusSubViewController.m b/Classes/StatusSubViewController.m
deleted file mode 100644
index dd2a5e569..000000000
--- a/Classes/StatusSubViewController.m
+++ /dev/null
@@ -1,99 +0,0 @@
-/* StatusSubViewController.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 "StatusSubViewController.h"
-
-@implementation StatusSubViewController
-
-@synthesize image;
-@synthesize spinner;
-@synthesize label;
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
-{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
-}
-
-- (void)didReceiveMemoryWarning
-{
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-#pragma mark - View lifecycle
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
-}
-
-- (void)viewDidUnload
-{
- [super viewDidUnload];
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-
--(BOOL) updateWithRegistrationState:(LinphoneRegistrationState)state message:(NSString*) message {
- label.hidden = NO;
- switch(state) {
- case LinphoneRegistrationCleared:
-/* image.hidden = NO;
- [image setImage:[UIImage imageNamed:@"status_orange.png"]];
- [spinner stopAnimating];
- [label setText:message != nil ? message : NSLocalizedString(@"No SIP account defined", nil)];
- return YES;*/
- case LinphoneRegistrationFailed:
- image.hidden = NO;
- [image setImage:[UIImage imageNamed:@"status_red.png"]];
- [spinner stopAnimating];
- [label setText:message];
- return NO;
- case LinphoneRegistrationNone:
- image.hidden = NO;
- [image setImage:[UIImage imageNamed:@"status_gray.png"]];
- [spinner stopAnimating];
- [label setText:message];
- return NO;
- case LinphoneRegistrationProgress:
- image.hidden = YES;
- spinner.hidden = NO;
- [spinner startAnimating];
- [label setText:message];
- return NO;
- case LinphoneRegistrationOk:
- image.hidden = NO;
- [image setImage:[UIImage imageNamed:@"status_green.png"]];
- [spinner stopAnimating];
- [label setText:message];
- return YES;
- }
- return NO;
-}
-
-@end
diff --git a/Classes/Utils/ColorSpaceUtilites.m b/Classes/Utils/ColorSpaceUtilites.m
new file mode 100644
index 000000000..5f845a428
--- /dev/null
+++ b/Classes/Utils/ColorSpaceUtilites.m
@@ -0,0 +1,142 @@
+/*
+ ColorConverter
+
+ you can use it to convert color from RGB space to HSL space and back.
+
+ HSL2RGB copied from GLPaint Apple sample: http://developer.apple.com/library/ios/#samplecode/GLPaint/Introduction/Intro.html
+
+ RGB2HSL translated from http://www.geekymonkey.com/Programming/CSharp/RGB2HSL_HSL2RGB.htm
+
+ From: https://github.com/alessani/ColorConverter
+ */
+
+void HSL2RGB(float h, float s, float l, float* outR, float* outG, float* outB)
+{
+ float temp1,
+ temp2;
+ float temp[3];
+ int i;
+
+ // Check for saturation. If there isn't any just return the luminance value for each, which results in gray.
+ if(s == 0.0) {
+ if(outR)
+ *outR = l;
+ if(outG)
+ *outG = l;
+ if(outB)
+ *outB = l;
+ return;
+ }
+
+ // Test for luminance and compute temporary values based on luminance and saturation
+ if(l < 0.5)
+ temp2 = l * (1.0 + s);
+ else
+ temp2 = l + s - l * s;
+ temp1 = 2.0 * l - temp2;
+
+ // Compute intermediate values based on hue
+ temp[0] = h + 1.0 / 3.0;
+ temp[1] = h;
+ temp[2] = h - 1.0 / 3.0;
+
+ for(i = 0; i < 3; ++i) {
+
+ // Adjust the range
+ if(temp[i] < 0.0)
+ temp[i] += 1.0;
+ if(temp[i] > 1.0)
+ temp[i] -= 1.0;
+
+
+ if(6.0 * temp[i] < 1.0)
+ temp[i] = temp1 + (temp2 - temp1) * 6.0 * temp[i];
+ else {
+ if(2.0 * temp[i] < 1.0)
+ temp[i] = temp2;
+ else {
+ if(3.0 * temp[i] < 2.0)
+ temp[i] = temp1 + (temp2 - temp1) * ((2.0 / 3.0) - temp[i]) * 6.0;
+ else
+ temp[i] = temp1;
+ }
+ }
+ }
+
+ // Assign temporary values to R, G, B
+ if(outR)
+ *outR = temp[0];
+ if(outG)
+ *outG = temp[1];
+ if(outB)
+ *outB = temp[2];
+}
+
+
+void RGB2HSL(float r, float g, float b, float* outH, float* outS, float* outL)
+{
+ /*r = r/255.0f;
+ g = g/255.0f;
+ b = b/255.0f;*/
+
+
+ float h,s, l, v, m, vm, r2, g2, b2;
+
+ h = 0;
+ s = 0;
+ l = 0;
+
+ v = MAX(r, g);
+ v = MAX(v, b);
+ m = MIN(r, g);
+ m = MIN(m, b);
+
+ l = (m+v)/2.0f;
+
+ if (l <= 0.0){
+ if(outH)
+ *outH = h;
+ if(outS)
+ *outS = s;
+ if(outL)
+ *outL = l;
+ return;
+ }
+
+ vm = v - m;
+ s = vm;
+
+ if (s > 0.0f){
+ s/= (l <= 0.5f) ? (v + m) : (2.0 - v - m);
+ }else{
+ if(outH)
+ *outH = h;
+ if(outS)
+ *outS = s;
+ if(outL)
+ *outL = l;
+ return;
+ }
+
+ r2 = (v - r)/vm;
+ g2 = (v - g)/vm;
+ b2 = (v - b)/vm;
+
+ if (r == v){
+ h = (g == m ? 5.0f + b2 : 1.0f - g2);
+ }else if (g == v){
+ h = (b == m ? 1.0f + r2 : 3.0 - b2);
+ }else{
+ h = (r == m ? 3.0f + g2 : 5.0f - r2);
+ }
+
+ h/=6.0f;
+
+ if(outH)
+ *outH = h;
+ if(outS)
+ *outS = s;
+ if(outL)
+ *outL = l;
+
+}
\ No newline at end of file
diff --git a/Classes/Utils/ColorSpaceUtilities.h b/Classes/Utils/ColorSpaceUtilities.h
new file mode 100644
index 000000000..7f2ff1b70
--- /dev/null
+++ b/Classes/Utils/ColorSpaceUtilities.h
@@ -0,0 +1,14 @@
+/*
+ ColorConverter
+
+ you can use it to convert color from RGB space to HSL space and back.
+
+ HSL2RGB copied from GLPaint Apple sample: http://developer.apple.com/library/ios/#samplecode/GLPaint/Introduction/Intro.html
+
+ RGB2HSL translated from http://www.geekymonkey.com/Programming/CSharp/RGB2HSL_HSL2RGB.htm
+
+ From: https://github.com/alessani/ColorConverter
+*/
+
+void HSL2RGB(float h, float s, float l, float* outR, float* outG, float* outB);
+void RGB2HSL(float r, float g, float b, float* outH, float* outS, float* outL);
\ No newline at end of file
diff --git a/Classes/LinphoneUI/FastAddressBook.h b/Classes/Utils/FastAddressBook.h
similarity index 68%
rename from Classes/LinphoneUI/FastAddressBook.h
rename to Classes/Utils/FastAddressBook.h
index 65713ad35..5550b373b 100644
--- a/Classes/LinphoneUI/FastAddressBook.h
+++ b/Classes/Utils/FastAddressBook.h
@@ -20,26 +20,18 @@
#import
#import
-@interface Contact : NSObject {
- ABRecordRef record;
- NSString* numberType;
-}
--(id) initWithRecord:(ABRecordRef) record ofType:(NSString*) type;
-@property (nonatomic, readonly) ABRecordRef record;
-@property (nonatomic, readonly) NSString* numberType;
-@end
-
@interface FastAddressBook : NSObject {
- NSMutableDictionary* mAddressBookMap;
+ NSMutableDictionary* addressBookMap;
ABAddressBookRef addressBook;
}
--(Contact*) getMatchingRecord:(NSString*) number ;
-+(NSString*) appendCountryCodeIfPossible:(NSString*) number ;
-+(NSString*) normalizePhoneNumber:(NSString*) number ;
--(id) init ;
-
-@property (nonatomic, readonly) ABAddressBookRef addressBook;
++ (BOOL)isSipURI:(NSString*)address;
++ (NSString*)getContactDisplayName:(ABRecordRef)contact;
++ (UIImage*)getContactImage:(ABRecordRef)contact thumbnail:(BOOL)thumbnail;
+- (ABRecordRef)getContact:(NSString*)address;
++ (NSString*)appendCountryCodeIfPossible:(NSString*)number;
++ (NSString*)normalizePhoneNumber:(NSString*)number;
++ (NSString*)normalizeSipURI:(NSString*)address;
@end
diff --git a/Classes/Utils/FastAddressBook.m b/Classes/Utils/FastAddressBook.m
new file mode 100644
index 000000000..ce4183f67
--- /dev/null
+++ b/Classes/Utils/FastAddressBook.m
@@ -0,0 +1,179 @@
+/* FastAddressBook.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 "FastAddressBook.h"
+#import "LinphoneManager.h"
+
+@implementation FastAddressBook
+
++ (NSString*)getContactDisplayName:(ABRecordRef)contact {
+ NSString *retString = nil;
+ if (contact) {
+ CFStringRef lDisplayName = ABRecordCopyCompositeName(contact);
+ if(lDisplayName != NULL) {
+ retString = [NSString stringWithString:(NSString*)lDisplayName];
+ CFRelease(lDisplayName);
+ }
+ }
+ return retString;
+}
+
++ (UIImage*)getContactImage:(ABRecordRef)contact thumbnail:(BOOL)thumbnail {
+ UIImage* retImage = nil;
+ if (contact && ABPersonHasImageData(contact)) {
+ CFDataRef imgData = ABPersonCopyImageDataWithFormat(contact, thumbnail?
+ kABPersonImageFormatThumbnail: kABPersonImageFormatOriginalSize);
+ retImage = [UIImage imageWithData:(NSData *)imgData];
+ CFRelease(imgData);
+ }
+ return retImage;
+}
+
+- (ABRecordRef)getContact:(NSString*)address {
+ @synchronized (addressBookMap){
+ return (ABRecordRef)[addressBookMap objectForKey:address];
+ }
+}
+
++ (BOOL)isSipURI:(NSString*)address {
+ return [address hasPrefix:@"sip:"];
+}
+
++ (NSString*)appendCountryCodeIfPossible:(NSString*)number {
+ if (![number hasPrefix:@"+"] && ![number hasPrefix:@"00"]) {
+ NSString* lCountryCode = [[NSUserDefaults standardUserDefaults] stringForKey:@"countrycode_preference"];
+ if (lCountryCode && [lCountryCode length]>0) {
+ //append country code
+ return [lCountryCode stringByAppendingString:number];
+ }
+ }
+ return number;
+}
+
++ (NSString*)normalizeSipURI:(NSString*)address {
+ NSString* ret = address;
+ if([address rangeOfString:@"@"].location != NSNotFound) {
+ if([address rangeOfString:@"sip:" options:NSCaseInsensitiveSearch].location == 0) {
+ // have to be sure that start with sip: in lower case
+ ret = [ret substringFromIndex:4];
+ }
+ ret = [@"sip:" stringByAppendingString:ret];
+ }
+ return ret;
+}
+
++ (NSString*)normalizePhoneNumber:(NSString*)address {
+ NSMutableString* lNormalizedAddress = [NSMutableString stringWithString:address];
+ [lNormalizedAddress replaceOccurrencesOfString:@" "
+ withString:@""
+ options:0
+ range:NSMakeRange(0, [lNormalizedAddress length])];
+ [lNormalizedAddress replaceOccurrencesOfString:@"("
+ withString:@""
+ options:0
+ range:NSMakeRange(0, [lNormalizedAddress length])];
+ [lNormalizedAddress replaceOccurrencesOfString:@")"
+ withString:@""
+ options:0
+ range:NSMakeRange(0, [lNormalizedAddress length])];
+ [lNormalizedAddress replaceOccurrencesOfString:@"-"
+ withString:@""
+ options:0
+ range:NSMakeRange(0, [lNormalizedAddress length])];
+ return [FastAddressBook appendCountryCodeIfPossible:lNormalizedAddress];
+}
+
+- (FastAddressBook*)init {
+ if ((self = [super init]) != nil) {
+ addressBookMap = [[NSMutableDictionary alloc] init];
+ addressBook = ABAddressBookCreate();
+ ABAddressBookRegisterExternalChangeCallback (addressBook, sync_address_book, self);
+ [self loadData];
+ }
+ return self;
+}
+
+- (void)loadData {
+ ABAddressBookRevert(addressBook);
+ @synchronized (addressBookMap) {
+ [addressBookMap removeAllObjects];
+
+ NSArray *lContacts = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
+ for (id lPerson in lContacts) {
+ // Phone
+ {
+ ABMultiValueRef lMap = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonPhoneProperty);
+ if(lMap) {
+ for (int i=0; i
+
+@interface TPMultiLayoutViewController : UIViewController {
+ UIView *portraitView;
+ UIView *landscapeView;
+
+ @private
+ NSDictionary *portraitAttributes;
+ NSDictionary *landscapeAttributes;
+ BOOL viewIsCurrentlyPortrait;
+}
+
+// Call directly to use with custom animation (override willRotateToInterfaceOrientation to disable the switch there)
+- (void)applyLayoutForInterfaceOrientation:(UIInterfaceOrientation)newOrientation;
+
+@property (nonatomic, retain) IBOutlet UIView *landscapeView;
+@property (nonatomic, retain) IBOutlet UIView *portraitView;
+@property (assign) BOOL viewIsCurrentlyPortrait;
+
+@end
diff --git a/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m b/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m
new file mode 100755
index 000000000..668e0d747
--- /dev/null
+++ b/Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.m
@@ -0,0 +1,238 @@
+//
+// TPMultiLayoutViewController.m
+//
+// Created by Michael Tyson on 14/08/2011.
+// Copyright 2011 A Tasty Pixel. All rights reserved.
+//
+
+#import "TPMultiLayoutViewController.h"
+
+#define VERBOSE_MATCH_FAIL 1 // Comment this out to be less verbose when associated views can't be found
+
+@interface TPMultiLayoutViewController ()
+- (NSDictionary*)attributeTableForViewHierarchy:(UIView*)rootView associateWithViewHierarchy:(UIView*)associatedRootView;
+- (void)addAttributesForSubviewHierarchy:(UIView*)view associatedWithSubviewHierarchy:(UIView*)associatedView toTable:(NSMutableDictionary*)table;
+- (UIView*)findAssociatedViewForView:(UIView*)view amongViews:(NSArray*)views;
+- (void)applyAttributeTable:(NSDictionary*)table toViewHierarchy:(UIView*)view;
+- (NSDictionary*)attributesForView:(UIView*)view;
+- (void)applyAttributes:(NSDictionary*)attributes toView:(UIView*)view;
+- (BOOL)shouldDescendIntoSubviewsOfView:(UIView*)view;
+@end
+
+@implementation TPMultiLayoutViewController
+@synthesize portraitView, landscapeView, viewIsCurrentlyPortrait;
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ // Construct attribute tables
+ portraitAttributes = [[self attributeTableForViewHierarchy:portraitView associateWithViewHierarchy:self.view] retain];
+ landscapeAttributes = [[self attributeTableForViewHierarchy:landscapeView associateWithViewHierarchy:self.view] retain];
+ viewIsCurrentlyPortrait = (self.view == portraitView);
+
+ // Don't need to retain the original template view hierarchies any more
+ self.portraitView = nil;
+ self.landscapeView = nil;
+}
+
+- (void)viewDidUnload {
+ [super viewDidUnload];
+
+ [portraitAttributes release];
+ portraitAttributes = nil;
+ [landscapeAttributes release];
+ landscapeAttributes = nil;
+}
+
+- (void)dealloc {
+ [portraitAttributes release];
+ portraitAttributes = nil;
+ [landscapeAttributes release];
+ landscapeAttributes = nil;
+
+ [super dealloc];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+ // Display correct layout for orientation
+ /*if ( (UIInterfaceOrientationIsPortrait(self.interfaceOrientation) && !viewIsCurrentlyPortrait) ||
+ (UIInterfaceOrientationIsLandscape(self.interfaceOrientation) && viewIsCurrentlyPortrait) ) {
+ [self applyLayoutForInterfaceOrientation:self.interfaceOrientation];
+ }*/
+ [super viewWillAppear:animated];
+}
+
+#pragma mark - Rotation
+
+- (void)applyLayoutForInterfaceOrientation:(UIInterfaceOrientation)newOrientation {
+ NSDictionary *table = UIInterfaceOrientationIsPortrait(newOrientation) ? portraitAttributes : landscapeAttributes;
+ [self applyAttributeTable:table toViewHierarchy:self.view];
+ viewIsCurrentlyPortrait = UIInterfaceOrientationIsPortrait(newOrientation);
+}
+
+- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+ [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
+ //if ( (UIInterfaceOrientationIsPortrait(toInterfaceOrientation) && !viewIsCurrentlyPortrait) ||
+ // (UIInterfaceOrientationIsLandscape(toInterfaceOrientation) && viewIsCurrentlyPortrait) ) {
+ [self applyLayoutForInterfaceOrientation:toInterfaceOrientation];
+ //}
+}
+
+#pragma mark - Helpers
+
+- (NSDictionary*)attributeTableForViewHierarchy:(UIView*)rootView associateWithViewHierarchy:(UIView*)associatedRootView {
+ NSMutableDictionary *table = [NSMutableDictionary dictionary];
+ [self addAttributesForSubviewHierarchy:rootView associatedWithSubviewHierarchy:associatedRootView toTable:table];
+ return table;
+}
+
+- (void)addAttributesForSubviewHierarchy:(UIView*)view associatedWithSubviewHierarchy:(UIView*)associatedView toTable:(NSMutableDictionary*)table {
+ [table setObject:[self attributesForView:view] forKey:[NSValue valueWithPointer:associatedView]];
+
+ if ( ![self shouldDescendIntoSubviewsOfView:view] ) return;
+
+ for ( UIView *subview in view.subviews ) {
+ UIView *associatedSubView = (view == associatedView ? subview : [self findAssociatedViewForView:subview amongViews:associatedView.subviews]);
+ if ( associatedSubView ) {
+ [self addAttributesForSubviewHierarchy:subview associatedWithSubviewHierarchy:associatedSubView toTable:table];
+ }
+ }
+}
+
+- (UIView*)findAssociatedViewForView:(UIView*)view amongViews:(NSArray*)views {
+ // First try to match tag
+ if ( view.tag != 0 ) {
+ UIView *associatedView = [[views filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"tag = %d", view.tag]] lastObject];
+ if ( associatedView ) return associatedView;
+ }
+
+ // Next, try to match class, targets and actions, if it's a control
+ if ( [view isKindOfClass:[UIControl class]] && [[(UIControl*)view allTargets] count] > 0 ) {
+ for ( UIView *otherView in views ) {
+ if ( [otherView isKindOfClass:[view class]]
+ && [[(UIControl*)otherView allTargets] isEqualToSet:[(UIControl*)view allTargets]]
+ && [(UIControl*)otherView allControlEvents] == [(UIControl*)view allControlEvents] ) {
+ // Try to match all actions and targets for each associated control event
+ BOOL allActionsMatch = YES;
+ UIControlEvents controlEvents = [(UIControl*)otherView allControlEvents];
+ for ( id target in [(UIControl*)otherView allTargets] ) {
+ // Iterate over each bit in the UIControlEvents bitfield
+ for ( NSInteger i=0; i ", NSStringFromClass([v class])] atIndex:0];
+ }
+ NSLog(@"Couldn't find match for %@%@", path, NSStringFromClass([view class]));
+
+#endif
+
+ return nil;
+}
+
+- (void)applyAttributeTable:(NSDictionary*)table toViewHierarchy:(UIView*)view {
+ NSDictionary *attributes = [table objectForKey:[NSValue valueWithPointer:view]];
+ if ( attributes ) {
+ [self applyAttributes:attributes toView:view];
+ }
+
+ //if ( view.hidden ) return;
+
+ if ( ![self shouldDescendIntoSubviewsOfView:view] ) return;
+
+ for ( UIView *subview in view.subviews ) {
+ [self applyAttributeTable:table toViewHierarchy:subview];
+ }
+}
+
+- (NSDictionary*)attributesForView:(UIView*)view {
+ NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
+
+ [attributes setObject:[NSValue valueWithCGRect:view.frame] forKey:@"frame"];
+ [attributes setObject:[NSValue valueWithCGRect:view.bounds] forKey:@"bounds"];
+ [attributes setObject:[NSNumber numberWithBool:view.hidden] forKey:@"hidden"];
+ [attributes setObject:[NSNumber numberWithInteger:view.autoresizingMask] forKey:@"autoresizingMask"];
+
+ return attributes;
+}
+
+- (void)applyAttributes:(NSDictionary*)attributes toView:(UIView*)view {
+ view.frame = [[attributes objectForKey:@"frame"] CGRectValue];
+ view.bounds = [[attributes objectForKey:@"bounds"] CGRectValue];
+ view.hidden = [[attributes objectForKey:@"hidden"] boolValue];
+ view.autoresizingMask = [[attributes objectForKey:@"autoresizingMask"] integerValue];
+}
+
+- (BOOL)shouldDescendIntoSubviewsOfView:(UIView*)view {
+ if ( [view isKindOfClass:[UISlider class]] ||
+ [view isKindOfClass:[UISwitch class]] ||
+ [view isKindOfClass:[UITextField class]] ||
+ [view isKindOfClass:[UIWebView class]] ||
+ [view isKindOfClass:[UITableView class]] ||
+ [view isKindOfClass:[UIPickerView class]] ||
+ [view isKindOfClass:[UIDatePicker class]] ||
+ [view isKindOfClass:[UITextView class]] ||
+ [view isKindOfClass:[UIProgressView class]] ||
+ [view isKindOfClass:[UISegmentedControl class]] ) return NO;
+ return YES;
+}
+
+@end
\ No newline at end of file
diff --git a/Classes/Utils/UACellBackgroundView/UACellBackgroundView.h b/Classes/Utils/UACellBackgroundView/UACellBackgroundView.h
new file mode 100644
index 000000000..a2a397792
--- /dev/null
+++ b/Classes/Utils/UACellBackgroundView/UACellBackgroundView.h
@@ -0,0 +1,30 @@
+//
+// UACellBackgroundView.h
+// Ambiance
+//
+// Created by Matt Coneybeare on 1/31/10.
+// Copyright 2010 Urban Apps LLC. All rights reserved.
+//
+// Modified by Diorcet Yann on 07/12/12
+
+#import
+
+#import
+
+typedef enum {
+ UACellBackgroundViewPositionSingle = 0,
+ UACellBackgroundViewPositionTop,
+ UACellBackgroundViewPositionBottom,
+ UACellBackgroundViewPositionMiddle
+} UACellBackgroundViewPosition;
+
+@interface UACellBackgroundView : UIView {
+ UACellBackgroundViewPosition position;
+ BOOL automaticPositioning;
+}
+
+@property(nonatomic) UACellBackgroundViewPosition position;
+@property(nonatomic, copy) UIColor *backgroundColor;
+@property(assign) BOOL automaticPositioning;
+
+@end
diff --git a/Classes/Utils/UACellBackgroundView/UACellBackgroundView.m b/Classes/Utils/UACellBackgroundView/UACellBackgroundView.m
new file mode 100644
index 000000000..1f8aa8e14
--- /dev/null
+++ b/Classes/Utils/UACellBackgroundView/UACellBackgroundView.m
@@ -0,0 +1,273 @@
+//
+// UACellBackgroundView.m
+// Ambiance
+//
+// Created by Matt Coneybeare on 1/31/10.
+// Copyright 2010 Urban Apps LLC. All rights reserved.
+//
+// Modified by Diorcet Yann on 07/12/12
+
+#define kDefaultMargin 10
+
+#import "UACellBackgroundView.h"
+
+static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth,float ovalHeight);
+
+@implementation UACellBackgroundView
+
+@synthesize position;
+@synthesize backgroundColor;
+@synthesize automaticPositioning;
+
+- (void)initUACellBackgroundView {
+ [super setBackgroundColor:[UIColor clearColor]];
+ self->automaticPositioning = TRUE;
+}
+
+- (id)init {
+ self = [super init];
+ if(self != nil) {
+ [self initUACellBackgroundView];
+ }
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder *)aDecoder {
+ self = [super initWithCoder:aDecoder];
+ if(self != nil) {
+ [self initUACellBackgroundView];
+ }
+ return self;
+}
+
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if(self != nil) {
+ [self initUACellBackgroundView];
+ }
+ return self;
+}
+
+- (BOOL)isOpaque {
+ return NO;
+}
+
+- (void)setBackgroundColor:(UIColor *)abackgroundColor {
+ if(self->backgroundColor != nil) {
+ [self->backgroundColor release];
+ }
+ self->backgroundColor = [[UIColor alloc]initWithCGColor:abackgroundColor.CGColor];
+ [self setNeedsDisplay];
+}
+
+- (void)layoutSubviews {
+ [super layoutSubviews];
+
+ if(!automaticPositioning)
+ return;
+
+ //
+ // Auto found position
+ //
+
+ UIView *view = [self superview];
+ // Find TableViewCell
+ if(view != nil && ![view isKindOfClass:[UITableView class]]) view = [view superview];
+
+ UIView *cellView = [self superview];
+ // Find TableViewCell
+ if(cellView != nil && ![cellView isKindOfClass:[UITableViewCell class]]) cellView = [cellView superview];
+
+ if(view != nil && cellView != nil) {
+ UITableViewCell *cell = (UITableViewCell*)cellView;
+ UITableView *tableView = (UITableView*)view;
+
+ if([tableView style] == UITableViewStyleGrouped) {
+ NSIndexPath *path = [tableView indexPathForCell:cell];
+ if(path) {
+ int count = [tableView numberOfRowsInSection:[path section]];
+ // Set Position for background view
+ if([path row] == 0) {
+ if([path row] == (count - 1)) {
+ [self setPosition:UACellBackgroundViewPositionSingle];
+ } else {
+ [self setPosition:UACellBackgroundViewPositionTop];
+ }
+ } else if([path row] == (count - 1)) {
+ [self setPosition:UACellBackgroundViewPositionBottom];
+ } else {
+ [self setPosition:UACellBackgroundViewPositionMiddle];
+ }
+ }
+ } else {
+ [self setPosition:UACellBackgroundViewPositionMiddle];
+ }
+ }
+ [self setNeedsDisplay];
+}
+
+- (void)drawRect:(CGRect)aRect {
+ // Drawing code
+
+ CGContextRef c = UIGraphicsGetCurrentContext();
+
+ int lineWidth = 1;
+
+ CGRect rect = [self bounds];
+ CGFloat minx = CGRectGetMinX(rect), midx = CGRectGetMidX(rect), maxx = CGRectGetMaxX(rect);
+ CGFloat miny = CGRectGetMinY(rect), midy = CGRectGetMidY(rect), maxy = CGRectGetMaxY(rect);
+ miny -= 1;
+
+ CGFloat locations[2] = { 0.0, 1.0 };
+ CGColorSpaceRef myColorspace = CGColorGetColorSpace([[self backgroundColor] CGColor]);
+ 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]);
+ CGContextSetLineWidth(c, lineWidth);
+ CGContextSetAllowsAntialiasing(c, YES);
+ CGContextSetShouldAntialias(c, YES);
+
+ if (position == UACellBackgroundViewPositionTop) {
+
+ miny += 1;
+
+ CGMutablePathRef path = CGPathCreateMutable();
+ CGPathMoveToPoint(path, NULL, minx, maxy);
+ CGPathAddArcToPoint(path, NULL, minx, miny, midx, miny, kDefaultMargin);
+ CGPathAddArcToPoint(path, NULL, maxx, miny, maxx, maxy, kDefaultMargin);
+ CGPathAddLineToPoint(path, NULL, maxx, maxy);
+ CGPathAddLineToPoint(path, NULL, minx, maxy);
+ CGPathCloseSubpath(path);
+
+ // Fill and stroke the path
+ CGContextSaveGState(c);
+ CGContextAddPath(c, path);
+ CGContextClip(c);
+
+ myGradient = CGGradientCreateWithColorComponents(myColorspace, components, locations, 2);
+ CGContextDrawLinearGradient(c, myGradient, CGPointMake(minx,miny), CGPointMake(minx,maxy), 0);
+
+ CGContextAddPath(c, path);
+ CGPathRelease(path);
+ CGContextStrokePath(c);
+ CGContextRestoreGState(c);
+
+ } else if (position == UACellBackgroundViewPositionBottom) {
+
+ CGMutablePathRef path = CGPathCreateMutable();
+ CGPathMoveToPoint(path, NULL, minx, miny);
+ CGPathAddArcToPoint(path, NULL, minx, maxy, midx, maxy, kDefaultMargin);
+ CGPathAddArcToPoint(path, NULL, maxx, maxy, maxx, miny, kDefaultMargin);
+ CGPathAddLineToPoint(path, NULL, maxx, miny);
+ CGPathAddLineToPoint(path, NULL, minx, miny);
+ CGPathCloseSubpath(path);
+
+ // Fill and stroke the path
+ CGContextSaveGState(c);
+ CGContextAddPath(c, path);
+ CGContextClip(c);
+
+ myGradient = CGGradientCreateWithColorComponents(myColorspace, components, locations, 2);
+ CGContextDrawLinearGradient(c, myGradient, CGPointMake(minx,miny), CGPointMake(minx,maxy), 0);
+
+ CGContextAddPath(c, path);
+ CGPathRelease(path);
+ CGContextStrokePath(c);
+ CGContextRestoreGState(c);
+
+
+ } else if (position == UACellBackgroundViewPositionMiddle) {
+
+ CGMutablePathRef path = CGPathCreateMutable();
+ CGPathMoveToPoint(path, NULL, minx, miny);
+ CGPathAddLineToPoint(path, NULL, maxx, miny);
+ CGPathAddLineToPoint(path, NULL, maxx, maxy);
+ CGPathAddLineToPoint(path, NULL, minx, maxy);
+ CGPathAddLineToPoint(path, NULL, minx, miny);
+ CGPathCloseSubpath(path);
+
+ // Fill and stroke the path
+ CGContextSaveGState(c);
+ CGContextAddPath(c, path);
+ CGContextClip(c);
+
+ myGradient = CGGradientCreateWithColorComponents(myColorspace, components, locations, 2);
+ CGContextDrawLinearGradient(c, myGradient, CGPointMake(minx,miny), CGPointMake(minx,maxy), 0);
+
+ CGContextAddPath(c, path);
+ CGPathRelease(path);
+ CGContextStrokePath(c);
+ CGContextRestoreGState(c);
+
+ } else if (position == UACellBackgroundViewPositionSingle) {
+ miny += 1;
+
+ CGMutablePathRef path = CGPathCreateMutable();
+ CGPathMoveToPoint(path, NULL, minx, midy);
+ CGPathAddArcToPoint(path, NULL, minx, miny, midx, miny, kDefaultMargin);
+ CGPathAddArcToPoint(path, NULL, maxx, miny, maxx, midy, kDefaultMargin);
+ CGPathAddArcToPoint(path, NULL, maxx, maxy, midx, maxy, kDefaultMargin);
+ CGPathAddArcToPoint(path, NULL, minx, maxy, minx, midy, kDefaultMargin);
+ CGPathCloseSubpath(path);
+
+
+ // Fill and stroke the path
+ CGContextSaveGState(c);
+ CGContextAddPath(c, path);
+ CGContextClip(c);
+
+
+ myGradient = CGGradientCreateWithColorComponents(myColorspace, components, locations, 2);
+ CGContextDrawLinearGradient(c, myGradient, CGPointMake(minx,miny), CGPointMake(minx,maxy), 0);
+
+ CGContextAddPath(c, path);
+ CGPathRelease(path);
+ CGContextStrokePath(c);
+ CGContextRestoreGState(c);
+ }
+
+ CGColorSpaceRelease(myColorspace);
+ CGGradientRelease(myGradient);
+ return;
+}
+
+- (void)dealloc {
+ [backgroundColor release];
+ [super dealloc];
+}
+
+- (void)setPosition:(UACellBackgroundViewPosition)newPosition {
+ if (position != newPosition) {
+ position = newPosition;
+ [self setNeedsDisplay];
+ }
+}
+
+@end
+
+static void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth,float ovalHeight) {
+ float fw, fh;
+
+ if (ovalWidth == 0 || ovalHeight == 0) {// 1
+ CGContextAddRect(context, rect);
+ return;
+ }
+
+ CGContextSaveGState(context);// 2
+
+ CGContextTranslateCTM (context, CGRectGetMinX(rect),// 3
+ CGRectGetMinY(rect));
+ CGContextScaleCTM (context, ovalWidth, ovalHeight);// 4
+ fw = CGRectGetWidth (rect) / ovalWidth;// 5
+ fh = CGRectGetHeight (rect) / ovalHeight;// 6
+
+ CGContextMoveToPoint(context, fw, fh/2); // 7
+ CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);// 8
+ CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);// 9
+ CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);// 10
+ CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1); // 11
+ CGContextClosePath(context);// 12
+
+ CGContextRestoreGState(context);// 13
+}
diff --git a/Classes/GenericTabViewController.m b/Classes/Utils/Utils.h
similarity index 56%
rename from Classes/GenericTabViewController.m
rename to Classes/Utils/Utils.h
index e3dc5a208..8568aca78 100644
--- a/Classes/GenericTabViewController.m
+++ b/Classes/Utils/Utils.h
@@ -1,6 +1,6 @@
-/* GenericTabViewController.c
+/* Utils.h
*
- * Copyright (C) 2009 Belledonne Comunications, Grenoble, France
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,31 +15,32 @@
* 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 "GenericTabViewController.h"
+#ifndef LINPHONE_UTILS_H
+#define LINPHONE_UTILS_H
+
+#define DYNAMIC_CAST(x, cls) \
+ ({ \
+ cls *inst_ = (cls *)(x); \
+ [inst_ isKindOfClass:[cls class]]? inst_ : nil; \
+ })
+
+typedef enum _LinphoneLoggerSeverity {
+ LinphoneLoggerLog = 0,
+ LinphoneLoggerDebug,
+ LinphoneLoggerWarning,
+ LinphoneLoggerError,
+ LinphoneLoggerFatal
+} LinphoneLoggerSeverity;
-@implementation GenericTabViewController
-@synthesize header;
+@interface LinphoneLogger : NSObject {
-
-- (void)viewDidLoad {
- [super viewDidLoad];
- self.tableView.tableHeaderView=header;
-}
-
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- [self.tableView reloadData];
-}
-
-
-
-- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
-
- [self tableView:tableView didSelectRowAtIndexPath:indexPath];
}
++ (void)log:(LinphoneLoggerSeverity) severity format:(NSString *)format,...;
++ (void)logc:(LinphoneLoggerSeverity) severity format:(const char *)format,...;
@end
+#endif
diff --git a/Classes/Utils/Utils.m b/Classes/Utils/Utils.m
new file mode 100644
index 000000000..1ae8a0230
--- /dev/null
+++ b/Classes/Utils/Utils.m
@@ -0,0 +1,62 @@
+/* Utils.m
+ *
+ * Copyright (C) 2012 Belledonne Comunications, Grenoble, France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#import "Utils.h"
+#include "linphonecore.h"
+
+@implementation LinphoneLogger
+
++ (void)log:(LinphoneLoggerSeverity) severity format:(NSString *)format,... {
+ va_list args;
+ va_start (args, format);
+ NSString *str = [[NSString alloc] initWithFormat: format arguments:args];
+ if(severity <= LinphoneLoggerLog) {
+ ms_message("%s", [str UTF8String]);
+ } else if(severity <= LinphoneLoggerDebug) {
+ ms_debug("%s", [str UTF8String]);
+ } else if(severity <= LinphoneLoggerWarning) {
+ ms_warning("%s", [str UTF8String]);
+ } else if(severity <= LinphoneLoggerError) {
+ ms_error("%s", [str UTF8String]);
+ } else if(severity <= LinphoneLoggerFatal) {
+ ms_fatal("%s", [str UTF8String]);
+ }
+ [str release];
+ va_end (args);
+}
+
++ (void)logc:(LinphoneLoggerSeverity) severity format:(const char *)format,... {
+ va_list args;
+ va_start (args, format);
+ if(severity <= LinphoneLoggerLog) {
+ ortp_logv(ORTP_MESSAGE, format, args);
+ } else if(severity <= LinphoneLoggerDebug) {
+ ortp_logv(ORTP_DEBUG, format, args);
+ } else if(severity <= LinphoneLoggerWarning) {
+ ortp_logv(ORTP_WARNING, format, args);
+ } else if(severity <= LinphoneLoggerError) {
+ ortp_logv(ORTP_ERROR, format, args);
+ } else if(severity <= LinphoneLoggerFatal) {
+ ortp_logv(ORTP_FATAL, format, args);
+ }
+ va_end (args);
+}
+
+@end
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarImage.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarImage.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarImage.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarImage.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarSDK.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h
diff --git a/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Exception.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Image.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Image.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Image.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Image.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Processor.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Processor.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Processor.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Processor.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Video.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Video.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Video.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Video.h
diff --git a/ZBarSDK/Headers/ZBarSDK/zbar/Window.h b/Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Window.h
similarity index 100%
rename from ZBarSDK/Headers/ZBarSDK/zbar/Window.h
rename to Classes/Utils/ZBarSDK/Headers/ZBarSDK/zbar/Window.h
diff --git a/ZBarSDK/Resources/zbar-back.png b/Classes/Utils/ZBarSDK/Resources/zbar-back.png
similarity index 100%
rename from ZBarSDK/Resources/zbar-back.png
rename to Classes/Utils/ZBarSDK/Resources/zbar-back.png
diff --git a/ZBarSDK/Resources/zbar-help.html b/Classes/Utils/ZBarSDK/Resources/zbar-help.html
similarity index 100%
rename from ZBarSDK/Resources/zbar-help.html
rename to Classes/Utils/ZBarSDK/Resources/zbar-help.html
diff --git a/ZBarSDK/Resources/zbar-helpicons.png b/Classes/Utils/ZBarSDK/Resources/zbar-helpicons.png
similarity index 100%
rename from ZBarSDK/Resources/zbar-helpicons.png
rename to Classes/Utils/ZBarSDK/Resources/zbar-helpicons.png
diff --git a/ZBarSDK/Resources/zbar-samples.png b/Classes/Utils/ZBarSDK/Resources/zbar-samples.png
similarity index 100%
rename from ZBarSDK/Resources/zbar-samples.png
rename to Classes/Utils/ZBarSDK/Resources/zbar-samples.png
diff --git a/ZBarSDK/libzbar.a b/Classes/Utils/ZBarSDK/libzbar.a
similarity index 100%
rename from ZBarSDK/libzbar.a
rename to Classes/Utils/ZBarSDK/libzbar.a
diff --git a/Classes/VideoViewController-ipad.xib b/Classes/VideoViewController-ipad.xib
deleted file mode 100644
index 01b0daa4c..000000000
--- a/Classes/VideoViewController-ipad.xib
+++ /dev/null
@@ -1,993 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- IBUIButton
- IBUIImageView
- IBUIView
- IBProxyObject
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
-
- IBFilesOwner
- IBIPadFramework
-
-
- IBFirstResponder
- IBIPadFramework
-
-
-
- 274
- {768, 1024}
-
-
-
-
- 4
- MAA
-
- IBIPadFramework
-
-
-
- 274
-
-
-
- 292
- {768, 1024}
-
-
-
- _NS:569
- NO
- IBIPadFramework
-
-
-
- 292
- {{329, 962}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
- 3
- MC41AA
-
-
- NSImage
- stopcall-red.png
-
-
- NSImage
- clavier-01-108px.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 292
- {{223, 962}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 292
- {{598, 799}, {170, 225}}
-
-
-
-
- 3
- MQA
-
- 2
-
-
- IBIPadFramework
-
-
-
- 292
- {{436, 962}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
- 1
- switch
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 292
- {{20, 976}, {28, 28}}
-
-
-
- _NS:567
- NO
- IBIPadFramework
-
-
- {768, 1024}
-
-
-
- _NS:212
-
- 3
- MC42NjY2NjY2NjY3AA
-
- IBIPadFramework
-
-
-
- 274
-
-
-
- 292
- {1024, 768}
-
-
-
- _NS:569
- NO
- IBIPadFramework
-
-
-
- 292
- {{799, 598}, {225, 170}}
-
-
-
- 3
- MQA
-
-
- IBIPadFramework
-
-
-
- 292
- {{351, 706}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 292
- {{458, 706}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
-
- 292
- {{565, 706}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
- 1
- switch
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 292
- {{20, 720}, {28, 28}}
-
-
- _NS:567
- NO
- IBIPadFramework
-
-
- {1024, 768}
-
-
-
- _NS:212
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
- 3
- 3
-
- IBIPadFramework
-
-
-
- 274
-
-
-
- 292
- {1024, 768}
-
-
-
- _NS:569
- NO
- IBIPadFramework
-
-
-
- 292
- {{799, 598}, {225, 170}}
-
-
-
- 3
- MQA
-
-
- IBIPadFramework
-
-
-
- 292
- {{351, 706}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 292
- {{458, 706}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
-
- 292
- {{565, 706}, {108, 62}}
-
-
-
- NO
- IBIPadFramework
- 0
- 0
- 1
- switch
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 292
- {{20, 720}, {28, 28}}
-
-
- _NS:567
- NO
- IBIPadFramework
-
-
- {1024, 768}
-
-
-
- _NS:212
-
- 1
- MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
-
-
- 3
- 3
-
- IBIPadFramework
-
-
-
-
-
-
- mCamSwitch
-
-
-
- 13
-
-
-
- mHangUp
-
-
-
- 16
-
-
-
- mPortrait
-
-
-
- 19
-
-
-
- mPreview
-
-
-
- 20
-
-
-
- view
-
-
-
- 22
-
-
-
- mMute
-
-
-
- 23
-
-
-
- mDisplay
-
-
-
- 27
-
-
-
- mCamSwitchLandLeft
-
-
-
- 35
-
-
-
- mCamSwitchLandRight
-
-
-
- 36
-
-
-
- mDisplayLandLeft
-
-
-
- 37
-
-
-
- mDisplayLandRight
-
-
-
- 38
-
-
-
- mHangUpLandLeft
-
-
-
- 39
-
-
-
- mHangUpLandRight
-
-
-
- 40
-
-
-
- mLandscapeLeft
-
-
-
- 41
-
-
-
- mLandscapeRight
-
-
-
- 42
-
-
-
- mMuteLandLeft
-
-
-
- 43
-
-
-
- mMuteLandRight
-
-
-
- 44
-
-
-
- mPreviewLandLeft
-
-
-
- 45
-
-
-
- mPreviewLandRight
-
-
-
- 46
-
-
-
- mCallQuality
-
-
-
- 51
-
-
-
- mCallQualityLandLeft
-
-
-
- 52
-
-
-
- mCallQualityLandRight
-
-
-
- 53
-
-
-
-
-
- 0
-
-
-
-
-
- 1
-
-
-
- root
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 3
-
-
-
-
-
-
-
-
-
-
- portrait
-
-
- 4
-
-
-
-
-
-
-
-
-
-
- landscape-right
-
-
- 5
-
-
- Hang Up Button
-
-
- 6
-
-
-
-
- 7
-
-
- preview
-
-
- 8
-
-
-
-
- 10
-
-
-
- preview
-
-
- 11
-
-
- Hang Up Button
-
-
- 12
-
-
-
-
- 9
-
-
-
-
- 25
-
-
-
-
- 26
-
-
-
-
- 29
-
-
-
-
-
-
-
-
-
-
- landscape-left
-
-
- 30
-
-
-
-
- 31
-
-
- Hang Up Button
-
-
- 32
-
-
-
-
- 33
-
-
- preview
-
-
- 34
-
-
-
-
- 48
-
-
-
-
- 49
-
-
-
-
- 50
-
-
-
-
-
-
- VideoViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
-
-
- 53
-
-
-
-
- UICamSwitch
- UIButton
-
- preview
- UIView
-
-
- preview
-
- preview
- UIView
-
-
-
- IBProjectSource
- ./Classes/UICamSwitch.h
-
-
-
- UIHangUpButton
- UIButton
-
- IBProjectSource
- ./Classes/UIHangUpButton.h
-
-
-
- UIMuteButton
- UIToggleButton
-
- IBProjectSource
- ./Classes/UIMuteButton.h
-
-
-
- UIToggleButton
- UIButton
-
- IBProjectSource
- ./Classes/UIToggleButton.h
-
-
-
- VideoViewController
- UIViewController
-
- UIImageView
- UIImageView
- UIImageView
- UICamSwitch
- UICamSwitch
- UICamSwitch
- UIView
- UIView
- UIView
- UIHangUpButton
- UIHangUpButton
- UIHangUpButton
- UIView
- UIView
- UIMuteButton
- UIMuteButton
- UIMuteButton
- UIView
- UIView
- UIView
- UIView
-
-
-
- mCallQuality
- UIImageView
-
-
- mCallQualityLandLeft
- UIImageView
-
-
- mCallQualityLandRight
- UIImageView
-
-
- mCamSwitch
- UICamSwitch
-
-
- mCamSwitchLandLeft
- UICamSwitch
-
-
- mCamSwitchLandRight
- UICamSwitch
-
-
- mDisplay
- UIView
-
-
- mDisplayLandLeft
- UIView
-
-
- mDisplayLandRight
- UIView
-
-
- mHangUp
- UIHangUpButton
-
-
- mHangUpLandLeft
- UIHangUpButton
-
-
- mHangUpLandRight
- UIHangUpButton
-
-
- mLandscapeLeft
- UIView
-
-
- mLandscapeRight
- UIView
-
-
- mMute
- UIMuteButton
-
-
- mMuteLandLeft
- UIMuteButton
-
-
- mMuteLandRight
- UIMuteButton
-
-
- mPortrait
- UIView
-
-
- mPreview
- UIView
-
-
- mPreviewLandLeft
- UIView
-
-
- mPreviewLandRight
- UIView
-
-
-
- IBProjectSource
- ./Classes/VideoViewController.h
-
-
-
-
- 0
- IBIPadFramework
- YES
- 3
-
- {108, 60}
- {62, 54}
-
- 933
-
-
diff --git a/Classes/VideoViewController.h b/Classes/VideoViewController.h
deleted file mode 100644
index 7f4db8d17..000000000
--- a/Classes/VideoViewController.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* VideoViewController.h
- *
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#import
-#import "UILinphone.h"
-
-@interface VideoViewController : UIViewController {
- UIView* mPortrait;
- UIView* mDisplay;
- UIView* mPreview;
- UIMuteButton* mMute;
- UIHangUpButton* mHangUp;
- UICamSwitch* mCamSwitch;
-
- UIView* mLandscapeRight;
- UIView* mDisplayLandRight;
- UIView* mPreviewLandRight;
- UIMuteButton* mMuteLandRight;
- UIHangUpButton* mHangUpLandRight;
- UICamSwitch* mCamSwitchLandRight;
-
- UIView* mLandscapeLeft;
- UIView* mDisplayLandLeft;
- UIView* mPreviewLandLeft;
- UIMuteButton* mMuteLandLeft;
- UIHangUpButton* mHangUpLandLeft;
- UICamSwitch* mCamSwitchLandLeft;
- BOOL isFirst;
- int maxCall;
-
-}
-
-@property (nonatomic, retain) IBOutlet UIView* mPortrait;
-@property (nonatomic, retain) IBOutlet UIView* mDisplay;
-@property (nonatomic, retain) IBOutlet UIView* mPreview;
-@property (nonatomic, retain) IBOutlet UIMuteButton* mMute;
-@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUp;
-@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitch;
-@property (nonatomic, retain) IBOutlet UIImageView *mCallQuality;
-
-@property (nonatomic, retain) IBOutlet UIView* mLandscapeRight;
-@property (nonatomic, retain) IBOutlet UIView* mDisplayLandRight;
-@property (nonatomic, retain) IBOutlet UIView* mPreviewLandRight;
-@property (nonatomic, retain) IBOutlet UIMuteButton* mMuteLandRight;
-@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUpLandRight;
-@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitchLandRight;
-@property (nonatomic, retain) IBOutlet UIImageView *mCallQualityLandRight;
-
-@property (nonatomic, retain) IBOutlet UIView* mLandscapeLeft;
-@property (nonatomic, retain) IBOutlet UIView* mDisplayLandLeft;
-@property (nonatomic, retain) IBOutlet UIView* mPreviewLandLeft;
-@property (nonatomic, retain) IBOutlet UIMuteButton* mMuteLandLeft;
-@property (nonatomic, retain) IBOutlet UIHangUpButton* mHangUpLandLeft;
-@property (nonatomic, retain) IBOutlet UICamSwitch* mCamSwitchLandLeft;
-@property (retain, nonatomic) IBOutlet UIImageView *mCallQualityLandLeft;
-
-- (void) updateCallQualityIndicator;
-
-@end
\ No newline at end of file
diff --git a/Classes/VideoViewController.m b/Classes/VideoViewController.m
deleted file mode 100644
index 6158c8392..000000000
--- a/Classes/VideoViewController.m
+++ /dev/null
@@ -1,230 +0,0 @@
-/* VideoViewController.m
- *
- * Copyright (C) 2011 Belledonne Comunications, Grenoble, France
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#import "VideoViewController.h"
-#import "LinphoneManager.h"
-#import
-
-@implementation VideoViewController
-@synthesize mPortrait;
-@synthesize mDisplay;
-@synthesize mPreview;
-@synthesize mMute;
-@synthesize mHangUp;
-@synthesize mCamSwitch;
-@synthesize mCallQuality;
-
-@synthesize mLandscapeRight;
-@synthesize mDisplayLandRight;
-@synthesize mPreviewLandRight;
-@synthesize mMuteLandRight;
-@synthesize mHangUpLandRight;
-@synthesize mCamSwitchLandRight;
-@synthesize mCallQualityLandRight;
-
-@synthesize mLandscapeLeft;
-@synthesize mDisplayLandLeft;
-@synthesize mPreviewLandLeft;
-@synthesize mMuteLandLeft;
-@synthesize mHangUpLandLeft;
-@synthesize mCamSwitchLandLeft;
-@synthesize mCallQualityLandLeft;
-
-NSTimer *callQualityRefresher;
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
-{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
-}
-
-- (void)dealloc
-{
- [mCallQuality release];
- [mCallQualityLandRight release];
- [mCallQualityLandLeft release];
- [super dealloc];
-}
-
-- (void)didReceiveMemoryWarning
-{
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-#pragma mark - View lifecycle
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
- [mMute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE button"];
- [mMuteLandRight initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE2 button"];
- [mMuteLandLeft initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] debugName:"MUTE3 button"];
- [mCamSwitch setPreview:mPreview];
- [mCamSwitchLandRight setPreview:mPreviewLandRight];
- [mCamSwitchLandLeft setPreview:mPreviewLandLeft];
-
- isFirst=TRUE;
-}
-
-- (void) updateCallQualityIndicator
-{
- LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
- if (!call)
- return;
-
- if (linphone_call_get_average_quality(call) >= 4) {
- [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_4.png"]];
- [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_4.png"]];
- [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_4.png"]];
- }
- else if (linphone_call_get_average_quality(call) >= 3) {
- [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_3.png"]];
- [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_3.png"]];
- [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_3.png"]];
- }
- else if (linphone_call_get_average_quality(call) >= 2) {
- [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_2.png"]];
- [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_2.png"]];
- [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_2.png"]];
- }
- else if (linphone_call_get_average_quality(call) >= 1) {
- [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_1.png"]];
- [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_1.png"]];
- [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_1.png"]];
- }
- else {
- [mCallQuality setImage: [UIImage imageNamed:@"stat_sys_signal_0.png"]];
- [mCallQualityLandRight setImage: [UIImage imageNamed:@"stat_sys_signal_0.png"]];
- [mCallQualityLandLeft setImage: [UIImage imageNamed:@"stat_sys_signal_0.png"]];
- }
-}
-
-
--(void) configureOrientation:(UIInterfaceOrientation) oritentation {
- int oldLinphoneOrientation = linphone_core_get_device_rotation([LinphoneManager getLc]);
- if (oritentation == UIInterfaceOrientationPortrait ) {
- [self.view addSubview:mPortrait];
- linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplay);
- linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreview);
- linphone_core_set_device_rotation([LinphoneManager getLc], 0);
-
- } else if (oritentation == UIInterfaceOrientationLandscapeRight ) {
- [self.view addSubview:mLandscapeRight];
- linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplayLandRight);
- linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreviewLandRight);
- linphone_core_set_device_rotation([LinphoneManager getLc], 270);
-
- } else if (oritentation == UIInterfaceOrientationLandscapeLeft ) {
- [self.view addSubview:mLandscapeLeft];
- linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplayLandLeft);
- linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreviewLandLeft);
- linphone_core_set_device_rotation([LinphoneManager getLc], 90);
- }
- if ((oldLinphoneOrientation != linphone_core_get_device_rotation([LinphoneManager getLc]))
- && linphone_core_get_current_call([LinphoneManager getLc])) {
- //Orientation has change, must call update call
- linphone_core_update_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), NULL);
- }
-}
-
--(void) configureOrientation {
- [self configureOrientation:self.interfaceOrientation];
-}
-
-- (void)viewDidUnload
-{
- [mCallQuality release];
- mCallQuality = nil;
- [self setMCallQualityLandRight:nil];
- [self setMCallQualityLandLeft:nil];
- [super viewDidUnload];
-
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-
--(void) viewDidDisappear:(BOOL)animated{
- [super viewDidDisappear:animated];
- [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
- linphone_core_set_max_calls([LinphoneManager getLc], maxCall);
-
- if (callQualityRefresher != nil) {
- [callQualityRefresher invalidate];
- callQualityRefresher=nil;
- }
-}
-
--(void) viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-
- //redirect audio to speaker
- UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
- AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
- , sizeof (audioRouteOverride)
- , &audioRouteOverride);
-
-
- [self performSelectorOnMainThread:@selector(configureOrientation)
- withObject:nil
- waitUntilDone:YES];
- [mMute reset];
- [mMuteLandRight reset];
- [mMuteLandLeft reset];
- maxCall = linphone_core_get_max_calls([LinphoneManager getLc]);
- linphone_core_set_max_calls([LinphoneManager getLc], 1);
-}
-
-- (void) viewDidAppear:(BOOL)animated{
- [super viewDidAppear:animated];
- [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
-
- callQualityRefresher = [NSTimer scheduledTimerWithTimeInterval:1
- target:self
- selector:@selector(updateCallQualityIndicator)
- userInfo:nil
- repeats:YES];
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- BOOL result = interfaceOrientation == UIInterfaceOrientationPortrait
- || interfaceOrientation == UIInterfaceOrientationLandscapeRight
- || interfaceOrientation == UIInterfaceOrientationLandscapeLeft;
-
- return result;
-}
-
-- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
- [self configureOrientation:self.interfaceOrientation];
- [mMute reset];
- [mMuteLandRight reset];
- [mMuteLandLeft reset];
-}
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
- [mLandscapeLeft removeFromSuperview];
- [mLandscapeRight removeFromSuperview];
- [mPortrait removeFromSuperview];
-}
-@end
diff --git a/Classes/VideoViewController.xib b/Classes/VideoViewController.xib
deleted file mode 100644
index f7c680281..000000000
--- a/Classes/VideoViewController.xib
+++ /dev/null
@@ -1,919 +0,0 @@
-
-
-
- 1280
- 11C74
- 1938
- 1138.23
- 567.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 933
-
-
- YES
- IBUIButton
- IBUIImageView
- IBUIView
- IBProxyObject
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
- YES
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
-
- 292
- {320, 460}
-
-
- 1
- MCAwIDAAA
-
- IBCocoaTouchFramework
-
-
-
- 274
-
- YES
-
-
- 274
- {320, 420}
-
-
- 1
- NO
- IBCocoaTouchFramework
-
-
-
- 292
- {{1, 418}, {108, 62}}
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
- 3
- MQA
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
- 3
- MC41AA
-
-
- NSImage
- clavier-01-108px.png
-
-
- Helvetica-Bold
- Helvetica
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
-
- 292
- {{106, 418}, {106, 63}}
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
- NSImage
- stopcall-red.png
-
-
-
-
-
-
-
- 292
- {{211, 418}, {108, 62}}
-
- NO
- IBCocoaTouchFramework
- 0
- 0
- 1
- switch
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 292
- {{233, 309}, {80, 106}}
-
-
-
- 3
- MQA
-
- 2
-
-
- IBCocoaTouchFramework
-
-
-
- 292
- {{6, 387}, {28, 28}}
-
-
- _NS:567
- NO
- IBCocoaTouchFramework
-
-
- {320, 480}
-
-
-
- 3
- MC42NjY2NjY2NjY3AA
-
- IBCocoaTouchFramework
-
-
-
- 292
-
- YES
-
-
- 274
- {420, 320}
-
-
-
- 3
- MQA
-
-
- IBCocoaTouchFramework
-
-
-
- 292
- {{420, 0}, {60, 108}}
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
- NSImage
- micro.png
-
-
- NSImage
- clavier-01-106px.png
-
-
-
-
-
-
- 292
- {{420, 107}, {60, 106}}
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
-
- 292
- {{420, 212}, {60, 108}}
-
- NO
- IBCocoaTouchFramework
- 0
- 0
- Switch
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 274
- {{308, 233}, {106, 80}}
-
-
-
- 3
- MQA
-
-
- IBCocoaTouchFramework
-
-
-
- 292
- {{8, 285}, {28, 28}}
-
-
- _NS:567
- NO
- IBCocoaTouchFramework
-
-
- {480, 320}
-
-
-
- 3
- MQA
-
-
-
- 3
- 3
-
- IBCocoaTouchFramework
-
-
-
- 292
-
- YES
-
-
- 274
-
- YES
-
-
- 292
- {{8, 285}, {28, 28}}
-
-
- _NS:567
- NO
- IBCocoaTouchFramework
-
-
- {{60, 0}, {420, 320}}
-
-
-
- 3
- MQA
-
-
- IBCocoaTouchFramework
-
-
-
- 292
- {60, 108}
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
-
- 292
- {{0, 107}, {60, 106}}
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
-
- 292
- {{0, 212}, {60, 108}}
-
-
- NO
- IBCocoaTouchFramework
- 0
- 0
- Switch
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
-
-
-
-
-
- 274
- {{360, 233}, {106, 80}}
-
-
- 3
- MQA
-
-
- IBCocoaTouchFramework
-
-
- {480, 320}
-
-
-
- 3
- MQA
-
-
-
- 3
- 3
-
- IBCocoaTouchFramework
-
-
-
-
- YES
-
-
- mDisplay
-
-
-
- 10
-
-
-
- mPreview
-
-
-
- 11
-
-
-
- mCamSwitch
-
-
-
- 12
-
-
-
- mMute
-
-
-
- 13
-
-
-
- mPortrait
-
-
-
- 21
-
-
-
- mHangUp
-
-
-
- 26
-
-
-
- view
-
-
-
- 32
-
-
-
- mMuteLandRight
-
-
-
- 40
-
-
-
- mHangUpLandRight
-
-
-
- 41
-
-
-
- mCamSwitchLandRight
-
-
-
- 42
-
-
-
- mLandscapeRight
-
-
-
- 43
-
-
-
- mPreviewLandRight
-
-
-
- 45
-
-
-
- mMuteLandLeft
-
-
-
- 47
-
-
-
- mHangUpLandLeft
-
-
-
- 48
-
-
-
- mCamSwitchLandLeft
-
-
-
- 49
-
-
-
- mPreviewLandLeft
-
-
-
- 50
-
-
-
- mLandscapeLeft
-
-
-
- 51
-
-
-
- mCallQuality
-
-
-
- 54
-
-
-
- mDisplayLandRight
-
-
-
- 44
-
-
-
- mCallQualityLandRight
-
-
-
- 58
-
-
-
- mDisplayLandLeft
-
-
-
- 46
-
-
-
- mCallQualityLandLeft
-
-
-
- 60
-
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- -1
-
-
- File's Owner
-
-
- -2
-
-
-
-
- 31
-
-
- YES
-
-
- root
-
-
- 1
-
-
- YES
-
-
-
-
-
-
-
-
- portrait
-
-
- 5
-
-
- display
-
-
- 9
-
-
- YES
-
-
- preview
-
-
- 6
-
-
-
-
- 7
-
-
- Hang Up Button
-
-
- 8
-
-
-
-
- 14
-
-
- YES
-
-
-
-
-
-
-
-
- landscape-right
-
-
- 19
-
-
- Cam Switch
-
-
- 18
-
-
- HangHup
-
-
- 17
-
-
- Mute
-
-
- 16
-
-
- preview
-
-
- 34
-
-
- YES
-
-
-
-
-
-
-
- landscape-left
-
-
- 35
-
-
- YES
-
-
- preview
-
-
- 36
-
-
- Cam Switch
-
-
- 37
-
-
- HangHup
-
-
- 38
-
-
- Mute
-
-
- 52
-
-
-
-
- 56
-
-
-
-
- 15
-
-
- display
-
-
- 39
-
-
- YES
-
-
-
- display
-
-
- 59
-
-
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -1.IBPluginDependency
- -2.CustomClassName
- -2.IBPluginDependency
- 1.IBPluginDependency
- 14.IBPluginDependency
- 15.IBPluginDependency
- 16.IBPluginDependency
- 17.CustomClassName
- 17.IBPluginDependency
- 18.CustomClassName
- 18.IBPluginDependency
- 19.CustomClassName
- 19.IBPluginDependency
- 31.IBPluginDependency
- 34.IBPluginDependency
- 35.IBPluginDependency
- 36.CustomClassName
- 36.IBPluginDependency
- 37.CustomClassName
- 37.IBPluginDependency
- 38.CustomClassName
- 38.IBPluginDependency
- 39.IBPluginDependency
- 5.IBPluginDependency
- 52.IBPluginDependency
- 56.IBPluginDependency
- 59.IBPluginDependency
- 6.CustomClassName
- 6.IBPluginDependency
- 7.CustomClassName
- 7.IBPluginDependency
- 8.CustomClassName
- 8.IBPluginDependency
- 9.IBPluginDependency
-
-
- YES
- VideoViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIMuteButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIHangUpButton
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UICamSwitch
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
-
-
-
-
- YES
-
-
-
-
- 60
-
-
- 0
- IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
-
-
- YES
- 3
-
- YES
-
- YES
- clavier-01-106px.png
- clavier-01-108px.png
- micro.png
- stopcall-red.png
-
-
- YES
- {106, 60}
- {108, 60}
- {107, 67}
- {62, 54}
-
-
- 933
-
-
diff --git a/PhoneMainView.xib b/PhoneMainView.xib
deleted file mode 100644
index 2dcf7a820..000000000
--- a/PhoneMainView.xib
+++ /dev/null
@@ -1,790 +0,0 @@
-
-
-
- 784
- 11E53
- 2549
- 1138.47
- 569.00
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1498
-
-
- YES
- IBProxyObject
- IBUICustomObject
- IBUITabBar
- IBUITabBarController
- IBUITabBarItem
- IBUIViewController
- IBUIWindow
-
-
- YES
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
- PluginDependencyRecalculationVersion
-
-
-
- YES
-
- IBFilesOwner
- IBCocoaTouchFramework
-
-
- IBFirstResponder
- IBCocoaTouchFramework
-
-
- IBCocoaTouchFramework
-
-
-
- 1316
-
- {320, 480}
-
-
-
- 1
- MSAxIDEAA
-
- NO
- NO
-
- IBCocoaTouchFramework
-
-
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
- History
-
- History
-
- NSImage
- history-orange.png
-
- IBCocoaTouchFramework
-
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
- YES
-
-
-
- Dialer
-
- NSImage
- dialer-orange.png
-
- IBCocoaTouchFramework
-
-
- PhoneViewController
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
- IBCocoaTouchFramework
- 5
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
-
- IBCocoaTouchFramework
- 0
-
-
-
-
- 1
- 1
-
- IBCocoaTouchFramework
- NO
-
-
-
-
- 266
- {{0, 431}, {320, 49}}
-
- 3
- MCAwAA
-
- NO
- IBCocoaTouchFramework
-
-
-
-
-
- YES
-
-
- delegate
-
-
-
- 6
-
-
-
- window
-
-
-
- 7
-
-
-
- myTabBarController
-
-
-
- 14
-
-
-
-
- YES
-
- 0
-
- YES
-
-
-
-
-
- 2
-
-
-
-
- -1
-
-
- File's Owner
-
-
- 4
-
-
- linphoneAppDelegate
-
-
- -2
-
-
-
-
- 8
-
-
- YES
-
-
-
-
-
-
-
-
-
- 9
-
-
-
-
- 11
-
-
- YES
-
-
-
- Contacts
-
-
- 12
-
-
-
-
- 38
-
-
- YES
-
-
-
- dialer
-
-
- 39
-
-
-
-
- 41
-
-
- YES
-
-
-
- history
-
-
- 42
-
-
-
-
- 43
-
-
- YES
-
-
-
- more
-
-
- 44
-
-
-
-
-
-
- YES
-
- YES
- -1.CustomClassName
- -1.IBPluginDependency
- -2.CustomClassName
- -2.IBPluginDependency
- 11.IBPluginDependency
- 12.IBPluginDependency
- 2.IBAttributePlaceholdersKey
- 2.IBPluginDependency
- 38.CustomClassName
- 38.IBPluginDependency
- 39.IBPluginDependency
- 4.CustomClassName
- 4.IBPluginDependency
- 41.CustomClassName
- 41.IBPluginDependency
- 42.IBPluginDependency
- 43.CustomClassName
- 43.IBPluginDependency
- 44.IBPluginDependency
- 8.IBPluginDependency
- 9.IBPluginDependency
-
-
- YES
- UIApplication
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- UIResponder
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- YES
-
-
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- PhoneViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- linphoneAppDelegate
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- CallHistoryTableViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- MoreViewController
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
-
-
- YES
-
-
-
-
-
- YES
-
-
-
-
- 48
-
-
-
- YES
-
- ABPeoplePickerNavigationController
- UINavigationController
-
- IBProjectSource
- ./Classes/ABPeoplePickerNavigationController.h
-
-
-
- CallHistoryTableViewController
- GenericTabViewController
-
- clear
- UIButton
-
-
- clear
-
- clear
- UIButton
-
-
-
- IBProjectSource
- ./Classes/CallHistoryTableViewController.h
-
-
-
- GenericTabViewController
- UITableViewController
-
- header
- UIView
-
-
- header
-
- header
- UIView
-
-
-
- IBProjectSource
- ./Classes/GenericTabViewController.h
-
-
-
- MainScreenWithVideoPreview
- UIViewController
-
- YES
-
- YES
- phoneMainView
- window
-
-
- YES
- PhoneViewController
- UIWindow
-
-
-
- YES
-
- YES
- phoneMainView
- window
-
-
- YES
-
- phoneMainView
- PhoneViewController
-
-
- window
- UIWindow
-
-
-
-
- IBProjectSource
- ./Classes/MainScreenWithVideoPreview.h
-
-
-
- MoreViewController
- UITableViewController
-
- YES
-
- YES
- console
- credit
- creditText
- web
- weburi
-
-
- YES
- UITableViewCell
- UITableViewCell
- UITextView
- UITableViewCell
- UILabel
-
-
-
- YES
-
- YES
- console
- credit
- creditText
- web
- weburi
-
-
- YES
-
- console
- UITableViewCell
-
-
- credit
- UITableViewCell
-
-
- creditText
- UITextView
-
-
- web
- UITableViewCell
-
-
- weburi
- UILabel
-
-
-
-
- IBProjectSource
- ./Classes/MoreViewController.h
-
-
-
- PhoneViewController
- UIViewController
-
- YES
-
- YES
- address
- backToCallView
- callLarge
- callShort
- dialerView
- eight
- erase
- five
- four
- hash
- mMainScreenWithVideoPreview
- myTabBarController
- nine
- one
- seven
- six
- star
- status
- statusViewHolder
- switchCamera
- three
- two
- zero
-
-
- YES
- UITextField
- UIButton
- UIButton
- UIButton
- UIView
- UIButton
- UIEraseButton
- UIButton
- UIButton
- UIButton
- MainScreenWithVideoPreview
- UITabBarController
- UIButton
- UIButton
- UIButton
- UIButton
- UIButton
- UILabel
- UIView
- UIButton
- UIButton
- UIButton
- UIButton
-
-
-
- YES
-
- YES
- address
- backToCallView
- callLarge
- callShort
- dialerView
- eight
- erase
- five
- four
- hash
- mMainScreenWithVideoPreview
- myTabBarController
- nine
- one
- seven
- six
- star
- status
- statusViewHolder
- switchCamera
- three
- two
- zero
-
-
- YES
-
- address
- UITextField
-
-
- backToCallView
- UIButton
-
-
- callLarge
- UIButton
-
-
- callShort
- UIButton
-
-
- dialerView
- UIView
-
-
- eight
- UIButton
-
-
- erase
- UIEraseButton
-
-
- five
- UIButton
-
-
- four
- UIButton
-
-
- hash
- UIButton
-
-
- mMainScreenWithVideoPreview
- MainScreenWithVideoPreview
-
-
- myTabBarController
- UITabBarController
-
-
- nine
- UIButton
-
-
- one
- UIButton
-
-
- seven
- UIButton
-
-
- six
- UIButton
-
-
- star
- UIButton
-
-
- status
- UILabel
-
-
- statusViewHolder
- UIView
-
-
- switchCamera
- UIButton
-
-
- three
- UIButton
-
-
- two
- UIButton
-
-
- zero
- UIButton
-
-
-
-
- IBProjectSource
- ./Classes/PhoneViewController.h
-
-
-
- UIEraseButton
- UIButton
-
- IBProjectSource
- ./Classes/UIEraseButton.h
-
-
-
- linphoneAppDelegate
- NSObject
-
- YES
-
- YES
- myPeoplePickerController
- myPhoneViewController
- myTabBarController
- window
-
-
- YES
- ABPeoplePickerNavigationController
- PhoneViewController
- UITabBarController
- UIWindow
-
-
-
- YES
-
- YES
- myPeoplePickerController
- myPhoneViewController
- myTabBarController
- window
-
-
- YES
-
- myPeoplePickerController
- ABPeoplePickerNavigationController
-
-
- myPhoneViewController
- PhoneViewController
-
-
- myTabBarController
- UITabBarController
-
-
- window
- UIWindow
-
-
-
-
- IBProjectSource
- ./Classes/linphoneAppDelegate.h
-
-
-
-
- 0
- IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
-
-
- YES
- 3
-
- YES
-
- YES
- dialer-orange.png
- history-orange.png
-
-
- YES
- {25, 24}
- {25, 23}
-
-
- 1498
-
-
diff --git a/Resources/App_Apple_Icon_DES_29.png b/Resources/App_Apple_Icon_DES_29.png
deleted file mode 100644
index 86a328afc..000000000
Binary files a/Resources/App_Apple_Icon_DES_29.png and /dev/null differ
diff --git a/Resources/App_Apple_Icon_DES_50.png b/Resources/App_Apple_Icon_DES_50.png
deleted file mode 100644
index ad06b8163..000000000
Binary files a/Resources/App_Apple_Icon_DES_50.png and /dev/null differ
diff --git a/Resources/HP.png b/Resources/HP.png
deleted file mode 100755
index b3527b782..000000000
Binary files a/Resources/HP.png and /dev/null differ
diff --git a/Resources/HP_inverse.png b/Resources/HP_inverse.png
deleted file mode 100755
index 983f799de..000000000
Binary files a/Resources/HP_inverse.png and /dev/null differ
diff --git a/Resources/ajouter.png b/Resources/ajouter.png
deleted file mode 100755
index 22127c463..000000000
Binary files a/Resources/ajouter.png and /dev/null differ
diff --git a/Resources/160/bj_barcode.png b/Resources/bj_barcode.png
similarity index 100%
rename from Resources/160/bj_barcode.png
rename to Resources/bj_barcode.png
diff --git a/Resources/160/bj_decline.png b/Resources/bj_decline.png
similarity index 100%
rename from Resources/160/bj_decline.png
rename to Resources/bj_decline.png
diff --git a/Resources/160/bj_door.png b/Resources/bj_door.png
similarity index 100%
rename from Resources/160/bj_door.png
rename to Resources/bj_door.png
diff --git a/Resources/160/bj_door_hl.png b/Resources/bj_door_hl.png
similarity index 100%
rename from Resources/160/bj_door_hl.png
rename to Resources/bj_door_hl.png
diff --git a/Resources/160/bj_end_call.png b/Resources/bj_end_call.png
similarity index 100%
rename from Resources/160/bj_end_call.png
rename to Resources/bj_end_call.png
diff --git a/Resources/160/bj_light.png b/Resources/bj_light.png
similarity index 100%
rename from Resources/160/bj_light.png
rename to Resources/bj_light.png
diff --git a/Resources/160/bj_light_hl.png b/Resources/bj_light_hl.png
similarity index 100%
rename from Resources/160/bj_light_hl.png
rename to Resources/bj_light_hl.png
diff --git a/Resources/160/bj_mute_off.png b/Resources/bj_mute_off.png
similarity index 100%
rename from Resources/160/bj_mute_off.png
rename to Resources/bj_mute_off.png
diff --git a/Resources/160/bj_mute_on.png b/Resources/bj_mute_on.png
similarity index 100%
rename from Resources/160/bj_mute_on.png
rename to Resources/bj_mute_on.png
diff --git a/Resources/160/bj_settings.png b/Resources/bj_settings.png
similarity index 100%
rename from Resources/160/bj_settings.png
rename to Resources/bj_settings.png
diff --git a/Resources/160/bj_start_call.png b/Resources/bj_start_call.png
similarity index 100%
rename from Resources/160/bj_start_call.png
rename to Resources/bj_start_call.png
diff --git a/Resources/App_Apple_Icon_DES_512.png b/Resources/buschjaeger_icon_512.png
similarity index 100%
rename from Resources/App_Apple_Icon_DES_512.png
rename to Resources/buschjaeger_icon_512.png
diff --git a/Resources/App_Apple_Icon_DES_57.png b/Resources/buschjaeger_icon_57.png
similarity index 100%
rename from Resources/App_Apple_Icon_DES_57.png
rename to Resources/buschjaeger_icon_57.png
diff --git a/Resources/App_Apple_Icon_DES_114.png b/Resources/buschjaeger_icon_57@2x.png
similarity index 100%
rename from Resources/App_Apple_Icon_DES_114.png
rename to Resources/buschjaeger_icon_57@2x.png
diff --git a/Resources/App_Apple_Icon_DES_72.png b/Resources/buschjaeger_icon_72.png
similarity index 100%
rename from Resources/App_Apple_Icon_DES_72.png
rename to Resources/buschjaeger_icon_72.png
diff --git a/Resources/buschjaeger_icon_72@2x.png b/Resources/buschjaeger_icon_72@2x.png
new file mode 100644
index 000000000..b6d44dcf9
Binary files /dev/null and b/Resources/buschjaeger_icon_72@2x.png differ
diff --git a/Resources/clavier-01-106px.png b/Resources/clavier-01-106px.png
deleted file mode 100644
index d3ca4b813..000000000
Binary files a/Resources/clavier-01-106px.png and /dev/null differ
diff --git a/Resources/clavier-01-108px.png b/Resources/clavier-01-108px.png
deleted file mode 100644
index 9c84cb3dd..000000000
Binary files a/Resources/clavier-01-108px.png and /dev/null differ
diff --git a/Resources/clavier-01-160px.png b/Resources/clavier-01-160px.png
deleted file mode 100644
index e30025f84..000000000
Binary files a/Resources/clavier-01-160px.png and /dev/null differ
diff --git a/Resources/clavier.png b/Resources/clavier.png
deleted file mode 100755
index df1026b65..000000000
Binary files a/Resources/clavier.png and /dev/null differ
diff --git a/Resources/contact.png b/Resources/contact.png
deleted file mode 100755
index 32a5aee96..000000000
Binary files a/Resources/contact.png and /dev/null differ
diff --git a/Resources/contact_vide.png b/Resources/contact_vide.png
deleted file mode 100755
index dda753a32..000000000
Binary files a/Resources/contact_vide.png and /dev/null differ
diff --git a/Resources/effacer.png b/Resources/effacer.png
deleted file mode 100755
index eee5833b3..000000000
Binary files a/Resources/effacer.png and /dev/null differ
diff --git a/Resources/grouper.png b/Resources/grouper.png
deleted file mode 100755
index 6ca595e43..000000000
Binary files a/Resources/grouper.png and /dev/null differ
diff --git a/Resources/icone-linphone-57.png b/Resources/icone-linphone-57.png
deleted file mode 100644
index 7b6283ab0..000000000
Binary files a/Resources/icone-linphone-57.png and /dev/null differ
diff --git a/Resources/icone-linphone-72.png b/Resources/icone-linphone-72.png
deleted file mode 100644
index 1fb83d1e4..000000000
Binary files a/Resources/icone-linphone-72.png and /dev/null differ
diff --git a/Resources/in_call.png b/Resources/in_call.png
deleted file mode 100644
index 1e20bac2b..000000000
Binary files a/Resources/in_call.png and /dev/null differ
diff --git a/Resources/in_call_video.png b/Resources/in_call_video.png
deleted file mode 100644
index 87fcb5b64..000000000
Binary files a/Resources/in_call_video.png and /dev/null differ
diff --git a/Resources/micro.png b/Resources/micro.png
deleted file mode 100755
index 1eee9ceef..000000000
Binary files a/Resources/micro.png and /dev/null differ
diff --git a/Resources/micro_inverse.png b/Resources/micro_inverse.png
deleted file mode 100755
index b4cd9f588..000000000
Binary files a/Resources/micro_inverse.png and /dev/null differ
diff --git a/Resources/missed_call.png b/Resources/missed_call.png
deleted file mode 100644
index 58d745612..000000000
Binary files a/Resources/missed_call.png and /dev/null differ
diff --git a/Resources/out_call.png b/Resources/out_call.png
deleted file mode 100644
index 3077fdb08..000000000
Binary files a/Resources/out_call.png and /dev/null differ
diff --git a/Resources/out_call_video.png b/Resources/out_call_video.png
deleted file mode 100644
index fb6447f8e..000000000
Binary files a/Resources/out_call_video.png and /dev/null differ
diff --git a/Resources/pause.png b/Resources/pause.png
deleted file mode 100755
index 4875f41c2..000000000
Binary files a/Resources/pause.png and /dev/null differ
diff --git a/Resources/pause_inactif.png b/Resources/pause_inactif.png
deleted file mode 100755
index c43d5fbce..000000000
Binary files a/Resources/pause_inactif.png and /dev/null differ
diff --git a/Resources/secured.png b/Resources/secured.png
deleted file mode 100644
index 61042339f..000000000
Binary files a/Resources/secured.png and /dev/null differ
diff --git a/Resources/startcall-gray.png b/Resources/startcall-gray.png
deleted file mode 100644
index 360e7baa0..000000000
Binary files a/Resources/startcall-gray.png and /dev/null differ
diff --git a/Resources/stat_sys_signal_0.png b/Resources/stat_sys_signal_0.png
deleted file mode 100644
index 0b7a04f44..000000000
Binary files a/Resources/stat_sys_signal_0.png and /dev/null differ
diff --git a/Resources/stat_sys_signal_1.png b/Resources/stat_sys_signal_1.png
deleted file mode 100644
index 5376e9258..000000000
Binary files a/Resources/stat_sys_signal_1.png and /dev/null differ
diff --git a/Resources/stat_sys_signal_2.png b/Resources/stat_sys_signal_2.png
deleted file mode 100644
index fd543636c..000000000
Binary files a/Resources/stat_sys_signal_2.png and /dev/null differ
diff --git a/Resources/stat_sys_signal_3.png b/Resources/stat_sys_signal_3.png
deleted file mode 100644
index 6c4873af3..000000000
Binary files a/Resources/stat_sys_signal_3.png and /dev/null differ
diff --git a/Resources/stat_sys_signal_4.png b/Resources/stat_sys_signal_4.png
deleted file mode 100644
index a3320cbb4..000000000
Binary files a/Resources/stat_sys_signal_4.png and /dev/null differ
diff --git a/Resources/status_gray.png b/Resources/status_gray.png
deleted file mode 100644
index b4f871f3e..000000000
Binary files a/Resources/status_gray.png and /dev/null differ
diff --git a/Resources/status_green.png b/Resources/status_green.png
deleted file mode 100644
index 1a39a4242..000000000
Binary files a/Resources/status_green.png and /dev/null differ
diff --git a/Resources/status_orange.png b/Resources/status_orange.png
deleted file mode 100644
index f2e66d34d..000000000
Binary files a/Resources/status_orange.png and /dev/null differ
diff --git a/Resources/status_red.png b/Resources/status_red.png
deleted file mode 100644
index e7a0ec98a..000000000
Binary files a/Resources/status_red.png and /dev/null differ
diff --git a/Resources/unverified.png b/Resources/unverified.png
deleted file mode 100644
index f824d40c4..000000000
Binary files a/Resources/unverified.png and /dev/null differ
diff --git a/Settings.bundle/Root.plist b/Settings.bundle/Root.plist
index eccf4c035..10aefb6e0 100644
--- a/Settings.bundle/Root.plist
+++ b/Settings.bundle/Root.plist
@@ -10,7 +10,7 @@
Type
PSGroupSpecifier
FooterText
- Linphone must be restarted for changes to take effect
+ Welcome must be restarted for changes to take effect
AutocapitalizationType
@@ -98,7 +98,7 @@
KeyboardType
NumbersAndPunctuation
-
+
Key
stun_preference
Title
diff --git a/linphone-Info.plist b/buschjaeger-Info.plist
similarity index 63%
rename from linphone-Info.plist
rename to buschjaeger-Info.plist
index 65819a66a..05a3e8766 100644
--- a/linphone-Info.plist
+++ b/buschjaeger-Info.plist
@@ -9,13 +9,31 @@
CFBundleExecutable
${EXECUTABLE_NAME}
CFBundleIconFile
-
+ buschjaeger_icon_57.png
CFBundleIconFiles
- App_Apple_Icon_DES_57.png
- App_Apple_Icon_DES_114.png
- App_Apple_Icon_DES_72.png
+ buschjaeger_icon_57.png
+ buschjaeger_icon_114.png
+ buschjaeger_icon_72.png
+ buschjaeger_icon_144.png
+ buschjaeger_icon_57@2x.png
+ buschjaeger_icon_72@2x.png
+ CFBundleIcons
+
+ CFBundlePrimaryIcon
+
+ CFBundleIconFiles
+
+ buschjaeger_icon_57.png
+ buschjaeger_icon_114.png
+ buschjaeger_icon_72.png
+ buschjaeger_icon_144.png
+ buschjaeger_icon_57@2x.png
+ buschjaeger_icon_72@2x.png
+
+
+
CFBundleIdentifier
de.busch-jaeger.phone
CFBundleInfoDictionaryVersion
@@ -33,7 +51,7 @@
NSMainNibFile
BuschJaegerApp
NSMainNibFile~ipad
- BuschJaegerMainView-ipad
+ BuschJaegerApp
UIApplicationExitsOnSuspend
UIBackgroundModes
@@ -41,8 +59,6 @@
voip
audio
- UIPrerenderedIcon
-
UIRequiredDeviceCapabilities
wifi
diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj
index d70ea59f9..cdf3ba110 100755
--- a/linphone.xcodeproj/project.pbxproj
+++ b/linphone.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 1D3623260D0F684500981E51 /* LinphoneAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* LinphoneAppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
@@ -16,14 +17,12 @@
220FAD3710765B400068D98F /* libosipparser2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2E10765B400068D98F /* libosipparser2.a */; };
220FAD3810765B400068D98F /* libspeex.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2F10765B400068D98F /* libspeex.a */; };
220FAD3910765B400068D98F /* libspeexdsp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD3010765B400068D98F /* libspeexdsp.a */; };
- 2211DB95147564B400DEE054 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2211DB94147564B400DEE054 /* Settings.bundle */; };
2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBB14769C8200DEE054 /* CallDelegate.m */; };
2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2211DBBB14769C8200DEE054 /* CallDelegate.m */; };
2214783D1386A2030020F8B8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2214783B1386A2030020F8B8 /* Localizable.strings */; };
2214EB7A12F846B1002A5394 /* UICallButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB7912F846B1002A5394 /* UICallButton.m */; };
2214EB8912F84EBB002A5394 /* UIHangUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB8812F84EBB002A5394 /* UIHangUpButton.m */; };
- 2214EBDA12F8558F002A5394 /* UIToggleButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EBD912F8558F002A5394 /* UIToggleButton.m */; };
- 2214EBF312F86360002A5394 /* UIMuteButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EBF212F86360002A5394 /* UIMuteButton.m */; };
+ 2214EBF312F86360002A5394 /* UIMicroButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EBF212F86360002A5394 /* UIMicroButton.m */; };
22276E8313C73D3100210156 /* libavcodec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22276E8013C73D3100210156 /* libavcodec.a */; };
22276E8413C73D3100210156 /* libavutil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22276E8113C73D3100210156 /* libavutil.a */; };
22276E8513C73D3100210156 /* libswscale.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22276E8213C73D3100210156 /* libswscale.a */; };
@@ -31,17 +30,12 @@
22276E8913C73DC000210156 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22276E8813C73DC000210156 /* CoreMedia.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
223148E41178A08200637D6A /* libilbc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 223148E31178A08200637D6A /* libilbc.a */; };
223148E61178A09900637D6A /* libmsilbc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 223148E51178A09900637D6A /* libmsilbc.a */; };
- 223963171393CFAF001DE689 /* FastAddressBook.m in Sources */ = {isa = PBXBuildFile; fileRef = 223963161393CFAF001DE689 /* FastAddressBook.m */; };
- 2242E313125235120061DDCE /* oldphone-mono-30s.caf in Resources */ = {isa = PBXBuildFile; fileRef = 2242E312125235120061DDCE /* oldphone-mono-30s.caf */; };
- 2245671D107699F700F10948 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2245671C107699F700F10948 /* Settings.bundle */; };
224567C2107B968500F10948 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224567C1107B968500F10948 /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
2248E90E12F7E4CF00220D9C /* UIDigitButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2248E90D12F7E4CF00220D9C /* UIDigitButton.m */; };
- 2248E99F12F801C200220D9C /* LinphoneManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2248E99E12F801C200220D9C /* LinphoneManager.m */; };
226183AD1472527D0037138E /* libSKP_SILK_SDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AA1472527D0037138E /* libSKP_SILK_SDK.a */; };
226183AE1472527D0037138E /* libsrtp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AB1472527D0037138E /* libsrtp.a */; };
226183B0147259670037138E /* libmssilk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AF147259670037138E /* libmssilk.a */; };
2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2264B6D111200342002C2C53 /* SystemConfiguration.framework */; };
- 226B563F13CAF1CD00921595 /* audio.plist in Resources */ = {isa = PBXBuildFile; fileRef = 226B563E13CAF1CD00921595 /* audio.plist */; };
226CDADF14E2D0B800513B67 /* libbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADD14E2D0B800513B67 /* libbcg729.a */; };
226CDAE014E2D0B800513B67 /* libmsbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADE14E2D0B800513B67 /* libmsbcg729.a */; };
226F2ED61344B0EF00F6EF27 /* libopencore-amrwb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */; };
@@ -51,9 +45,7 @@
2274402F106F335E006EC466 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2274402E106F335E006EC466 /* AudioToolbox.framework */; };
2274550810700509006EC466 /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 2274550710700509006EC466 /* linphonerc */; };
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 */; };
@@ -63,26 +55,15 @@
22BB1A69132FF16A005CD7AA /* UIEraseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22BB1A68132FF16A005CD7AA /* UIEraseButton.m */; };
22C755601317E59C007BC101 /* UIBluetoothButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */; };
22D1B68112A3E0BE001AE361 /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D1B68012A3E0BE001AE361 /* libresolv.dylib */; };
- 22D8F11F147548E2008C97DB /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 2274550710700509006EC466 /* linphonerc */; };
- 22D8F124147548E2008C97DB /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; };
- 22D8F139147548E2008C97DB /* oldphone-mono-30s.caf in Resources */ = {isa = PBXBuildFile; fileRef = 2242E312125235120061DDCE /* oldphone-mono-30s.caf */; };
- 22D8F13C147548E2008C97DB /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 228B19AE130290C500F154D3 /* iTunesArtwork */; };
- 22D8F13D147548E2008C97DB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2214783B1386A2030020F8B8 /* Localizable.strings */; };
- 22D8F140147548E2008C97DB /* audio.plist in Resources */ = {isa = PBXBuildFile; fileRef = 226B563E13CAF1CD00921595 /* audio.plist */; };
- 22D8F141147548E2008C97DB /* video.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22E1A9E713CAF4AA00219531 /* video.plist */; };
- 22D8F142147548E2008C97DB /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
22D8F144147548E2008C97DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 22D8F145147548E2008C97DB /* LinphoneAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* LinphoneAppDelegate.m */; };
22D8F14C147548E2008C97DB /* UIDigitButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2248E90D12F7E4CF00220D9C /* UIDigitButton.m */; };
- 22D8F14D147548E2008C97DB /* LinphoneManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2248E99E12F801C200220D9C /* LinphoneManager.m */; };
22D8F14E147548E2008C97DB /* UICallButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB7912F846B1002A5394 /* UICallButton.m */; };
22D8F14F147548E2008C97DB /* UIHangUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EB8812F84EBB002A5394 /* UIHangUpButton.m */; };
- 22D8F150147548E2008C97DB /* UIToggleButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EBD912F8558F002A5394 /* UIToggleButton.m */; };
- 22D8F151147548E2008C97DB /* UIMuteButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2214EBF212F86360002A5394 /* UIMuteButton.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 */; };
22D8F155147548E2008C97DB /* UIBluetoothButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */; };
22D8F156147548E2008C97DB /* UIEraseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22BB1A68132FF16A005CD7AA /* UIEraseButton.m */; };
- 22D8F157147548E2008C97DB /* FastAddressBook.m in Sources */ = {isa = PBXBuildFile; fileRef = 223963161393CFAF001DE689 /* FastAddressBook.m */; };
22D8F159147548E2008C97DB /* UICamSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 22AA8B0013D83F6300B30535 /* UICamSwitch.m */; };
22D8F15B147548E2008C97DB /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; };
22D8F15C147548E2008C97DB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E542F413E147EB002BA2C0 /* QuartzCore.framework */; };
@@ -116,80 +97,135 @@
22D8F17B147548E2008C97DB /* libmsamr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED51344B0EF00F6EF27 /* libmsamr.a */; };
22D8F17E147548E2008C97DB /* libSKP_SILK_SDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AA1472527D0037138E /* libSKP_SILK_SDK.a */; };
22D8F17F147548E2008C97DB /* libsrtp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AB1472527D0037138E /* libsrtp.a */; };
- 22D8F180147548E2008C97DB /* libmssilk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226183AF147259670037138E /* libmssilk.a */; };
- 22E1A9E813CAF4AA00219531 /* video.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22E1A9E713CAF4AA00219531 /* video.plist */; };
22E5B0AF133B5EA20044EA25 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E5B0AD133B5EA20044EA25 /* libssl.a */; };
22E5B0B0133B5EA20044EA25 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22E5B0AE133B5EA20044EA25 /* libcrypto.a */; };
- 22F51EF6107FA66500F98953 /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
340751971506459A00B89C47 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340751961506459A00B89C47 /* CoreTelephony.framework */; };
34075199150645A300B89C47 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340751961506459A00B89C47 /* CoreTelephony.framework */; };
- 340751E7150F38FD00B89C47 /* UIToggleVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 340751E6150F38FD00B89C47 /* UIToggleVideoButton.m */; };
- 340751E8150F38FD00B89C47 /* UIToggleVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 340751E6150F38FD00B89C47 /* UIToggleVideoButton.m */; };
+ 340751E7150F38FD00B89C47 /* UIVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 340751E6150F38FD00B89C47 /* UIVideoButton.m */; };
+ 340751E8150F38FD00B89C47 /* UIVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 340751E6150F38FD00B89C47 /* UIVideoButton.m */; };
341FCA8E149798210084BC26 /* linphonerc-ipad in Resources */ = {isa = PBXBuildFile; fileRef = 341FCA8D149798210084BC26 /* linphonerc-ipad */; };
- 341FCA8F149798210084BC26 /* linphonerc-ipad in Resources */ = {isa = PBXBuildFile; fileRef = 341FCA8D149798210084BC26 /* linphonerc-ipad */; };
+ 34216F401547EBCD00EA9777 /* VideoZoomHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 34216F3F1547EBCD00EA9777 /* VideoZoomHandler.m */; };
+ 34216F411547EBCD00EA9777 /* VideoZoomHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 34216F3F1547EBCD00EA9777 /* VideoZoomHandler.m */; };
344ABDE81484E723007420B6 /* libzrtpcpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 344ABDE71484E723007420B6 /* libzrtpcpp.a */; };
344ABDF114850AE9007420B6 /* libc++.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 344ABDEF14850AE9007420B6 /* libc++.1.dylib */; settings = {ATTRIBUTES = (Weak, ); }; };
344ABDF214850AE9007420B6 /* libstdc++.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 344ABDF014850AE9007420B6 /* libstdc++.6.dylib */; settings = {ATTRIBUTES = (Weak, ); }; };
- 348848E014D98859005B0B54 /* bj_decline.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848D714D98859005B0B54 /* bj_decline.png */; };
- 348848E114D98859005B0B54 /* bj_door_hl.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848D814D98859005B0B54 /* bj_door_hl.png */; };
- 348848E214D98859005B0B54 /* bj_door.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848D914D98859005B0B54 /* bj_door.png */; };
- 348848E314D98859005B0B54 /* bj_end_call.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848DA14D98859005B0B54 /* bj_end_call.png */; };
- 348848E414D98859005B0B54 /* bj_light_hl.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848DB14D98859005B0B54 /* bj_light_hl.png */; };
- 348848E514D98859005B0B54 /* bj_light.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848DC14D98859005B0B54 /* bj_light.png */; };
- 348848E614D98859005B0B54 /* bj_mute_off.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848DD14D98859005B0B54 /* bj_mute_off.png */; };
- 348848E714D98859005B0B54 /* bj_mute_on.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848DE14D98859005B0B54 /* bj_mute_on.png */; };
- 348848E814D98859005B0B54 /* bj_start_call.png in Resources */ = {isa = PBXBuildFile; fileRef = 348848DF14D98859005B0B54 /* bj_start_call.png */; };
- 34A6ECF714D0179C00460C04 /* BuschJaegerCallView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A6ECF514D0179C00460C04 /* BuschJaegerCallView.m */; };
- 34A6ECF814D0179C00460C04 /* BuschJaegerCallView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34A6ECF614D0179C00460C04 /* BuschJaegerCallView.xib */; };
- 34A6ED0614D1440300460C04 /* BuschJaegerAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A6ED0514D1440300460C04 /* BuschJaegerAppDelegate.m */; };
- 34ACD0AC14D80D4100EE0B0A /* UILightButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 34ACD0AB14D80D4100EE0B0A /* UILightButton.m */; };
- 34ACD0AD14D80D4100EE0B0A /* UILightButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 34ACD0AB14D80D4100EE0B0A /* UILightButton.m */; };
- 34E28E7A14D98F6D00D84BDD /* 01.wav in Resources */ = {isa = PBXBuildFile; fileRef = 34E28E7914D98F6D00D84BDD /* 01.wav */; };
- 5749FCB21518D6C100F0712D /* App_Apple_Icon_DES_57.png in Resources */ = {isa = PBXBuildFile; fileRef = 5749FCB11518D6C100F0712D /* App_Apple_Icon_DES_57.png */; };
- 70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
7066FC0C13E830E400EFC6DC /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; };
70E542F313E147E3002BA2C0 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E542F213E147E3002BA2C0 /* OpenGLES.framework */; };
70E542F513E147EB002BA2C0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E542F413E147EB002BA2C0 /* QuartzCore.framework */; };
- D2E1B2E21549A88D007B0B0D /* App_Apple_Icon_DES_114.png in Resources */ = {isa = PBXBuildFile; fileRef = D2E1B2E11549A88D007B0B0D /* App_Apple_Icon_DES_114.png */; };
- D2E7F40E155CD5AB00970BDF /* App_Apple_Icon_DES_72.png in Resources */ = {isa = PBXBuildFile; fileRef = D2E7F40D155CD5AB00970BDF /* App_Apple_Icon_DES_72.png */; };
- D378AB4F15DCF1B80098505D /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D378AB4915DCF1B80098505D /* libzbar.a */; };
- D378AB5015DCF1B80098505D /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D378AB4915DCF1B80098505D /* libzbar.a */; };
- D378AB5115DCF1B90098505D /* zbar-back.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4B15DCF1B80098505D /* zbar-back.png */; };
- D378AB5215DCF1B90098505D /* zbar-back.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4B15DCF1B80098505D /* zbar-back.png */; };
- D378AB5315DCF1B90098505D /* zbar-help.html in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4C15DCF1B80098505D /* zbar-help.html */; };
- D378AB5415DCF1B90098505D /* zbar-help.html in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4C15DCF1B80098505D /* zbar-help.html */; };
- D378AB5515DCF1B90098505D /* zbar-helpicons.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4D15DCF1B80098505D /* zbar-helpicons.png */; };
- D378AB5615DCF1B90098505D /* zbar-helpicons.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4D15DCF1B80098505D /* zbar-helpicons.png */; };
- D378AB5715DCF1B90098505D /* zbar-samples.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4E15DCF1B80098505D /* zbar-samples.png */; };
- D378AB5815DCF1B90098505D /* zbar-samples.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB4E15DCF1B80098505D /* zbar-samples.png */; };
- D378AB5B15DD02CD0098505D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D378AB5A15DD02CC0098505D /* libiconv.dylib */; };
- D378AB5C15DD02D30098505D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D378AB5A15DD02CC0098505D /* libiconv.dylib */; };
- D378AB6E15DD3FFD0098505D /* BuschJaegerSettingsView.m in Sources */ = {isa = PBXBuildFile; fileRef = D378AB6C15DD3FFB0098505D /* BuschJaegerSettingsView.m */; };
- D378AB6F15DD3FFD0098505D /* BuschJaegerSettingsView.m in Sources */ = {isa = PBXBuildFile; fileRef = D378AB6C15DD3FFB0098505D /* BuschJaegerSettingsView.m */; };
- D378AB7015DD3FFD0098505D /* BuschJaegerSettingsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D378AB6D15DD3FFC0098505D /* BuschJaegerSettingsView.xib */; };
- D378AB7115DD3FFD0098505D /* BuschJaegerSettingsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D378AB6D15DD3FFC0098505D /* BuschJaegerSettingsView.xib */; };
- D378AB7315DD40FE0098505D /* bj_barcode.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB7215DD40FE0098505D /* bj_barcode.png */; };
- D378AB7415DD40FE0098505D /* bj_barcode.png in Resources */ = {isa = PBXBuildFile; fileRef = D378AB7215DD40FE0098505D /* bj_barcode.png */; };
- D378AB7A15DD457D0098505D /* BuschJaegerApp.xib in Resources */ = {isa = PBXBuildFile; fileRef = D378AB7915DD457C0098505D /* BuschJaegerApp.xib */; };
- D378AB7B15DD457D0098505D /* BuschJaegerApp.xib in Resources */ = {isa = PBXBuildFile; fileRef = D378AB7915DD457C0098505D /* BuschJaegerApp.xib */; };
- D37CD1E915DE26B80028869A /* VideoZoomHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 34216F3F1547EBCD00EA9777 /* VideoZoomHandler.m */; };
- D37CD1EA15DE26B80028869A /* VideoZoomHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 34216F3F1547EBCD00EA9777 /* VideoZoomHandler.m */; };
- D37CD1F515DE27810028869A /* BuschJaegerMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD1F315DE27810028869A /* BuschJaegerMainView.m */; };
- D37CD1F615DE27810028869A /* BuschJaegerMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD1F315DE27810028869A /* BuschJaegerMainView.m */; };
- D37CD1F715DE27810028869A /* BuschJaegerMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD1F415DE27810028869A /* BuschJaegerMainView.xib */; };
- D37CD1F815DE27810028869A /* BuschJaegerMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD1F415DE27810028869A /* BuschJaegerMainView.xib */; };
- D37CD20815DE2AAC0028869A /* bj_settings.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD20715DE2AAC0028869A /* bj_settings.png */; };
- D37CD20915DE2AAC0028869A /* bj_settings.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD20715DE2AAC0028869A /* bj_settings.png */; };
- D37CD20C15DE2C610028869A /* BuschJaegerUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD20B15DE2C610028869A /* BuschJaegerUtils.m */; };
- D37CD20D15DE2C610028869A /* BuschJaegerUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD20B15DE2C610028869A /* BuschJaegerUtils.m */; };
- D37CD21015DE548A0028869A /* BuschJaegerConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD20F15DE548A0028869A /* BuschJaegerConfigParser.m */; };
- D37CD21115DE548A0028869A /* BuschJaegerConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD20F15DE548A0028869A /* BuschJaegerConfigParser.m */; };
- D37CD21515DE74B20028869A /* OutdoorStation.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD21415DE74B20028869A /* OutdoorStation.m */; };
- D37CD21615DE74B20028869A /* OutdoorStation.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD21415DE74B20028869A /* OutdoorStation.m */; };
- D37CD21715DE7D0F0028869A /* BuschJaegerCallView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A6ECF514D0179C00460C04 /* BuschJaegerCallView.m */; };
- D37CD21815DE7D130028869A /* BuschJaegerAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A6ED0514D1440300460C04 /* BuschJaegerAppDelegate.m */; };
- D37CD21915DE7D1D0028869A /* BuschJaegerCallView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34A6ECF614D0179C00460C04 /* BuschJaegerCallView.xib */; };
+ D3196D3E15A32BD8007FEEBA /* UITransferButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D3196D3D15A32BD8007FEEBA /* UITransferButton.m */; };
+ D3196D3F15A32BD8007FEEBA /* UITransferButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D3196D3D15A32BD8007FEEBA /* UITransferButton.m */; };
+ D32409C3158B49A600C8C119 /* UILongTouchButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D32409C2158B49A600C8C119 /* UILongTouchButton.m */; };
+ D32409C4158B49A600C8C119 /* UILongTouchButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D32409C2158B49A600C8C119 /* UILongTouchButton.m */; };
+ D32460E6159D9AAD00BA7F3A /* UITransparentView.m in Sources */ = {isa = PBXBuildFile; fileRef = D32460E5159D9AAD00BA7F3A /* UITransparentView.m */; };
+ D32460E7159D9AAD00BA7F3A /* UITransparentView.m in Sources */ = {isa = PBXBuildFile; fileRef = D32460E5159D9AAD00BA7F3A /* UITransparentView.m */; };
+ D326483815887D5200930C67 /* OrderedDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = D326483715887D5200930C67 /* OrderedDictionary.m */; };
+ D326483915887D5200930C67 /* OrderedDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = D326483715887D5200930C67 /* OrderedDictionary.m */; };
+ D32648441588F6FC00930C67 /* UIToggleButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D32648431588F6FB00930C67 /* UIToggleButton.m */; };
+ D32648451588F6FC00930C67 /* UIToggleButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D32648431588F6FB00930C67 /* UIToggleButton.m */; };
+ D32B6E2F15A5C0AC0033019F /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D32B6E2E15A5C0AC0033019F /* libsqlite3.dylib */; };
+ D32B9DFC15A2F131000B6DEC /* FastAddressBook.m in Sources */ = {isa = PBXBuildFile; fileRef = D32B9DFB15A2F131000B6DEC /* FastAddressBook.m */; };
+ D32B9DFD15A2F131000B6DEC /* FastAddressBook.m in Sources */ = {isa = PBXBuildFile; fileRef = D32B9DFB15A2F131000B6DEC /* FastAddressBook.m */; };
+ D34BD61515C13B7B0070C209 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D32B6E2E15A5C0AC0033019F /* libsqlite3.dylib */; };
+ D34BD61815C13D0B0070C209 /* liblinphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB911475562600DEE054 /* liblinphone.a */; };
+ D34BD61915C13D0B0070C209 /* libmediastreamer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB8F147555C800DEE054 /* libmediastreamer.a */; };
+ D34BD6A615C13DB70070C209 /* linphonerc in Resources */ = {isa = PBXBuildFile; fileRef = 2274550710700509006EC466 /* linphonerc */; };
+ D34BD6A715C13DB70070C209 /* linphonerc-ipad in Resources */ = {isa = PBXBuildFile; fileRef = 341FCA8D149798210084BC26 /* linphonerc-ipad */; };
+ D34BD74115C13E250070C209 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2214783B1386A2030020F8B8 /* Localizable.strings */; };
+ D35860D615B549B500513429 /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = D35860D515B549B500513429 /* Utils.m */; };
+ D35860D715B549B500513429 /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = D35860D515B549B500513429 /* Utils.m */; };
+ D35E7581159328EB0066B1C1 /* UIAddressTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = D35E7580159328EB0066B1C1 /* UIAddressTextField.m */; };
+ D35E7582159328EB0066B1C1 /* UIAddressTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = D35E7580159328EB0066B1C1 /* UIAddressTextField.m */; };
+ D36FB2D51589EF7C0036F6F2 /* UIPauseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */; };
+ D36FB2D61589EF7C0036F6F2 /* UIPauseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D36FB2D41589EF7C0036F6F2 /* UIPauseButton.m */; };
+ D37CD2D115E21CB30028869A /* 01.wav in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2BF15E21CB30028869A /* 01.wav */; };
+ D37CD2D215E21CB30028869A /* 01.wav in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2BF15E21CB30028869A /* 01.wav */; };
+ D37CD2DF15E21CB30028869A /* bj_barcode.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C615E21CB30028869A /* bj_barcode.png */; };
+ D37CD2E015E21CB30028869A /* bj_barcode.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C615E21CB30028869A /* bj_barcode.png */; };
+ D37CD2E115E21CB30028869A /* bj_decline.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C715E21CB30028869A /* bj_decline.png */; };
+ D37CD2E215E21CB30028869A /* bj_decline.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C715E21CB30028869A /* bj_decline.png */; };
+ D37CD2E315E21CB30028869A /* bj_door_hl.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C815E21CB30028869A /* bj_door_hl.png */; };
+ D37CD2E415E21CB30028869A /* bj_door_hl.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C815E21CB30028869A /* bj_door_hl.png */; };
+ D37CD2E515E21CB30028869A /* bj_door.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C915E21CB30028869A /* bj_door.png */; };
+ D37CD2E615E21CB30028869A /* bj_door.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2C915E21CB30028869A /* bj_door.png */; };
+ D37CD2E715E21CB30028869A /* bj_end_call.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CA15E21CB30028869A /* bj_end_call.png */; };
+ D37CD2E815E21CB30028869A /* bj_end_call.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CA15E21CB30028869A /* bj_end_call.png */; };
+ D37CD2E915E21CB30028869A /* bj_light_hl.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CB15E21CB30028869A /* bj_light_hl.png */; };
+ D37CD2EA15E21CB30028869A /* bj_light_hl.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CB15E21CB30028869A /* bj_light_hl.png */; };
+ D37CD2EB15E21CB30028869A /* bj_light.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CC15E21CB30028869A /* bj_light.png */; };
+ D37CD2EC15E21CB30028869A /* bj_light.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CC15E21CB30028869A /* bj_light.png */; };
+ D37CD2ED15E21CB30028869A /* bj_mute_off.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CD15E21CB30028869A /* bj_mute_off.png */; };
+ D37CD2EE15E21CB30028869A /* bj_mute_off.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CD15E21CB30028869A /* bj_mute_off.png */; };
+ D37CD2EF15E21CB30028869A /* bj_mute_on.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CE15E21CB30028869A /* bj_mute_on.png */; };
+ D37CD2F015E21CB30028869A /* bj_mute_on.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CE15E21CB30028869A /* bj_mute_on.png */; };
+ D37CD2F115E21CB30028869A /* bj_settings.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CF15E21CB30028869A /* bj_settings.png */; };
+ D37CD2F215E21CB30028869A /* bj_settings.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2CF15E21CB30028869A /* bj_settings.png */; };
+ D37CD2F315E21CB30028869A /* bj_start_call.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2D015E21CB30028869A /* bj_start_call.png */; };
+ D37CD2F415E21CB30028869A /* bj_start_call.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD2D015E21CB30028869A /* bj_start_call.png */; };
+ D37CD30D15E21E330028869A /* BuschJaegerCallView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD2FF15E21E320028869A /* BuschJaegerCallView.m */; };
+ D37CD30E15E21E330028869A /* BuschJaegerCallView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD2FF15E21E320028869A /* BuschJaegerCallView.m */; };
+ D37CD30F15E21E330028869A /* BuschJaegerCallView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD30015E21E320028869A /* BuschJaegerCallView.xib */; };
+ D37CD31015E21E330028869A /* BuschJaegerCallView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD30015E21E320028869A /* BuschJaegerCallView.xib */; };
+ D37CD31115E21E330028869A /* BuschJaegerConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD30215E21E320028869A /* BuschJaegerConfigParser.m */; };
+ D37CD31215E21E330028869A /* BuschJaegerConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD30215E21E320028869A /* BuschJaegerConfigParser.m */; };
+ D37CD31715E21E330028869A /* BuschJaegerSettingsView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD30715E21E320028869A /* BuschJaegerSettingsView.m */; };
+ D37CD31815E21E330028869A /* BuschJaegerSettingsView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD30715E21E320028869A /* BuschJaegerSettingsView.m */; };
+ D37CD31915E21E330028869A /* BuschJaegerSettingsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD30815E21E330028869A /* BuschJaegerSettingsView.xib */; };
+ D37CD31A15E21E330028869A /* BuschJaegerSettingsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD30815E21E330028869A /* BuschJaegerSettingsView.xib */; };
+ D37CD31B15E21E330028869A /* BuschJaegerUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD30A15E21E330028869A /* BuschJaegerUtils.m */; };
+ D37CD31C15E21E330028869A /* BuschJaegerUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD30A15E21E330028869A /* BuschJaegerUtils.m */; };
+ D37CD32115E21E520028869A /* UILightButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD32015E21E520028869A /* UILightButton.m */; };
+ D37CD32215E21E520028869A /* UILightButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD32015E21E520028869A /* UILightButton.m */; };
+ D37CD32815E220620028869A /* buschjaeger_icon_57.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32315E220620028869A /* buschjaeger_icon_57.png */; };
+ D37CD32915E220620028869A /* buschjaeger_icon_57.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32315E220620028869A /* buschjaeger_icon_57.png */; };
+ D37CD32A15E220620028869A /* buschjaeger_icon_57@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32415E220620028869A /* buschjaeger_icon_57@2x.png */; };
+ D37CD32B15E220620028869A /* buschjaeger_icon_57@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32415E220620028869A /* buschjaeger_icon_57@2x.png */; };
+ D37CD32C15E220620028869A /* buschjaeger_icon_72.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32515E220620028869A /* buschjaeger_icon_72.png */; };
+ D37CD32D15E220620028869A /* buschjaeger_icon_72.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32515E220620028869A /* buschjaeger_icon_72.png */; };
+ D37CD32E15E220620028869A /* buschjaeger_icon_72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32615E220620028869A /* buschjaeger_icon_72@2x.png */; };
+ D37CD32F15E220620028869A /* buschjaeger_icon_72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32615E220620028869A /* buschjaeger_icon_72@2x.png */; };
+ D37CD33015E220620028869A /* buschjaeger_icon_512.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32715E220620028869A /* buschjaeger_icon_512.png */; };
+ D37CD33115E220620028869A /* buschjaeger_icon_512.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD32715E220620028869A /* buschjaeger_icon_512.png */; };
+ D37CD33C15E2214C0028869A /* BuschJaegerApp.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD33B15E2214C0028869A /* BuschJaegerApp.xib */; };
+ D37CD33D15E2214C0028869A /* BuschJaegerApp.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD33B15E2214C0028869A /* BuschJaegerApp.xib */; };
+ D37CD35315E22A470028869A /* OutdoorStation.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD35215E22A470028869A /* OutdoorStation.m */; };
+ D37CD35415E22A470028869A /* OutdoorStation.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD35215E22A470028869A /* OutdoorStation.m */; };
+ D37CD37315E22B0C0028869A /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D37CD36D15E22B0C0028869A /* libzbar.a */; };
+ D37CD37415E22B0C0028869A /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D37CD36D15E22B0C0028869A /* libzbar.a */; };
+ D37CD37515E22B0C0028869A /* zbar-back.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD36F15E22B0C0028869A /* zbar-back.png */; };
+ D37CD37615E22B0C0028869A /* zbar-back.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD36F15E22B0C0028869A /* zbar-back.png */; };
+ D37CD37715E22B0C0028869A /* zbar-help.html in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37015E22B0C0028869A /* zbar-help.html */; };
+ D37CD37815E22B0C0028869A /* zbar-help.html in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37015E22B0C0028869A /* zbar-help.html */; };
+ D37CD37915E22B0C0028869A /* zbar-helpicons.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37115E22B0C0028869A /* zbar-helpicons.png */; };
+ D37CD37A15E22B0C0028869A /* zbar-helpicons.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37115E22B0C0028869A /* zbar-helpicons.png */; };
+ D37CD37B15E22B0C0028869A /* zbar-samples.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37215E22B0C0028869A /* zbar-samples.png */; };
+ D37CD37C15E22B0C0028869A /* zbar-samples.png in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37215E22B0C0028869A /* zbar-samples.png */; };
+ D37CD38015E22B700028869A /* BuschJaegerWelcomeView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD37E15E22B6F0028869A /* BuschJaegerWelcomeView.m */; };
+ D37CD38115E22B700028869A /* BuschJaegerWelcomeView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD37E15E22B6F0028869A /* BuschJaegerWelcomeView.m */; };
+ D37CD38215E22B700028869A /* BuschJaegerWelcomeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37F15E22B700028869A /* BuschJaegerWelcomeView.xib */; };
+ D37CD38315E22B700028869A /* BuschJaegerWelcomeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD37F15E22B700028869A /* BuschJaegerWelcomeView.xib */; };
+ D37CD38715E22C020028869A /* BuschJaegerMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD38515E22C000028869A /* BuschJaegerMainView.m */; };
+ D37CD38815E22C020028869A /* BuschJaegerMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D37CD38515E22C000028869A /* BuschJaegerMainView.m */; };
+ D37CD38915E22C020028869A /* BuschJaegerMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD38615E22C010028869A /* BuschJaegerMainView.xib */; };
+ D37CD38A15E22C020028869A /* BuschJaegerMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37CD38615E22C010028869A /* BuschJaegerMainView.xib */; };
+ D37CD38C15E22FD60028869A /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D37CD38B15E22FD60028869A /* libiconv.dylib */; };
+ D37CD38D15E22FDC0028869A /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D37CD38B15E22FD60028869A /* libiconv.dylib */; };
+ D37CD38F15E2331C0028869A /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D37CD38E15E2331C0028869A /* Settings.bundle */; };
+ D37CD39015E2331C0028869A /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D37CD38E15E2331C0028869A /* Settings.bundle */; };
+ D37DC7181594AF3400B2A5EB /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D37DC7171594AF3400B2A5EB /* MessageUI.framework */; };
+ D37DC7191594AF3F00B2A5EB /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D37DC7171594AF3400B2A5EB /* MessageUI.framework */; };
+ D380800515C28A7A005BE9BC /* UILinphone.m in Sources */ = {isa = PBXBuildFile; fileRef = D380800415C28A7A005BE9BC /* UILinphone.m */; };
+ D380800615C28A7A005BE9BC /* UILinphone.m in Sources */ = {isa = PBXBuildFile; fileRef = D380800415C28A7A005BE9BC /* UILinphone.m */; };
+ D380801315C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */ = {isa = PBXBuildFile; fileRef = D380801215C299D0005BE9BC /* ColorSpaceUtilites.m */; };
+ D380801415C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */ = {isa = PBXBuildFile; fileRef = D380801215C299D0005BE9BC /* ColorSpaceUtilites.m */; };
+ D3C6526715AC1A8F0092A874 /* UIEditableTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D3C6526615AC1A8F0092A874 /* UIEditableTableViewCell.m */; };
+ D3C6526815AC1A8F0092A874 /* UIEditableTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D3C6526615AC1A8F0092A874 /* UIEditableTableViewCell.m */; };
+ D3EA53FD159850E80037DC6B /* LinphoneManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D3EA53FC159850E80037DC6B /* LinphoneManager.m */; };
+ D3EA53FE159850E80037DC6B /* LinphoneManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D3EA53FC159850E80037DC6B /* LinphoneManager.m */; };
+ D3F7998115BD32370018C273 /* TPMultiLayoutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F7998015BD32370018C273 /* TPMultiLayoutViewController.m */; };
+ D3F7998215BD32370018C273 /* TPMultiLayoutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F7998015BD32370018C273 /* TPMultiLayoutViewController.m */; };
+ D3F9A9EE15AF277E0045320F /* UACellBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F9A9ED15AF277D0045320F /* UACellBackgroundView.m */; };
+ D3F9A9EF15AF277E0045320F /* UACellBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F9A9ED15AF277D0045320F /* UACellBackgroundView.m */; };
F476004B147AAF2800FFF19B /* liblinphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB911475562600DEE054 /* liblinphone.a */; };
F476004C147AAF4600FFF19B /* libmediastreamer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB8F147555C800DEE054 /* libmediastreamer.a */; };
/* End PBXBuildFile section */
@@ -216,17 +252,11 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 1AE0A49314AC5C64002C99BD /* stat_sys_signal_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stat_sys_signal_0.png; path = Resources/stat_sys_signal_0.png; sourceTree = ""; };
- 1AE0A49414AC5C64002C99BD /* stat_sys_signal_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stat_sys_signal_1.png; path = Resources/stat_sys_signal_1.png; sourceTree = ""; };
- 1AE0A49514AC5C64002C99BD /* stat_sys_signal_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stat_sys_signal_2.png; path = Resources/stat_sys_signal_2.png; sourceTree = ""; };
- 1AE0A49614AC5C64002C99BD /* stat_sys_signal_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stat_sys_signal_3.png; path = Resources/stat_sys_signal_3.png; sourceTree = ""; };
- 1AE0A49714AC5C64002C99BD /* stat_sys_signal_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stat_sys_signal_4.png; path = Resources/stat_sys_signal_4.png; sourceTree = ""; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* LinphoneAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinphoneAppDelegate.h; sourceTree = ""; };
1D3623250D0F684500981E51 /* LinphoneAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LinphoneAppDelegate.m; sourceTree = ""; };
- 1D6058910D05DD3D006BFB54 /* linphone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = linphone.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1D6058910D05DD3D006BFB54 /* buschjaeger.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = buschjaeger.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
- 22058C70116E305000B08DDD /* icone-linphone-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icone-linphone-57.png"; path = "Resources/icone-linphone-57.png"; sourceTree = ""; };
220FAC79107654FC0068D98F /* eX_call.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eX_call.h; sourceTree = ""; };
220FAC7A107654FC0068D98F /* eX_message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eX_message.h; sourceTree = ""; };
220FAC7B107654FC0068D98F /* eX_options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eX_options.h; sourceTree = ""; };
@@ -341,72 +371,32 @@
220FAD2E10765B400068D98F /* libosipparser2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libosipparser2.a; path = "liblinphone-sdk/apple-darwin/lib/libosipparser2.a"; sourceTree = ""; };
220FAD2F10765B400068D98F /* libspeex.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libspeex.a; path = "liblinphone-sdk/apple-darwin/lib/libspeex.a"; sourceTree = ""; };
220FAD3010765B400068D98F /* libspeexdsp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libspeexdsp.a; path = "liblinphone-sdk/apple-darwin/lib/libspeexdsp.a"; sourceTree = ""; };
- 220FAE4A10767A6A0068D98F /* PhoneMainView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhoneMainView.xib; sourceTree = ""; };
2211DB8F147555C800DEE054 /* libmediastreamer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediastreamer.a; path = "liblinphone-sdk/apple-darwin/lib/libmediastreamer.a"; sourceTree = ""; };
2211DB911475562600DEE054 /* liblinphone.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblinphone.a; path = "liblinphone-sdk/apple-darwin/lib/liblinphone.a"; sourceTree = ""; };
- 2211DB94147564B400DEE054 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Settings.bundle; path = "nogpl-thirdparties/Settings.bundle"; sourceTree = ""; };
2211DBBB14769C8200DEE054 /* CallDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallDelegate.m; sourceTree = ""; };
- 2211DBCA1476BE7300DEE054 /* ajouter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ajouter.png; path = Resources/ajouter.png; sourceTree = ""; };
- 2211DBCB1476BE7300DEE054 /* clavier.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = clavier.png; path = Resources/clavier.png; sourceTree = ""; };
- 2211DBCC1476BE7300DEE054 /* contact.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact.png; path = Resources/contact.png; sourceTree = ""; };
- 2211DBCD1476BE7300DEE054 /* effacer.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = effacer.png; path = Resources/effacer.png; sourceTree = ""; };
- 2211DBCE1476BE7300DEE054 /* grouper.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = grouper.png; path = Resources/grouper.png; sourceTree = ""; };
- 2211DBCF1476BE7300DEE054 /* HP_inverse.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HP_inverse.png; path = Resources/HP_inverse.png; sourceTree = ""; };
- 2211DBD01476BE7300DEE054 /* HP.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HP.png; path = Resources/HP.png; sourceTree = ""; };
- 2211DBD11476BE7300DEE054 /* micro_inverse.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micro_inverse.png; path = Resources/micro_inverse.png; sourceTree = ""; };
- 2211DBD21476BE7300DEE054 /* micro.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = micro.png; path = Resources/micro.png; sourceTree = ""; };
- 2211DBD31476BE7300DEE054 /* pause_inactif.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pause_inactif.png; path = Resources/pause_inactif.png; sourceTree = ""; };
- 2211DBD41476BE7300DEE054 /* pause.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pause.png; path = Resources/pause.png; sourceTree = ""; };
2214783C1386A2030020F8B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = ""; };
2214EB7812F846B1002A5394 /* UICallButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICallButton.h; sourceTree = ""; };
2214EB7912F846B1002A5394 /* UICallButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICallButton.m; sourceTree = ""; };
2214EB8712F84EBB002A5394 /* UIHangUpButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIHangUpButton.h; sourceTree = ""; };
2214EB8812F84EBB002A5394 /* UIHangUpButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIHangUpButton.m; sourceTree = ""; };
- 2214EB8A12F84FE9002A5394 /* UILinphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILinphone.h; sourceTree = ""; };
- 2214EBD812F8558F002A5394 /* UIToggleButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIToggleButton.h; sourceTree = ""; };
- 2214EBD912F8558F002A5394 /* UIToggleButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIToggleButton.m; sourceTree = ""; };
- 2214EBF112F86360002A5394 /* UIMuteButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIMuteButton.h; sourceTree = ""; };
- 2214EBF212F86360002A5394 /* UIMuteButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIMuteButton.m; sourceTree = ""; };
- 2218A5C412F9597B0088A667 /* LinphoneUIDelegates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinphoneUIDelegates.h; sourceTree = ""; };
+ 2214EBF112F86360002A5394 /* UIMicroButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIMicroButton.h; sourceTree = ""; };
+ 2214EBF212F86360002A5394 /* UIMicroButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIMicroButton.m; sourceTree = ""; };
2218A5CE12F973450088A667 /* LogView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogView.h; sourceTree = ""; };
- 2218A92212FBE1340088A667 /* FirstLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FirstLoginViewController.h; sourceTree = ""; };
- 2218A92312FBE1340088A667 /* FirstLoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirstLoginViewController.m; sourceTree = ""; };
- 2218A92412FBE1340088A667 /* FirstLoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FirstLoginViewController.xib; sourceTree = ""; };
- 22226C11118197C0000CA27B /* startcall-green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "startcall-green.png"; path = "liblinphone-sdk/apple-darwin/share/pixmaps/linphone/startcall-green.png"; sourceTree = ""; };
- 22226C13118197EC000CA27B /* stopcall-red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "stopcall-red.png"; path = "liblinphone-sdk/apple-darwin/share/pixmaps/linphone/stopcall-red.png"; sourceTree = ""; };
22276E8013C73D3100210156 /* libavcodec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavcodec.a; path = "liblinphone-sdk/apple-darwin/lib/libavcodec.a"; sourceTree = ""; };
22276E8113C73D3100210156 /* libavutil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavutil.a; path = "liblinphone-sdk/apple-darwin/lib/libavutil.a"; sourceTree = ""; };
22276E8213C73D3100210156 /* libswscale.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswscale.a; path = "liblinphone-sdk/apple-darwin/lib/libswscale.a"; sourceTree = ""; };
22276E8613C73D8A00210156 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
22276E8813C73DC000210156 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
- 222A483112F7176F0075F07F /* IncallViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IncallViewController.xib; sourceTree = ""; };
- 222A483212F7176F0075F07F /* IncallViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IncallViewController.m; sourceTree = ""; };
- 222A483312F7176F0075F07F /* IncallViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncallViewController.h; sourceTree = ""; };
223148E31178A08200637D6A /* libilbc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libilbc.a; path = "liblinphone-sdk/apple-darwin/lib/libilbc.a"; sourceTree = ""; };
223148E51178A09900637D6A /* libmsilbc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsilbc.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsilbc.a"; sourceTree = ""; };
- 223963151393CFAE001DE689 /* FastAddressBook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastAddressBook.h; sourceTree = ""; };
- 223963161393CFAF001DE689 /* FastAddressBook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FastAddressBook.m; sourceTree = ""; };
- 2242D91410D66BF300E9963F /* in_call.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = in_call.png; path = Resources/in_call.png; sourceTree = ""; };
- 2242D91510D66BF300E9963F /* out_call.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = out_call.png; path = Resources/out_call.png; sourceTree = ""; };
- 2242D9C710D691F900E9963F /* GenericTabViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericTabViewController.h; sourceTree = ""; };
- 2242D9C810D691F900E9963F /* GenericTabViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GenericTabViewController.m; sourceTree = ""; };
- 2242E312125235120061DDCE /* oldphone-mono-30s.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "oldphone-mono-30s.caf"; path = "liblinphone-sdk/apple-darwin/share/sounds/linphone/rings/oldphone-mono-30s.caf"; sourceTree = ""; };
- 2245671C107699F700F10948 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; };
224567C1107B968500F10948 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
2248E90C12F7E4CF00220D9C /* UIDigitButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIDigitButton.h; sourceTree = ""; };
2248E90D12F7E4CF00220D9C /* UIDigitButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIDigitButton.m; sourceTree = ""; };
- 2248E99D12F801C200220D9C /* LinphoneManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinphoneManager.h; sourceTree = ""; };
- 2248E99E12F801C200220D9C /* LinphoneManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LinphoneManager.m; sourceTree = ""; };
2258633C11410BAC00C5A737 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; };
- 225CB2E811ABB51000628906 /* clavier-01-106px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-106px.png"; path = "Resources/clavier-01-106px.png"; sourceTree = ""; };
- 225CB2E911ABB51000628906 /* clavier-01-108px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-108px.png"; path = "Resources/clavier-01-108px.png"; sourceTree = ""; };
- 225CB2ED11ABB65D00628906 /* clavier-01-160px.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "clavier-01-160px.png"; path = "Resources/clavier-01-160px.png"; sourceTree = ""; };
- 225CB2F911ABB76400628906 /* linphone-banner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "linphone-banner.png"; path = "liblinphone-sdk/apple-darwin/share/pixmaps/linphone/linphone-banner.png"; sourceTree = ""; };
226183AA1472527D0037138E /* libSKP_SILK_SDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSKP_SILK_SDK.a; path = "liblinphone-sdk/apple-darwin/lib/libSKP_SILK_SDK.a"; sourceTree = ""; };
226183AB1472527D0037138E /* libsrtp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsrtp.a; path = "liblinphone-sdk/apple-darwin/lib/libsrtp.a"; sourceTree = ""; };
226183AF147259670037138E /* libmssilk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmssilk.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmssilk.a"; sourceTree = ""; };
2264B6D111200342002C2C53 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
- 226B563E13CAF1CD00921595 /* audio.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = audio.plist; path = Settings.bundle/audio.plist; sourceTree = ""; };
226CDADD14E2D0B800513B67 /* libbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/libbcg729.a"; sourceTree = ""; };
226CDADE14E2D0B800513B67 /* libmsbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsbcg729.a"; sourceTree = ""; };
226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libopencore-amrwb.a"; path = "liblinphone-sdk/apple-darwin/lib/libopencore-amrwb.a"; sourceTree = ""; };
@@ -417,22 +407,14 @@
22744043106F33FC006EC466 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
22744056106F9BC9006EC466 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
2274550710700509006EC466 /* linphonerc */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = linphonerc; sourceTree = ""; };
- 227BCDBF10D4004600FBFD76 /* CallHistoryTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallHistoryTableViewController.h; sourceTree = ""; };
- 227BCDC010D4004600FBFD76 /* CallHistoryTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CallHistoryTableViewController.m; sourceTree = ""; };
- 227BCDC110D4004600FBFD76 /* CallHistoryTableViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CallHistoryTableViewController.xib; sourceTree = ""; };
228697C311AC29B800E9E0CA /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
- 228B19AE130290C500F154D3 /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = text; name = iTunesArtwork; path = Resources/iTunesArtwork; sourceTree = ""; };
22968A5D12F875C600588287 /* UISpeakerButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISpeakerButton.h; sourceTree = ""; };
22968A5E12F875C600588287 /* UISpeakerButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UISpeakerButton.m; sourceTree = ""; };
- 22968A8612F87C2000588287 /* UIDuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIDuration.h; sourceTree = ""; };
- 22968A8712F87C2000588287 /* UIDuration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIDuration.m; sourceTree = ""; };
22AA8AFB13D7125500B30535 /* libx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libx264.a; path = "liblinphone-sdk/apple-darwin/lib/libx264.a"; sourceTree = ""; };
22AA8AFC13D7125500B30535 /* libmsx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsx264.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsx264.a"; sourceTree = ""; };
22AA8AFF13D83F6300B30535 /* UICamSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICamSwitch.h; sourceTree = ""; };
22AA8B0013D83F6300B30535 /* UICamSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICamSwitch.m; sourceTree = ""; };
22B5EFA210CE50BD00777D97 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
- 22B5EFE310CE5E5800777D97 /* ContactPickerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactPickerDelegate.h; sourceTree = ""; };
- 22B5EFE410CE5E5800777D97 /* ContactPickerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactPickerDelegate.m; sourceTree = ""; };
22B5F03410CE6B2F00777D97 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
22BB1A67132FF16A005CD7AA /* UIEraseButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEraseButton.h; sourceTree = ""; };
22BB1A68132FF16A005CD7AA /* UIEraseButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIEraseButton.m; sourceTree = ""; };
@@ -440,11 +422,11 @@
22C7555F1317E59C007BC101 /* UIBluetoothButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIBluetoothButton.m; sourceTree = ""; };
22C7560513265C6A007BC101 /* aes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes.h; sourceTree = ""; };
22C7560613265C6A007BC101 /* asn1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asn1.h; sourceTree = ""; };
- 22C7560713265C6A007BC101 /* asn1_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asn1_mac.h; sourceTree = ""; };
+ 22C7560713265C6A007BC101 /* asn1_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = asn1_mac.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
22C7560813265C6A007BC101 /* asn1t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asn1t.h; sourceTree = ""; };
22C7560913265C6A007BC101 /* bio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bio.h; sourceTree = ""; };
22C7560A13265C6A007BC101 /* blowfish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blowfish.h; sourceTree = ""; };
- 22C7560B13265C6A007BC101 /* bn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bn.h; sourceTree = ""; };
+ 22C7560B13265C6A007BC101 /* bn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = bn.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
22C7560C13265C6A007BC101 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = ""; };
22C7560D13265C6A007BC101 /* cast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cast.h; sourceTree = ""; };
22C7560E13265C6A007BC101 /* comp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = comp.h; sourceTree = ""; };
@@ -462,7 +444,7 @@
22C7561A13265C6A007BC101 /* ec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ec.h; sourceTree = ""; };
22C7561B13265C6A007BC101 /* ecdh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ecdh.h; sourceTree = ""; };
22C7561C13265C6A007BC101 /* ecdsa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ecdsa.h; sourceTree = ""; };
- 22C7561D13265C6A007BC101 /* engine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = engine.h; sourceTree = ""; };
+ 22C7561D13265C6A007BC101 /* engine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = engine.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
22C7561E13265C6A007BC101 /* err.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = err.h; sourceTree = ""; };
22C7561F13265C6A007BC101 /* evp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = evp.h; sourceTree = ""; };
22C7562013265C6A007BC101 /* fips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fips.h; sourceTree = ""; };
@@ -510,131 +492,123 @@
22C7564A13265C6A007BC101 /* x509_vfy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x509_vfy.h; sourceTree = ""; };
22C7564B13265C6A007BC101 /* x509v3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x509v3.h; sourceTree = ""; };
22D1B68012A3E0BE001AE361 /* libresolv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libresolv.dylib; path = usr/lib/libresolv.dylib; sourceTree = SDKROOT; };
- 22D8F187147548E2008C97DB /* linphone-no-gpl-thirdparties.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "linphone-no-gpl-thirdparties.app"; sourceTree = BUILT_PRODUCTS_DIR; };
- 22E028B413B4CCBD0068A713 /* VideoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoViewController.h; sourceTree = ""; };
- 22E028B513B4CCBD0068A713 /* VideoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoViewController.m; sourceTree = ""; };
- 22E028B613B4CCBD0068A713 /* VideoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VideoViewController.xib; sourceTree = ""; };
- 22E0A81B111C44E100B04932 /* MoreViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MoreViewController.xib; sourceTree = ""; };
- 22E0A81C111C44E100B04932 /* MoreViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoreViewController.m; sourceTree = ""; };
- 22E0A81D111C44E100B04932 /* MoreViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoreViewController.h; sourceTree = ""; };
- 22E0A81E111C44E100B04932 /* ConsoleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ConsoleViewController.xib; sourceTree = ""; };
- 22E0A81F111C44E100B04932 /* ConsoleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConsoleViewController.m; sourceTree = ""; };
- 22E0A820111C44E100B04932 /* ConsoleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleViewController.h; sourceTree = ""; };
- 22E19E47138A67A000FBFE87 /* missed_call.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = missed_call.png; path = Resources/missed_call.png; sourceTree = ""; };
- 22E1A9E713CAF4AA00219531 /* video.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = video.plist; path = Settings.bundle/video.plist; sourceTree = ""; };
+ 22D8F187147548E2008C97DB /* buschjaeger-no-gpl-thirdparties.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "buschjaeger-no-gpl-thirdparties.app"; sourceTree = BUILT_PRODUCTS_DIR; };
22E5B0AD133B5EA20044EA25 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = "liblinphone-sdk/apple-darwin/lib/libssl.a"; sourceTree = ""; };
22E5B0AE133B5EA20044EA25 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "liblinphone-sdk/apple-darwin/lib/libcrypto.a"; sourceTree = ""; };
- 22F2508B107141E100AC9B3F /* PhoneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhoneViewController.h; sourceTree = ""; };
- 22F2508C107141E100AC9B3F /* PhoneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhoneViewController.m; sourceTree = ""; };
- 22F2508D107141E100AC9B3F /* PhoneViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhoneViewController.xib; sourceTree = ""; };
- 22F51EF5107FA66500F98953 /* untitled.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = untitled.plist; sourceTree = ""; };
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = ""; };
340751961506459A00B89C47 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
340751E4150E4D0200B89C47 /* CallDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallDelegate.h; sourceTree = ""; };
- 340751E5150F38FC00B89C47 /* UIToggleVideoButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIToggleVideoButton.h; sourceTree = ""; };
- 340751E6150F38FD00B89C47 /* UIToggleVideoButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIToggleVideoButton.m; sourceTree = ""; };
- 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ConferenceCallDetailView-ipad.xib"; sourceTree = ""; };
- 3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = nowebcamCIF.jpg; path = submodules/linphone/mediastreamer2/src/nowebcamCIF.jpg; sourceTree = ""; };
- 3418844514C6CAD300EA48C7 /* StatusSubViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatusSubViewController.h; sourceTree = ""; };
- 3418844614C6CAD300EA48C7 /* StatusSubViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StatusSubViewController.m; sourceTree = ""; };
- 3418844714C6CAD300EA48C7 /* StatusSubViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = StatusSubViewController.xib; sourceTree = ""; };
- 3418844C14C6D1CE00EA48C7 /* startcall-gray.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "startcall-gray.png"; path = "Resources/startcall-gray.png"; sourceTree = ""; };
- 3418844F14C6F66E00EA48C7 /* status_green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = status_green.png; path = Resources/status_green.png; sourceTree = "