mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 13:08:08 +00:00
fix incall view
fix incoming call with no userinfo
This commit is contained in:
parent
b502892764
commit
2c1d1eafc6
8 changed files with 166 additions and 208 deletions
|
|
@ -20,52 +20,45 @@
|
|||
#import "linphonecore.h"
|
||||
#import "PhoneViewController.h"
|
||||
#import <AddressBookUI/ABPeoplePickerNavigationController.h>
|
||||
#include "UILinphone.h"
|
||||
|
||||
|
||||
@interface IncallViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate> {
|
||||
LinphoneCore* myLinphoneCore;
|
||||
id<PhoneViewControllerDelegate> phoneviewDelegate;
|
||||
NSTimer *durationRefreasher;
|
||||
@interface IncallViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate,LinphoneUICallDelegate> {
|
||||
|
||||
|
||||
UIView* controlSubView;
|
||||
UIView* padSubView;
|
||||
|
||||
UILabel* peerName;
|
||||
UILabel* peerNumber;
|
||||
UILabel* callDuration;
|
||||
UIDuration* callDuration;
|
||||
UILabel* status;
|
||||
UIButton* end;
|
||||
UIHangUpButton* end;
|
||||
UIButton* dialer;
|
||||
UIButton* mute;
|
||||
UIButton* speaker;
|
||||
UIMuteButton* mute;
|
||||
UISpeakerButton* speaker;
|
||||
UIButton* contacts;
|
||||
|
||||
|
||||
//key pad
|
||||
UIButton* one;
|
||||
UIButton* two;
|
||||
UIButton* three;
|
||||
UIButton* four;
|
||||
UIButton* five;
|
||||
UIButton* six;
|
||||
UIButton* seven;
|
||||
UIButton* eight;
|
||||
UIButton* nine;
|
||||
UIButton* star;
|
||||
UIButton* zero;
|
||||
UIButton* hash;
|
||||
|
||||
|
||||
UIView* padSubView;
|
||||
UIDigitButton* one;
|
||||
UIDigitButton* two;
|
||||
UIDigitButton* three;
|
||||
UIDigitButton* four;
|
||||
UIDigitButton* five;
|
||||
UIDigitButton* six;
|
||||
UIDigitButton* seven;
|
||||
UIDigitButton* eight;
|
||||
UIDigitButton* nine;
|
||||
UIDigitButton* star;
|
||||
UIDigitButton* zero;
|
||||
UIDigitButton* hash;
|
||||
UIButton* close;
|
||||
|
||||
bool isMuted;
|
||||
bool isSpeaker;
|
||||
|
||||
ABPeoplePickerNavigationController* myPeoplePickerController;
|
||||
}
|
||||
|
||||
-(void) setLinphoneCore:(LinphoneCore*) lc;
|
||||
-(void) startCall;
|
||||
|
||||
-(void)displayStatus:(NSString*) message;
|
||||
|
||||
- (IBAction)doAction:(id)sender;
|
||||
|
|
@ -98,5 +91,4 @@
|
|||
@property (nonatomic, retain) IBOutlet UIButton* hash;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* close;
|
||||
|
||||
@property (nonatomic, retain) id<PhoneViewControllerDelegate> phoneviewDelegate;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
@implementation IncallViewController
|
||||
@synthesize phoneviewDelegate;
|
||||
|
||||
|
||||
@synthesize controlSubView;
|
||||
@synthesize padSubView;
|
||||
|
|
@ -68,104 +68,60 @@
|
|||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
isMuted = false;
|
||||
isSpeaker = false;
|
||||
//Controls
|
||||
[mute initWithOnImage:[UIImage imageNamed:@"mic_muted.png"] offImage:[UIImage imageNamed:@"mic_active.png"] ];
|
||||
[speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ];
|
||||
|
||||
//Dialer init
|
||||
[zero initWithNumber:'0'];
|
||||
[one initWithNumber:'1'];
|
||||
[two initWithNumber:'2'];
|
||||
[three initWithNumber:'3'];
|
||||
[four initWithNumber:'4'];
|
||||
[five initWithNumber:'5'];
|
||||
[six initWithNumber:'6'];
|
||||
[seven initWithNumber:'7'];
|
||||
[eight initWithNumber:'8'];
|
||||
[nine initWithNumber:'9'];
|
||||
[star initWithNumber:'*'];
|
||||
[hash initWithNumber:'#'];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Override to allow orientations other than the default portrait orientation.
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
// Return YES for supported orientations
|
||||
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
||||
}
|
||||
*/
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
if (durationRefreasher != nil) {
|
||||
[ durationRefreasher invalidate];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void) setLinphoneCore:(LinphoneCore*) lc {
|
||||
myLinphoneCore = lc;
|
||||
}
|
||||
|
||||
-(void)displayStatus:(NSString*) message {
|
||||
-(void) displayStatus:(NSString*) message; {
|
||||
[status setText:message];
|
||||
}
|
||||
|
||||
-(void) startCall {
|
||||
const LinphoneAddress* address = linphone_core_get_remote_uri(myLinphoneCore);
|
||||
const char* displayName = linphone_address_get_display_name(address)?linphone_address_get_display_name(address):"";
|
||||
[peerName setText:[NSString stringWithCString:displayName length:strlen(displayName)]];
|
||||
|
||||
const char* username = linphone_address_get_username(address)!=0?linphone_address_get_username(address):"";
|
||||
[peerNumber setText:[NSString stringWithCString:username length:strlen(username)]];
|
||||
// start scheduler
|
||||
durationRefreasher = [NSTimer scheduledTimerWithTimeInterval:1
|
||||
target:self
|
||||
selector:@selector(updateCallDuration)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
|
||||
}
|
||||
|
||||
-(void)updateCallDuration {
|
||||
int lDuration = linphone_core_get_current_call_duration(myLinphoneCore);
|
||||
if (lDuration < 60) {
|
||||
[callDuration setText:[NSString stringWithFormat: @"%i s", lDuration]];
|
||||
-(void) displayCallInProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
if (displayName && [displayName length]>0) {
|
||||
[peerName setText:displayName];
|
||||
[peerNumber setText:username];
|
||||
} else {
|
||||
[callDuration setText:[NSString stringWithFormat: @"%i:%i", lDuration/60,lDuration - 60 *(lDuration/60)]];
|
||||
[peerName setText:username];
|
||||
[peerNumber setText:@""];
|
||||
}
|
||||
[callDuration setText:@"Calling"];
|
||||
}
|
||||
|
||||
-(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[callDuration start];
|
||||
}
|
||||
-(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[callDuration stop];
|
||||
[self dismissModalViewControllerAnimated:true];
|
||||
}
|
||||
- (IBAction)doAction:(id)sender {
|
||||
|
||||
if (linphone_core_in_call(myLinphoneCore)) {
|
||||
//incall behavior
|
||||
if (sender == one) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'1');
|
||||
} else if (sender == two) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'2');
|
||||
} else if (sender == three) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'3');
|
||||
} else if (sender == four) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'4');
|
||||
} else if (sender == five) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'5');
|
||||
} else if (sender == six) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'6');
|
||||
} else if (sender == seven) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'7');
|
||||
} else if (sender == eight) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'8');
|
||||
} else if (sender == nine) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'9');
|
||||
} else if (sender == star) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'*');
|
||||
} else if (sender == zero) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'0');
|
||||
} else if (sender == hash) {
|
||||
linphone_core_send_dtmf(myLinphoneCore,'#');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sender == end) {
|
||||
linphone_core_terminate_call(myLinphoneCore,NULL);
|
||||
} else if (sender == dialer) {
|
||||
if (sender == dialer) {
|
||||
[controlSubView setHidden:true];
|
||||
[padSubView setHidden:false];
|
||||
|
||||
|
|
@ -173,43 +129,12 @@
|
|||
// start people picker
|
||||
myPeoplePickerController = [[[ABPeoplePickerNavigationController alloc] init] autorelease];
|
||||
[myPeoplePickerController setPeoplePickerDelegate:self];
|
||||
|
||||
|
||||
[self presentModalViewController: myPeoplePickerController animated:true];
|
||||
} else if (sender == close) {
|
||||
[controlSubView setHidden:false];
|
||||
[padSubView setHidden:true];
|
||||
} else if (sender == mute) {
|
||||
isMuted = isMuted?false:true;
|
||||
linphone_core_mute_mic(myLinphoneCore,isMuted);
|
||||
// swithc buttun state
|
||||
UIImage * tmpImage = [mute backgroundImageForState: UIControlStateNormal];
|
||||
[mute setBackgroundImage:[mute backgroundImageForState: UIControlStateHighlighted] forState:UIControlStateNormal];
|
||||
[mute setBackgroundImage:tmpImage forState:UIControlStateHighlighted];
|
||||
|
||||
} else if (sender == speaker) {
|
||||
isSpeaker = isSpeaker?false:true;
|
||||
if (isSpeaker) {
|
||||
//redirect audio to speaker
|
||||
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
|
||||
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
|
||||
, sizeof (audioRouteOverride)
|
||||
, &audioRouteOverride);
|
||||
} else {
|
||||
//Cancel audio route redirection
|
||||
UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_None;
|
||||
AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute
|
||||
, sizeof (audioRouteOverride)
|
||||
, &audioRouteOverride);
|
||||
}
|
||||
// switch button state
|
||||
UIImage * tmpImage = [speaker backgroundImageForState: UIControlStateNormal];
|
||||
[speaker setBackgroundImage:[speaker backgroundImageForState: UIControlStateHighlighted] forState:UIControlStateNormal];
|
||||
[speaker setBackgroundImage:tmpImage forState:UIControlStateHighlighted];
|
||||
|
||||
}else {
|
||||
NSLog(@"unknown event from incall view");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// handle people picker behavior
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="9"/>
|
||||
<integer value="26"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
|
@ -43,18 +43,6 @@
|
|||
<int key="NSvFlags">274</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIActivityIndicatorView" id="275734970">
|
||||
<reference key="NSNextResponder" ref="858247959"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{150, 220}, {20, 20}}</string>
|
||||
<reference key="NSSuperview" ref="858247959"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIHidesWhenStopped">NO</bool>
|
||||
<int key="IBUIStyle">2</int>
|
||||
</object>
|
||||
<object class="IBUILabel" id="357639611">
|
||||
<reference key="NSNextResponder" ref="858247959"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
|
|
@ -155,12 +143,12 @@
|
|||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">mic_active.png</string>
|
||||
</object>
|
||||
<reference key="IBUINormalImage" ref="436895690"/>
|
||||
<object class="NSCustomResource" key="IBUIHighlightedBackgroundImage" id="132679557">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">mic_muted.png</string>
|
||||
</object>
|
||||
<reference key="IBUISelectedBackgroundImage" ref="132679557"/>
|
||||
<reference key="IBUINormalBackgroundImage" ref="436895690"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="953411930">
|
||||
<reference key="NSNextResponder" ref="585669622"/>
|
||||
|
|
@ -196,15 +184,13 @@
|
|||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<reference key="IBUIFont" ref="755582794"/>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<string key="IBUINormalTitle">Contacts</string>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="816037173"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
|
||||
</object>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="785445938"/>
|
||||
<object class="NSCustomResource" key="IBUINormalBackgroundImage">
|
||||
<object class="NSCustomResource" key="IBUINormalImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">contact-orange.png</string>
|
||||
</object>
|
||||
|
|
@ -220,8 +206,6 @@
|
|||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<reference key="IBUIFont" ref="755582794"/>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<string key="IBUINormalTitle">Dialer</string>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="816037173"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
|
|
@ -244,8 +228,6 @@
|
|||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<reference key="IBUIFont" ref="755582794"/>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<string key="IBUINormalTitle">Spk</string>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="816037173"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
|
|
@ -556,7 +538,7 @@
|
|||
<reference key="IBUINormalTitleShadowColor" ref="785445938"/>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{25, 110}, {270, 317}}</string>
|
||||
<string key="NSFrame">{{400, 110}, {270, 317}}</string>
|
||||
<reference key="NSSuperview" ref="858247959"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -918,15 +900,6 @@
|
|||
</object>
|
||||
<int key="connectionID">84</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">doAction:</string>
|
||||
<reference key="source" ref="478667533"/>
|
||||
<reference key="destination" ref="841351856"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">85</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">peerName</string>
|
||||
|
|
@ -999,7 +972,6 @@
|
|||
<reference ref="357639611"/>
|
||||
<reference ref="671407802"/>
|
||||
<reference ref="983423469"/>
|
||||
<reference ref="275734970"/>
|
||||
<reference ref="620882994"/>
|
||||
</object>
|
||||
<reference key="parent" ref="981679694"/>
|
||||
|
|
@ -1173,11 +1145,6 @@
|
|||
<reference key="parent" ref="759087764"/>
|
||||
<string key="objectName">0</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">92</int>
|
||||
<reference key="object" ref="275734970"/>
|
||||
<reference key="parent" ref="858247959"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">93</int>
|
||||
<reference key="object" ref="620882994"/>
|
||||
|
|
@ -1194,32 +1161,48 @@
|
|||
<string>-2.CustomClassName</string>
|
||||
<string>10.IBPluginDependency</string>
|
||||
<string>11.IBPluginDependency</string>
|
||||
<string>12.CustomClassName</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>13.CustomClassName</string>
|
||||
<string>13.IBPluginDependency</string>
|
||||
<string>15.IBPluginDependency</string>
|
||||
<string>16.CustomClassName</string>
|
||||
<string>16.IBPluginDependency</string>
|
||||
<string>17.IBPluginDependency</string>
|
||||
<string>18.CustomClassName</string>
|
||||
<string>18.IBPluginDependency</string>
|
||||
<string>2.IBEditorWindowLastContentRect</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>26.IBPluginDependency</string>
|
||||
<string>27.IBPluginDependency</string>
|
||||
<string>28.CustomClassName</string>
|
||||
<string>28.IBPluginDependency</string>
|
||||
<string>29.IBPluginDependency</string>
|
||||
<string>30.CustomClassName</string>
|
||||
<string>30.IBPluginDependency</string>
|
||||
<string>31.CustomClassName</string>
|
||||
<string>31.IBPluginDependency</string>
|
||||
<string>32.CustomClassName</string>
|
||||
<string>32.IBPluginDependency</string>
|
||||
<string>33.CustomClassName</string>
|
||||
<string>33.IBPluginDependency</string>
|
||||
<string>34.CustomClassName</string>
|
||||
<string>34.IBPluginDependency</string>
|
||||
<string>35.CustomClassName</string>
|
||||
<string>35.IBPluginDependency</string>
|
||||
<string>36.CustomClassName</string>
|
||||
<string>36.IBPluginDependency</string>
|
||||
<string>37.CustomClassName</string>
|
||||
<string>37.IBPluginDependency</string>
|
||||
<string>38.CustomClassName</string>
|
||||
<string>38.IBPluginDependency</string>
|
||||
<string>39.CustomClassName</string>
|
||||
<string>39.IBPluginDependency</string>
|
||||
<string>40.CustomClassName</string>
|
||||
<string>40.IBPluginDependency</string>
|
||||
<string>41.CustomClassName</string>
|
||||
<string>41.IBPluginDependency</string>
|
||||
<string>9.IBPluginDependency</string>
|
||||
<string>92.IBPluginDependency</string>
|
||||
<string>93.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
|
|
@ -1228,30 +1211,46 @@
|
|||
<string>UIResponder</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDuration</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UISpeakerButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIMuteButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIHangUpButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>{{14, 634}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIHangUpButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIDigitButton</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
|
|
@ -1312,7 +1311,6 @@
|
|||
<string>padSubView</string>
|
||||
<string>peerName</string>
|
||||
<string>peerNumber</string>
|
||||
<string>phoneviewDelegate</string>
|
||||
<string>seven</string>
|
||||
<string>six</string>
|
||||
<string>speaker</string>
|
||||
|
|
@ -1340,7 +1338,6 @@
|
|||
<string>UIView</string>
|
||||
<string>UILabel</string>
|
||||
<string>UILabel</string>
|
||||
<string>id</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
<string>UIButton</string>
|
||||
|
|
@ -1371,7 +1368,6 @@
|
|||
<string>padSubView</string>
|
||||
<string>peerName</string>
|
||||
<string>peerNumber</string>
|
||||
<string>phoneviewDelegate</string>
|
||||
<string>seven</string>
|
||||
<string>six</string>
|
||||
<string>speaker</string>
|
||||
|
|
@ -1447,10 +1443,6 @@
|
|||
<string key="name">peerNumber</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">phoneviewDelegate</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">seven</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
|
|
@ -1490,6 +1482,65 @@
|
|||
<string key="minorKey">Classes/IncallViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIDigitButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/LinphoneUI/UIDigitButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIDuration</string>
|
||||
<string key="superclassName">UILabel</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/LinphoneUI/UIDuration.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIHangUpButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/LinphoneUI/UIHangUpButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIMuteButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/LinphoneUI/UIMuteButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UISpeakerButton</string>
|
||||
<string key="superclassName">UIToggleButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/LinphoneUI/UISpeakerButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIToggleButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">mActionHandler</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">mActionHandler</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">mActionHandler</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">Classes/LinphoneUI/UIToggleButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
|
@ -1584,14 +1635,6 @@
|
|||
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIActivityIndicatorView</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">UIKit.framework/Headers/UIActivityIndicatorView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIButton</string>
|
||||
<string key="superclassName">UIControl</string>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ extern void libmsilbc_init();
|
|||
}
|
||||
|
||||
-(void) onCall:(LinphoneCall*) currentCall StateChanged: (LinphoneCallState) new_state withMessage: (const char *) message {
|
||||
NSString* lUserName = [[NSString alloc] initWithCString:linphone_address_get_username(linphone_call_get_remote_address(currentCall))];
|
||||
const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(currentCall));
|
||||
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithCString:lUserNameChars]:@"Unknown";
|
||||
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(currentCall));
|
||||
NSString* lDisplayName = lDisplayNameChars?[[NSString alloc] initWithCString:lDisplayNameChars]:@"";
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
UITextField* mAddress;
|
||||
|
||||
}
|
||||
-(void) initWithNumber:(char)digit ;
|
||||
-(void) initWithNumber:(char)digit addressField:(UITextField*) address;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
|
||||
-(void) touchDown:(id) sender {
|
||||
if (!linphone_core_in_call([LinphoneManager getLc])) {
|
||||
if (mAddress && !linphone_core_in_call([LinphoneManager getLc])) {
|
||||
NSString* newAddress = [NSString stringWithFormat:@"%@%c",mAddress.text,mDigit];
|
||||
[mAddress setText:newAddress];
|
||||
linphone_core_play_dtmf([LinphoneManager getLc], mDigit, -1);
|
||||
|
|
@ -58,9 +58,12 @@
|
|||
|
||||
}
|
||||
|
||||
-(void) initWithNumber:(char)digit {
|
||||
[self initWithNumber:digit addressField:nil];
|
||||
}
|
||||
-(void) initWithNumber:(char)digit addressField:(UITextField*) address{
|
||||
mDigit=digit ;
|
||||
mAddress=[address retain];
|
||||
mAddress=address?[address retain]:nil;
|
||||
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
|
||||
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
UIButton* back;
|
||||
|
||||
UITabBarController* myTabBarController;
|
||||
IncallViewController *myIncallViewController;
|
||||
|
||||
UIActionSheet *mIncomingCallActionSheet;
|
||||
FirstLoginViewController* myFirstLoginViewController;
|
||||
|
||||
|
|
|
|||
|
|
@ -214,9 +214,6 @@
|
|||
//status reporting
|
||||
-(void) displayStatus:(NSString*) message {
|
||||
[status setText:message];
|
||||
if (myIncallViewController != nil) {
|
||||
[myIncallViewController displayStatus:message];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -255,10 +252,7 @@
|
|||
}
|
||||
mIncomingCallActionSheet = nil;
|
||||
}
|
||||
-(void) displayFirstLoginUI:(UIWindow *) window {
|
||||
|
||||
|
||||
}
|
||||
- (void)dealloc {
|
||||
[address dealloc];
|
||||
[ mDisplayName dealloc];
|
||||
|
|
@ -284,7 +278,6 @@
|
|||
[hash dealloc];
|
||||
[back dealloc];
|
||||
[myTabBarController release];
|
||||
[myIncallViewController release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue