LiblinphoneTester: remove old code

This commit is contained in:
Gautier Pelloux-Prayer 2016-06-15 13:52:30 +02:00
parent 13a798f71e
commit 5a03a6bffe
8 changed files with 2 additions and 94 deletions

View file

@ -8,7 +8,6 @@
#import "DetailTableView.h"
#import "MasterView.h"
#import "LogsView.h"
#include "linphone/liblinphone_tester.h"
#import "Log.h"

View file

@ -1,16 +0,0 @@
//
// LogsViewController.h
// linphone
//
// Created by Guillaume BIENKOWSKI on 01/06/2014.
//
//
#import <UIKit/UIKit.h>
@interface LogsView : UIViewController
@property(weak, nonatomic) IBOutlet UITextView *tview;
- (IBAction)clearLogs:(id)sender;
@end

View file

@ -1,49 +0,0 @@
//
// LogsViewController.m
// linphone
//
// Created by Guillaume BIENKOWSKI on 01/06/2014.
//
//
#import "LogsView.h"
#import "MasterView.h"
@interface LogsView () {
NSString *txt;
}
@end
@implementation LogsView
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)viewDidAppear:(BOOL)animated {
self.tview.textContainer.lineBreakMode = NSLineBreakByClipping;
self.tview.text = [lastLogs componentsJoinedByString:@"\n"];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(updateLogs:)
name:kLogsUpdateNotification
object:nil];
}
- (void)viewDidDisappear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (IBAction)clearLogs:(id)sender {
self.tview.text = nil;
}
- (void)updateLogs:(NSNotification *)notif {
NSArray *newLogs = [notif.userInfo objectForKey:@"newlogs"];
dispatch_async(dispatch_get_main_queue(), ^{
self.tview.text = [self.tview.text stringByAppendingString:[newLogs componentsJoinedByString:@"\n"]];
});
}
@end

View file

@ -8,9 +8,6 @@
#import <UIKit/UIKit.h>
extern NSMutableArray *lastLogs;
extern NSString *const kLogsUpdateNotification;
@class DetailTableView;
@interface MasterView : UITableViewController

View file

@ -7,7 +7,6 @@
//
#import "MasterView.h"
#import "LogsView.h"
#import "DetailTableView.h"
#include "linphone/liblinphone_tester.h"
@ -31,16 +30,8 @@
[super awakeFromNib];
}
NSMutableArray *lastLogs = nil;
NSMutableArray *logsBuffer = nil;
static int const kLastLogsCapacity = 5000;
static int const kLogsBufferCapacity = 10;
NSString *const kLogsUpdateNotification = @"kLogsUpdateNotification";
- (void)setupLogging {
lastLogs = [[NSMutableArray alloc] initWithCapacity:kLastLogsCapacity];
logsBuffer = [NSMutableArray arrayWithCapacity:kLogsBufferCapacity];
[Log enableLogs:ORTP_DEBUG];
[Log enableLogs:0];
linphone_core_enable_log_collection(NO);
}

View file

@ -14,16 +14,10 @@
#import "Log.h"
@interface LinphoneTester_Tests : XCTestCase
@property(retain, nonatomic) NSString *bundlePath;
@property(retain, nonatomic) NSString *documentPath;
@end
@implementation LinphoneTester_Tests
+ (NSArray *)skippedSuites {
return @[ @"Flexisip" ];
}
+ (NSString *)safetyTestString:(NSString *)testString {
NSCharacterSet *charactersToRemove = [[NSCharacterSet alphanumericCharacterSet] invertedSet];
return [[testString componentsSeparatedByCharactersInSet:charactersToRemove] componentsJoinedByString:@"_"];
@ -40,8 +34,6 @@
NSString *sSuite = [NSString stringWithUTF8String:suite];
NSString *sTest = [NSString stringWithUTF8String:test];
if ([[LinphoneTester_Tests skippedSuites] containsObject:sSuite])
continue;
// prepend "test_" so that it gets found by introspection
NSString *safesTest = [self safetyTestString:sTest];
NSString *safesSuite = [self safetyTestString:sSuite];

View file

@ -51,7 +51,6 @@
63058A281B4E821E00EFAE36 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63058A151B4E821E00EFAE36 /* Main_iPad.storyboard */; };
63058A291B4E821E00EFAE36 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63058A171B4E821E00EFAE36 /* Main_iPhone.storyboard */; };
63058A2A1B4E821E00EFAE36 /* DetailTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63058A1A1B4E821E00EFAE36 /* DetailTableView.m */; };
63058A2C1B4E821E00EFAE36 /* LogsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63058A1F1B4E821E00EFAE36 /* LogsView.m */; };
63058A2D1B4E821E00EFAE36 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 63058A201B4E821E00EFAE36 /* main.m */; };
63058A2E1B4E821E00EFAE36 /* MasterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63058A221B4E821E00EFAE36 /* MasterView.m */; };
63058A2F1B4E821E00EFAE36 /* TesterImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 63058A231B4E821E00EFAE36 /* TesterImages.xcassets */; };
@ -951,8 +950,6 @@
63058A1B1B4E821E00EFAE36 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
63058A1C1B4E821E00EFAE36 /* LinphoneTester-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "LinphoneTester-Info.plist"; sourceTree = "<group>"; };
63058A1D1B4E821E00EFAE36 /* LinphoneTester-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "LinphoneTester-Prefix.pch"; sourceTree = "<group>"; };
63058A1E1B4E821E00EFAE36 /* LogsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogsView.h; sourceTree = "<group>"; };
63058A1F1B4E821E00EFAE36 /* LogsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogsView.m; sourceTree = "<group>"; };
63058A201B4E821E00EFAE36 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
63058A211B4E821E00EFAE36 /* MasterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterView.h; sourceTree = "<group>"; };
63058A221B4E821E00EFAE36 /* MasterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MasterView.m; sourceTree = "<group>"; };
@ -2302,8 +2299,6 @@
63058A1A1B4E821E00EFAE36 /* DetailTableView.m */,
63058A1C1B4E821E00EFAE36 /* LinphoneTester-Info.plist */,
63058A1D1B4E821E00EFAE36 /* LinphoneTester-Prefix.pch */,
63058A1E1B4E821E00EFAE36 /* LogsView.h */,
63058A1F1B4E821E00EFAE36 /* LogsView.m */,
63058A201B4E821E00EFAE36 /* main.m */,
63058A211B4E821E00EFAE36 /* MasterView.h */,
63058A221B4E821E00EFAE36 /* MasterView.m */,
@ -3894,7 +3889,6 @@
63058A241B4E821E00EFAE36 /* AppDelegate.m in Sources */,
63058A2A1B4E821E00EFAE36 /* DetailTableView.m in Sources */,
63058A2E1B4E821E00EFAE36 /* MasterView.m in Sources */,
63058A2C1B4E821E00EFAE36 /* LogsView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

@ -1 +1 @@
Subproject commit a93e4cc4e4ba28e984d55d595d16af372611025a
Subproject commit 9992c9a4fefb164c2577df59dd15e4ed7b344a9a