diff --git a/Classes/ConsoleViewController.h b/Classes/ConsoleViewController.h deleted file mode 100644 index b1cc77e97..000000000 --- a/Classes/ConsoleViewController.h +++ /dev/null @@ -1,28 +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 "UICompositeViewController.h" - -@interface ConsoleViewController : UIViewController { -} - -@property (nonatomic, retain) IBOutlet UIWebView* logsView; - -@end diff --git a/Classes/ConsoleViewController.m b/Classes/ConsoleViewController.m deleted file mode 100644 index 1de7eec32..000000000 --- a/Classes/ConsoleViewController.m +++ /dev/null @@ -1,153 +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 - -@synthesize logsView; - - - -#pragma mark - Lifecycle Functions - -- (id)init { - return [super initWithNibName:@"ConsoleViewController" bundle:[NSBundle mainBundle]]; -} - -- (void)dealloc { - // Remove observer - [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [logsView release]; - - [super dealloc]; -} - -#pragma mark - UICompositeViewDelegate Functions - -static UICompositeViewDescription *compositeDescription = nil; - -+ (UICompositeViewDescription *)compositeViewDescription { - if(compositeDescription == nil) { - compositeDescription = [[UICompositeViewDescription alloc] init:@"ConsoleView" - content:@"ConsoleViewController" - stateBar:@"UIStateBar" - stateBarEnabled:true - tabBar:@"UIMainBar" - tabBarEnabled:true - fullscreen:false - landscapeMode:[LinphoneManager runningOnIpad] - portraitMode:true]; - } - return compositeDescription; -} - - -#pragma mark - ViewController Functions - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - [logsView loadHTMLString:@"
" baseURL:nil];
-}
-
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-    
-    // Remove observer
-    [[NSNotificationCenter defaultCenter] removeObserver:self
-                                                    name:kLinphoneLogsUpdate
-                                                  object:nil];
-}
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    
-    [logsView setDelegate:self];
-    
-    UIScrollView *scrollView = [ConsoleViewController defaultScrollView:logsView];
-    UIEdgeInsets inset = {0, 0, 10, 0};
-    [scrollView setContentInset:inset];
-    [scrollView setScrollIndicatorInsets:inset];
-    
-    [scrollView setBounces:FALSE];
-}
-
-
-#pragma mark - UIWebViewDelegate Functions
-
-- (void)webViewDidFinishLoad:(UIWebView *)webView {
-    NSString *logs = [[LinphoneManager instance].logs componentsJoinedByString:@"\n"];
-    [self addLog:logs scroll:TRUE];
-    
-    // Set observer
-    [[NSNotificationCenter defaultCenter] addObserver:self
-                                             selector:@selector(logsUpdateEvent:)
-                                                 name:kLinphoneLogsUpdate
-                                               object:nil];
-}
-
-
-#pragma mark - Event Functions
-
-- (void)logsUpdateEvent:(NSNotification*)notif {
-    NSString *log = [notif.userInfo objectForKey: @"log"];
-    [self addLog:log scroll:FALSE];
-}
-
-
-#pragma mark - 
-
-+ (UIScrollView *)defaultScrollView:(UIWebView *)webView {
-    UIScrollView *scrollView = nil;
-    
-    if ([[UIDevice currentDevice].systemVersion doubleValue] >= 5.0) {
-        return webView.scrollView;
-    }  else {
-        for (UIView *subview in [webView subviews]) {
-            if ([subview isKindOfClass:[UIScrollView class]]) {
-                scrollView = (UIScrollView *)subview;
-            }
-        }
-    }
-    return scrollView;
-}
-
-- (void)clear {
-    NSString *js = @"document.getElementById('content').innerHTML += ''";
-    [logsView stringByEvaluatingJavaScriptFromString:js];
-}
-
-- (void)addLog:(NSString*)log scroll:(BOOL)scroll {
-    log = [log stringByReplacingOccurrencesOfString:@"\r" withString:@""];
-    log = [log stringByReplacingOccurrencesOfString:@"\n" withString:@"\\n"];
-    log = [log stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""];
-    log = [log stringByReplacingOccurrencesOfString:@"&" withString:@"&"];
-    log = [log stringByReplacingOccurrencesOfString:@"<" withString:@"<"];
-    log = [log stringByReplacingOccurrencesOfString:@">" withString:@">"];
-    NSMutableString *js = [NSMutableString stringWithFormat:@"document.getElementById('content').innerHTML += \"%@\\n\";", log];
-    if(scroll) {
-        [js appendString:@"window.scrollTo(0, document.body.scrollHeight);"];
-    }
-    [logsView stringByEvaluatingJavaScriptFromString:js];
-}
-
-@end
diff --git a/Classes/ConsoleViewController.xib b/Classes/ConsoleViewController.xib
deleted file mode 100644
index a100ee1b7..000000000
--- a/Classes/ConsoleViewController.xib
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-    
-        
-        
-    
-    
-        
-            
-                
-                
-            
-        
-        
-        
-            
-            
-            
-                
-                    
-                    
-                    
-                    
-                
-            
-            
-        
-    
-
\ No newline at end of file
diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj
index ef8659e63..727e37d71 100755
--- a/linphone.xcodeproj/project.pbxproj
+++ b/linphone.xcodeproj/project.pbxproj
@@ -100,8 +100,6 @@
 		22C755601317E59C007BC101 /* UIBluetoothButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */; };
 		22D1B68112A3E0BE001AE361 /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D1B68012A3E0BE001AE361 /* libresolv.dylib */; };
 		22E0A822111C44E100B04932 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81C111C44E100B04932 /* AboutViewController.m */; };
-		22E0A823111C44E100B04932 /* ConsoleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81E111C44E100B04932 /* ConsoleViewController.xib */; };
-		22E0A824111C44E100B04932 /* ConsoleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81F111C44E100B04932 /* ConsoleViewController.m */; };
 		22F2508E107141E100AC9B3F /* DialerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F2508C107141E100AC9B3F /* DialerViewController.m */; };
 		22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; };
 		288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
@@ -925,9 +923,6 @@
 		22E0A81B111C44E100B04932 /* AboutViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AboutViewController.xib; sourceTree = ""; };
 		22E0A81C111C44E100B04932 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = ""; };
 		22E0A81D111C44E100B04932 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.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 = ""; };
 		22F2508B107141E100AC9B3F /* DialerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DialerViewController.h; sourceTree = ""; };
 		22F2508C107141E100AC9B3F /* DialerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = DialerViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
 		22F254801073D99800AC9B3F /* ringback.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ringback.wav; path = Resources/ringback.wav; sourceTree = ""; };
@@ -1848,9 +1843,6 @@
 				D35E7594159460560066B1C1 /* ChatViewController.h */,
 				D35E7595159460560066B1C1 /* ChatViewController.m */,
 				D38187B415FE340500C3EDCA /* ChatViewController.xib */,
-				22E0A820111C44E100B04932 /* ConsoleViewController.h */,
-				22E0A81F111C44E100B04932 /* ConsoleViewController.m */,
-				22E0A81E111C44E100B04932 /* ConsoleViewController.xib */,
 				D30BBD1215D3EFEB000F93DD /* ContactDetailsDelegate.h */,
 				D378906215AC373B00BD776C /* ContactDetailsLabelViewController.h */,
 				D378906315AC373B00BD776C /* ContactDetailsLabelViewController.m */,
@@ -3024,7 +3016,6 @@
 			files = (
 				22F254811073D99800AC9B3F /* ringback.wav in Resources */,
 				2237D4091084D7A9001383EE /* ring.wav in Resources */,
-				22E0A823111C44E100B04932 /* ConsoleViewController.xib in Resources */,
 				22058C71116E305000B08DDD /* linphone_icon_57.png in Resources */,
 				225CB2FA11ABB76400628906 /* linphone-banner.png in Resources */,
 				2245F78A1201D38000C4179D /* AboutViewController.xib in Resources */,
@@ -3650,7 +3641,6 @@
 				22F2508E107141E100AC9B3F /* DialerViewController.m in Sources */,
 				22E0A822111C44E100B04932 /* AboutViewController.m in Sources */,
 				631C4FB119D2A8F2004BFE77 /* UIDigitButtonLongPlus.m in Sources */,
-				22E0A824111C44E100B04932 /* ConsoleViewController.m in Sources */,
 				2248E90E12F7E4CF00220D9C /* UIDigitButton.m in Sources */,
 				2214EB7A12F846B1002A5394 /* UICallButton.m in Sources */,
 				2214EB8912F84EBB002A5394 /* UIHangUpButton.m in Sources */,