diff --git a/Classes/FirstLoginViewController.m b/Classes/FirstLoginViewController.m
index 99bd808c5..ddacf0e09 100644
--- a/Classes/FirstLoginViewController.m
+++ b/Classes/FirstLoginViewController.m
@@ -90,7 +90,6 @@
[[NSUserDefaults standardUserDefaults] setBool:false forKey:@"enable_first_login_view_preference"];
[self.parentViewController dismissModalViewControllerAnimated:true];
[self.activityIndicator setHidden:true];
- [[LinphoneManager instance] setRegistrationDelegate:nil];
}
-(void) displayRegisteringFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain {
[self.activityIndicator setHidden:false];
diff --git a/Classes/InCallViewController-ipad.xib b/Classes/InCallViewController-ipad.xib
index 592a9208f..17661327c 100644
--- a/Classes/InCallViewController-ipad.xib
+++ b/Classes/InCallViewController-ipad.xib
@@ -43,6 +43,7 @@
274
{768, 805}
+
_NS:408
- status
+ statusViewHolder
-
+
- 55
+ 62
@@ -798,12 +778,12 @@
-
+
@@ -903,9 +883,10 @@
Call-large
- 21
-
+ 61
+
+ status_holder
@@ -919,7 +900,6 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UICallButton
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UIEraseButton
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -951,12 +931,13 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 60
+ 62
@@ -985,17 +966,6 @@
PhoneViewController
UIViewController
-
- doKeyPad:
- id
-
-
- doKeyPad:
-
- doKeyPad:
- id
-
-
UITextField
UIButton
@@ -1015,6 +985,7 @@
UIButton
UIButton
UILabel
+ UIView
UIButton
UIButton
UIButton
@@ -1093,6 +1064,10 @@
status
UILabel
+
+ statusViewHolder
+ UIView
+
switchCamera
UIButton
diff --git a/Classes/PhoneViewController.h b/Classes/PhoneViewController.h
index 259af213d..27b93562c 100644
--- a/Classes/PhoneViewController.h
+++ b/Classes/PhoneViewController.h
@@ -21,13 +21,14 @@
#import "linphonecore.h"
#import "UILinphone.h"
#import "CallDelegate.h"
+#import "StatusSubViewController.h"
@class MainScreenWithVideoPreview;
@class IncallViewController;
@class FirstLoginViewController;
-@interface PhoneViewController : UIViewController {
+@interface PhoneViewController : UIViewController {
@private
//UI definition
@@ -55,6 +56,7 @@
UIDigitButton* hash;
UIButton* backToCallView;
+ UIView* statusViewHolder;
UITabBarController* myTabBarController;
@@ -62,6 +64,7 @@
FirstLoginViewController* myFirstLoginViewController;
IncallViewController* mIncallViewController;
MainScreenWithVideoPreview* mMainScreenWithVideoPreview;
+ StatusSubViewController* statusSubViewController;
UIButton* switchCamera;
}
@@ -87,6 +90,8 @@
@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;
diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m
index a99cfe838..b1f1214a8 100644
--- a/Classes/PhoneViewController.m
+++ b/Classes/PhoneViewController.m
@@ -49,12 +49,54 @@
@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 = @"No SIP account configured";
+ } else {
+ s = linphone_proxy_config_get_state(config);
+
+ switch (s) {
+ case LinphoneRegistrationOk: m = @"Registered"; break;
+ case LinphoneRegistrationNone: 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 {
@@ -72,15 +114,18 @@
[exc.name cStringUsingEncoding:[NSString defaultCStringEncoding]],
[exc.reason cStringUsingEncoding:[NSString defaultCStringEncoding]]);
}
+
+ [self updateStatusSubView];
}
+
- (void)viewDidAppear:(BOOL)animated {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == true) {
myFirstLoginViewController = [[FirstLoginViewController alloc] initWithNibName:@"FirstLoginViewController"
bundle:[NSBundle mainBundle]];
- [[LinphoneManager instance] setRegistrationDelegate:myFirstLoginViewController];
[self presentModalViewController:myFirstLoginViewController animated:true];
- };
+ }
+ [[LinphoneManager instance] setRegistrationDelegate:self];
[mMainScreenWithVideoPreview showPreview:YES];
[self updateCallAndBackButtons];
@@ -91,10 +136,10 @@
}
-// Implement viewDidLoad to do additional setup after loading the view, typically from a nib : called twice (?!)
+// 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];
@@ -114,8 +159,17 @@
[erase initWithAddressField:address];
[backToCallView addTarget:self action:@selector(backToCallViewPressed) forControlEvents:UIControlEventTouchUpInside];
- mIncallViewController = [[IncallViewController alloc] initWithNibName:[LinphoneManager runningOnIpad]?@"InCallViewController-ipad":@"IncallViewController"
+ 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 {
@@ -180,8 +234,7 @@
}
//status reporting
--(void) displayStatus:(NSString*) message {
- [status setText:message];
+-(void) displayStatus:(NSString*) message {
[mIncallViewController displayStatus:message];
}
@@ -302,5 +355,31 @@
[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];
+}
+
@end
diff --git a/Classes/PhoneViewController.xib b/Classes/PhoneViewController.xib
index ef1171aee..60f3013c1 100644
--- a/Classes/PhoneViewController.xib
+++ b/Classes/PhoneViewController.xib
@@ -12,11 +12,10 @@
YES
- IBUITextField
IBUIViewController
IBUIButton
IBUIView
- IBUILabel
+ IBUITextField
IBProxyObject
@@ -51,10 +50,10 @@
292
- {{254, 0}, {66, 65}}
+ {{254, 0}, {66, 81}}
-
+
NO
IBCocoaTouchFramework
0
@@ -90,10 +89,11 @@
292
- {{5, 0}, {255, 66}}
+ {{0, 1}, {255, 80}}
+
NO
NO
IBCocoaTouchFramework
@@ -103,9 +103,6 @@
3
MAA
-
- 2
-
YES
15
@@ -128,216 +125,31 @@
- {320, 65}
+ {320, 81}
-
- 1
- MC45MDE5NjA3OSAwLjkwMTk2MDc5IDAuOTAxOTYwNzkAA
-
+
IBCocoaTouchFramework
-
+
292
- {{9, 390}, {304, 21}}
+ {255, 20}
-
- NO
- YES
- NO
+
+ _NS:196
+
+ 3
+ MCAwAA
+
IBCocoaTouchFramework
- status
-
- 1
- MCAwIDAAA
-
-
- 1
- 10
-
- 1
- 17
-
-
- Helvetica
- 17
- 16
-
-
-
-
- 292
- {{213, 64}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 3
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- clavier-01-106px.png
-
-
-
-
-
-
- 292
- {{0, 130}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 4
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{107, 130}, {106, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 5
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
- NSImage
- clavier-01-108px.png
-
-
-
-
-
-
- 292
- {{213, 130}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 6
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{0, 196}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 7
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{213, 196}, {107, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 9
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
-
-
-
- 292
- {{107, 64}, {106, 66}}
-
-
-
- NO
- NO
- IBCocoaTouchFramework
- 0
- 0
- 2
-
-
- 1
- MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
-
-
-
-
292
- {{0, 64}, {107, 66}}
+ {{0, 81}, {107, 66}}
@@ -357,83 +169,158 @@
MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
+
+ NSImage
+ clavier-01-106px.png
+
-
+
292
- {{0, 262}, {107, 66}}
+ {{107, 81}, {106, 66}}
-
+
NO
NO
IBCocoaTouchFramework
0
0
- *
+ 2
1
MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
+
+ NSImage
+ clavier-01-108px.png
+
-
+
292
- {{107, 262}, {106, 66}}
+ {{213, 81}, {107, 66}}
-
+
NO
NO
IBCocoaTouchFramework
0
0
- 0+
+ 3
1
MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
-
+
-
+
292
- {{213, 262}, {107, 66}}
+ {{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, 196}, {106, 66}}
+ {{107, 213}, {106, 66}}
@@ -449,14 +336,106 @@
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, 328}, {160, 66}}
+ {{160, 345}, {160, 66}}
@@ -490,7 +469,7 @@
292
- {{0, 328}, {160, 66}}
+ {{0, 345}, {160, 66}}
@@ -505,10 +484,15 @@
MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
+
+ NSImage
+ startcall-gray.png
+
NSImage
startcall-green.png
+
@@ -516,10 +500,10 @@
292
- {{0, 328}, {320, 66}}
+ {{0, 345}, {320, 66}}
-
+
NO
NO
IBCocoaTouchFramework
@@ -531,7 +515,9 @@
MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
+
+
@@ -541,10 +527,7 @@
-
- 3
- MCAwAA
-
+
5
IBCocoaTouchFramework
@@ -568,14 +551,6 @@
12
-
-
- status
-
-
-
- 15
-
view
@@ -680,14 +655,6 @@
54
-
-
- erase
-
-
-
- 151
-
dialerView
@@ -720,6 +687,22 @@
164
+
+
+ statusViewHolder
+
+
+
+ 169
+
+
+
+ erase
+
+
+
+ 151
+
delegate
@@ -765,23 +748,23 @@
YES
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -811,11 +794,6 @@
Call-short
-
- 7
-
-
-
35
@@ -861,18 +839,12 @@
YES
-
+
Dialer
-
- 150
-
-
- Erase
-
4
@@ -891,6 +863,18 @@
Call-large
+
+ 165
+
+
+ status_view
+
+
+ 150
+
+
+ Erase
+
@@ -909,6 +893,8 @@
160.IBPluginDependency
162.CustomClassName
162.IBPluginDependency
+ 162.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
+ 165.IBPluginDependency
29.CustomClassName
29.IBPluginDependency
30.CustomClassName
@@ -936,7 +922,7 @@
41.IBPluginDependency
5.CustomClassName
5.IBPluginDependency
- 7.IBPluginDependency
+ 5.IBUIButtonInspectorSelectedStateConfigurationMetadataKey
80.IBPluginDependency
@@ -950,7 +936,7 @@
YES
- 410
+ 412
1
@@ -965,6 +951,8 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UICallButton
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UIDigitButton
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UIDigitButton
@@ -992,7 +980,7 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
UICallButton
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -1008,7 +996,7 @@
- 164
+ 169
@@ -1056,17 +1044,6 @@
PhoneViewController
UIViewController
-
- doKeyPad:
- id
-
-
- doKeyPad:
-
- doKeyPad:
- id
-
-
YES
@@ -1089,6 +1066,7 @@
six
star
status
+ statusViewHolder
switchCamera
three
two
@@ -1114,6 +1092,7 @@
UIButton
UIButton
UILabel
+ UIView
UIButton
UIButton
UIButton
@@ -1142,6 +1121,7 @@
six
star
status
+ statusViewHolder
switchCamera
three
two
@@ -1221,6 +1201,10 @@
status
UILabel
+
+ statusViewHolder
+ UIView
+
switchCamera
UIButton
@@ -1290,6 +1274,7 @@
clavier-01-108px.png
clavier-01-160px.png
effacer.png
+ startcall-gray.png
startcall-green.png
@@ -1299,6 +1284,7 @@
{160, 60}
{66, 65}
{60, 52}
+ {60, 52}
933
diff --git a/Classes/StatusSubViewController.h b/Classes/StatusSubViewController.h
new file mode 100644
index 000000000..72e4997eb
--- /dev/null
+++ b/Classes/StatusSubViewController.h
@@ -0,0 +1,34 @@
+/* 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
new file mode 100644
index 000000000..e0d1cadcb
--- /dev/null
+++ b/Classes/StatusSubViewController.m
@@ -0,0 +1,99 @@
+/* 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 {
+
+ 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/StatusSubViewController.xib b/Classes/StatusSubViewController.xib
new file mode 100644
index 000000000..12478957f
--- /dev/null
+++ b/Classes/StatusSubViewController.xib
@@ -0,0 +1,253 @@
+
+
+
+ 1280
+ 11C74
+ 1938
+ 1138.23
+ 567.00
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ 933
+
+
+ IBUIImageView
+ IBUIActivityIndicatorView
+ IBUIView
+ IBUILabel
+ IBProxyObject
+
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+ PluginDependencyRecalculationVersion
+
+
+
+
+ IBFilesOwner
+ IBCocoaTouchFramework
+
+
+ IBFirstResponder
+ IBCocoaTouchFramework
+
+
+
+ 292
+
+
+
+ 292
+ {{0, -1}, {25, 23}}
+
+
+
+ _NS:567
+ NO
+ IBCocoaTouchFramework
+
+ NSImage
+ status_orange.png
+
+
+
+
+ -2147483356
+ {{0, 1}, {20, 20}}
+
+
+
+ _NS:1030
+ NO
+ IBCocoaTouchFramework
+ 2
+
+
+
+ 292
+ {{28, 0}, {280, 21}}
+
+
+
+ _NS:328
+ NO
+ YES
+ 7
+ NO
+ IBCocoaTouchFramework
+ No SIP account defined
+
+ 3
+ MC42NjY2NjY2NjY3AA
+
+
+ 1
+ 10
+
+ 1
+ 17
+
+
+ Helvetica
+ 17
+ 16
+
+
+
+ {255, 23}
+
+
+
+ _NS:196
+
+ 3
+ MCAwAA
+
+ IBCocoaTouchFramework
+
+
+
+
+
+
+ image
+
+
+
+ 8
+
+
+
+ label
+
+
+
+ 9
+
+
+
+ spinner
+
+
+
+ 10
+
+
+
+ view
+
+
+
+ 11
+
+
+
+
+
+ 0
+
+
+
+
+
+ -1
+
+
+ File's Owner
+
+
+ -2
+
+
+
+
+ 4
+
+
+
+
+
+
+
+ status_view
+
+
+ 7
+
+
+ status_spin
+
+
+ 6
+
+
+ status_label
+
+
+ 5
+
+
+ status_image
+
+
+
+
+ StatusSubViewController
+ 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
+
+
+
+
+
+ 11
+
+
+
+
+ StatusSubViewController
+ UIViewController
+
+ UIImageView
+ UILabel
+ UIActivityIndicatorView
+
+
+
+ image
+ UIImageView
+
+
+ label
+ UILabel
+
+
+ spinner
+ UIActivityIndicatorView
+
+
+
+ IBProjectSource
+ ./Classes/StatusSubViewController.h
+
+
+
+
+ 0
+ IBCocoaTouchFramework
+ YES
+ 3
+
+ status_orange.png
+ {25, 23}
+
+ 933
+
+
diff --git a/Resources/startcall-gray.png b/Resources/startcall-gray.png
new file mode 100644
index 000000000..360e7baa0
Binary files /dev/null and b/Resources/startcall-gray.png differ
diff --git a/Resources/status_gray.png b/Resources/status_gray.png
new file mode 100644
index 000000000..b4f871f3e
Binary files /dev/null and b/Resources/status_gray.png differ
diff --git a/Resources/status_green.png b/Resources/status_green.png
new file mode 100644
index 000000000..1a39a4242
Binary files /dev/null and b/Resources/status_green.png differ
diff --git a/Resources/status_offline.png b/Resources/status_offline.png
new file mode 100644
index 000000000..243c5c069
Binary files /dev/null and b/Resources/status_offline.png differ
diff --git a/Resources/status_orange.png b/Resources/status_orange.png
new file mode 100644
index 000000000..f2e66d34d
Binary files /dev/null and b/Resources/status_orange.png differ
diff --git a/Resources/status_red.png b/Resources/status_red.png
new file mode 100644
index 000000000..e7a0ec98a
Binary files /dev/null and b/Resources/status_red.png differ
diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj
index a57d43ab8..62637bae8 100755
--- a/linphone.xcodeproj/project.pbxproj
+++ b/linphone.xcodeproj/project.pbxproj
@@ -234,6 +234,22 @@
340A75B114C0670B006AA708 /* ConferenceCallDetailView-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 340A75AF14C0670A006AA708 /* ConferenceCallDetailView-ipad.xib */; };
3418843714C58BB100EA48C7 /* nowebcamCIF.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */; };
3418843814C58BB100EA48C7 /* nowebcamCIF.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */; };
+ 3418844814C6CAD300EA48C7 /* StatusSubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3418844614C6CAD300EA48C7 /* StatusSubViewController.m */; };
+ 3418844914C6CAD300EA48C7 /* StatusSubViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3418844614C6CAD300EA48C7 /* StatusSubViewController.m */; };
+ 3418844A14C6CAD300EA48C7 /* StatusSubViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3418844714C6CAD300EA48C7 /* StatusSubViewController.xib */; };
+ 3418844B14C6CAD300EA48C7 /* StatusSubViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3418844714C6CAD300EA48C7 /* StatusSubViewController.xib */; };
+ 3418844D14C6D1CE00EA48C7 /* startcall-gray.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418844C14C6D1CE00EA48C7 /* startcall-gray.png */; };
+ 3418844E14C6D1CE00EA48C7 /* startcall-gray.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418844C14C6D1CE00EA48C7 /* startcall-gray.png */; };
+ 3418845314C6F66F00EA48C7 /* status_green.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418844F14C6F66E00EA48C7 /* status_green.png */; };
+ 3418845414C6F66F00EA48C7 /* status_green.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418844F14C6F66E00EA48C7 /* status_green.png */; };
+ 3418845514C6F66F00EA48C7 /* status_offline.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845014C6F66F00EA48C7 /* status_offline.png */; };
+ 3418845614C6F66F00EA48C7 /* status_offline.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845014C6F66F00EA48C7 /* status_offline.png */; };
+ 3418845714C6F66F00EA48C7 /* status_orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845114C6F66F00EA48C7 /* status_orange.png */; };
+ 3418845814C6F66F00EA48C7 /* status_orange.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845114C6F66F00EA48C7 /* status_orange.png */; };
+ 3418845914C6F66F00EA48C7 /* status_red.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845214C6F66F00EA48C7 /* status_red.png */; };
+ 3418845A14C6F66F00EA48C7 /* status_red.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845214C6F66F00EA48C7 /* status_red.png */; };
+ 3418845C14C7077400EA48C7 /* status_gray.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845B14C7077400EA48C7 /* status_gray.png */; };
+ 3418845D14C7077400EA48C7 /* status_gray.png in Resources */ = {isa = PBXBuildFile; fileRef = 3418845B14C7077400EA48C7 /* status_gray.png */; };
341FCA8E149798210084BC26 /* linphonerc-ipad in Resources */ = {isa = PBXBuildFile; fileRef = 341FCA8D149798210084BC26 /* linphonerc-ipad */; };
341FCA8F149798210084BC26 /* linphonerc-ipad in Resources */ = {isa = PBXBuildFile; fileRef = 341FCA8D149798210084BC26 /* linphonerc-ipad */; };
3422AA5014975EC9000D4E8A /* InCallViewController-ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3422AA4F14975EC9000D4E8A /* InCallViewController-ipad.xib */; };
@@ -617,6 +633,15 @@
32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; 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 = ""; };
+ 3418845014C6F66F00EA48C7 /* status_offline.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = status_offline.png; path = Resources/status_offline.png; sourceTree = ""; };
+ 3418845114C6F66F00EA48C7 /* status_orange.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = status_orange.png; path = Resources/status_orange.png; sourceTree = ""; };
+ 3418845214C6F66F00EA48C7 /* status_red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = status_red.png; path = Resources/status_red.png; sourceTree = ""; };
+ 3418845B14C7077400EA48C7 /* status_gray.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = status_gray.png; path = Resources/status_gray.png; sourceTree = ""; };
341FCA8D149798210084BC26 /* linphonerc-ipad */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "linphonerc-ipad"; sourceTree = ""; };
3422AA4F14975EC9000D4E8A /* InCallViewController-ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "InCallViewController-ipad.xib"; sourceTree = ""; };
3422AA5214978352000D4E8A /* PhoneViewController-ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "PhoneViewController-ipad.xib"; sourceTree = ""; };
@@ -778,6 +803,9 @@
34CA8537148F692A00503C01 /* MainScreenWithVideoPreview.h */,
34CA8538148F692A00503C01 /* MainScreenWithVideoPreview.m */,
34CA852E148F646700503C01 /* MainScreenWithVideoPreview.xib */,
+ 3418844514C6CAD300EA48C7 /* StatusSubViewController.h */,
+ 3418844614C6CAD300EA48C7 /* StatusSubViewController.m */,
+ 3418844714C6CAD300EA48C7 /* StatusSubViewController.xib */,
);
path = Classes;
sourceTree = "";
@@ -1176,6 +1204,12 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ 3418845B14C7077400EA48C7 /* status_gray.png */,
+ 3418844F14C6F66E00EA48C7 /* status_green.png */,
+ 3418845014C6F66F00EA48C7 /* status_offline.png */,
+ 3418845114C6F66F00EA48C7 /* status_orange.png */,
+ 3418845214C6F66F00EA48C7 /* status_red.png */,
+ 3418844C14C6D1CE00EA48C7 /* startcall-gray.png */,
3418843614C58BB100EA48C7 /* nowebcamCIF.jpg */,
1AE0A49214AC5C64002C99BD /* mic_active.png */,
1AE0A49314AC5C64002C99BD /* stat_sys_signal_0.png */,
@@ -1372,6 +1406,13 @@
1AE0A4A214AC5C64002C99BD /* stat_sys_signal_4.png in Resources */,
340A75B014C0670B006AA708 /* ConferenceCallDetailView-ipad.xib in Resources */,
3418843714C58BB100EA48C7 /* nowebcamCIF.jpg in Resources */,
+ 3418844A14C6CAD300EA48C7 /* StatusSubViewController.xib in Resources */,
+ 3418844D14C6D1CE00EA48C7 /* startcall-gray.png in Resources */,
+ 3418845314C6F66F00EA48C7 /* status_green.png in Resources */,
+ 3418845514C6F66F00EA48C7 /* status_offline.png in Resources */,
+ 3418845714C6F66F00EA48C7 /* status_orange.png in Resources */,
+ 3418845914C6F66F00EA48C7 /* status_red.png in Resources */,
+ 3418845C14C7077400EA48C7 /* status_gray.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1442,6 +1483,13 @@
1AE0A4A314AC5C64002C99BD /* stat_sys_signal_4.png in Resources */,
340A75B114C0670B006AA708 /* ConferenceCallDetailView-ipad.xib in Resources */,
3418843814C58BB100EA48C7 /* nowebcamCIF.jpg in Resources */,
+ 3418844B14C6CAD300EA48C7 /* StatusSubViewController.xib in Resources */,
+ 3418844E14C6D1CE00EA48C7 /* startcall-gray.png in Resources */,
+ 3418845414C6F66F00EA48C7 /* status_green.png in Resources */,
+ 3418845614C6F66F00EA48C7 /* status_offline.png in Resources */,
+ 3418845814C6F66F00EA48C7 /* status_orange.png in Resources */,
+ 3418845A14C6F66F00EA48C7 /* status_red.png in Resources */,
+ 3418845D14C7077400EA48C7 /* status_gray.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1479,6 +1527,7 @@
22D817AD147A9F33001CFB9C /* UIAddVideoButton.m in Sources */,
344ABD77147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */,
34CA8539148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */,
+ 3418844814C6CAD300EA48C7 /* StatusSubViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1513,6 +1562,7 @@
22D817AE147A9F33001CFB9C /* UIAddVideoButton.m in Sources */,
344ABD78147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */,
34CA853A148F692A00503C01 /* MainScreenWithVideoPreview.m in Sources */,
+ 3418844914C6CAD300EA48C7 /* StatusSubViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/submodules/linphone b/submodules/linphone
index ae0857e88..e647665bc 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit ae0857e88c8bac66c5e825de10c261ff322614f6
+Subproject commit e647665bc3013e5b42f3b88c669000714e6fd948