diff --git a/Classes/ConferenceCallDetailCell.xib b/Classes/ConferenceCallDetailCell.xib
new file mode 100644
index 000000000..9feae9f9c
--- /dev/null
+++ b/Classes/ConferenceCallDetailCell.xib
@@ -0,0 +1,238 @@
+
+
+
+ 1280
+ 11C74
+ 1938
+ 1138.23
+ 567.00
+
+
+ IBUITableViewCell
+ IBUIImageView
+ IBUILabel
+ IBProxyObject
+
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+
+
+
+
+
+
+
+
+
+ conferenceDetailCell
+
+
+
+ 7
+
+
+
+
+
+ 0
+
+
+
+
+
+ -1
+
+
+ File's Owner
+
+
+ -2
+
+
+
+
+ 3
+
+
+
+
+
+
+
+
+ 5
+
+
+
+
+ 6
+
+
+
+
+
+
+ ConferenceCallDetailView
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ UIResponder
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+
+
+
+ 7
+
+
+
+
+ ConferenceCallDetailView
+ UIViewController
+
+ UIButton
+ UIButton
+ UITableViewCell
+ UIButton
+ UIButton
+ UIButton
+ UITableView
+
+
+
+ addCall
+ UIButton
+
+
+ back
+ UIButton
+
+
+ conferenceDetailCell
+ UITableViewCell
+
+
+ hangup
+ UIButton
+
+
+ mute
+ UIButton
+
+
+ speaker
+ UIButton
+
+
+ table
+ UITableView
+
+
+
+ IBProjectSource
+ ./Classes/ConferenceCallDetailView.h
+
+
+
+
+ 0
+ IBCocoaTouchFramework
+ YES
+ 3
+ 933
+
+
diff --git a/Classes/ConferenceCallDetailView.h b/Classes/ConferenceCallDetailView.h
new file mode 100644
index 000000000..ccc5d10c8
--- /dev/null
+++ b/Classes/ConferenceCallDetailView.h
@@ -0,0 +1,32 @@
+//
+// ConferenceCallDetailView.h
+// linphone
+//
+// Created by Pierre-Eric Pelloux-Prayer on 25/11/11.
+// Copyright (c) 2011 Belledonne Communications. All rights reserved.
+//
+
+#import
+#import "LinphoneUI/UIMuteButton.h"
+#import "LinphoneUI/UISpeakerButton.h"
+
+@interface ConferenceCallDetailView : UIViewController {
+
+ UIMuteButton* mute;
+ UISpeakerButton* speaker;
+ UIButton* back;
+ UIButton* hangup;
+ UITableView* table;
+
+ UITableViewCell* conferenceDetailCell;
+}
+
+@property (nonatomic, retain) IBOutlet UIButton* mute;
+@property (nonatomic, retain) IBOutlet UIButton* speaker;
+@property (nonatomic, retain) IBOutlet UIButton* addCall;
+@property (nonatomic, retain) IBOutlet UIButton* back;
+@property (nonatomic, retain) IBOutlet UIButton* hangup;
+@property (nonatomic, retain) IBOutlet UITableView* table;
+
+@property (nonatomic, assign) IBOutlet UITableViewCell* conferenceDetailCell;
+@end
diff --git a/Classes/ConferenceCallDetailView.m b/Classes/ConferenceCallDetailView.m
new file mode 100644
index 000000000..0ca6890c5
--- /dev/null
+++ b/Classes/ConferenceCallDetailView.m
@@ -0,0 +1,114 @@
+//
+// ConferenceCallDetailView.m
+// linphone
+//
+// Created by Pierre-Eric Pelloux-Prayer on 25/11/11.
+// Copyright (c) 2011 Belledonne Communications. All rights reserved.
+//
+
+#import "ConferenceCallDetailView.h"
+#import "linphonecore.h"
+#import "LinphoneManager.h"
+#import "IncallViewController.h"
+
+@implementation ConferenceCallDetailView
+
+@synthesize mute;
+@synthesize speaker;
+@synthesize back;
+@synthesize hangup;
+@synthesize table;
+
+@synthesize conferenceDetailCell;
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void)didReceiveMemoryWarning
+{
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ [back addTarget:self action:@selector(backButtonPressed) forControlEvents:UIControlEventTouchUpInside];
+
+ table.rowHeight = 80;
+
+ [mute initWithOnImage:[UIImage imageNamed:@"micro_inverse.png"] offImage:[UIImage imageNamed:@"micro.png"] ];
+ [speaker initWithOnImage:[UIImage imageNamed:@"HP_inverse.png"] offImage:[UIImage imageNamed:@"HP.png"] ];
+}
+
+-(void) backButtonPressed {
+ [self dismissModalViewControllerAnimated:YES];
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ // Return YES for supported orientations
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+-(void) viewWillAppear:(BOOL)animated {
+ [table reloadData];
+ [mute reset];
+ [speaker reset];
+}
+
+#pragma mark - UITableView delegates
+-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+ if (indexPath.row % 2)
+ cell.backgroundColor = [UIColor lightGrayColor];
+ else
+ cell.backgroundColor = [UIColor darkGrayColor];
+}
+
+-(UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+ static NSString* identifier = @"ConferenceDetailCellIdentifier";
+ UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:identifier];
+ if (cell == nil) {
+ [[NSBundle mainBundle] loadNibNamed:@"ConferenceCallDetailCell" owner:self options:nil];
+ cell = conferenceDetailCell;
+ self.conferenceDetailCell = nil;
+ }
+
+ /* retrieve cell's fields using tags */
+ UIImageView* image = (UIImageView*) [cell viewWithTag:1];
+ UILabel* label = (UILabel*) [cell viewWithTag:2];
+
+ /* update cell content */
+ LinphoneCall* call = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:YES];
+ [IncallViewController updateCellImageView:image Label:label DetailLabel:nil AndAccessoryView:nil withCall:call];
+
+ tableView.rowHeight = 80;//cell.bounds.size.height;
+
+ return cell;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ LinphoneCore* lc = [LinphoneManager getLc];
+ int result = linphone_core_get_conference_size(lc) - (int)linphone_core_is_in_conference(lc);
+ return result;
+}
+
+@end
diff --git a/Classes/ConferenceCallDetailView.xib b/Classes/ConferenceCallDetailView.xib
new file mode 100644
index 000000000..d756d676e
--- /dev/null
+++ b/Classes/ConferenceCallDetailView.xib
@@ -0,0 +1,477 @@
+
+
+
+ 1280
+ 11C74
+ 1938
+ 1138.23
+ 567.00
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ 933
+
+
+ IBUITableView
+ IBUIButton
+ IBUIView
+ IBProxyObject
+
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+ PluginDependencyRecalculationVersion
+
+
+
+
+ IBFilesOwner
+ IBCocoaTouchFramework
+
+
+ IBFirstResponder
+ IBCocoaTouchFramework
+
+
+
+ 274
+
+
+
+ 274
+ {320, 328}
+
+
+
+ _NS:418
+
+ 3
+ MCAwAA
+
+ YES
+ IBCocoaTouchFramework
+ YES
+ 0
+ YES
+ 44
+ 22
+ 22
+
+
+
+ 292
+ {{107, 328}, {106, 66}}
+
+
+
+
+ NO
+ NO
+ IBCocoaTouchFramework
+ 0
+ 0
+
+ 3
+ MQA
+
+
+ 1
+ MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
+
+
+ 3
+ MC41AA
+
+
+ NSImage
+ mic_active.png
+
+
+ NSImage
+ micro_inverse.png
+
+
+ NSImage
+ micro.png
+
+
+ 2
+ 2
+
+
+ Helvetica-Bold
+ 18
+ 16
+
+
+
+
+ 292
+ {{213, 328}, {107, 66}}
+
+
+
+
+ NO
+ NO
+ IBCocoaTouchFramework
+ 0
+ 0
+
+
+ 1
+ MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA
+
+
+
+ NSImage
+ HP_inverse.png
+
+
+ NSImage
+ HP.png
+
+
+
+
+
+
+ 292
+ {{0, 394}, {320, 66}}
+
+
+
+
+ 1
+ MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA
+
+ NO
+ NO
+ IBCocoaTouchFramework
+ 0
+ 0
+
+
+ 1
+ MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA
+
+
+
+ NSImage
+ stopcall-red.png
+
+
+ NSImage
+ clavier-01-106px.png
+
+
+ Helvetica-Bold
+ Helvetica
+ 2
+ 15
+
+
+ Helvetica-Bold
+ 15
+ 16
+
+
+
+
+ 292
+ {{0, 328}, {107, 66}}
+
+
+
+ NO
+ IBCocoaTouchFramework
+ 0
+ 0
+
+
+ 1
+ MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
+
+
+
+ NSImage
+ effacer.png
+
+
+
+
+
+ {{0, 20}, {320, 460}}
+
+
+
+
+ 3
+ MC42NjY2NjY2NjY3AA
+
+
+ IBCocoaTouchFramework
+
+
+
+
+
+
+ back
+
+
+
+ 16
+
+
+
+ hangup
+
+
+
+ 17
+
+
+
+ mute
+
+
+
+ 18
+
+
+
+ speaker
+
+
+
+ 19
+
+
+
+ view
+
+
+
+ 20
+
+
+
+ table
+
+
+
+ 23
+
+
+
+ dataSource
+
+
+
+ 21
+
+
+
+ delegate
+
+
+
+ 22
+
+
+
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+ -1
+
+
+ File's Owner
+
+
+ -2
+
+
+
+
+ 7
+
+
+
+
+
+ 10
+
+
+ mute
+
+
+ 11
+
+
+ end
+
+
+ 12
+
+
+ speaker
+
+
+ 14
+
+
+ Erase
+
+
+
+
+ ConferenceCallDetailView
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ UIResponder
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ UIMuteButton
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+ UIHangUpButton
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ UISpeakerButton
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+ UIEraseButton
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+
+
+
+
+ 23
+
+
+
+
+ ConferenceCallDetailView
+ UIViewController
+
+ UIButton
+ UIButton
+ UITableViewCell
+ UIButton
+ UIButton
+ UIButton
+ UITableView
+
+
+
+ addCall
+ UIButton
+
+
+ back
+ UIButton
+
+
+ conferenceDetailCell
+ UITableViewCell
+
+
+ hangup
+ UIButton
+
+
+ mute
+ UIButton
+
+
+ speaker
+ UIButton
+
+
+ table
+ UITableView
+
+
+
+ IBProjectSource
+ ./Classes/ConferenceCallDetailView.h
+
+
+
+ UIEraseButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UIEraseButton.h
+
+
+
+ UIHangUpButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UIHangUpButton.h
+
+
+
+ UIMuteButton
+ UIToggleButton
+
+ IBProjectSource
+ ./Classes/UIMuteButton.h
+
+
+
+ UISpeakerButton
+ UIToggleButton
+
+ IBProjectSource
+ ./Classes/UISpeakerButton.h
+
+
+
+ UIToggleButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UIToggleButton.h
+
+
+
+
+ 0
+ IBCocoaTouchFramework
+ YES
+ 3
+
+ {107, 67}
+ {107, 67}
+ {106, 60}
+ {66, 65}
+ {20, 20}
+ {107, 67}
+ {107, 67}
+ {62, 54}
+
+ 933
+
+
diff --git a/Classes/IncallViewController.h b/Classes/IncallViewController.h
index 36a7f91c6..55fc0d57f 100644
--- a/Classes/IncallViewController.h
+++ b/Classes/IncallViewController.h
@@ -19,6 +19,7 @@
#import
#import "linphonecore.h"
#import "PhoneViewController.h"
+#import "ConferenceCallDetailView.h"
#import
#include "UILinphone.h"
@class VideoViewController;
@@ -69,6 +70,7 @@
UITableViewCell* activeCallCell;
VideoViewController* mVideoViewController;
+ ConferenceCallDetailView* conferenceDetail;
BOOL mVideoShown;
BOOL mVideoIsPending;
BOOL mIncallViewIsReady;
@@ -78,11 +80,14 @@
- (IBAction)doAction:(id)sender;
++(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf;
++ (void) updateCellImageView:(UIImageView*)imageView Label:(UILabel*)label DetailLabel:(UILabel*)detailLabel AndAccessoryView:(UIImageView*)accessoryView withCall:(LinphoneCall*) call;
@property (nonatomic, retain) IBOutlet UIView* controlSubView;
@property (nonatomic, retain) IBOutlet UIView* callControlSubView;
@property (nonatomic, retain) IBOutlet UIView* padSubView;
@property (nonatomic, retain) IBOutlet UIView* hangUpView;
+@property (nonatomic, retain) IBOutlet UIViewController* conferenceDetail;
@property (nonatomic, retain) IBOutlet UIButton* endCtrl;
diff --git a/Classes/IncallViewController.m b/Classes/IncallViewController.m
index 008a05010..5675b9c13 100644
--- a/Classes/IncallViewController.m
+++ b/Classes/IncallViewController.m
@@ -30,6 +30,7 @@
@synthesize callControlSubView;
@synthesize padSubView;
@synthesize hangUpView;
+@synthesize conferenceDetail;
@synthesize addToConf;
@synthesize endCtrl;
@@ -118,7 +119,11 @@ int callCount(LinphoneCore* lc) {
[mergeCalls setHidden:YES];
mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
bundle:[NSBundle mainBundle]];
- mVideoShown=FALSE;
+
+ conferenceDetail = [[ConferenceCallDetailView alloc] initWithNibName:@"ConferenceCallDetailView"
+ bundle:[NSBundle mainBundle]];
+
+ mVideoShown=FALSE;
mIncallViewIsReady=FALSE;
mVideoIsPending=FALSE;
//selectedCall = nil;
@@ -359,6 +364,14 @@ int callCount(LinphoneCore* lc) {
}
}
[mergeCalls setHidden:!pause.hidden];
+
+ // update conference details view if diaplsyed
+ if (self.presentedViewController == conferenceDetail) {
+ if (!linphone_core_is_in_conference(lc))
+ [self dismissModalViewControllerAnimated:YES];
+ else
+ [conferenceDetail.table reloadData];
+ }
}
- (IBAction)doAction:(id)sender {
@@ -404,7 +417,7 @@ int callCount(LinphoneCore* lc) {
[super dealloc];
}
--(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf{
++(LinphoneCall*) retrieveCallAtIndex: (NSInteger) index inConference:(bool) conf{
const MSList* calls = linphone_core_get_calls([LinphoneManager getLc]);
if (!conf && linphone_core_get_conference_size([LinphoneManager getLc]))
@@ -442,8 +455,6 @@ int callCount(LinphoneCore* lc) {
}
[cell.textLabel setBackgroundColor:[UIColor clearColor]];
[cell.detailTextLabel setBackgroundColor:[UIColor clearColor]];
- //[cell.accessoryView setHidden:YES];
- //[cell.backgroundView setBackgroundColor:cell.backgroundColor];
}
-(void) updateGlow {
@@ -460,13 +471,12 @@ int callCount(LinphoneCore* lc) {
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
[self updateActive:(cell == activeCallCell) cell:cell];
- //cell.accessoryType = UITableViewCellAccessoryNone;
}
-- (void) updateCell:(UITableViewCell*)cell at:(NSIndexPath*) path withCall:(LinphoneCall*) call conferenceActive:(bool)confActive{
++ (void) updateCellImageView:(UIImageView*)imageView Label:(UILabel*)label DetailLabel:(UILabel*)detailLabel AndAccessoryView:(UIImageView*)accessoryView withCall:(LinphoneCall*) call {
if (call == NULL) {
ms_warning("UpdateCell called with null call");
- [cell.textLabel setText:@""];
+ [label setText:@""];
return;
}
const LinphoneAddress* addr = linphone_call_get_remote_address(call);
@@ -480,66 +490,47 @@ int callCount(LinphoneCore* lc) {
else
[mss appendFormat:@"%s", linphone_address_get_username(addr), nil];
- if ([mss compare:cell.textLabel.text] != 0 || cell.imageView.image == nil) {
- [cell.textLabel setText:mss];
+ if ([mss compare:label.text] != 0 || imageView.image == nil) {
+ [label setText:mss];
- cell.imageView.image = [[LinphoneManager instance] getImageFromAddressBook:[NSString stringWithCString:linphone_address_get_username(addr) encoding: [NSString defaultCStringEncoding]]];
+ imageView.image = [[LinphoneManager instance] getImageFromAddressBook:[NSString stringWithCString:linphone_address_get_username(addr) encoding: [NSString defaultCStringEncoding]]];
}
} else {
- [cell.textLabel setText:@"plop"];
- cell.imageView.image = nil;
+ [label setText:@"plop"];
+ imageView.image = nil;
}
- NSMutableString* ms = [[NSMutableString alloc] init ];
- if (linphone_call_get_state(call) == LinphoneCallStreamsRunning) {
- int duration = linphone_call_get_duration(call);
- if (duration >= 60)
- [ms appendFormat:@"%02i:%02i", (duration/60), duration - 60*(duration/60), nil];
- else
- [ms appendFormat:@"%02i sec", duration, nil];
- } else {
- switch (linphone_call_get_state(call)) {
- case LinphoneCallPaused:
- [ms appendFormat:@"%@", NSLocalizedString(@"Paused", nil), nil];
- break;
- case LinphoneCallOutgoingProgress:
- [ms appendFormat:@"%@...", NSLocalizedString(@"In progress", nil), nil];
- break;
- default:
- break;
+ if (detailLabel != nil) {
+ NSMutableString* ms = [[NSMutableString alloc] init ];
+ if (linphone_call_get_state(call) == LinphoneCallStreamsRunning) {
+ int duration = linphone_call_get_duration(call);
+ if (duration >= 60)
+ [ms appendFormat:@"%02i:%02i", (duration/60), duration - 60*(duration/60), nil];
+ else
+ [ms appendFormat:@"%02i sec", duration, nil];
+ } else {
+ switch (linphone_call_get_state(call)) {
+ case LinphoneCallPaused:
+ [ms appendFormat:@"%@", NSLocalizedString(@"Paused", nil), nil];
+ break;
+ case LinphoneCallOutgoingProgress:
+ [ms appendFormat:@"%@...", NSLocalizedString(@"In progress", nil), nil];
+ break;
+ default:
+ break;
+ }
}
+ [detailLabel setText:ms];
}
- [cell.detailTextLabel setText:ms];
-
- /*
- if (linphone_core_get_current_call([LinphoneManager getLc]) == call) {
- cell.backgroundColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:1];
- } else if (confActive && isInConference(call)) {
- cell.backgroundColor = [UIColor colorWithRed:0 green:0 blue:1 alpha:1];
- } else{
- cell.backgroundColor = [UIColor colorWithRed:1 green:0.5 blue:0 alpha:1];
- }*/
- UIImageView* uiiv = ((UIImageView*)cell.accessoryView);
- if (linphone_call_params_get_media_encryption(linphone_call_get_current_params(call)) !=
- LinphoneMediaEncryptionNone) {
- if (uiiv.image == nil)
- uiiv.image = [UIImage imageNamed:@"secured.png"];
- } else {
- uiiv = nil;
- }
-
- return;
-
-
- LinphoneCall* selectedCall = linphone_core_get_current_call([LinphoneManager getLc]);
- if (call == selectedCall) {
- [cell setSelected:YES animated:NO];
- [callTableView selectRowAtIndexPath:path animated:NO scrollPosition:UITableViewScrollPositionNone];
- cell.accessoryType = UITableViewCellAccessoryCheckmark;
- }else{
- [cell setSelected:NO animated:NO];
- [callTableView deselectRowAtIndexPath:path animated:NO];
- cell.accessoryType = UITableViewCellAccessoryNone;
+
+ if (accessoryView != nil) {
+ if (linphone_call_params_get_media_encryption(linphone_call_get_current_params(call)) !=
+ LinphoneMediaEncryptionNone) {
+ if (accessoryView.image == nil)
+ accessoryView.image = [UIImage imageNamed:@"secured.png"];
+ } else {
+ accessoryView.image = nil;
+ }
}
}
@@ -549,11 +540,9 @@ int callCount(LinphoneCore* lc) {
LinphoneCore* lc = [LinphoneManager getLc];
- cell.accessoryType = UITableViewCellAccessoryNone;
[self updateActive:NO cell:cell];
cell.selected = NO;
- ((UIImageView*)cell.accessoryView).image = nil;
[callTableView deselectRowAtIndexPath:indexPath animated:NO];
NSMutableString* ms = [[NSMutableString alloc] init ];
@@ -576,7 +565,6 @@ int callCount(LinphoneCore* lc) {
if (call == selectedCall) {
[callTableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
cell.selected = YES;
- cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
isFirst = false;
@@ -592,6 +580,12 @@ int callCount(LinphoneCore* lc) {
cell.backgroundColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];*/
}
+-(void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
+{
+ // show conference detail view
+ [self presentModalViewController:conferenceDetail animated:true];
+
+}
// UITableViewDataSource (required)
- (UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -602,21 +596,28 @@ int callCount(LinphoneCore* lc) {
cell.textLabel.font = [UIFont systemFontOfSize:40];
cell.textLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight;
- cell.accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 28, 28)];
}
- ((UIImageView*)cell.accessoryView).image = nil;
+ if (cell.accessoryView != nil)
+ ((UIImageView*)cell.accessoryView).image = nil;
LinphoneCore* lc = [LinphoneManager getLc];
if (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0) {
[self updateConferenceCell:cell at:indexPath];
if (linphone_core_is_in_conference(lc))
activeCallCell = cell;
+ cell.accessoryView = nil;
+ if (linphone_core_is_in_conference(lc))
+ cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
+ else
+ cell.accessoryType = UITableViewCellAccessoryNone;
} else {
- LinphoneCall* call = [self retrieveCallAtIndex:indexPath.row inConference:NO];
- [self updateCell:cell at:indexPath withCall: call
- conferenceActive:linphone_core_is_in_conference(lc)];
+ LinphoneCall* call = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:NO];
+ [IncallViewController updateCellImageView:cell.imageView Label:cell.textLabel DetailLabel:cell.detailTextLabel AndAccessoryView:(UIImageView*)cell.accessoryView withCall:call];
if (linphone_core_get_current_call(lc) == call)
activeCallCell = cell;
+ cell.accessoryType = UITableViewCellAccessoryNone;
+ if (cell.accessoryView == nil)
+ cell.accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 28, 28)];
}
cell.userInteractionEnabled = YES;
@@ -692,7 +693,7 @@ int callCount(LinphoneCore* lc) {
bool inConf = (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0);
- LinphoneCall* selectedCall = [self retrieveCallAtIndex:indexPath.row inConference:inConf];
+ LinphoneCall* selectedCall = [IncallViewController retrieveCallAtIndex:indexPath.row inConference:inConf];
if (inConf) {
if (linphone_core_is_in_conference(lc))
diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj
index 13b0bf947..18d84e353 100755
--- a/linphone.xcodeproj/project.pbxproj
+++ b/linphone.xcodeproj/project.pbxproj
@@ -223,6 +223,12 @@
22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; };
22F51EF6107FA66500F98953 /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
+ 344ABD72147FC438007420B6 /* ConferenceCallDetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 344ABD71147FC438007420B6 /* ConferenceCallDetailView.xib */; };
+ 344ABD73147FC438007420B6 /* ConferenceCallDetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 344ABD71147FC438007420B6 /* ConferenceCallDetailView.xib */; };
+ 344ABD77147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 344ABD76147FCB68007420B6 /* ConferenceCallDetailView.m */; };
+ 344ABD78147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 344ABD76147FCB68007420B6 /* ConferenceCallDetailView.m */; };
+ 344ABD7A147FD32B007420B6 /* ConferenceCallDetailCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 344ABD79147FD32B007420B6 /* ConferenceCallDetailCell.xib */; };
+ 344ABD7B147FD32B007420B6 /* ConferenceCallDetailCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 344ABD79147FD32B007420B6 /* ConferenceCallDetailCell.xib */; };
34957F3F147D3FBF00DD7A09 /* secured.png in Resources */ = {isa = PBXBuildFile; fileRef = 34957F3E147D3FBF00DD7A09 /* secured.png */; };
34F2F678147D2E1C00A2D5E3 /* contact_vide.png in Resources */ = {isa = PBXBuildFile; fileRef = 34F2F677147D2E1C00A2D5E3 /* contact_vide.png */; };
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
@@ -575,6 +581,10 @@
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = ""; };
+ 344ABD71147FC438007420B6 /* ConferenceCallDetailView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConferenceCallDetailView.xib; sourceTree = ""; };
+ 344ABD75147FCB68007420B6 /* ConferenceCallDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConferenceCallDetailView.h; sourceTree = ""; };
+ 344ABD76147FCB68007420B6 /* ConferenceCallDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConferenceCallDetailView.m; sourceTree = ""; };
+ 344ABD79147FD32B007420B6 /* ConferenceCallDetailCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConferenceCallDetailCell.xib; sourceTree = ""; };
34957F3E147D3FBF00DD7A09 /* secured.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = secured.png; path = Resources/secured.png; sourceTree = ""; };
34F2F677147D2E1C00A2D5E3 /* contact_vide.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_vide.png; path = Resources/contact_vide.png; sourceTree = ""; };
70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = ""; };
@@ -712,6 +722,10 @@
22E028B413B4CCBD0068A713 /* VideoViewController.h */,
22E028B513B4CCBD0068A713 /* VideoViewController.m */,
22E028B613B4CCBD0068A713 /* VideoViewController.xib */,
+ 344ABD71147FC438007420B6 /* ConferenceCallDetailView.xib */,
+ 344ABD75147FCB68007420B6 /* ConferenceCallDetailView.h */,
+ 344ABD76147FCB68007420B6 /* ConferenceCallDetailView.m */,
+ 344ABD79147FD32B007420B6 /* ConferenceCallDetailCell.xib */,
);
path = Classes;
sourceTree = "";
@@ -1278,6 +1292,8 @@
2211DBE91476BE7300DEE054 /* pause.png in Resources */,
34F2F678147D2E1C00A2D5E3 /* contact_vide.png in Resources */,
34957F3F147D3FBF00DD7A09 /* secured.png in Resources */,
+ 344ABD72147FC438007420B6 /* ConferenceCallDetailView.xib in Resources */,
+ 344ABD7A147FD32B007420B6 /* ConferenceCallDetailCell.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1332,6 +1348,8 @@
2211DBE61476BE7300DEE054 /* micro.png in Resources */,
2211DBE81476BE7300DEE054 /* pause_inactif.png in Resources */,
2211DBEA1476BE7300DEE054 /* pause.png in Resources */,
+ 344ABD73147FC438007420B6 /* ConferenceCallDetailView.xib in Resources */,
+ 344ABD7B147FD32B007420B6 /* ConferenceCallDetailCell.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1367,6 +1385,7 @@
2211DBBE14769C8300DEE054 /* CallDelegate.m in Sources */,
2211DBC014769CB200DEE054 /* IncallViewController.m in Sources */,
22D817AD147A9F33001CFB9C /* UIAddVideoButton.m in Sources */,
+ 344ABD77147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1399,6 +1418,7 @@
2211DBBF14769C8300DEE054 /* CallDelegate.m in Sources */,
2211DBC114769CB300DEE054 /* IncallViewController.m in Sources */,
22D817AE147A9F33001CFB9C /* UIAddVideoButton.m in Sources */,
+ 344ABD78147FCB68007420B6 /* ConferenceCallDetailView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};