mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Add Console view
This commit is contained in:
parent
4ae532b61a
commit
50e2a6bd07
18 changed files with 401 additions and 221 deletions
|
|
@ -148,6 +148,7 @@
|
|||
<string key="NSFrame">{{0, 58}, {320, 402}}</string>
|
||||
<reference key="NSSuperview" ref="1010501960"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
|
|
@ -160,6 +161,10 @@
|
|||
<double key="IBUIContentInset.left">0.0</double>
|
||||
<double key="IBUIContentInset.right">0.0</double>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<double key="IBUIScrollIndicatorInsets.top">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.bottom">10</double>
|
||||
<double key="IBUIScrollIndicatorInsets.left">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.right">0.0</double>
|
||||
<int key="IBUISeparatorStyle">1</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
|
||||
|
|
|
|||
|
|
@ -18,15 +18,11 @@
|
|||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "UICompositeViewController.h"
|
||||
|
||||
#import "LogView.h"
|
||||
|
||||
@interface ConsoleViewController : UIViewController <LogView> {
|
||||
@interface ConsoleViewController : UIViewController<UICompositeViewDelegate, UIWebViewDelegate> {
|
||||
}
|
||||
|
||||
-(void) doAction;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextView* logs;
|
||||
@property (nonatomic, retain) IBOutlet UIView* logsView;
|
||||
@property (nonatomic, retain) IBOutlet UIWebView* logsView;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -22,49 +22,110 @@
|
|||
|
||||
@implementation ConsoleViewController
|
||||
|
||||
NSMutableString* MoreViewController_logs;
|
||||
|
||||
@synthesize logs;
|
||||
@synthesize logsView;
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
UIBarButtonItem* clear = [[[UIBarButtonItem alloc]
|
||||
initWithBarButtonSystemItem:UIBarButtonSystemItemTrash
|
||||
target:self
|
||||
action:@selector(doAction)] autorelease];
|
||||
[self.navigationItem setRightBarButtonItem:clear];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[logs setText:MoreViewController_logs];
|
||||
}
|
||||
|
||||
- (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];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)doAction{
|
||||
@synchronized(self) {
|
||||
NSMutableString* oldString = MoreViewController_logs;
|
||||
MoreViewController_logs = [[NSMutableString alloc] init];
|
||||
[oldString release];
|
||||
[logs setText:@""];
|
||||
}
|
||||
- (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:@"<html><body><pre id=\"content\"></pre></body><html>" 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];
|
||||
|
||||
UIEdgeInsets inset = {0, 0, 10, 0};
|
||||
[logsView.scrollView setContentInset:inset];
|
||||
[logsView.scrollView setScrollIndicatorInsets:inset];
|
||||
|
||||
[logsView.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 -
|
||||
|
||||
- (void)clear {
|
||||
NSString *js = @"document.getElementById('content').innerHTML += ''";
|
||||
[logsView stringByEvaluatingJavaScriptFromString:js];
|
||||
}
|
||||
|
||||
- (void)addLog:(NSString*)log scroll:(BOOL)scroll {
|
||||
NSMutableString *js = [NSMutableString stringWithFormat:@"document.getElementById('content').innerHTML += \"%@\\n\";", [log stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""]];
|
||||
if(scroll) {
|
||||
[js appendString:@"window.scrollTo(0, document.body.scrollHeight);"];
|
||||
}
|
||||
[logsView stringByEvaluatingJavaScriptFromString:js];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -13,9 +13,8 @@
|
|||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUITextView</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBUIViewController</string>
|
||||
<string>IBUIWebView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
|
@ -35,86 +34,40 @@
|
|||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIViewController" id="962557183">
|
||||
<object class="IBUIView" key="IBUIView" id="679133499">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUITextView" id="249557632">
|
||||
<reference key="NSNextResponder" ref="679133499"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrameSize">{320, 450}</string>
|
||||
<reference key="NSSuperview" ref="679133499"/>
|
||||
<reference key="NSWindow"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
|
||||
<bool key="IBUIDelaysContentTouches">NO</bool>
|
||||
<bool key="IBUICanCancelContentTouches">NO</bool>
|
||||
<bool key="IBUIBouncesZoom">NO</bool>
|
||||
<bool key="IBUIEditable">NO</bool>
|
||||
<string key="IBUIText"/>
|
||||
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
|
||||
<int key="IBUIAutocapitalizationType">2</int>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">1</int>
|
||||
<double key="pointSize">17</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">17</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<object class="IBUIView" id="679133499">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIWebView" id="143119813">
|
||||
<reference key="NSNextResponder" ref="679133499"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview" ref="679133499"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="143119813"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MCAwAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">logs</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="249557632"/>
|
||||
</object>
|
||||
<int key="connectionID">9</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">logsView</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="679133499"/>
|
||||
</object>
|
||||
<int key="connectionID">13</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
|
|
@ -123,6 +76,14 @@
|
|||
</object>
|
||||
<int key="connectionID">14</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">logsView</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="143119813"/>
|
||||
</object>
|
||||
<int key="connectionID">19</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
|
|
@ -146,29 +107,20 @@
|
|||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="732835941"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="962557183"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="679133499"/>
|
||||
</object>
|
||||
<reference key="parent" ref="732835941"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="679133499"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="249557632"/>
|
||||
<reference ref="143119813"/>
|
||||
</object>
|
||||
<reference key="parent" ref="962557183"/>
|
||||
<string key="objectName">logView</string>
|
||||
<reference key="parent" ref="732835941"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="249557632"/>
|
||||
<int key="objectID">18</int>
|
||||
<reference key="object" ref="143119813"/>
|
||||
<reference key="parent" ref="679133499"/>
|
||||
<string key="objectName">logsView</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
@ -180,10 +132,8 @@
|
|||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>10.CustomClassName</string>
|
||||
<string>10.IBPluginDependency</string>
|
||||
<string>18.IBPluginDependency</string>
|
||||
<string>4.IBPluginDependency</string>
|
||||
<string>7.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
|
@ -191,8 +141,6 @@
|
|||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIResponder</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>ConsoleViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
|
|
@ -209,7 +157,7 @@
|
|||
<reference key="dict.values" ref="732835941"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">14</int>
|
||||
<int key="maxID">19</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
|
@ -218,35 +166,14 @@
|
|||
<string key="className">ConsoleViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>logs</string>
|
||||
<string>logsView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UITextView</string>
|
||||
<string>UIView</string>
|
||||
</object>
|
||||
<string key="NS.key.0">logsView</string>
|
||||
<string key="NS.object.0">UIWebView</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>logs</string>
|
||||
<string>logsView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">logs</string>
|
||||
<string key="candidateClassName">UITextView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">logsView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<string key="NS.key.0">logsView</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">logsView</string>
|
||||
<string key="candidateClassName">UIWebView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@
|
|||
<string key="NSFrame">{{0, 59}, {320, 401}}</string>
|
||||
<reference key="NSSuperview" ref="1031663480"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">10</int>
|
||||
|
|
@ -201,6 +202,10 @@ AAgACAAIAAEAAQABAAE</bytes>
|
|||
<double key="IBUIContentInset.right">0.0</double>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
|
||||
<double key="IBUIScrollIndicatorInsets.top">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.bottom">10</double>
|
||||
<double key="IBUIScrollIndicatorInsets.left">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.right">0.0</double>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<int key="IBUISeparatorStyle">2</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
|
|
@ -350,7 +355,7 @@ AAgACAAIAAEAAQABAAE</bytes>
|
|||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ContactDetailsLabelViewController</string>
|
||||
<string key="superclassName">UIModalViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">onBackClick:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
|
|
@ -378,14 +383,6 @@ AAgACAAIAAEAAQABAAE</bytes>
|
|||
<string key="minorKey">./Classes/ContactDetailsLabelViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIModalViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIModalViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@
|
|||
<string key="NSFrame">{{0, 59}, {320, 401}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">10</int>
|
||||
|
|
@ -244,6 +245,10 @@ AAgACAAIAAEAAQABAAE</bytes>
|
|||
<double key="IBUIContentInset.left">0.0</double>
|
||||
<double key="IBUIContentInset.right">0.0</double>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<double key="IBUIScrollIndicatorInsets.top">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.bottom">10</double>
|
||||
<double key="IBUIScrollIndicatorInsets.left">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.right">0.0</double>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<int key="IBUISeparatorStyle">2</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
|
|
@ -661,6 +666,17 @@ AAgACAAIAAEAAQABAAE</bytes>
|
|||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIContactDetailsHeader</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">onAvatarClick:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">onAvatarClick:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">onAvatarClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="addressLabel">UILabel</string>
|
||||
<string key="avatarImage">UIImageView</string>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
<string key="NSFrameSize">{320, 58}</string>
|
||||
<reference key="NSSuperview" ref="95706395"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="600417980"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -101,7 +102,7 @@
|
|||
<string key="NSFrame">{{214, 0}, {106, 58}}</string>
|
||||
<reference key="NSSuperview" ref="95706395"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="600417980"/>
|
||||
<reference key="NSNextKeyView" ref="562388802"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
|
|
@ -158,7 +159,7 @@
|
|||
<string key="NSFrameSize">{108, 58}</string>
|
||||
<reference key="NSSuperview" ref="95706395"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="562388802"/>
|
||||
<reference key="NSNextKeyView" ref="257572356"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
|
|
@ -184,7 +185,7 @@
|
|||
<string key="NSFrameSize">{320, 58}</string>
|
||||
<reference key="NSSuperview" ref="812520855"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="257572356"/>
|
||||
<reference key="NSNextKeyView" ref="958933557"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -201,6 +202,7 @@
|
|||
<string key="NSFrame">{{0, 58}, {320, 402}}</string>
|
||||
<reference key="NSSuperview" ref="812520855"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:10</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
|
|
@ -214,6 +216,10 @@
|
|||
<double key="IBUIContentInset.right">0.0</double>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
|
||||
<double key="IBUIScrollIndicatorInsets.top">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.bottom">10</double>
|
||||
<double key="IBUIScrollIndicatorInsets.left">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.right">0.0</double>
|
||||
<int key="IBUISeparatorStyle">1</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
<string key="NSFrameSize">{320, 58}</string>
|
||||
<reference key="NSSuperview" ref="95706395"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="257572356"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -160,7 +161,7 @@
|
|||
<string key="NSFrameSize">{320, 58}</string>
|
||||
<reference key="NSSuperview" ref="812520855"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="257572356"/>
|
||||
<reference key="NSNextKeyView" ref="929072924"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -177,6 +178,7 @@
|
|||
<string key="NSFrame">{{0, 58}, {320, 402}}</string>
|
||||
<reference key="NSSuperview" ref="812520855"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
|
|
@ -189,6 +191,10 @@
|
|||
<double key="IBUIContentInset.left">0.0</double>
|
||||
<double key="IBUIContentInset.right">0.0</double>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<double key="IBUIScrollIndicatorInsets.top">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.bottom">10</double>
|
||||
<double key="IBUIScrollIndicatorInsets.left">0.0</double>
|
||||
<double key="IBUIScrollIndicatorInsets.right">0.0</double>
|
||||
<int key="IBUISeparatorStyle">1</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
<int key="NSvFlags">301</int>
|
||||
<string key="NSFrame">{{-1000, -1000}, {2000, 2000}}</string>
|
||||
<reference key="NSSuperview" ref="1009068048"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1017044170"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
|
|
@ -65,6 +66,7 @@
|
|||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview" ref="1009068048"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="69034748"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:196</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor" id="95762599">
|
||||
|
|
@ -78,6 +80,7 @@
|
|||
<int key="NSvFlags">283</int>
|
||||
<string key="NSFrame">{{220, 360}, {100, 100}}</string>
|
||||
<reference key="NSSuperview" ref="1009068048"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="972197710"/>
|
||||
<reference key="IBUIBackgroundColor" ref="95762599"/>
|
||||
<int key="IBUIContentMode">1</int>
|
||||
|
|
@ -88,6 +91,7 @@
|
|||
<int key="NSvFlags">301</int>
|
||||
<string key="NSFrame">{{141, 212}, {37, 37}}</string>
|
||||
<reference key="NSSuperview" ref="1009068048"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="673568144"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1030</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -99,6 +103,7 @@
|
|||
</object>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview" ref="858247959"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="327164432"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:196</string>
|
||||
<reference key="IBUIBackgroundColor" ref="95762599"/>
|
||||
|
|
@ -109,6 +114,7 @@
|
|||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{0, -10}, {320, 480}}</string>
|
||||
<reference key="NSSuperview" ref="858247959"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1009068048"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:418</string>
|
||||
<reference key="IBUIBackgroundColor" ref="95762599"/>
|
||||
|
|
@ -139,7 +145,7 @@
|
|||
<int key="NSvFlags">-2147483356</int>
|
||||
<string key="NSFrame">{{0, 23}, {85, 33}}</string>
|
||||
<reference key="NSSuperview" ref="858247959"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -172,6 +178,7 @@
|
|||
</object>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="662692377"/>
|
||||
<reference key="IBUIBackgroundColor" ref="95762599"/>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
|
|
@ -438,7 +445,120 @@
|
|||
<nil key="sourceID"/>
|
||||
<int key="maxID">173</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">InCallTableViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/InCallTableViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">InCallViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>callTableController</string>
|
||||
<string>callTableView</string>
|
||||
<string>testVideoView</string>
|
||||
<string>videoCameraSwitch</string>
|
||||
<string>videoGroup</string>
|
||||
<string>videoPreview</string>
|
||||
<string>videoView</string>
|
||||
<string>videoWaitingForFirstImage</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>InCallTableViewController</string>
|
||||
<string>UITableView</string>
|
||||
<string>UIView</string>
|
||||
<string>UICamSwitch</string>
|
||||
<string>UIView</string>
|
||||
<string>UIView</string>
|
||||
<string>UIView</string>
|
||||
<string>UIActivityIndicatorView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>callTableController</string>
|
||||
<string>callTableView</string>
|
||||
<string>testVideoView</string>
|
||||
<string>videoCameraSwitch</string>
|
||||
<string>videoGroup</string>
|
||||
<string>videoPreview</string>
|
||||
<string>videoView</string>
|
||||
<string>videoWaitingForFirstImage</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">callTableController</string>
|
||||
<string key="candidateClassName">InCallTableViewController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">callTableView</string>
|
||||
<string key="candidateClassName">UITableView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">testVideoView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">videoCameraSwitch</string>
|
||||
<string key="candidateClassName">UICamSwitch</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">videoGroup</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">videoPreview</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">videoView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">videoWaitingForFirstImage</string>
|
||||
<string key="candidateClassName">UIActivityIndicatorView</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/InCallViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UICamSwitch</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">preview</string>
|
||||
<string key="NS.object.0">UIView</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">preview</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">preview</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UICamSwitch.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
|
||||
|
|
|
|||
|
|
@ -225,7 +225,11 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler);
|
||||
|
||||
[changedDict release];
|
||||
changedDict=[[NSMutableDictionary alloc] init];
|
||||
changedDict = [[NSMutableDictionary alloc] init];
|
||||
|
||||
// Post event
|
||||
NSDictionary *eventDic = [NSDictionary dictionaryWithObject:self forKey:@"settings"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneLogsUpdate object:self userInfo:eventDic];
|
||||
}
|
||||
|
||||
- (void)setObject:(id)value forKey:(NSString *)key {
|
||||
|
|
@ -516,6 +520,11 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
|
||||
[changedDict release];
|
||||
changedDict = [[NSMutableDictionary alloc] init];
|
||||
|
||||
// Post event
|
||||
NSDictionary *eventDic = [NSDictionary dictionaryWithObject:self forKey:@"settings"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneLogsUpdate object:self userInfo:eventDic];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <sqlite3.h>
|
||||
|
||||
#import "LogView.h"
|
||||
#import "IASKSettingsReader.h"
|
||||
#import "IASKSettingsStore.h"
|
||||
#import "IASKAppSettingsViewController.h"
|
||||
|
|
@ -32,12 +31,15 @@
|
|||
|
||||
#include "linphonecore.h"
|
||||
|
||||
extern NSString *const kLinphoneDisplayStatusUpdate;
|
||||
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 kLinphoneLogsUpdate;
|
||||
extern NSString *const kLinphoneSettingsUpdate;
|
||||
|
||||
extern NSString *const kContactSipField;
|
||||
|
||||
|
|
@ -126,6 +128,7 @@ typedef struct _LinphoneManagerSounds {
|
|||
@property (readonly) sqlite3* database;
|
||||
@property (nonatomic, retain) NSData *pushNotificationToken;
|
||||
@property (readonly) LinphoneManagerSounds sounds;
|
||||
@property (readonly) NSMutableArray *logs;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
|||
|
|
@ -38,12 +38,15 @@
|
|||
static LinphoneCore* theLinphoneCore = nil;
|
||||
static LinphoneManager* theLinphoneManager = nil;
|
||||
|
||||
NSString *const kLinphoneDisplayStatusUpdate = @"LinphoneDisplayStatusUpdate";
|
||||
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 kLinphoneLogsUpdate = @"LinphoneLogsUpdate";
|
||||
NSString *const kLinphoneSettingsUpdate = @"LinphoneSettingsUpdate";
|
||||
NSString *const kContactSipField = @"SIP";
|
||||
|
||||
extern void libmsilbc_init();
|
||||
|
|
@ -76,6 +79,7 @@ extern void libmsbcg729_init();
|
|||
@synthesize fastAddressBook;
|
||||
@synthesize pushNotificationToken;
|
||||
@synthesize sounds;
|
||||
@synthesize logs;
|
||||
|
||||
struct codec_name_pref_table{
|
||||
const char *name;
|
||||
|
|
@ -195,6 +199,7 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
}
|
||||
}
|
||||
inhibitedEvent = [[NSMutableArray alloc] init];
|
||||
logs = [[NSMutableArray alloc] init];
|
||||
database = NULL;
|
||||
settingsStore = nil;
|
||||
self.defaultExpires = 600;
|
||||
|
|
@ -216,6 +221,7 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
[fastAddressBook release];
|
||||
[self closeDatabase];
|
||||
[settingsStore release];
|
||||
[logs release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
|
@ -263,7 +269,15 @@ 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];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[LinphoneManager instance].logs addObject:formatedString];
|
||||
|
||||
// Post event
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithObject:formatedString forKey:@"log"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneLogsUpdate object:[LinphoneManager instance] userInfo:dict];
|
||||
});
|
||||
|
||||
[formatedString release];
|
||||
[format release];
|
||||
}
|
||||
|
|
@ -272,7 +286,14 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args){
|
|||
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];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[LinphoneManager instance].logs addObject:log];
|
||||
|
||||
// Post event
|
||||
NSDictionary *dict = [NSDictionary dictionaryWithObject:log forKey:@"log"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneLogsUpdate object:[LinphoneManager instance] userInfo:dict];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -280,10 +301,10 @@ static void linphone_iphone_log(struct _LinphoneCore * lc, const char * message)
|
|||
|
||||
- (void)displayStatus:(NSString*) message {
|
||||
// Post event
|
||||
NSDictionary* dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
message, @"message",
|
||||
nil] autorelease];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneDisplayStatus" object:self userInfo:dict];
|
||||
nil];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneDisplayStatusUpdate object:self userInfo:dict];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -330,11 +351,11 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
}
|
||||
|
||||
// Post event
|
||||
NSDictionary* dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSValue valueWithPointer:call], @"call",
|
||||
[NSNumber numberWithInt:state], @"state",
|
||||
[NSString stringWithUTF8String:message], @"message", nil] autorelease];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneCallUpdate" object:self userInfo:dict];
|
||||
[NSString stringWithUTF8String:message], @"message", nil];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneCallUpdate object:self userInfo:dict];
|
||||
}
|
||||
|
||||
static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, LinphoneCallState state,const char* message) {
|
||||
|
|
@ -354,12 +375,12 @@ static void linphone_iphone_transfer_state_changed(LinphoneCore* lc, LinphoneCal
|
|||
[LinphoneLogger logc:LinphoneLoggerLog format:"NEW REGISTRATION STATE: '%s' (message: '%s')", linphone_registration_state_to_string(state), message];
|
||||
|
||||
// Post event
|
||||
NSDictionary* dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInt:state], @"state",
|
||||
[NSValue valueWithPointer:cfg], @"cfg",
|
||||
[NSString stringWithUTF8String:message], @"message",
|
||||
nil] autorelease];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneRegistrationUpdate" object:self userInfo:dict];
|
||||
nil];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneRegistrationUpdate object:self userInfo:dict];
|
||||
}
|
||||
|
||||
static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyConfig* cfg, LinphoneRegistrationState state,const char* message) {
|
||||
|
|
@ -388,13 +409,13 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
|
|||
ms_free(fromStr);
|
||||
|
||||
// Post event
|
||||
NSDictionary* dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSValue valueWithPointer:room], @"room",
|
||||
[NSValue valueWithPointer:from], @"from",
|
||||
[NSString stringWithUTF8String:message], @"message",
|
||||
chat, @"chat",
|
||||
nil] autorelease];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"LinphoneTextReceived" object:self userInfo:dict];
|
||||
nil];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneTextReceived object:self userInfo:dict];
|
||||
[chat release];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
/* LogView.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 <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@protocol LogView
|
||||
-(void) addLog:(NSString*) log;
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -38,6 +38,7 @@
|
|||
#import "FirstLoginViewController.h"
|
||||
#import "WizardViewController.h"
|
||||
#import "IncomingCallViewController.h"
|
||||
#import "ConsoleViewController.h"
|
||||
|
||||
@interface PhoneMainView : UIViewController<CallActionSheetDelegate, IncomingCallViewDelegate> {
|
||||
@private
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
}
|
||||
|
||||
- (UIViewController*)_changeCurrentView:(UICompositeViewDescription*)view transition:(CATransition*)transition force:(BOOL)force {
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"PhoneMainView: change view %d", [view name]];
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"PhoneMainView: Change current view to %@", [view name]];
|
||||
|
||||
if(force || ![view equal: currentView]) {
|
||||
if(transition == nil)
|
||||
|
|
|
|||
|
|
@ -451,6 +451,15 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[hiddenKeys addObject:@"ice_preference"];
|
||||
}
|
||||
[settingsController setHiddenKeys:hiddenKeys animated:TRUE];
|
||||
} else if ([@"debugenable_preference" compare: notif.object] == NSOrderedSame) {
|
||||
NSMutableSet *hiddenKeys = [NSMutableSet setWithSet:[settingsController hiddenKeys]];
|
||||
BOOL debugEnable = [[notif.userInfo objectForKey:@"debugenable_preference"] boolValue];
|
||||
if (debugEnable) {
|
||||
[hiddenKeys removeObject:@"console_button"];
|
||||
} else {
|
||||
[hiddenKeys addObject:@"console_button"];
|
||||
}
|
||||
[settingsController setHiddenKeys:hiddenKeys animated:TRUE];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -493,6 +502,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[hiddenKeys addObject:@"video_menu"];
|
||||
}
|
||||
|
||||
|
||||
[hiddenKeys addObjectsFromArray:[[LinphoneManager unsupportedCodecs] allObjects]];
|
||||
|
||||
if([[[[LinphoneManager instance] settingsStore] objectForKey:@"random_port_preference"] boolValue]) {
|
||||
|
|
@ -503,6 +513,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[hiddenKeys addObject:@"ice_preference"];
|
||||
}
|
||||
|
||||
if(![[[[LinphoneManager instance] settingsStore] objectForKey:@"debugenable_preference"] boolValue]) {
|
||||
[hiddenKeys addObject:@"console_button"];
|
||||
}
|
||||
|
||||
return hiddenKeys;
|
||||
}
|
||||
|
||||
|
|
@ -524,5 +538,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[[PhoneMainView instance].mainViewController clearCache];
|
||||
}
|
||||
#endif
|
||||
if([key isEqual:@"console_button"]) {
|
||||
[[PhoneMainView instance] changeCurrentView:[ConsoleViewController compositeViewDescription] push:TRUE];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Debug</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
|
|
@ -14,6 +20,20 @@
|
|||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Key</key>
|
||||
<string>console_button</string>
|
||||
<key>Title</key>
|
||||
<string>Console</string>
|
||||
<key>Type</key>
|
||||
<string>IASKButtonSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string></string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
|
|
|
|||
|
|
@ -1329,7 +1329,6 @@
|
|||
2214EB8812F84EBB002A5394 /* UIHangUpButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIHangUpButton.m; sourceTree = "<group>"; };
|
||||
2214EBF112F86360002A5394 /* UIMicroButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIMicroButton.h; sourceTree = "<group>"; };
|
||||
2214EBF212F86360002A5394 /* UIMicroButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIMicroButton.m; sourceTree = "<group>"; };
|
||||
2218A5CE12F973450088A667 /* LogView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogView.h; sourceTree = "<group>"; };
|
||||
2218A92212FBE1340088A667 /* FirstLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FirstLoginViewController.h; sourceTree = "<group>"; };
|
||||
2218A92312FBE1340088A667 /* FirstLoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = FirstLoginViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
||||
2218A92412FBE1340088A667 /* FirstLoginViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FirstLoginViewController.xib; sourceTree = "<group>"; };
|
||||
|
|
@ -2428,7 +2427,6 @@
|
|||
2214EB7012F84668002A5394 /* LinphoneUI */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2218A5CE12F973450088A667 /* LogView.h */,
|
||||
D35E757F159328EA0066B1C1 /* UIAddressTextField.h */,
|
||||
D35E7580159328EB0066B1C1 /* UIAddressTextField.m */,
|
||||
22C7555E1317E59C007BC101 /* UIBluetoothButton.h */,
|
||||
|
|
@ -4589,6 +4587,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COMPRESS_PNG_FILES = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
|
|
@ -4637,6 +4636,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COMPRESS_PNG_FILES = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
|
|
@ -4685,6 +4685,7 @@
|
|||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = "";
|
||||
COMPRESS_PNG_FILES = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
|
|
@ -4733,6 +4734,7 @@
|
|||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = "";
|
||||
COMPRESS_PNG_FILES = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue